FONT.H (4510B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /*************************************************************************** 17 ** 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 ** 18 *************************************************************************** 19 * * 20 * Project Name : Font and text print 32 bit library * 21 * * 22 * File Name : FONT.H * 23 * * 24 * Programmer : Scott K. Bowen * 25 * * 26 * Start Date : June 27, 1994 * 27 * * 28 * Last Update : June 29, 1994 [SKB] * 29 * * 30 *-------------------------------------------------------------------------* 31 * Functions: * 32 * VVPC::Text_Print -- Text print into a virtual viewport. * 33 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 34 35 #ifndef FONT_H 36 #define FONT_H 37 38 #ifndef GBUFFER_H 39 #include <gbuffer.h> 40 #endif 41 42 43 //////////////////////////////////////// Defines ////////////////////////////////////////// 44 45 // defines for font header, offsets to block offsets 46 47 #define FONTINFOBLOCK 4 48 #define FONTOFFSETBLOCK 6 49 #define FONTWIDTHBLOCK 8 50 #define FONTDATABLOCK 10 51 #define FONTHEIGHTBLOCK 12 52 53 // defines for font info block 54 55 #define FONTINFOMAXHEIGHT 4 56 #define FONTINFOMAXWIDTH 5 57 58 //////////////////////////////////////// Prototypes ////////////////////////////////////////// 59 60 /*=========================================================================*/ 61 /* The following prototypes are for the file: SET_FONT.CPP */ 62 /*=========================================================================*/ 63 64 void * __cdecl Set_Font(void const *fontptr); 65 66 /*=========================================================================*/ 67 /* The following prototypes are for the file: FONT.CPP */ 68 /*=========================================================================*/ 69 70 int __cdecl Char_Pixel_Width(char chr); 71 unsigned int __cdecl String_Pixel_Width(char const *string); 72 void __cdecl Get_Next_Text_Print_XY(GraphicViewPortClass& vp, unsigned long offset, INT *x, INT *y); 73 74 /*=========================================================================*/ 75 /* The following prototypes are for the file: LOADFONT.CPP */ 76 /*=========================================================================*/ 77 78 void * __cdecl Load_Font(char const *name); 79 80 /*=========================================================================*/ 81 /* The following prototypes are for the file: TEXTPRNT.ASM */ 82 /*=========================================================================*/ 83 84 #ifdef __cplusplus 85 extern "C" { 86 #endif 87 88 89 void __cdecl Set_Font_Palette_Range(void const *palette, INT start_idx, INT end_idx); 90 91 92 #ifdef __cplusplus 93 } 94 #endif 95 96 /*=========================================================================*/ 97 98 99 100 101 102 //////////////////////////////////////// External varables /////////////////////////////////////// 103 extern "C" int FontXSpacing; 104 extern "C" int FontYSpacing; 105 extern char FontWidth ; 106 extern char FontHeight; 107 extern char *FontWidthBlockPtr; 108 109 110 extern "C" void const *FontPtr; 111 112 113 114 115 #endif // FONT_H