FONT.H 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef VQMFONT_H
  19. #define VQMFONT_H
  20. /****************************************************************************
  21. *
  22. * C O N F I D E N T I A L -- W E S T W O O D S T U D I O S
  23. *
  24. *---------------------------------------------------------------------------
  25. *
  26. * FILE
  27. * font.h
  28. *
  29. * DESCRIPTION
  30. * Font definitions.
  31. *
  32. * PROGRAMMER
  33. * Denzil E. Long, Jr.
  34. *
  35. * DATE
  36. * March 9, 1995
  37. *
  38. ****************************************************************************/
  39. /* Font: A Westwood style font.
  40. *
  41. * Size - Size of font.
  42. * CompMethod - Compression method of font. (0 = none)
  43. * NumBlks - Number of data blocks.
  44. * InfoBlk - Offset to font information block.
  45. * OffsetBlk - Offset to character offset block.
  46. * WidthBlk - Offset to character width block.
  47. * DataBlk - Offset to character data block.
  48. * HeightBlk - Offset to character height block.
  49. */
  50. typedef struct _Font {
  51. unsigned short Size;
  52. unsigned char CompMethod;
  53. unsigned char NumBlks;
  54. unsigned short InfoBlk;
  55. unsigned short OffsetBlk;
  56. unsigned short WidthBlk;
  57. unsigned short DataBlk;
  58. unsigned short HeightBlk;
  59. } Font;
  60. typedef struct _FontInfo {
  61. long huh;
  62. unsigned char MaxHeight;
  63. unsigned char MaxWidth;
  64. } FontInfo;
  65. #ifdef __cplusplus
  66. extern "C" {
  67. #endif
  68. extern void const *FontPtr;
  69. extern int FontXSpacing;
  70. extern int FontYSpacing;
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. extern char FontWidth;
  75. extern char FontHeight;
  76. extern char *FontWidthBlockPtr;
  77. /* Function prototypes. */
  78. void *cdecl Load_Font(char const *name);
  79. void *cdecl Set_Font(void const *font);
  80. unsigned short cdecl String_Pixel_Width(char const *string);
  81. #ifdef __cplusplus
  82. extern "C" {
  83. #endif
  84. #ifdef __WATCOMC__
  85. long cdecl __saveregs Char_Pixel_Width(char chr);
  86. #else
  87. long cdecl Char_Pixel_Width(char chr);
  88. #endif
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif /* VQMFONT_H */