annotate GUIFont.h @ 1237:8ee5f1554b64

Слияние
author Ritor1
date Sun, 09 Jun 2013 21:48:48 +0600
parents 8b3e7d5ba069
children 7e5e328454c7
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 */
Ritor1
parents:
diff changeset
15 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
16 struct GUIFont
Ritor1
parents:
diff changeset
17 {
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
18
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
19 //----- (0044C4DE) --------------------------------------------------------
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
20 bool IsCharValid(unsigned char c) { return (c >= cFirstChar) && (c <= cLastChar) || (c == '\f') || (c == '\r') || (c == '\t') || (c == '\n');}
0
Ritor1
parents:
diff changeset
21 int AlignText_Center(unsigned int uCenterX, const char *pString);
Ritor1
parents:
diff changeset
22 int GetLineWidth(const char *pString);
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
23 int CalcTextHeight(const char *pString, struct GUIWindow *pWindow, int uXOffset, int a5);
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
24 int GetStringHeight2(GUIFont *secondFont, const char *text_str, GUIWindow* pWindow, int startX, int a6);
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
25 char* _44C6C2(const char *pInString, GUIWindow *pWindow, unsigned int uX, int a5);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
26 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
27 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
28 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
29 unsigned __int16 firstColor, unsigned __int16 secondColor, const char *pString,
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
30 unsigned __int16 *pPixels, unsigned int uPixelsWidth);
0
Ritor1
parents:
diff changeset
31
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1160
diff changeset
32 static char * FitTwoFontStringINWindow(const char *pString, GUIFont *pFontMain, GUIFont *pFontSecond, GUIWindow* pWindow, int startPixlOff, int a6);
0
Ritor1
parents:
diff changeset
33
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
34 unsigned char cFirstChar; //0
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
35 unsigned char cLastChar; //1
0
Ritor1
parents:
diff changeset
36 char field_2;
Ritor1
parents:
diff changeset
37 char field_3;
Ritor1
parents:
diff changeset
38 char field_4;
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
39 __int16 uFontHeight; //5-6
0
Ritor1
parents:
diff changeset
40 char field_7;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
41 int palletes_count;
0
Ritor1
parents:
diff changeset
42 unsigned __int16 *pFontPalettes[5];
Ritor1
parents:
diff changeset
43 GUICharMetric pMetrics[256];
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
44 int font_pixels_offset[256];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
45 unsigned char pFontData[0]; //array of font pixels
0
Ritor1
parents:
diff changeset
46 };
Ritor1
parents:
diff changeset
47 #pragma pack(pop)
Ritor1
parents:
diff changeset
48
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
49 GUIFont *LoadFont(const char *pFontFile, const char *pFontPalette, ...);
688
c0bfb386b15f some ui cleanup
Gloval
parents: 189
diff changeset
50 char * FitTextInAWindow(const char *pInString, GUIFont *pFont, GUIWindow *pWindow, signed int uX, int a5);
0
Ritor1
parents:
diff changeset
51
175
304d7afce43f Обращённый набор изменений: 941eb1cc5846
Ritor1
parents: 171
diff changeset
52
0
Ritor1
parents:
diff changeset
53 extern struct GUIFont *pAutonoteFont;
Ritor1
parents:
diff changeset
54 extern struct GUIFont *pSpellFont;
Ritor1
parents:
diff changeset
55 extern struct GUIFont *pFontArrus;
Ritor1
parents:
diff changeset
56 extern struct GUIFont *pFontLucida;
Ritor1
parents:
diff changeset
57 extern struct GUIFont *pBook2Font;
Ritor1
parents:
diff changeset
58 extern struct GUIFont *pBookFont;
Ritor1
parents:
diff changeset
59 extern struct GUIFont *pFontCreate;
Ritor1
parents:
diff changeset
60 extern struct GUIFont *pFontCChar;
Ritor1
parents:
diff changeset
61 extern struct GUIFont *pFontComic;
Ritor1
parents:
diff changeset
62 extern struct GUIFont *pFontSmallnum;