2502
|
1 #pragma once
|
|
2
|
|
3
|
|
4 /* 171 */
|
|
5 #pragma pack(push, 1)
|
|
6 struct GUICharMetric
|
|
7 {
|
|
8 unsigned int uLeftSpacing;
|
|
9 unsigned int uWidth;
|
|
10 unsigned int uRightSpacing;
|
|
11 };
|
|
12 #pragma pack(pop)
|
|
13
|
|
14 /* 170 */
|
|
15 #pragma warning( push )
|
|
16 #pragma warning( disable : 4200 )
|
|
17 #pragma pack(push, 1)
|
|
18 struct GUIFont
|
|
19 {
|
|
20
|
|
21 //----- (0044C4DE) --------------------------------------------------------
|
|
22 bool IsCharValid(unsigned char c) { return (c >= cFirstChar) && (c <= cLastChar) || (c == '\f') || (c == '\r') || (c == '\t') || (c == '\n');}
|
|
23 int AlignText_Center(unsigned int uCenterX, const char *pString);
|
|
24 int GetLineWidth(const char *pString);
|
|
25 int CalcTextHeight(const char *pString, struct GUIWindow *pWindow, int uXOffset, int a5);
|
|
26 int GetStringHeight2(GUIFont *secondFont, const char *text_str, GUIWindow* pWindow, int startX, int a6);
|
|
27 char* GetPageTop(const char *pInString, GUIWindow *pWindow, unsigned int uX, int a5);
|
|
28 void DrawTextLineToBuff(int uColor, int a3, unsigned short* uX_buff_pos, const char *text, int line_width);
|
|
29 void DrawTextLine(unsigned int uDefaultColor, signed int uX, signed int uY, const char *text, int max_len_pix);
|
|
30 void _44D2FD_prolly_draw_credits_entry(GUIFont *pSecondFont, int uFrameX, int uFrameY, unsigned int w, unsigned int h,
|
|
31 unsigned __int16 firstColor, unsigned __int16 secondColor, const char *pString,
|
|
32 unsigned __int16 *pPixels, unsigned int uPixelsWidth);
|
|
33
|
|
34 static char * FitTwoFontStringINWindow(const char *pString, GUIFont *pFontMain, GUIFont *pFontSecond, GUIWindow* pWindow, int startPixlOff, int a6);
|
|
35 static void uGameUIFontMain_initialize();
|
|
36 static void uGameUIFontShadow_initialize();
|
|
37
|
|
38 unsigned char cFirstChar; //0
|
|
39 unsigned char cLastChar; //1
|
|
40 char field_2;
|
|
41 char field_3;
|
|
42 char field_4;
|
|
43 __int16 uFontHeight; //5-6
|
|
44 char field_7;
|
|
45 int palletes_count;
|
|
46 unsigned __int16 *pFontPalettes[5];
|
|
47 GUICharMetric pMetrics[256];
|
|
48 int font_pixels_offset[256];
|
|
49 unsigned char pFontData[0]; //array of font pixels
|
|
50
|
|
51 };
|
|
52 #pragma pack(pop)
|
|
53 #pragma warning( pop )
|
|
54
|
|
55 GUIFont *LoadFont(const char *pFontFile, const char *pFontPalette, ...);
|
2574
|
56 char * FitTextInAWindow(const char *pInString, GUIFont *pFont, struct GUIWindow *pWindow, signed int uX, int a5);
|
2502
|
57
|
|
58
|
|
59 extern struct GUIFont *pAutonoteFont;
|
|
60 extern struct GUIFont *pSpellFont;
|
|
61 extern struct GUIFont *pFontArrus;
|
|
62 extern struct GUIFont *pFontLucida;
|
|
63 extern struct GUIFont *pBook2Font;
|
|
64 extern struct GUIFont *pBookFont;
|
|
65 extern struct GUIFont *pFontCreate;
|
|
66 extern struct GUIFont *pFontCChar;
|
|
67 extern struct GUIFont *pFontComic;
|
|
68 extern struct GUIFont *pFontSmallnum; |