annotate GUIFont.cpp @ 1316:a2be48c661f6

Слияние
author Ritor1
date Tue, 25 Jun 2013 11:31:22 +0600
parents 5450af4f57ef
children dfc9484ed94c
rev   line source
1165
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1160
diff changeset
1 #ifdef _MSC_VER
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1160
diff changeset
2 #define _CRT_SECURE_NO_WARNINGS
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1160
diff changeset
3 #endif
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1160
diff changeset
4
0
Ritor1
parents:
diff changeset
5 #include <string>
200
1527f66fd81b Buffer overflow in credits window
Nomad
parents: 189
diff changeset
6 #include <assert.h>
1527f66fd81b Buffer overflow in credits window
Nomad
parents: 189
diff changeset
7
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
8 #include "LOD.h"
0
Ritor1
parents:
diff changeset
9 #include "GUIFont.h"
Ritor1
parents:
diff changeset
10 #include "GUIWindow.h"
Ritor1
parents:
diff changeset
11 #include "Render.h"
Ritor1
parents:
diff changeset
12
Ritor1
parents:
diff changeset
13 #include "mm7_data.h"
Ritor1
parents:
diff changeset
14
Ritor1
parents:
diff changeset
15
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
16 extern LODFile_IconsBitmaps *pIcons_LOD;
0
Ritor1
parents:
diff changeset
17
Ritor1
parents:
diff changeset
18
Ritor1
parents:
diff changeset
19 struct GUIFont *pAutonoteFont;
Ritor1
parents:
diff changeset
20 struct GUIFont *pSpellFont;
Ritor1
parents:
diff changeset
21 struct GUIFont *pFontArrus;
Ritor1
parents:
diff changeset
22 struct GUIFont *pFontLucida;
Ritor1
parents:
diff changeset
23 struct GUIFont *pBook2Font;
Ritor1
parents:
diff changeset
24 struct GUIFont *pBookFont;
Ritor1
parents:
diff changeset
25 struct GUIFont *pFontCreate;
Ritor1
parents:
diff changeset
26 struct GUIFont *pFontCChar;
Ritor1
parents:
diff changeset
27 struct GUIFont *pFontComic;
Ritor1
parents:
diff changeset
28 struct GUIFont *pFontSmallnum;
Ritor1
parents:
diff changeset
29
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
30 char temp_string[2048];
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
31
1205
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1168
diff changeset
32 std::array<char, 10000> pTmpBuf3;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
33
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
34 void DrawCharToBuff(unsigned short* uXpos,unsigned char* pCharPixels, int uCharWidth, int uCharHeight, unsigned __int16* pFontPalette, __int16 draw_color, int line_width);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
35
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
36
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
37 //----- (0044C448) --------------------------------------------------------
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
38 GUIFont *LoadFont(const char *pFontFile, const char *pFontPalette, ...)
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
39 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
40 int pallete_index; // eax@3
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
41 GUIFont *pFont;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
42 unsigned int palletes_count =0;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
43 va_list palettes_ptr;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
44
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
45 pFont = (GUIFont *)pIcons_LOD->LoadRaw(pFontFile, 0);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
46 va_start(palettes_ptr, pFontFile);
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
47
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
48 while (NULL!=(pFontPalette=va_arg(palettes_ptr, const char *)))
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
49 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
50 pallete_index =pIcons_LOD->LoadTexture(pFontPalette, TEXTURE_16BIT_PALETTE);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
51 if (pallete_index == -1)
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
52 {
1205
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1168
diff changeset
53 wsprintfA(pTmpBuf.data(), "Unable to open %s", pFontPalette);
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1168
diff changeset
54 Abortf(pTmpBuf.data());
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
55 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
56 pFont->pFontPalettes[palletes_count] = pIcons_LOD->pTextures[pallete_index].pPalette16;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
57 ++palletes_count;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
58 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
59 va_end(palettes_ptr);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
60 pFont->palletes_count = palletes_count;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
61 return pFont;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
62 }
0
Ritor1
parents:
diff changeset
63
Ritor1
parents:
diff changeset
64
Ritor1
parents:
diff changeset
65
Ritor1
parents:
diff changeset
66 //----- (0044D2FD) --------------------------------------------------------
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
67 void GUIFont::_44D2FD_prolly_draw_credits_entry( GUIFont *pSecondFont, int uFrameX, int uFrameY, unsigned int w, unsigned int h,
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
68 unsigned __int16 firstColor, unsigned __int16 secondColor, const char *pString,
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
69 unsigned __int16 *pPixels, unsigned int uPixelsWidth )
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
70 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
71 char *work_string; // eax@1
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
72 unsigned __int16 *curr_pixel_pos; // esi@1
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
73 GUIFont *currentFont; // edi@4
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
74 signed int start_str_pos; // ecx@4
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
75 signed int line_w; // eax@6
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
76 GUIWindow draw_window; // [sp+Ch] [bp-5Ch]@
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
77 int currentColor; // [sp+74h] [bp+Ch]@4
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
78 int half_frameX; // [sp+80h] [bp+18h]@2
0
Ritor1
parents:
diff changeset
79
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
80 draw_window.uFrameHeight = h;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
81 draw_window.uFrameW = uFrameY + h - 1;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
82 draw_window.uFrameWidth = w;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
83 draw_window.uFrameZ = uFrameX + w - 1;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
84 ui_current_text_color = firstColor;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
85 draw_window.uFrameX = uFrameX;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
86 draw_window.uFrameY = uFrameY;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
87
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
88 work_string = GUIFont::FitTwoFontStringINWindow(pString, this, pSecondFont, &draw_window, 0, 1);
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
89 work_string = strtok(work_string, "\n");
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
90 curr_pixel_pos = &pPixels[uPixelsWidth * uFrameY];
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
91 if ( work_string )
0
Ritor1
parents:
diff changeset
92 {
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
93 half_frameX = uFrameX >> 1;
0
Ritor1
parents:
diff changeset
94 while ( 1 )
Ritor1
parents:
diff changeset
95 {
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
96 currentFont = this;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
97 ui_current_text_color = firstColor;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
98 start_str_pos = 0;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
99 currentColor = firstColor;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
100 if ( *work_string == '_' )
0
Ritor1
parents:
diff changeset
101 {
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
102 currentFont = pSecondFont;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
103 currentColor = secondColor;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
104 ui_current_text_color = secondColor;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
105 start_str_pos = 1;
0
Ritor1
parents:
diff changeset
106 }
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
107 line_w = (signed int)(w - currentFont->GetLineWidth(&work_string[start_str_pos]))/2;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
108 if ( line_w < 0 )
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
109 line_w = 0;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
110 currentFont->DrawTextLineToBuff(currentColor, secondColor, &curr_pixel_pos[line_w + half_frameX], work_string, uPixelsWidth);
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
111 curr_pixel_pos += uPixelsWidth * (currentFont->uFontHeight - 3);
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
112 work_string = strtok(0, "\n");
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
113 if ( !work_string )
0
Ritor1
parents:
diff changeset
114 break;
Ritor1
parents:
diff changeset
115 }
Ritor1
parents:
diff changeset
116 }
Ritor1
parents:
diff changeset
117 }
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
118
0
Ritor1
parents:
diff changeset
119
Ritor1
parents:
diff changeset
120
Ritor1
parents:
diff changeset
121 //----- (0044D1E7) --------------------------------------------------------
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
122 void GUIFont::DrawTextLine( unsigned int uDefaultColor, signed int uX, signed int uY,
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
123 const char *text, int max_len_pix )
0
Ritor1
parents:
diff changeset
124 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
125 signed int uX_pos; // edi@3
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
126 unsigned char c; // cl@4
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
127 unsigned __int16 draw_color; // cx@12
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
128 unsigned __int8 *pCharPixels; // eax@12
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
129 char color_code[20]; // [sp+Ch] [bp-1Ch]@16
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
130 int text_length; // [sp+20h] [bp-8h]@2
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
131 int text_color; // [sp+24h] [bp-4h]@1
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
132 int uCharWidth; // [sp+30h] [bp+8h]@9
0
Ritor1
parents:
diff changeset
133
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
134 if ( !text )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
135 return;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
136 text_color = ui_current_text_color;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
137 text_length = strlen(text);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
138 uX_pos=uX;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
139 for (int i=0; i<text_length; ++i )
0
Ritor1
parents:
diff changeset
140 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
141 c = text[i];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
142 if ( IsCharValid(c) )
0
Ritor1
parents:
diff changeset
143 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
144 switch (c)
0
Ritor1
parents:
diff changeset
145 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
146 case '\n': //Line Feed 0A 10:
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
147 return;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
148 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
149 case '\f': //Form Feed, page eject 0C 12
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
150 strncpy(color_code, &text[i + 1], 5);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
151 color_code[5] = 0;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
152 text_color = atoi(color_code);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
153 ui_current_text_color = text_color;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
154 i += 5;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
155 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
156 case '\t': // Horizontal tab 09
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
157 case '\r': //Carriage Return 0D 13
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
158 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
159 default:
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
160 uCharWidth = pMetrics[c].uWidth;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
161 if ( uCharWidth )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
162 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
163 if ( i > 0 )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
164 uX_pos += pMetrics[c].uLeftSpacing;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
165 draw_color = text_color;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
166 pCharPixels = &pFontData[font_pixels_offset[c]];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
167 if ( !text_color )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
168 draw_color = -1;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
169 pRenderer->DrawText(uX_pos, uY, pCharPixels, uCharWidth, uFontHeight, pFontPalettes[0], draw_color, 0);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
170 uX_pos += uCharWidth;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
171 if ( i < text_length )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
172 uX_pos += pMetrics[c].uRightSpacing;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
173 }
0
Ritor1
parents:
diff changeset
174 }
Ritor1
parents:
diff changeset
175 }
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
176 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
177
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
178 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
179
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
180 //----- (0040F845) --------------------------------------------------------
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
181 void DrawCharToBuff( unsigned short* uXpos,unsigned char* pCharPixels, int uCharWidth, int uCharHeight,
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
182 unsigned __int16* pFontPalette, __int16 draw_color, int line_width )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
183 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
184 unsigned __int16* draw_buff; // edi@1
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
185 unsigned char* pPixels; // esi@1
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
186 unsigned char char_pxl; // eax@3
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
187
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
188 draw_buff = uXpos;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
189 pPixels = pCharPixels;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
190 for(int i=0; i<uCharHeight; ++i)
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
191 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
192 for(int j=0; j<uCharWidth; ++j)
0
Ritor1
parents:
diff changeset
193 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
194 char_pxl = *pPixels++;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
195 if ( char_pxl )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
196 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
197 if ( char_pxl == 1 )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
198 *draw_buff = pFontPalette[1];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
199 else
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
200 *draw_buff = draw_color;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
201 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
202 ++draw_buff;
0
Ritor1
parents:
diff changeset
203 }
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
204 draw_buff+=line_width-uCharWidth;
0
Ritor1
parents:
diff changeset
205 }
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
206
0
Ritor1
parents:
diff changeset
207 }
Ritor1
parents:
diff changeset
208
Ritor1
parents:
diff changeset
209 //----- (0044D0B5) --------------------------------------------------------
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
210 void GUIFont::DrawTextLineToBuff( int uColor, int a3, unsigned short* uX_buff_pos, const char *text, int line_width )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
211 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
212
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
213 unsigned short* uX_pos; // edi@3
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
214 unsigned char c; // cl@4
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
215 unsigned __int16 draw_color; // cx@12
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
216 unsigned __int8 *pCharPixels; // eax@12
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
217 char color_code[20]; // [sp+Ch] [bp-1Ch]@16
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
218 int text_length; // [sp+20h] [bp-8h]@2
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
219 int text_color; // [sp+24h] [bp-4h]@1
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
220 int uCharWidth; // [sp+30h] [bp+8h]@9
0
Ritor1
parents:
diff changeset
221
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
222 if ( !text )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
223 return;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
224 text_color = ui_current_text_color;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
225 text_length = strlen(text);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
226 uX_pos=uX_buff_pos;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
227 for (int i=0; i<text_length; ++i )
0
Ritor1
parents:
diff changeset
228 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
229 c = text[i];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
230 if ( IsCharValid(c) )
0
Ritor1
parents:
diff changeset
231 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
232 switch (c)
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
233 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
234 case '\n': //Line Feed 0A 10:
0
Ritor1
parents:
diff changeset
235 return;
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
236 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
237 case '\f': //Form Feed, page eject 0C 12
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
238 strncpy(color_code, &text[i + 1], 5);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
239 color_code[5] = 0;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
240 text_color = atoi(color_code);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
241 ui_current_text_color = text_color;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
242 i += 5;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
243 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
244 case '\t': // Horizontal tab 09
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
245 case '_':
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
246 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
247 default:
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
248 uCharWidth = pMetrics[c].uWidth;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
249 if ( uCharWidth )
0
Ritor1
parents:
diff changeset
250 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
251 if ( i > 0 )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
252 uX_pos += pMetrics[c].uLeftSpacing;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
253 draw_color = text_color;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
254 pCharPixels = &pFontData[font_pixels_offset[c]];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
255 if ( !text_color )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
256 draw_color = -1;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
257 DrawCharToBuff(uX_pos, pCharPixels, uCharWidth, uFontHeight, pFontPalettes[0], draw_color, line_width);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
258 uX_pos += uCharWidth;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
259 if ( i < text_length )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
260 uX_pos += pMetrics[c].uRightSpacing;
0
Ritor1
parents:
diff changeset
261 }
Ritor1
parents:
diff changeset
262 }
Ritor1
parents:
diff changeset
263 }
Ritor1
parents:
diff changeset
264 }
Ritor1
parents:
diff changeset
265 }
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
266
0
Ritor1
parents:
diff changeset
267
Ritor1
parents:
diff changeset
268
Ritor1
parents:
diff changeset
269 //----- (0044C933) --------------------------------------------------------
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
270 char * GUIFont::FitTwoFontStringINWindow( const char *pString, GUIFont *pFontMain, GUIFont *pFontSecond, GUIWindow* pWindow, int startPixlOff, int a6 )
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
271 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
272
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
273 GUIFont *currentFont; // esi@3
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
274 unsigned char c;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
275 int uInStrLen;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
276 char digits[4];
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
277 int possible_transition_point;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
278 int string_pixel_Width;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
279 int start_pixel_offset;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
280
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
281 if (!pString)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
282 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
283 MessageBoxW(nullptr, L"Invalid string passed !", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Font.cpp:445", 0);
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
284 return 0;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
285 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
286 currentFont=pFontMain; // esi@3
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
287 uInStrLen = strlen(pString);
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
288 assert(uInStrLen < sizeof(pTmpBuf3));
1205
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1168
diff changeset
289 strcpy(pTmpBuf3.data(), pString);
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
290 if (uInStrLen==0)
1205
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1168
diff changeset
291 return pTmpBuf3.data();
0
Ritor1
parents:
diff changeset
292
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
293 start_pixel_offset=string_pixel_Width=startPixlOff;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
294 possible_transition_point=0;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
295 for(int i=0; i<uInStrLen; ++i)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
296 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
297 c=pTmpBuf3[i];
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
298 if (pFontMain->IsCharValid(c))
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
299 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
300 switch (c)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
301 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
302 case '\t': // Horizontal tab 09
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
303 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
304 strncpy(digits, &pTmpBuf3[i+1],3);
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
305 digits[3]=0;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
306 string_pixel_Width = atoi(digits)+startPixlOff;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
307 i+=3;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
308 break;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
309 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
310 case '\n': //Line Feed 0A 10
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
311 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
312 string_pixel_Width=start_pixel_offset;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
313 possible_transition_point=i;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
314 currentFont=pFontMain;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
315 break;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
316 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
317 case '\f': //Form Feed, page eject 0C 12
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
318 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
319 i+=5;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
320 break;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
321 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
322 case '\r': //Carriage Return 0D 13
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
323 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
324 if (!a6)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
325 return (char*)pString;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
326 break;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
327 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
328 case ' ' :
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
329 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
330 string_pixel_Width+=currentFont->pMetrics[c].uWidth;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
331 possible_transition_point=i;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
332 break;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
333 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
334 case '_' :
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
335 currentFont=pFontSecond;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
336 break;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
337 default:
200
1527f66fd81b Buffer overflow in credits window
Nomad
parents: 189
diff changeset
338
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
339 if ((string_pixel_Width+currentFont->pMetrics[c].uWidth+ currentFont->pMetrics[c].uLeftSpacing+
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
340 currentFont->pMetrics[c].uRightSpacing)<pWindow->uFrameWidth)
0
Ritor1
parents:
diff changeset
341 {
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
342 if(i>possible_transition_point)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
343 string_pixel_Width+=currentFont->pMetrics[c].uLeftSpacing;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
344 string_pixel_Width+=currentFont->pMetrics[c].uWidth;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
345 if (i<uInStrLen)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
346 string_pixel_Width+=currentFont->pMetrics[c].uRightSpacing;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
347 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
348 else
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
349 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
350 pTmpBuf3[possible_transition_point]='\n';
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
351
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
352 if ( currentFont== pFontSecond)
0
Ritor1
parents:
diff changeset
353 {
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
354
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
355 for(int k=uInStrLen-1; k>=possible_transition_point+1; --k)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
356 pTmpBuf3[k] = pTmpBuf3[k-1];
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
357
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
358 ++uInStrLen;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
359 ++possible_transition_point;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
360 pTmpBuf3[possible_transition_point] = '_';
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
361
0
Ritor1
parents:
diff changeset
362 }
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
363 string_pixel_Width=start_pixel_offset;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
364
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
365 for(int j=possible_transition_point;j<i; ++j )
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
366 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
367 c=pTmpBuf3[j];
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
368 if (pFontMain->IsCharValid(c))
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
369 {
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
370 if(j>possible_transition_point)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
371 string_pixel_Width+=pFontMain->pMetrics[c].uLeftSpacing;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
372 string_pixel_Width+=pFontMain->pMetrics[c].uWidth;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
373 if (j<i)
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
374 string_pixel_Width+=pFontMain->pMetrics[c].uRightSpacing;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
375
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
376 }
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
377 }
0
Ritor1
parents:
diff changeset
378 }
Ritor1
parents:
diff changeset
379 }
Ritor1
parents:
diff changeset
380 }
Ritor1
parents:
diff changeset
381 }
1205
8c02e6f74b29 arrays to std::arrays phase 2 - mm7_data.h converted
Grumpy7
parents: 1168
diff changeset
382 return pTmpBuf3.data();
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
383
0
Ritor1
parents:
diff changeset
384 }
Ritor1
parents:
diff changeset
385
Ritor1
parents:
diff changeset
386
Ritor1
parents:
diff changeset
387 //----- (0044C6C2) --------------------------------------------------------
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
388 char* GUIFont::_44C6C2( const char *pInString, GUIWindow *pWindow, unsigned int uX, int a5 )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
389 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
390 int text_height; // edi@1
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
391 char *text_str; // ebx@3
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
392 int i;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
393 unsigned char c; // cl@4
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
394 int text_length;
0
Ritor1
parents:
diff changeset
395
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
396 text_height = 0;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
397
0
Ritor1
parents:
diff changeset
398 if ( !pInString )
Ritor1
parents:
diff changeset
399 return 0;
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
400 text_str = FitTextInAWindow(pInString, this, pWindow, uX, 0);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
401 text_length = strlen(text_str);
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
402 for (i=0; i<text_length; ++i )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
403 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
404 c = text_str[i];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
405 if ( IsCharValid(c) )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
406 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
407 switch (c)
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
408 {
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
409 case '\n': //Line Feed 0A 10:
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
410 text_height = text_height + uFontHeight - 3;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
411 if ( text_height >= (signed int)(a5 * pWindow->uFrameHeight) )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
412 return &text_str[i+1];
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
413 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
414 case '\f': //Form Feed, page eject 0C 12
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
415 i += 5;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
416 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
417 case '\t': // Horizontal tab 09
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
418 case '\r': //Carriage Return 0D 13
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
419 i += 3;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
420 break;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
421 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
422 if ( text_height >= (signed int)(a5 * pWindow->uFrameHeight) )
1166
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
423 break;
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
424 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
425 }
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
426 return &text_str[i];
0
Ritor1
parents:
diff changeset
427 }
Ritor1
parents:
diff changeset
428
Ritor1
parents:
diff changeset
429
Ritor1
parents:
diff changeset
430
Ritor1
parents:
diff changeset
431 //----- (0044C62E) --------------------------------------------------------
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
432 int GUIFont::GetStringHeight2( GUIFont *secondFont, const char *text_str, GUIWindow* pWindow, int startX, int a6 )
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
433 {
1166
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
434
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
435 int uAllHeght;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
436 int uStringLen;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
437 unsigned char c;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
438 char *test_string;
0
Ritor1
parents:
diff changeset
439
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
440 if ( !text_str )
0
Ritor1
parents:
diff changeset
441 return 0;
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
442 uAllHeght = uFontHeight - 3;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
443 test_string = FitTwoFontStringINWindow(text_str, this, secondFont, pWindow, startX, 0);
1166
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
444 uStringLen = strlen(test_string);
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
445 for (int i = 0; i < uStringLen; ++i)
0
Ritor1
parents:
diff changeset
446 {
1166
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
447 c = test_string[i];
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
448 if (IsCharValid(c))
0
Ritor1
parents:
diff changeset
449 {
1166
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
450 switch (c)
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
451 {
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
452 case '\n': //Line Feed 0A 10:
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
453 uAllHeght+= uFontHeight - 3;
1166
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
454 break;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
455 case '\f': //Form Feed, page eject 0C 12
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
456 i += 5;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
457 break;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
458 case '\t': // Horizontal tab 09
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
459 case '\r': //Carriage Return 0D 13
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
460 if (a6 != 1)
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
461 i += 3;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
462 break;
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
463 }
0
Ritor1
parents:
diff changeset
464 }
Ritor1
parents:
diff changeset
465 }
1166
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
466
11cda4934da3 font cleaning
Gloval
parents: 1165
diff changeset
467 return uAllHeght;
0
Ritor1
parents:
diff changeset
468 }
Ritor1
parents:
diff changeset
469
Ritor1
parents:
diff changeset
470 //----- (0044C59D) --------------------------------------------------------
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
471 int GUIFont::CalcTextHeight( const char *pString, struct GUIWindow *pWindow, int uXOffset, int a5 )
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
472 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
473 int uAllHeght;
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
474 int uStringLen;
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
475 unsigned char c;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
476 char *test_string;
0
Ritor1
parents:
diff changeset
477
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
478 if (!pString)
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
479 return 0;
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
480 uAllHeght = uFontHeight - 3;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
481 test_string = FitTextInAWindow(pString, this, pWindow, uXOffset, 0);
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
482 uStringLen = strlen(pString);
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
483 for (int i = 0; i < uStringLen; ++i)
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
484 {
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
485 c = test_string[i];
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
486 if (IsCharValid(c))
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
487 {
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
488 switch (c)
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
489 {
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
490 case '\n': //Line Feed 0A 10:
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
491 uAllHeght+= uFontHeight - 3;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
492 break;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
493 case '\f': //Form Feed, page eject 0C 12
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
494 i += 5;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
495 break;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
496 case '\t': // Horizontal tab 09
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
497 case '\r': //Carriage Return 0D 13
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
498 if (a5 != 1)
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
499 i += 3;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
500 break;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
501 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
502 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
503 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
504 return uAllHeght;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
505 }
0
Ritor1
parents:
diff changeset
506
Ritor1
parents:
diff changeset
507
Ritor1
parents:
diff changeset
508 //----- (0044C51E) --------------------------------------------------------
Ritor1
parents:
diff changeset
509 int GUIFont::GetLineWidth(const char *pString)
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
510 {
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
511 int str_len; // ebp@3
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
512 int string_line_width; // esi@3
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
513 unsigned char c;
0
Ritor1
parents:
diff changeset
514
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
515 if (!pString)
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
516 return 0;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
517 str_len = strlen(pString);
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
518 string_line_width = 0;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
519 for ( int i = 0; i < str_len; ++i )
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
520 {
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
521 c = pString[i];
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
522 if (IsCharValid(c))
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
523 {
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
524 switch (c)
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
525 {
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
526 case '\t':
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
527 case '\n':
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
528 case '\r':
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
529 return string_line_width;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
530 case '\f':
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
531 i += 5;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
532 break;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
533 default:
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
534 if (i > 0)
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
535 string_line_width += pMetrics[c].uLeftSpacing;
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
536 string_line_width += pMetrics[c].uWidth;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
537 if (i < str_len)
1168
8b3e7d5ba069 fonts all cleaned
Gloval
parents: 1166
diff changeset
538 string_line_width +=pMetrics[c].uRightSpacing;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
539 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
540 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
541 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
542 return string_line_width;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
543 }
0
Ritor1
parents:
diff changeset
544
Ritor1
parents:
diff changeset
545
Ritor1
parents:
diff changeset
546 //----- (0044C502) --------------------------------------------------------
Ritor1
parents:
diff changeset
547 int GUIFont::AlignText_Center(unsigned int uCenterX, const char *pString)
Ritor1
parents:
diff changeset
548 {
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
549 signed int position; // esi@1
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
550
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
551 position = (signed int)(uCenterX - GetLineWidth(pString)) >> 1;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
552 if ( position >= 0 )
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
553 return position;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
554 else
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
555 return 0;
178
1dfa65be220e Обращённый набор изменений: 91fa025e6ca6
Ritor1
parents: 177
diff changeset
556
0
Ritor1
parents:
diff changeset
557 }
Ritor1
parents:
diff changeset
558
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
559 //----- (0044C768) --------------------------------------------------------
688
c0bfb386b15f some ui cleanup
Gloval
parents: 200
diff changeset
560 char * FitTextInAWindow( const char *pInString, GUIFont *pFont, GUIWindow *pWindow, signed int uX, int a5 )
c0bfb386b15f some ui cleanup
Gloval
parents: 200
diff changeset
561 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
562 unsigned char c;
1160
502b8b2e36b4 font cleaning
Gloval
parents: 688
diff changeset
563 int uInStrLen;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
564 char digits[4];
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
565 int possible_transition_point;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
566 int string_pixel_Width;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
567 int start_pixel_offset;
0
Ritor1
parents:
diff changeset
568
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
569 if (!pInString)
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
570 {
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
571 MessageBoxW(nullptr, L"Invalid string passed !", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Font.cpp:445", 0);
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
572 return 0;
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
573 }
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
574 uInStrLen = strlen(pInString);
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
575 strcpy(&temp_string[0], pInString);
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
576 if (uInStrLen==0)
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
577 return &temp_string[0];
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
578
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
579 start_pixel_offset=string_pixel_Width=uX;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
580 possible_transition_point=0;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
581 for(int i=0; i<uInStrLen; ++i)
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
582 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
583 c=temp_string[i];
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
584 if (pFont->IsCharValid(c))
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
585 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
586 switch (c)
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
587 {
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
588 case '\t': // Horizontal tab 09
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
589 {
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
590 strncpy(digits, &temp_string[i+1],3);
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
591 digits[3]=0;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
592 string_pixel_Width= atoi(digits)+uX;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
593 i+=3;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
594 break;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
595 }
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
596 case '\n': //Line Feed 0A 10
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
597 {
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
598 string_pixel_Width=start_pixel_offset;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
599 possible_transition_point=i;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
600 break;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
601 }
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
602 case '\f': //Form Feed, page eject 0C 12
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
603 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
604 i+=5;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
605 break;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
606 }
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
607 case '\r': //Carriage Return 0D 13
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
608 {
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
609 if (!a5)
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
610 return (char*)pInString;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
611 break;
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
612 }
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
613 case ' ' :
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
614 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
615 string_pixel_Width+=pFont->pMetrics[c].uWidth;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
616 possible_transition_point=i;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
617 break;
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
618 }
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
619 default:
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
620
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
621 if ((string_pixel_Width+pFont->pMetrics[c].uWidth+ pFont->pMetrics[c].uLeftSpacing+
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
622 pFont->pMetrics[c].uRightSpacing)<pWindow->uFrameWidth)
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
623 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
624 if(i>possible_transition_point)
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
625 string_pixel_Width+=pFont->pMetrics[c].uLeftSpacing;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
626 string_pixel_Width+=pFont->pMetrics[c].uWidth;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
627 if (i<uInStrLen)
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
628 string_pixel_Width+=pFont->pMetrics[c].uRightSpacing;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
629 }
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
630 else
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
631 {
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
632 temp_string[possible_transition_point]='\n';
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
633 string_pixel_Width=start_pixel_offset;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
634 if (i>possible_transition_point)
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
635 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
636 for(int j=possible_transition_point;j<i; ++j )
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
637 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
638 c=temp_string[j];
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
639 if (pFont->IsCharValid(c))
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
640 {
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
641 if(j>possible_transition_point)
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
642 string_pixel_Width+=pFont->pMetrics[c].uLeftSpacing;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
643 string_pixel_Width+=pFont->pMetrics[c].uWidth;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
644 if (j<i)
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
645 string_pixel_Width+=pFont->pMetrics[c].uRightSpacing;
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
646
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
647 }
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
648 }
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
649 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
650 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
651 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
652 }
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
653 }
189
038a4d09406f new texts file, fix text rendender error
Gloval
parents: 180
diff changeset
654 return &temp_string[0];
180
c5bd7a825ef2 come back
Ritor1
parents: 178
diff changeset
655 }
1297
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
656 //----- (00414162) --------------------------------------------------------
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
657 void uGameUIFontMain_initialize()
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
658 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
659 uGameUIFontMain = TargetColor(0xAu, 0, 0);
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
660 }
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
661
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
662 //----- (00414174) --------------------------------------------------------
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
663 void uGameUIFontShadow_initialize()
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
664 {
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
665 uGameUIFontShadow = TargetColor(0xE6u, 214u, 193u);
5450af4f57ef moving files mm7_x ending
Ritor1
parents: 1205
diff changeset
666 }