version 1.6 | | version 1.7 |
---|
| | |
* Definitions for graphics lib. | | * Definitions for graphics lib. |
* | | * |
* $Log$ | | * $Log$ |
| | * Revision 1.7 1999/09/30 23:02:27 donut |
| | * opengl direct support for ingame and normal menus, fonts as textures, and automap support |
| | * |
* Revision 1.6 1999/09/24 05:47:01 donut | | * Revision 1.6 1999/09/24 05:47:01 donut |
* added sizing (and padding) of ogl textures up to next multiple of 2, so they don't get mangled | | * added sizing (and padding) of ogl textures up to next multiple of 2, so they don't get mangled |
* | | * |
| | |
fix x,y; | | fix x,y; |
} grs_point; | | } grs_point; |
| | |
| | //old font structure, could not add new items to it without screwing up gr_init_font |
typedef struct _grs_font { | | typedef struct _grs_font { |
short ft_w,ft_h; // Width and height in pixels | | short ft_w,ft_h; // Width and height in pixels |
short ft_flags; // Proportional? | | short ft_flags; // Proportional? |
| | |
ubyte ** ft_chars; // Ptrs to data for each char (required for prop font) | | ubyte ** ft_chars; // Ptrs to data for each char (required for prop font) |
short * ft_widths; // Array of widths (required for prop font) | | short * ft_widths; // Array of widths (required for prop font) |
ubyte * ft_kerndata; // Array of kerning triplet data | | ubyte * ft_kerndata; // Array of kerning triplet data |
} grs_font; | | } |
| | old_grs_font; |
| | |
#define BM_LINEAR 0 | | #define BM_LINEAR 0 |
| | |
| | |
#endif | | #endif |
} grs_bitmap; | | } grs_bitmap; |
| | |
| | //new font structure, which does not suffer from the inability to add new items (as long as they are added at the end) |
| | typedef struct _new_grs_font { |
| | short ft_w,ft_h; // Width and height in pixels |
| | short ft_flags; // Proportional? |
| | short ft_baseline; // |
| | ubyte ft_minchar, // The first and last chars defined by |
| | ft_maxchar; // This font |
| | short ft_bytewidth; // Width in unsigned chars |
| | ubyte * ft_data; // Ptr to raw data. |
| | ubyte ** ft_chars; // Ptrs to data for each char (required for prop font) |
| | short * ft_widths; // Array of widths (required for prop font) |
| | ubyte * ft_kerndata; // Array of kerning triplet data |
| | old_grs_font *oldfont; |
| | #ifdef OGL |
| | grs_bitmap * ft_bitmaps; |
| | #endif |
| | } grs_font; |
| | |
typedef struct _grs_canvas { | | typedef struct _grs_canvas { |
grs_bitmap cv_bitmap; // the bitmap for this canvas | | grs_bitmap cv_bitmap; // the bitmap for this canvas |
short cv_color; // current color | | short cv_color; // current color |
| | |
#ifdef D1XD3D | | #ifdef D1XD3D |
#define BM_DIRECTX 1 | | #define BM_DIRECTX 1 |
#else | | #else |
| | #ifdef __MSDOS__ |
#define BM_MODEX 1 | | #define BM_MODEX 1 |
#define BM_SVGA 2 | | #define BM_SVGA 2 |
#endif | | #endif |
| | #endif |
#define BM_RGB15 3 //5 bits each r,g,b stored at 16 bits | | #define BM_RGB15 3 //5 bits each r,g,b stored at 16 bits |
#define BM_SVGA15 4 | | #define BM_SVGA15 4 |
| | |
| | #ifdef OGL |
| | #define BM_OGL 5 |
| | #include "ogl_init.h" |
| | #endif |
| | |
////========================================================================= | | ////========================================================================= |
// System functions: | | // System functions: |