Commit Graph

4 Commits (9c9a0d8c28b84a72768813030039a2bfa81b10ac)

Author SHA1 Message Date
Daniel Richard G dd168ad22c Use C99 integer types and C++ boolean types/values
This change comprehensively replaces the use of Microsoft-standard integer
and boolean types with their C99/C++ standard equivalents, as the latter is
more appropriate for a cross-platform application. With matter-of-course
exceptions in the Win32-specific code, the types/values have been converted
as follows:

    QWORD  --> uint64_t
    SQWORD --> int64_t
    DWORD  --> uint32_t
    SDWORD --> int32_t
    WORD   --> uint16_t
    SWORD  --> int16_t
    BYTE   --> uint8_t
    BOOL   --> bool
    TRUE   --> true
    FALSE  --> false

The following related changes are also included:

* Added C99 integer type definitions for Windows, as stdint.h is not
  available prior to Visual Studio 2010

* Changed types of some variables in the SolveSpace class from 'int' to
  'bool', as they actually represent boolean settings

* Implemented new Cnf{Freeze,Thaw}Bool() functions to support boolean
  variables in the Registry

* Cnf{Freeze,Thaw}DWORD() are now Cnf{Freeze,Thaw}Int()

* TtfFont::Get{WORD,DWORD}() are now TtfFont::Get{USHORT,ULONG}() (names
  inspired by the OpenType spec)

* RGB colors are packed into an integer of type uint32_t (nee DWORD), but
  in a few places, these were represented by an int; these have been
  corrected to uint32_t
2013-10-02 01:45:13 -04:00
Daniel Richard G 718d411699 Renamed *.table files to *.table.h
The *.table files are in fact C header files, and with an *.h extension,
tools will be able to recognize them as such
2013-09-16 17:14:53 -04:00
Jonathan Westhues 2dbb21aecd Add special characters to font, to represent checkboxes and radio
buttons. This requires some tools to convert .png images to that,
and that I put the characters in a two-dimensional grid in the
texture (since one-dimensional strip gets wider than the hardware
supports).

[git-p4: depot-paths = "//depot/solvespace/": change = 2138]
2010-05-08 17:20:02 -08:00
Jonathan Westhues c4b442f92f Initial work to move text window guts into platform-independent
code. This is now drawn using gl, and the bitmap font (both there
and in the graphics window) is drawn from a texture from a static
table, not from the Win32 functions, since that's ~1000x faster.

So this adds a tool to generate that table. With luck that will
also fix my font issues under WINE, which won't have to render the
TTF itself.

Still needs some cleanup, and to make all the cosmetic improvements
that I want.

[git-p4: depot-paths = "//depot/solvespace/": change = 2130]
2010-04-25 23:52:49 -08:00