annotate GUIFont.h @ 1595:a52a01aaf439

Player::GetBaseResistance cleanup, setting default parameter to Player::GetItemsBonus
author Grumpy7
date Tue, 10 Sep 2013 03:25:15 +0200
parents dfc9484ed94c
children 63e1388c5463
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4 /* 171 */
Ritor1
parents:
diff changeset
5 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
6 struct GUICharMetric
Ritor1
parents:
diff changeset
7 {
Ritor1
parents:
diff changeset
8 unsigned int uLeftSpacing;
Ritor1
parents:
diff changeset
9 unsigned int uWidth;
Ritor1
parents:
diff changeset
10 unsigned int uRightSpacing;
Ritor1
parents:
diff changeset
11 };
Ritor1
parents:
diff changeset
12 #pragma pack(pop)
Ritor1
parents:
diff changeset
13
Ritor1
parents:
diff changeset
14 /* 170 */
1255
7e5e328454c7 zero size array warning in guifont silenced
Grumpy7
parents: 1168
diff changeset
15 #pragma warning( push )
7e5e328454c7 zero size array warning in guifont silenced
Grumpy7
parents: 1168
diff changeset
16 #pragma warning( disable : 4200 )
0
Ritor1
parents:
diff changeset
17 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
18 struct GUIFont
Ritor1
parents:
diff changeset
19 {
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
20
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
21 //----- (0044C4DE) --------------------------------------------------------
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
22 bool IsCharValid(unsigned char c) { return (c >= cFirstChar) && (c <= cLastChar) || (c == '\f') || (c == '\r') || (c == '\t') || (c == '\n');}
0
Ritor1
parents:
diff changeset
23 int AlignText_Center(unsigned int uCenterX, const char *pString);
Ritor1
parents:
diff changeset
24 int GetLineWidth(const char *pString);
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
25 int CalcTextHeight(const char *pString, struct GUIWindow *pWindow, int uXOffset, int a5);
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
26 int GetStringHeight2(GUIFont *secondFont, const char *text_str, GUIWindow* pWindow, int startX, int a6);
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1255
diff changeset
27 char* GetPageTop(const char *pInString, GUIWindow *pWindow, unsigned int uX, int a5);
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
28 void DrawTextLineToBuff(int uColor, int a3, unsigned short* uX_buff_pos, const char *text, int line_width);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
29 void DrawTextLine(unsigned int uDefaultColor, signed int uX, signed int uY, const char *text, int max_len_pix);
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
30 void _44D2FD_prolly_draw_credits_entry(GUIFont *pSecondFont, int uFrameX, int uFrameY, unsigned int w, unsigned int h,
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
31 unsigned __int16 firstColor, unsigned __int16 secondColor, const char *pString,
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
32 unsigned __int16 *pPixels, unsigned int uPixelsWidth);
0
Ritor1
parents:
diff changeset
33
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
34 static char * FitTwoFontStringINWindow(const char *pString, GUIFont *pFontMain, GUIFont *pFontSecond, GUIWindow* pWindow, int startPixlOff, int a6);
0
Ritor1
parents:
diff changeset
35
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
36 unsigned char cFirstChar; //0
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
37 unsigned char cLastChar; //1
0
Ritor1
parents:
diff changeset
38 char field_2;
Ritor1
parents:
diff changeset
39 char field_3;
Ritor1
parents:
diff changeset
40 char field_4;
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
41 __int16 uFontHeight; //5-6
0
Ritor1
parents:
diff changeset
42 char field_7;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
43 int palletes_count;
0
Ritor1
parents:
diff changeset
44 unsigned __int16 *pFontPalettes[5];
Ritor1
parents:
diff changeset
45 GUICharMetric pMetrics[256];
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
46 int font_pixels_offset[256];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
47 unsigned char pFontData[0]; //array of font pixels
1255
7e5e328454c7 zero size array warning in guifont silenced
Grumpy7
parents: 1168
diff changeset
48
0
Ritor1
parents:
diff changeset
49 };
Ritor1
parents:
diff changeset
50 #pragma pack(pop)
1255
7e5e328454c7 zero size array warning in guifont silenced
Grumpy7
parents: 1168
diff changeset
51 #pragma warning( pop )
0
Ritor1
parents:
diff changeset
52
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
53 GUIFont *LoadFont(const char *pFontFile, const char *pFontPalette, ...);
688
c0bfb386b15f some ui cleanup
Gloval
parents: 189
diff changeset
54 char * FitTextInAWindow(const char *pInString, GUIFont *pFont, GUIWindow *pWindow, signed int uX, int a5);
0
Ritor1
parents:
diff changeset
55
175
304d7afce43f Обращённый набор изменений: 941eb1cc5846
Ritor1
parents: 171
diff changeset
56
0
Ritor1
parents:
diff changeset
57 extern struct GUIFont *pAutonoteFont;
Ritor1
parents:
diff changeset
58 extern struct GUIFont *pSpellFont;
Ritor1
parents:
diff changeset
59 extern struct GUIFont *pFontArrus;
Ritor1
parents:
diff changeset
60 extern struct GUIFont *pFontLucida;
Ritor1
parents:
diff changeset
61 extern struct GUIFont *pBook2Font;
Ritor1
parents:
diff changeset
62 extern struct GUIFont *pBookFont;
Ritor1
parents:
diff changeset
63 extern struct GUIFont *pFontCreate;
Ritor1
parents:
diff changeset
64 extern struct GUIFont *pFontCChar;
Ritor1
parents:
diff changeset
65 extern struct GUIFont *pFontComic;
Ritor1
parents:
diff changeset
66 extern struct GUIFont *pFontSmallnum;