Mercurial > mm7
comparison GUIFont.cpp @ 57:8af333180755
Слияние
author | Ritor1 |
---|---|
date | Mon, 21 Jan 2013 20:22:10 +0600 |
parents | 5629105aa178 |
children | 2b90f29892ae |
comparison
equal
deleted
inserted
replaced
56:7082a3f95e7c | 57:8af333180755 |
---|---|
95 | 95 |
96 //----- (0044D1E7) -------------------------------------------------------- | 96 //----- (0044D1E7) -------------------------------------------------------- |
97 void GUIFont::DrawTextLine(unsigned int uDefaultColor, signed int uX, signed int uY, const char *Str, int a6) | 97 void GUIFont::DrawTextLine(unsigned int uDefaultColor, signed int uX, signed int uY, const char *Str, int a6) |
98 { | 98 { |
99 size_t v6; // ebx@1 | 99 size_t v6; // ebx@1 |
100 GUIFont *v7; // esi@1 | 100 GUIFont *pFont; // esi@1 |
101 signed int v8; // edi@3 | 101 signed int v8; // edi@3 |
102 unsigned __int8 v9; // cl@4 | 102 unsigned __int8 v9; // cl@4 |
103 int v10; // eax@5 | 103 int v10; // eax@5 |
104 int v11; // ecx@5 | 104 int v11; // ecx@5 |
105 int v12; // ecx@6 | 105 int v12; // ecx@6 |
114 int v21; // [sp+24h] [bp-4h]@1 | 114 int v21; // [sp+24h] [bp-4h]@1 |
115 int uXa; // [sp+30h] [bp+8h]@9 | 115 int uXa; // [sp+30h] [bp+8h]@9 |
116 | 116 |
117 v6 = 0; | 117 v6 = 0; |
118 v21 = uDefaultColor; | 118 v21 = uDefaultColor; |
119 v7 = this; | 119 pFont = this; |
120 if ( Str ) | 120 if ( Str ) |
121 { | 121 { |
122 v21 = ui_current_text_color; | 122 v21 = ui_current_text_color; |
123 v20 = strlen(Str); | 123 v20 = strlen(Str); |
124 if ( (signed int)v20 > 0 ) | 124 if ( (signed int)v20 > 0 ) |
125 { | 125 { |
126 v8 = uX; | 126 v8 = uX; |
127 do | 127 do |
128 { | 128 { |
129 if ( v7->IsCharValid(v9 = Str[v6]) ) | 129 if ( pFont->IsCharValid(v9 = Str[v6]) ) |
130 { | 130 { |
131 v10 = v9; | 131 v10 = v9; |
132 v11 = v9 - 9; | 132 v11 = v9 - 9; |
133 if ( v11 ) | 133 if ( v11 ) |
134 { | 134 { |
139 if ( v13 ) | 139 if ( v13 ) |
140 { | 140 { |
141 if ( v13 != 1 ) | 141 if ( v13 != 1 ) |
142 { | 142 { |
143 v14 = 3 * v10 + 9; | 143 v14 = 3 * v10 + 9; |
144 v15 = *((int *)&v7->cFirstChar + v14); | 144 v15 = *((int *)&pFont->cFirstChar + v14); |
145 uXa = *((int *)&v7->cFirstChar + v14); | 145 uXa = *((int *)&pFont->cFirstChar + v14); |
146 if ( v15 ) | 146 if ( v15 ) |
147 { | 147 { |
148 if ( (signed int)v6 > 0 ) | 148 if ( (signed int)v6 > 0 ) |
149 v8 += v7->pMetrics[v10].uLeftSpacing; | 149 v8 += pFont->pMetrics[v10].uLeftSpacing; |
150 v16 = v21; | 150 v16 = v21; |
151 v17 = (unsigned __int8 *)((char *)&v7[1] + v7->field_C20[v10]); | 151 v17 = (unsigned __int8 *)((char *)&pFont[1] + pFont->field_C20[v10]); |
152 if ( !v21 ) | 152 if ( !v21 ) |
153 v16 = -1; | 153 v16 = -1; |
154 pRenderer->DrawText(v8, uY, v17, v15, LOBYTE(v7->uFontHeight), v7->pFontPalettes[0], v16, 0); | 154 pRenderer->DrawText(v8, uY, v17, v15, pFont->uFontHeight, pFont->pFontPalettes[0], v16, 0); |
155 v8 += uXa; | 155 v8 += uXa; |
156 if ( (signed int)v6 < (signed int)v20 ) | 156 if ( (signed int)v6 < (signed int)v20 ) |
157 v8 += v7->pMetrics[(unsigned __int8)Str[v6]].uRightSpacing; | 157 v8 += pFont->pMetrics[(unsigned __int8)Str[v6]].uRightSpacing; |
158 } | 158 } |
159 } | 159 } |
160 } | 160 } |
161 else | 161 else |
162 { | 162 { |