Mercurial > mm7
annotate UI/UIPopup.cpp @ 1678:6faacde46271
DrawPopupWindow
author | Ritor1 |
---|---|
date | Fri, 20 Sep 2013 17:31:37 +0600 |
parents | 96a1f5e0b6cd |
children | 33c7cc2d48d5 |
rev | line source |
---|---|
1298 | 1 #ifdef _MSC_VER |
2 #define _CRT_SECURE_NO_WARNINGS | |
3 #endif | |
4 | |
1299 | 5 #include "..\MM7.h" |
1298 | 6 |
1299 | 7 #include "..\Mouse.h" |
1298 | 8 |
1299 | 9 #include "..\Sprites.h" |
10 #include "..\Vis.h" | |
11 #include "..\Game.h" | |
12 #include "..\GUIWindow.h" | |
13 #include "..\GUIFont.h" | |
14 #include "..\Party.h" | |
15 #include "..\AudioPlayer.h" | |
16 #include "..\LOD.h" | |
17 #include "..\Actor.h" | |
18 #include "..\Viewport.h" | |
19 #include "..\SpriteObject.h" | |
20 #include "..\ObjectList.h" | |
21 #include "..\Chest.h" | |
22 #include "..\PaletteManager.h" | |
23 #include "..\Time.h" | |
24 #include "..\texts.h" | |
1298 | 25 |
1299 | 26 #include "..\mm7_data.h" |
1298 | 27 |
28 static char static_sub_417BB5_out_string[1200]; // static to a file, not sub actually | |
29 | |
1393 | 30 |
31 //----- (004179BC) -------------------------------------------------------- | |
1678 | 32 void CharacterUI_DrawTooltip(const char *Title, const char *content) |
1393 | 33 { |
1678 | 34 GUIWindow popup_window; // [sp+Ch] [bp-5Ch]@1 |
1393 | 35 POINT v6; // [sp+60h] [bp-8h]@1 |
36 | |
1678 | 37 memset(&popup_window, 0, 0x54u); |
38 popup_window.uFrameWidth = 384; | |
39 popup_window.uFrameHeight = 256; | |
40 popup_window.uFrameX = 128; | |
41 popup_window.uFrameY = pMouse->GetCursorPos(&v6)->y + 30; | |
42 popup_window.uFrameHeight = pFontSmallnum->CalcTextHeight(content, &popup_window, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; | |
43 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1; | |
44 popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1; | |
45 popup_window.DrawMessageBox(0); | |
46 | |
47 popup_window.uFrameX += 12; | |
48 popup_window.uFrameWidth -= 24; | |
49 popup_window.uFrameY += 12; | |
50 popup_window.uFrameHeight -= 12; | |
51 popup_window.uFrameZ = popup_window.uFrameX + popup_window.uFrameWidth - 1; | |
52 popup_window.uFrameW = popup_window.uFrameY + popup_window.uFrameHeight - 1; | |
53 sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", ui_character_tooltip_header_default_color, Title); | |
54 popup_window.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3); | |
55 popup_window.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, content, 0, 0, 0); | |
1393 | 56 } |
57 | |
1298 | 58 //----- (004151D9) -------------------------------------------------------- |
59 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight) | |
1678 | 60 { |
61 unsigned int uNumTiles; // [sp+2Ch] [bp-Ch]@6 | |
62 unsigned int coord_x; // [sp+2Ch] [bp-Ch]@3 | |
63 unsigned int coord_y; // [sp+34h] [bp-4h]@5 | |
1298 | 64 |
1678 | 65 pRenderer->SetTextureClipRect(uX, uY, uX + uWidth, uY + uHeight); |
66 if ( pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth && pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight) | |
67 { | |
68 uNumTiles = uWidth / pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth; | |
69 if ( uWidth % pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth ) | |
70 ++uNumTiles; | |
71 coord_y = uY; | |
72 for ( uint j = 0; j <= uHeight / pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight; j++ ) | |
1298 | 73 { |
1678 | 74 coord_x = uX - pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth; |
75 for ( uint i = uNumTiles + 1; i; --i ) | |
76 { | |
77 coord_x += pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureWidth; | |
78 pRenderer->DrawTextureIndexed(coord_x, coord_y, pIcons_LOD->GetTexture(uTextureID_Parchment)); | |
79 } | |
80 coord_y += pIcons_LOD->GetTexture(uTextureID_Parchment)->uTextureHeight; | |
1298 | 81 } |
1678 | 82 pRenderer->DrawTextureTransparent(uX, uY, pIcons_LOD->GetTexture(uTextureID_5076AC)); |
83 pRenderer->DrawTextureTransparent(uX, uY + uHeight - 32, pIcons_LOD->GetTexture(uTextureID_5076B4)); | |
84 pRenderer->DrawTextureTransparent(uX + uWidth - 32, uY, pIcons_LOD->GetTexture(uTextureID_5076A8)); | |
85 pRenderer->DrawTextureTransparent(uX + uWidth - 32, uY + uHeight - 32, pIcons_LOD->GetTexture(uTextureID_5076B0)); | |
86 if ( uWidth > 64 ) | |
87 { | |
88 pRenderer->SetTextureClipRect(uX + 32, uY, uX + uWidth - 32, uY + uHeight); | |
89 pRenderer->DrawTextureTransparent(uX + 32, uY, pIcons_LOD->GetTexture(uTextureID_507698)); | |
90 pRenderer->DrawTextureTransparent(uX + 32, uY + uHeight - 10, pIcons_LOD->GetTexture(uTextureID_5076A4)); | |
91 if ( uWidth > 512 ) | |
92 { | |
93 pRenderer->DrawTextureTransparent(uX + 544, uY, pIcons_LOD->GetTexture(uTextureID_507698)); | |
94 pRenderer->DrawTextureTransparent(uX + 544, uY + uHeight - 10, pIcons_LOD->GetTexture(uTextureID_5076A4)); | |
95 } | |
96 } | |
97 if ( uHeight > 64 ) | |
98 { | |
99 pRenderer->SetTextureClipRect(uX, uY + 32, uX + uWidth, uY + uHeight - 32); | |
100 pRenderer->DrawTextureTransparent(uX, uY + 32, pIcons_LOD->GetTexture(uTextureID_5076A0)); | |
101 pRenderer->DrawTextureTransparent(uX + uWidth - 10, uY + 32, pIcons_LOD->GetTexture(uTextureID_50769C)); | |
102 } | |
103 pRenderer->ResetTextureClipRect(); | |
104 } | |
105 } | |
1298 | 106 |
107 //----- (0041D895) -------------------------------------------------------- | |
108 void GameUI_DrawItemInfo( struct ItemGen* inspect_item ) | |
109 { | |
110 ItemGen *v1; // esi@1 | |
111 unsigned int v2; // eax@3 | |
112 signed int v6; // eax@5 | |
113 int v7; // edx@5 | |
114 char v10; // zf@16 | |
115 ItemGen *v11; // eax@16 | |
116 ItemGen *v12; // eax@25 | |
117 const char *v16; // eax@34 | |
118 int v17; // eax@36 | |
119 int v18; // esi@37 | |
120 unsigned __int16 v19; // ax@37 | |
121 char v21; // al@44 | |
122 int v24; // eax@52 | |
123 int v25; // eax@57 | |
124 int v26; // eax@60 | |
125 int v27; // eax@67 | |
126 const char *v28; // edi@69 | |
127 int v29; // eax@70 | |
128 char v30; // edi@78 | |
129 const char *v31; // eax@78 | |
130 int v32; // ecx@81 | |
131 unsigned int v33; // eax@81 | |
132 int v34; // esi@81 | |
133 const char *v35; // eax@85 | |
134 const char *v36; // eax@87 | |
135 unsigned int v37; // eax@109 | |
136 unsigned int v38; // eax@109 | |
137 int v39; // eax@113 | |
138 GUIFont *v40; // edx@113 | |
139 signed int v41; // [sp-20h] [bp-298h]@113 | |
140 int v42; // [sp-1Ch] [bp-294h]@113 | |
141 unsigned int v44; // [sp-18h] [bp-290h]@113 | |
142 const char *v46; // [sp-14h] [bp-28Ch]@58 | |
143 char *v47; // [sp-14h] [bp-28Ch]@110 | |
144 const char *v49; // [sp-10h] [bp-288h]@56 | |
145 char *v50; // [sp-10h] [bp-288h]@58 | |
146 int v51; // [sp-10h] [bp-288h]@110 | |
147 const char *v52; // [sp-Ch] [bp-284h]@36 | |
148 char *v54; // [sp-Ch] [bp-284h]@56 | |
149 int v55; // [sp-Ch] [bp-284h]@58 | |
150 int v56; // [sp-Ch] [bp-284h]@110 | |
151 unsigned int v57; // [sp-8h] [bp-280h]@36 | |
152 int v59; // [sp-8h] [bp-280h]@56 | |
153 int v60; // [sp-8h] [bp-280h]@58 | |
154 unsigned int v61; // [sp-8h] [bp-280h]@110 | |
155 char out_text[300]; // [sp+8h] [bp-270h]@40 | |
156 char v65[120]; // [sp+134h] [bp-144h]@92 | |
157 char Source[40]; // [sp+1ACh] [bp-CCh]@49 | |
158 stru351_summoned_item v67; | |
159 int var88; // [sp+1F0h] [bp-88h]@1 | |
160 Texture *v73; // [sp+1F4h] [bp-84h]@5 | |
161 int v77; // [sp+200h] [bp-78h]@12 | |
162 int v78; // [sp+204h] [bp-74h]@5 | |
163 GUIWindow wHintWindow; // [sp+208h] [bp-70h]@2 | |
164 POINT a2; // [sp+25Ch] [bp-1Ch]@2 | |
165 int v81; // [sp+264h] [bp-14h]@5 | |
166 PlayerSpeech v83; // [sp+26Ch] [bp-Ch]@18 | |
167 char* v84; | |
168 int v85; | |
169 char *Str; // [sp+270h] [bp-8h]@65 | |
170 | |
171 v1 = inspect_item; | |
172 var88 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | |
173 if (!inspect_item->uItemID) | |
174 return; | |
175 | |
176 wHintWindow.Hint = 0; | |
177 wHintWindow.uFrameWidth = 384; | |
178 wHintWindow.uFrameHeight = 180; | |
179 wHintWindow.uFrameY = 40; | |
180 if ( pMouse->GetCursorPos(&a2)->x <= 320 ) | |
181 v2 = pMouse->GetCursorPos(&a2)->x + 30; | |
182 else | |
183 v2 = pMouse->GetCursorPos(&a2)->x - wHintWindow.uFrameWidth - 30; | |
184 wHintWindow.uFrameX = v2; | |
185 auto item_desc = &pItemsTable->pItems[inspect_item->uItemID]; | |
186 //v3 = (char *)&pItemsTable->pItems[_this->uItemID].pIconName; | |
187 //v76 = v3; | |
188 //v4 = pIcons_LOD->LoadTexture(pItemsTable->pItems[_this->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | |
189 //v5 = v4; | |
190 //v4 *= 72; | |
191 //v75 = v4; | |
192 //v73 = &pIcons_LOD->pTextures[v4]; | |
193 v73 = pIcons_LOD->LoadTexturePtr(item_desc->pIconName, TEXTURE_16BIT_PALETTE); | |
194 v6 = 100 - v73->uTextureWidth; | |
195 v7 = v73->uTextureHeight; | |
196 v78 = v6; | |
197 v81 = 144 - v7; | |
198 if ( v6 > 0 ) | |
199 v78 = v6 >> 1; | |
200 if ( v81 <= 0 ) | |
201 v81 = 0; | |
202 else | |
203 v81 >>= 1; | |
204 if ( !item_desc->uItemID_Rep_St ) | |
205 inspect_item->SetIdentified(); | |
206 //v9 = v8->uAttributes; | |
207 v77 = 0; | |
208 //a2.y = v8->uAttributes & 2; | |
209 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_GOLD) | |
210 v77 = inspect_item->uSpecEnchantmentType; | |
211 if ( uActiveCharacter ) | |
212 { | |
213 //try to identify | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
214 if (!inspect_item->IsIdentified()) |
1298 | 215 { |
216 | |
217 v11 = inspect_item; | |
218 if ( pPlayers[uActiveCharacter]->CanIdentify(inspect_item) == 1 ) | |
219 inspect_item->SetIdentified(); | |
220 v83 = SPEECH_9; | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
221 if ( !inspect_item->IsIdentified() ) |
1298 | 222 { |
223 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u);//"Identify Failed" | |
224 } | |
225 else | |
226 { | |
227 v83 = SPEECH_8; | |
228 if ( inspect_item->GetValue() < 100 * (pPlayers[uActiveCharacter]->uLevel + 5) ) | |
229 v83 = SPEECH_7; | |
230 } | |
231 if ( dword_4E455C ) | |
232 { | |
233 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0); | |
234 dword_4E455C = 0; | |
235 } | |
236 } | |
237 inspect_item->UpdateTempBonus(pParty->uTimePlayed); | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
238 if (inspect_item->IsBroken()) |
1298 | 239 { |
240 if ( pPlayers[uActiveCharacter]->CanRepair(inspect_item) == 1 ) | |
241 inspect_item->uAttributes = inspect_item->uAttributes & 0xFFFFFFFD | 1; | |
242 v83 = SPEECH_11; | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
243 if ( !inspect_item->IsBroken() ) |
1298 | 244 v83 = SPEECH_10; |
245 else | |
246 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u);//"Repair Failed" | |
247 if ( dword_4E455C ) | |
248 { | |
249 pPlayers[uActiveCharacter]->PlaySound(v83, 0); | |
250 dword_4E455C = 0; | |
251 } | |
252 } | |
253 } | |
254 //v13 = _this->uAttributes; | |
255 //v14 = _this->Identified(); | |
256 //a2.y = inspect_item->Identified(); | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
257 if (inspect_item->IsBroken()) |
1298 | 258 { |
259 wHintWindow.DrawMessageBox(0); | |
260 //v15 = &; | |
261 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, | |
262 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, | |
263 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12); | |
264 wHintWindow.uFrameWidth -= 24; | |
265 wHintWindow.uFrameHeight -= 12; | |
266 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; | |
267 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; | |
268 pRenderer->DrawTransparentRedShade(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73); | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
269 if ( inspect_item->IsIdentified()) |
1298 | 270 v16 = inspect_item->GetIdentifiedName(); |
271 else | |
272 v16 = item_desc->pUnidentifiedName; | |
273 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v16, 3u); | |
274 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &wHintWindow, 0, 0); //"Broken Item" | |
275 v18 = v17 >> 1; | |
276 v19 = TargetColor(0xFFu, 0x19u, 0x19u); | |
277 wHintWindow.DrawTitleText(pFontArrus, 0x64u, ((signed int)wHintWindow.uFrameHeight >> 1) - v18, v19, pGlobalTXT_LocalizationStrings[32], 3); //"Broken Item" | |
278 pRenderer->ResetTextureClipRect(); | |
279 if ( !areWeLoadingTexture ) | |
280 { | |
281 v73->Release(); | |
282 pIcons_LOD->SyncLoadedFilesCount(); | |
283 } | |
284 return; | |
285 } | |
1567
9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents:
1545
diff
changeset
|
286 if (!inspect_item->IsIdentified()) |
1298 | 287 { |
288 wHintWindow.DrawMessageBox(0); | |
289 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, | |
290 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, | |
291 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12); | |
292 wHintWindow.uFrameWidth -= 24; | |
293 wHintWindow.uFrameHeight -= 12; | |
294 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; | |
295 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; | |
296 pRenderer->DrawTextureTransparent(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73); | |
297 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, item_desc->pUnidentifiedName, 3u); | |
298 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[232], &wHintWindow, 0, 0); ///"Not Identified" | |
299 v18 = v17 >> 1; | |
300 v19 = TargetColor(0xFFu, 0x19u, 0x19u); | |
301 wHintWindow.DrawTitleText(pFontArrus, 0x64u, ((signed int)wHintWindow.uFrameHeight >> 1) - v18, v19, pGlobalTXT_LocalizationStrings[232], 3); | |
302 pRenderer->ResetTextureClipRect(); | |
303 if ( !areWeLoadingTexture ) | |
304 { | |
305 v73->Release(); | |
306 pIcons_LOD->SyncLoadedFilesCount(); | |
307 } | |
308 return; | |
309 } | |
310 | |
311 sprintfex(out_text, pGlobalTXT_LocalizationStrings[463], item_desc->pUnidentifiedName); //"Type: %s" | |
312 out_text[100] = 0; | |
313 out_text[200] = 0; | |
314 //v20 = item_desc->uEquipType; | |
315 switch (item_desc->uEquipType) | |
316 { | |
317 case EQUIP_OFF_HAND: | |
318 case EQUIP_MAIN_HAND: | |
319 sprintfex(out_text + 100, "%s: +%d %s: %dd%d", pGlobalTXT_LocalizationStrings[LOCSTR_ATTACK], | |
320 (int)item_desc->uDamageMod, pGlobalTXT_LocalizationStrings[53], (int)item_desc->uDamageDice, (int)item_desc->uDamageRoll); //"Damage" | |
321 if (item_desc->uDamageMod) | |
322 { | |
323 char mod[16]; | |
324 sprintf(mod, "+%d", (int)item_desc->uDamageMod); | |
325 strcat(out_text + 100, mod); | |
326 } | |
327 break; | |
328 | |
329 case EQUIP_BOW: | |
330 sprintfex(out_text + 100, "%s: +%d %s: %dd%d", pGlobalTXT_LocalizationStrings[203], //"Shoot" | |
331 (int)item_desc->uDamageMod, pGlobalTXT_LocalizationStrings[53], //"Damage" | |
332 (int)item_desc->uDamageDice, (int)item_desc->uDamageRoll); | |
333 if (item_desc->uDamageMod) | |
334 { | |
335 char mod[16]; | |
336 sprintf(mod, "+%d", (int)item_desc->uDamageMod); | |
337 strcat(out_text + 100, mod); | |
338 } | |
339 break; | |
340 | |
341 case EQUIP_ARMOUR: | |
342 case EQUIP_SHIELD: | |
343 case EQUIP_HELMET: | |
344 case EQUIP_BELT: | |
345 case EQUIP_CLOAK: | |
346 case EQUIP_GAUNTLETS: | |
347 case EQUIP_BOOTS: | |
348 case EQUIP_RING: | |
349 case EQUIP_AMULET: | |
350 if (item_desc->uDamageDice) //"Armor" | |
351 sprintfex(out_text + 100, "%s: +%d", pGlobalTXT_LocalizationStrings[11], item_desc->uDamageDice + item_desc->uDamageMod); | |
352 break; | |
353 | |
354 } | |
355 | |
356 if ( !v77 ) | |
357 { | |
358 if (item_desc->uEquipType ==EQUIP_POTION) //this is CORRECT! do not move to switch! | |
359 { | |
360 if ( inspect_item->uEnchantmentType ) | |
361 sprintf(out_text + 200, "%s: %d",pGlobalTXT_LocalizationStrings[449] , inspect_item->uEnchantmentType); //"Power" | |
362 } | |
363 else if (item_desc->uEquipType == EQUIP_REAGENT) | |
364 { | |
365 sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], pItemsTable->pItems[inspect_item->uItemID].uDamageDice); //"Power" | |
366 } | |
367 | |
368 else if ( inspect_item->uEnchantmentType ) | |
369 { | |
370 sprintf(out_text + 200, "%s: %s +%d", pGlobalTXT_LocalizationStrings[210], | |
1599 | 371 pItemsTable->pEnchantments[inspect_item->uEnchantmentType-1].pBonusStat, inspect_item->m_enchantmentStrength); //"Special" |
1298 | 372 } |
373 else if ( inspect_item->uSpecEnchantmentType ) | |
374 { | |
375 sprintf(out_text + 200, "%s: %s", pGlobalTXT_LocalizationStrings[210], | |
1599 | 376 pItemsTable->pSpecialEnchantments[inspect_item->uSpecEnchantmentType-1].pBonusStatement, inspect_item->m_enchantmentStrength); |
1298 | 377 } |
378 | |
379 else if ( inspect_item->uNumCharges ) | |
380 { | |
381 sprintf(out_text + 200, "%s: %lu", pGlobalTXT_LocalizationStrings[464], inspect_item->uNumCharges); //"Charges" | |
382 | |
383 } | |
384 } | |
385 wHintWindow.uFrameWidth -= 12; | |
386 v85 = 3; | |
387 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; | |
388 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; | |
389 Str = (char *)(3 * (LOBYTE(pFontArrus->uFontHeight) + 8)); | |
390 v84 = &out_text[0]; | |
391 do | |
392 { | |
393 if ( *v84 ) | |
394 { | |
395 v27 = pFontComic->CalcTextHeight(v84, &wHintWindow, 100, 0); | |
396 Str += v27 + 3; | |
397 } | |
398 v84 += 100; | |
399 --v85; | |
400 } | |
401 while ( v85 ); | |
402 v28 = item_desc->pDescription; | |
403 if ( *v28 ) | |
404 { | |
405 v29 = pFontSmallnum->CalcTextHeight(v28, &wHintWindow, 100, 0); | |
406 Str += v29; | |
407 } | |
408 wHintWindow.uFrameHeight = v73->uTextureHeight + v81 + 54; | |
409 if ( (signed int)Str > (signed int)wHintWindow.uFrameHeight ) | |
410 wHintWindow.uFrameHeight = (unsigned int)Str; | |
411 if ( inspect_item->uAttributes & 8 && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) ) | |
412 wHintWindow.uFrameHeight += LOBYTE(pFontComic->uFontHeight); | |
413 v85 = 0; | |
414 if ( pFontArrus->uFontHeight ) | |
415 { | |
416 wHintWindow.uFrameWidth -= 24; | |
417 v30 = pFontArrus->uFontHeight; | |
418 v31 = inspect_item->GetIdentifiedName(); | |
419 if ( pFontArrus->CalcTextHeight(v31, &wHintWindow, 0, 0) / (signed int)v30 ) | |
420 v85 = v30; | |
421 wHintWindow.uFrameWidth += 24; | |
422 } | |
423 wHintWindow.uFrameWidth += 12; | |
424 wHintWindow.uFrameHeight += (unsigned int)v85; | |
425 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; | |
426 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; | |
427 wHintWindow.DrawMessageBox(0); | |
428 //v15 = pRenderer; | |
429 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, | |
430 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12); | |
431 wHintWindow.uFrameWidth -= 12; | |
432 v32 = v73->uTextureHeight; | |
433 v33 = wHintWindow.uFrameHeight; | |
434 wHintWindow.uFrameHeight -= 12; | |
435 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; | |
436 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; | |
437 pRenderer->DrawTextureTransparent( | |
438 wHintWindow.uFrameX + v78, | |
439 wHintWindow.uFrameY + (signed int)(v33 - v32) / 2, | |
440 v73); | |
441 | |
442 v34 = (int)(v85 + 35); | |
443 v85 = 3; | |
444 Str = out_text; | |
445 do | |
446 { | |
447 if ( *Str ) | |
448 { | |
449 wHintWindow.DrawText(pFontComic, 100, v34, 0, Str, 0, 0, 0); | |
450 v34 += pFontComic->CalcTextHeight(Str, &wHintWindow, 100, 0) + 3; | |
451 } | |
452 Str += 100; | |
453 --v85; | |
454 } | |
455 while (v85 ); | |
456 v35 = item_desc->pDescription; | |
457 if ( *v35 ) | |
458 wHintWindow.DrawText(pFontSmallnum, 100, v34, 0, v35, 0, 0, 0); | |
459 wHintWindow.uFrameX += 12; | |
460 wHintWindow.uFrameWidth -= 24; | |
461 v36 = inspect_item->GetIdentifiedName(); | |
462 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v36, 3u); | |
463 wHintWindow.uFrameWidth += 24; | |
464 wHintWindow.uFrameX -= 12; | |
465 if ( v77 ) | |
466 { | |
467 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], v77);//"Value" | |
468 v40 = pFontComic; | |
469 v61 = 0; | |
470 v56 = 0; | |
471 v51 = 0; | |
472 v47 = pTmpBuf.data(); | |
473 v44 = 0; | |
474 v42 = wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight); | |
475 v41 = 100; | |
476 } | |
477 else | |
478 { | |
479 if ( (inspect_item->uAttributes & 8) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) ) | |
480 { | |
1459 | 481 init_summoned_item(&v67, inspect_item->uExpireTime - pParty->uTimePlayed); |
1298 | 482 strcpy(pTmpBuf.data(), "Duration:"); |
483 Str = (char *)(v67.field_18_expire_year - game_starting_year); | |
484 if (v67.field_18_expire_year != 1168 ) | |
485 { | |
486 sprintf(v65, " %d:yr", v67.field_18_expire_year - game_starting_year); | |
487 strcat(pTmpBuf.data(), v65); | |
488 } | |
489 if ( (((v67.field_14_exprie_month || Str) && | |
490 ((sprintf(v65, " %d:mo", v67.field_14_exprie_month), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str) | |
491 || v67.field_C_expire_day) | |
492 && ((sprintf(v65, " %d:dy", v67.field_C_expire_day), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str || | |
493 v67.field_C_expire_day) | |
494 || v67.field_8_expire_hour) | |
495 && ((sprintf(v65, " %d:hr", v67.field_8_expire_hour), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str || | |
496 v67.field_C_expire_day || v67.field_8_expire_hour) | |
497 || v67.field_4_expire_minute ) | |
498 { | |
499 sprintf(v65, " %d:mn", v67.field_4_expire_minute); | |
500 strcat(pTmpBuf.data(), v65); | |
501 } | |
502 wHintWindow.DrawText(pFontComic, 100, wHintWindow.uFrameHeight - 2 * LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0); | |
503 } | |
504 v37 = inspect_item->GetValue(); | |
505 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], v37); | |
506 wHintWindow.DrawText(pFontComic, 100, wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0); | |
507 v38 = inspect_item->uAttributes; | |
508 if ( BYTE1(v38) & 1 ) | |
509 { | |
510 v61 = 0; | |
511 v56 = 0; | |
512 v51 = 0; | |
513 v47 = pGlobalTXT_LocalizationStrings[187]; //"Stolen" | |
514 } | |
515 else | |
516 { | |
517 if ( !(BYTE1(v38) & 2) ) | |
518 { | |
519 pRenderer->ResetTextureClipRect(); | |
520 if ( !areWeLoadingTexture ) | |
521 { | |
522 v73->Release(); | |
523 pIcons_LOD->SyncLoadedFilesCount(); | |
524 } | |
525 return; | |
526 } | |
527 v61 = 0; | |
528 v56 = 0; | |
529 v51 = 0; | |
530 v47 = pGlobalTXT_LocalizationStrings[651]; //"Hardened" | |
531 } | |
532 LOWORD(v38) = LOWORD(pRenderer->uTargetRMask); | |
533 v44 = v38; | |
534 v42 = wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight); | |
535 v39 = pFontComic->GetLineWidth(pTmpBuf.data()); | |
536 v40 = pFontComic; | |
537 v41 = v39 + 132; | |
538 } | |
539 wHintWindow.DrawText(v40, v41, v42, v44, v47, v51, v56, v61); | |
540 pRenderer->ResetTextureClipRect(); | |
541 if ( !areWeLoadingTexture ) | |
542 { | |
543 v73->Release(); | |
544 pIcons_LOD->SyncLoadedFilesCount(); | |
545 } | |
546 return; | |
547 } | |
548 // 4E455C: using guessed type int dword_4E455C; | |
549 // 506128: using guessed type int areWeLoadingTexture; | |
550 | |
551 | |
552 | |
553 //----- (0041E360) -------------------------------------------------------- | |
554 void MonsterPopup_Draw(unsigned int uActorID, GUIWindow *edx0) | |
555 { | |
556 unsigned int v2; // esi@1 | |
557 Actor *v3; // esi@3 | |
558 int v4; // eax@3 | |
559 //unsigned int v5; // ecx@3 | |
560 NPCData *v6; // eax@3 | |
561 unsigned __int16 v7; // cx@3 | |
562 int v8; // eax@4 | |
563 unsigned __int16 v9; // dx@4 | |
564 SpriteFrame *v10; // edi@17 | |
565 LODSprite *v11; // esi@17 | |
566 unsigned int v12; // ecx@17 | |
567 Sprite *v13; // edi@18 | |
568 //int v14; // ecx@18 | |
569 //int v15; // edx@18 | |
570 //int v16; // edx@18 | |
571 //int v17; // eax@18 | |
572 unsigned int v18; // ecx@19 | |
573 unsigned int v19; // eax@21 | |
574 char *v20; // esi@28 | |
575 int v21; // edx@29 | |
576 unsigned __int16 *v22; // ecx@29 | |
577 int v23; // eax@29 | |
578 int v24; // eax@32 | |
579 int v25; // esi@32 | |
580 char *v26; // edx@34 | |
581 unsigned __int8 v27; // sf@36 | |
582 unsigned __int8 v28; // of@36 | |
583 //int v29; // esi@40 | |
584 //unsigned __int16 *v30; // ecx@40 | |
585 //int v31; // eax@40 | |
586 //int v32; // esi@43 | |
587 //unsigned __int16 v33; // ax@45 | |
588 //int v34; // edx@45 | |
589 //int v35; // eax@45 | |
590 int v36; // eax@49 | |
591 //char *v37; // eax@52 | |
592 int v38; // eax@55 | |
593 unsigned __int16 v39; // ax@59 | |
594 SpellBuff *v40; // eax@60 | |
595 int v41; // edi@61 | |
596 unsigned int v42; // eax@61 | |
597 int v43; // eax@62 | |
598 int v44; // eax@63 | |
599 signed int v45; // edi@65 | |
600 unsigned __int16 v46; // ax@73 | |
601 Player *v47; // ecx@77 | |
602 //unsigned int v48; // eax@85 | |
603 GUIFont *v49; // edi@90 | |
604 int v50; // edi@90 | |
605 SpellBuff *v51; // eax@91 | |
606 char *v52; // ecx@98 | |
607 char *v53; // ecx@101 | |
608 char *v54; // ST0C_4@118 | |
609 unsigned int v55; // eax@118 | |
610 GUIFont *v56; // edi@124 | |
611 unsigned __int8 v57; // al@128 | |
612 int v58; // eax@132 | |
613 Actor *v59; // ecx@133 | |
614 unsigned __int8 v60; // dl@138 | |
615 char *v62; // eax@147 | |
616 int v63; // eax@152 | |
617 //char *result; // eax@152 | |
618 int v65; // eax@155 | |
619 const char *v66; // [sp-10h] [bp-1FCh]@121 | |
620 const char *v67; // [sp-10h] [bp-1FCh]@125 | |
621 const char *v68; // [sp-10h] [bp-1FCh]@142 | |
622 int v69; // [sp-Ch] [bp-1F8h]@121 | |
623 char *v70; // [sp-Ch] [bp-1F8h]@125 | |
624 char *v71; // [sp-Ch] [bp-1F8h]@142 | |
625 char *v72; // [sp-8h] [bp-1F4h]@54 | |
626 int v73; // [sp-8h] [bp-1F4h]@79 | |
627 int v74; // [sp-8h] [bp-1F4h]@121 | |
628 int v75; // [sp-8h] [bp-1F4h]@125 | |
629 int v76; // [sp-8h] [bp-1F4h]@142 | |
630 size_t v77; // [sp-4h] [bp-1F0h]@54 | |
631 unsigned int v78; // [sp-4h] [bp-1F0h]@121 | |
632 unsigned int v79; // [sp-4h] [bp-1F0h]@125 | |
633 char *v80; // [sp-4h] [bp-1F0h]@142 | |
634 char *v81; // [sp-4h] [bp-1F0h]@148 | |
635 DDBLTFX Dst; // [sp+Ch] [bp-1E0h]@18 | |
636 DDSURFACEDESC2 pDesc; // [sp+70h] [bp-17Ch]@18 | |
637 RECT v84; // [sp+ECh] [bp-100h]@26 | |
638 char *v85[10]; // [sp+FCh] [bp-F0h]@145 | |
639 char *v95[11]; // [sp+124h] [bp-C8h]@127 | |
640 RenderBillboardTransform_local0 v106; // [sp+150h] [bp-9Ch]@3 | |
641 unsigned int v107; // [sp+1A0h] [bp-4Ch]@18 | |
642 unsigned __int16 *v108; // [sp+1A4h] [bp-48h]@34 | |
643 unsigned int v109; // [sp+1A8h] [bp-44h]@32 | |
644 LPVOID v110; // [sp+1ACh] [bp-40h]@28 | |
645 unsigned int v111; // [sp+1B0h] [bp-3Ch]@29 | |
646 int v112; // [sp+1B4h] [bp-38h]@3 | |
647 int v222; // [sp+1B8h] [bp-34h]@18 | |
648 unsigned __int8 v114; // [sp+1BFh] [bp-2Dh]@133 | |
649 int v115; // [sp+1C0h] [bp-2Ch]@3 | |
650 unsigned int v116; // [sp+1C4h] [bp-28h]@18 | |
651 int i; // [sp+1C8h] [bp-24h]@18 | |
652 int a2; // [sp+1CCh] [bp-20h]@28 | |
653 int v119; // [sp+1D0h] [bp-1Ch]@18 | |
654 SpellBuff *v120; // [sp+1D4h] [bp-18h]@18 | |
655 Actor *v121; // [sp+1D8h] [bp-14h]@3 | |
656 int a5; // [sp+1DCh] [bp-10h]@3 | |
657 GUIWindow *a1; // [sp+1E0h] [bp-Ch]@1 | |
658 int v124; // [sp+1E4h] [bp-8h]@18 | |
659 int a4; // [sp+1E8h] [bp-4h]@18 | |
660 | |
661 a1 = edx0; | |
662 v2 = uActorID; | |
663 | |
664 static Actor pMonsterInfoUI_Doll; | |
665 /*if ( !(bMonsterInfoUI_bDollInitialized & 1) ) | |
666 { | |
667 bMonsterInfoUI_bDollInitialized |= 1u; | |
668 Actor::Actor(&pMonsterInfoUI_Doll); | |
669 atexit(nullsub_3); | |
670 }*/ | |
671 v106.uParentBillboardID = -1; | |
672 v3 = &pActors[v2]; | |
673 v121 = v3; | |
674 v4 = TargetColor(0xE1u, 255, 0x9Bu); | |
675 //v5 = v3->sNPC_ID; | |
676 a5 = v4; | |
677 v6 = GetNPCData(v3->sNPC_ID); | |
678 v7 = v3->pMonsterInfo.uID; | |
679 //v112 = (char **)v6; | |
680 v115 = monster_popup_y_offsets[((signed __int16)v7 - 1) / 3] - 40; | |
681 if ( v7 == pMonsterInfoUI_Doll.pMonsterInfo.uID ) | |
682 { | |
683 v9 = pMonsterInfoUI_Doll.uCurrentActionLength; | |
684 } | |
685 else | |
686 { | |
687 memcpy(&pMonsterInfoUI_Doll, v3, sizeof(pMonsterInfoUI_Doll)); | |
688 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored; | |
689 pMonsterInfoUI_Doll.uCurrentActionTime = 0; | |
690 v8 = rand(); | |
691 v3 = v121; | |
692 v9 = v8 % 256 + 128; | |
693 pMonsterInfoUI_Doll.uCurrentActionLength = v8 % 256 + 128; | |
694 } | |
695 | |
696 if ( (signed int)pMonsterInfoUI_Doll.uCurrentActionTime > (signed __int16)v9 ) | |
697 { | |
698 pMonsterInfoUI_Doll.uCurrentActionTime = 0; | |
699 if ( pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_Bored || pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_AtkMelee) | |
700 { | |
701 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Standing; | |
702 pMonsterInfoUI_Doll.uCurrentActionLength = rand() % 128 + 128; | |
703 } | |
704 else | |
705 { | |
706 //rand(); | |
707 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored; | |
708 if ( (pMonsterInfoUI_Doll.pMonsterInfo.uID < 115 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 186) && | |
709 (pMonsterInfoUI_Doll.pMonsterInfo.uID < 232 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 249) && rand() % 30 < 100 ) | |
710 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_AtkMelee; | |
711 pMonsterInfoUI_Doll.uCurrentActionLength = 8 * pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation]].uAnimLength; | |
712 } | |
713 } | |
714 v10 = pSpriteFrameTable->GetFrame( v3->pSpriteIDs[pMonsterInfoUI_Doll.uCurrentActionAnimation], pMonsterInfoUI_Doll.uCurrentActionTime); | |
715 v11 = &pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]];//40 * v10->pHwSpriteIDs[0] + 7218180; | |
716 v106.pTarget = pRenderer->pTargetSurface; | |
717 v106.pTargetZ = pRenderer->pActiveZBuffer; | |
718 v106.uTargetPitch = pRenderer->uTargetSurfacePitch; | |
719 v12 = a1->uFrameY + 52; | |
720 v106.uViewportX = a1->uFrameX + 13; | |
721 v106.uViewportY = v12; | |
722 v106.uViewportW = v12 + 128; | |
723 v106.uViewportZ = v106.uViewportX + 128; | |
724 v106.uScreenSpaceX = (signed int)(v106.uViewportX + 128 + v106.uViewportX) / 2; | |
725 v106._screenspace_x_scaler_packedfloat = 65536; | |
726 v106._screenspace_y_scaler_packedfloat = 65536; | |
727 v106.uScreenSpaceY = v115 + v12 + v11->uHeight; | |
728 v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1); | |
729 v106.sZValue = 0; | |
730 v106.uFlags = 0; | |
731 pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu); | |
732 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, a5); | |
733 pRenderer->RasterLine2D( v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, a5); | |
734 pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, a5); | |
735 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, a5); | |
736 if ( pRenderer->pRenderD3D ) | |
737 { | |
738 v13 = &pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]]; | |
739 v106.uScreenSpaceY = v115 + v106.uViewportY + v13->uBufferHeight; | |
740 //v222 = (IDirectDrawSurface *)v13->pTextureSurface; | |
741 memset(&Dst, 0, 0x64u); | |
742 Dst.dwSize = 100; | |
743 Dst.dwFillColor = 0; | |
744 memset(&pDesc, 0, 0x7Cu); | |
745 pDesc.dwSize = 124; | |
746 v13->pTextureSurface->GetSurfaceDesc(&pDesc); | |
747 //v14 = v13->uBufferHeight; | |
748 //v120 = (SpellBuff *)v13->uBufferWidth; | |
749 v107 = 0; | |
750 //v15 = v13->uAreaX; | |
751 //v119 = v13->uBufferWidth / 2; | |
752 i = 0; | |
753 //a4 = v106.uScreenSpaceX + v15 - v13->uBufferWidth / 2; | |
754 int dst_x = v106.uScreenSpaceX + v13->uAreaX - v13->uBufferWidth / 2; | |
755 //v115 = v13->uAreaY; | |
756 //v16 = v13->uAreaWidth + v13->uBufferWidth / 2 + v13->uAreaX - v13->uBufferWidth; | |
757 //v124 = v106.uScreenSpaceY + v115 - v14; | |
758 int dst_y = v106.uScreenSpaceY + v13->uAreaY - v13->uBufferHeight; | |
759 //v17 = v13->uAreaHeight + v13->uAreaY - v14; | |
760 //v116 = v106.uScreenSpaceX + v16; | |
761 uint dst_z = v106.uScreenSpaceX + v13->uAreaX + v13->uAreaWidth + v13->uBufferWidth / 2 - v13->uBufferWidth; | |
762 //v119 = v106.uScreenSpaceY + v17; | |
763 uint dst_w = v106.uScreenSpaceY + v13->uAreaY + v13->uAreaHeight - v13->uBufferHeight; | |
764 if (dst_x < v106.uViewportX) | |
765 { | |
766 v18 = v106.uViewportX - dst_x; | |
767 dst_x = v106.uViewportX; | |
768 v107 = v18; | |
769 } | |
770 if (dst_y < v106.uViewportY) | |
771 { | |
772 v19 = v106.uViewportY - dst_y; | |
773 dst_y = v106.uViewportY; | |
774 i = v19; | |
775 } | |
776 if (dst_z > v106.uViewportZ) | |
777 dst_z = v106.uViewportZ; | |
778 if (dst_w > v106.uViewportW) | |
779 dst_w = v106.uViewportW; | |
780 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask); | |
781 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask); | |
782 v84.left = v106.uViewportX; | |
783 v84.top = v106.uViewportY; | |
784 v84.right = v106.uViewportZ; | |
785 v84.bottom = v106.uViewportW; | |
786 ErrD3D(pRenderer->pBackBuffer4->Blt(&v84, 0, 0, 16778240u, &Dst)); | |
787 if ( pRenderer->uTargetGBits == 5 ) | |
788 { | |
789 __debugbreak(); // no monster popup for r5g5b5 yet | |
790 memset(&pDesc, 0, 0x7Cu); | |
791 pDesc.dwSize = 124; | |
792 if ( pRenderer->LockSurface_DDraw4(v13->pTextureSurface, &pDesc, DDLOCK_WAIT)) | |
793 { | |
794 v20 = (char *)dst_y; | |
795 v110 = pDesc.lpSurface; | |
796 a2 = dst_y; | |
797 if (dst_y < dst_w) | |
798 { | |
799 //v111 = 2 * pRenderer->uTargetSurfacePitch; | |
800 v21 = dst_x; | |
801 v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x]; | |
802 auto _v22_2 = v22; | |
803 v23 = i - dst_y; | |
804 //v120 = (SpellBuff *)&pRenderer->pTargetSurface[(int)&a4[v124 * pRenderer->uTargetSurfacePitch]]; | |
805 v115 = i - dst_y; | |
806 while ( 1 ) | |
807 { | |
808 dst_y = v21; | |
809 if ( v21 < dst_z ) | |
810 { | |
811 v24 = (int)&v20[v23]; | |
812 v25 = v107 - v21; | |
813 v109 = v24; | |
814 for ( i = v107 - v21; ; v25 = i ) | |
815 { | |
816 v108 = (unsigned __int16 *)((pDesc.lPitch >> 1) * pDesc.dwHeight * v109 / v13->uAreaHeight); | |
817 v26 = (char *)v108 + pDesc.dwWidth * (v25 + dst_y++) / v13->uAreaWidth; | |
818 *v22 = *((short *)v110 + (int)v26); | |
819 ++v22; | |
820 if ( dst_y >= dst_z ) | |
821 break; | |
822 } | |
823 v23 = v115; | |
824 } | |
825 v22 = (unsigned __int16 *)((char *)_v22_2 + 2 * pRenderer->uTargetSurfacePitch); | |
826 _v22_2 = v22; | |
827 v20 = (char *)(a2 + 1); | |
828 v28 = __OFSUB__(a2 + 1, dst_w); | |
829 v27 = (signed int)(a2++ + 1 - dst_w) < 0; | |
830 //a2 = (Player *)((char *)a2 + 1); | |
831 //v120 = (SpellBuff *)((char *)v120 + v111); | |
832 if ( !(v27 ^ v28) ) | |
833 break; | |
834 v21 = dst_x; | |
835 } | |
836 } | |
837 v13->pTextureSurface->Unlock(0); | |
838 } | |
839 } | |
840 else | |
841 { | |
842 memset(&pDesc, 0, 0x7Cu); | |
843 pDesc.dwSize = 124; | |
844 if ( pRenderer->LockSurface_DDraw4(v13->pTextureSurface, &pDesc, DDLOCK_WAIT) ) | |
845 { | |
846 auto src = (unsigned __int16 *)pDesc.lpSurface; | |
847 | |
848 uint num_top_scanlines_above_frame_y = i - dst_y; | |
849 for (uint y = dst_y; y < dst_w; ++y) | |
850 { | |
851 auto dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x]; | |
852 | |
853 uint src_y = num_top_scanlines_above_frame_y + y; | |
854 for (uint x = dst_x; x < dst_z; ++x) | |
855 { | |
856 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x | |
857 | |
858 uint idx = pDesc.dwHeight * src_y / v13->uAreaHeight * (pDesc.lPitch / sizeof(short)) + | |
859 pDesc.dwWidth * src_x / v13->uAreaWidth; | |
860 uint b = src[idx] & 0x1F; | |
861 *dst++ = b | 2 * (src[idx] & 0xFFE0); | |
862 } | |
863 } | |
864 v13->pTextureSurface->Unlock(0); | |
865 } | |
866 } | |
867 } | |
868 else | |
869 { | |
870 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, 0); | |
871 v36 = v10->pHwSpriteIDs[0]; | |
872 if ( v36 >= 0 ) | |
873 pSprites_LOD->pSpriteHeaders[v36].DrawSprite_sw(&v106, 0); | |
874 } | |
875 | |
876 if ( v121->sNPC_ID ) | |
877 { | |
878 //v37 = v6->uProfession; | |
879 if (v6->uProfession) | |
880 { | |
881 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v6->uProfession]); // "%s the %s" / ^Pi[%s] %s | |
882 } | |
883 else | |
884 { | |
885 v77 = 2000; | |
886 v72 = v6->pName; | |
887 } | |
888 } | |
889 else | |
890 { | |
891 v38 = v121->dword_000334_unique_name; | |
892 v77 = 2000; | |
893 if ( v38 ) | |
894 v72 = pMonsterStats->pPlaceStrings[v38]; | |
895 else | |
896 v72 = pMonsterStats->pInfos[v121->pMonsterInfo.uID].pName; | |
897 } | |
898 if(!v121->sNPC_ID || (v121->sNPC_ID && !v6->uProfession)) | |
899 strncpy(pTmpBuf.data(), v72, v77); | |
900 v39 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | |
901 a1->DrawTitleText(pFontComic, 0, 0xCu, v39, pTmpBuf.data(), 3u); | |
902 Actor::DrawHealthBar(v121, a1); | |
903 v119 = 0; | |
904 pMonsterInfoUI_Doll.uCurrentActionTime += pMiscTimer->uTimeElapsed; | |
905 v115 = 0; | |
906 v116 = 0; | |
907 i = 0; | |
908 v112 = 0; | |
909 if ( !uActiveCharacter ) | |
910 { | |
911 v45 = 1; | |
912 } | |
913 else | |
914 { | |
915 LOBYTE(v40) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID); | |
916 v120 = v40; | |
917 if ( !v40 ) | |
918 v45 = 1; | |
919 else | |
920 { | |
921 v41 = (unsigned __int8)v40 & 0x3F; | |
922 v42 = SkillToMastery((unsigned __int16)v40) - 1; | |
923 if ( !v42 ) | |
924 { | |
925 if ( v41 + 10 >= v121->pMonsterInfo.uLevel ) | |
926 { | |
927 v45 = 1; | |
928 v119 = 1; | |
929 } | |
930 else | |
931 v45 = 1; | |
932 } | |
933 else | |
934 { | |
935 v43 = v42 - 1; | |
936 if ( !v43 ) | |
937 { | |
938 if ( 2 * v41 + 10 >= v121->pMonsterInfo.uLevel ) | |
939 { | |
940 v45 = 1; | |
941 v119 = 1; | |
942 v116 = 1; | |
943 } | |
944 else | |
945 v45 = 1; | |
946 } | |
947 else | |
948 { | |
949 v44 = v43 - 1; | |
950 if ( !v44 ) | |
951 { | |
952 if ( 3 * v41 + 10 >= v121->pMonsterInfo.uLevel ) | |
953 { | |
954 v45 = 1; | |
955 v119 = 1; | |
956 v116 = 1; | |
957 i = 1; | |
958 } | |
959 else | |
960 { | |
961 v45 = 1; | |
962 } | |
963 } | |
964 else | |
965 { | |
966 if ( v44 != 1 ) | |
967 v45 = 1; | |
968 else | |
969 { | |
970 v45 = 1; | |
971 v119 = 1; | |
972 v116 = 1; | |
973 i = 1; | |
974 v112 = 1; | |
975 } | |
976 } | |
977 } | |
978 } | |
979 } | |
980 // LABEL_73: | |
981 v46 = v121->uAIState; | |
982 if ( v46 != 5 && v46 != 4 && !dword_507BF0_is_there_popup_onscreen && v120 ) | |
983 { | |
984 v47 = pPlayers[uActiveCharacter]; | |
985 if ( v119 | v116 | i | (unsigned int)v112 ) | |
986 { | |
987 if ( v121->pMonsterInfo.uLevel >= v47->uLevel - 5 ) | |
988 v73 = SPEECH_105; | |
989 else | |
990 v73 = SPEECH_104; | |
991 } | |
992 else | |
993 { | |
994 v73 = SPEECH_106; | |
995 } | |
996 v47->PlaySound((PlayerSpeech)v73, 0); | |
997 } | |
998 } | |
999 | |
1000 for (uint _it = 0; _it < 4; ++_it) | |
1001 { | |
1002 auto player = pParty->pPlayers + _it; | |
1003 | |
1004 //LOBYTE(v48) = player->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID); | |
1005 //v111 = v48; | |
1006 v111 = player->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID); | |
1007 v120 = (SpellBuff *)138; | |
1008 do | |
1009 { | |
1010 if ( (signed int)SkillToMastery(v111) >= 3 ) | |
1011 v115 = v45; | |
1012 v120 = (SpellBuff *)((char *)v120 - 1); | |
1013 } | |
1014 while ( v120 ); | |
1015 //++a2; | |
1016 } | |
1017 //while ( (signed int)a2 < (signed int)pParty->pHirelings ); | |
1018 | |
1019 v49 = pFontSmallnum; | |
1020 a2 = (int)pFontSmallnum; | |
1021 a1->DrawText(pFontSmallnum, 12, 196, a5, pGlobalTXT_LocalizationStrings[631], 0, 0, 0); | |
1022 v50 = LOBYTE(v49->uFontHeight) + 193; | |
1023 if ( !v115 ) | |
1024 { | |
1025 v78 = 0; | |
1026 v74 = 0; | |
1027 v69 = 0; | |
1028 v66 = pGlobalTXT_LocalizationStrings[630]; | |
1029 a1->DrawText((GUIFont *)a2, 28, v50, a5, v66, v69, v74, v78); | |
1030 } | |
1031 else | |
1032 { | |
1033 a4 = 0; | |
1034 v51 = &v121->pActorBuffs[1]; | |
1035 v222 = 0; | |
1036 v120 = &v121->pActorBuffs[1]; | |
1037 do | |
1038 { | |
1039 if ( (signed __int64)v51->uExpireTime > 0 ) | |
1040 { | |
1041 switch ( (int)v51 ) | |
1042 { | |
1043 case 0u: | |
1044 v124 = 60; | |
1045 a4 = (int)pGlobalTXT_LocalizationStrings[591]; | |
1046 break; | |
1047 case 1u: | |
1048 v124 = 82; | |
1049 a4 = (int)pGlobalTXT_LocalizationStrings[649]; | |
1050 break; | |
1051 case 2u: | |
1052 v124 = 92; | |
1053 a4 = (int)pGlobalTXT_LocalizationStrings[592]; | |
1054 break; | |
1055 case 3u: | |
1056 v124 = 63; | |
1057 a4 = (int)pGlobalTXT_LocalizationStrings[4]; | |
1058 break; | |
1059 case 4u: | |
1060 v52 = pGlobalTXT_LocalizationStrings[220]; | |
1061 a4 = (int)v52; | |
1062 v124 = 81; | |
1063 break; | |
1064 case 5u: | |
1065 v52 = pGlobalTXT_LocalizationStrings[162]; | |
1066 a4 = (int)v52; | |
1067 v124 = 81; | |
1068 break; | |
1069 case 6u: | |
1070 v53 = pGlobalTXT_LocalizationStrings[593]; | |
1071 v124 = 35; | |
1072 a4 = (int)v53; | |
1073 break; | |
1074 case 8u: | |
1075 v53 = pGlobalTXT_LocalizationStrings[608]; | |
1076 v124 = 62; | |
1077 a4 = (int)v53; | |
1078 break; | |
1079 case 7u: | |
1080 case 9u: | |
1081 a4 = 0; | |
1082 v124 = 0; | |
1083 ++v51; | |
1084 v222 = v222 + 1; | |
1085 v120 = v51; | |
1086 __debugbreak(); // fix condition | |
1087 continue; | |
1088 case 0xAu: | |
1089 v124 = 47; | |
1090 a4 = (int)pGlobalTXT_LocalizationStrings[221]; | |
1091 break; | |
1092 case 0xBu: | |
1093 v124 = 66; | |
1094 a4 = (int)pGlobalTXT_LocalizationStrings[607]; | |
1095 break; | |
1096 case 0xCu: | |
1097 v124 = 85; | |
1098 a4 = (int)pGlobalTXT_LocalizationStrings[610]; | |
1099 break; | |
1100 case 0xDu: | |
1101 v124 = 86; | |
1102 a4 = (int)pGlobalTXT_LocalizationStrings[609]; | |
1103 break; | |
1104 case 0xEu: | |
1105 v124 = 17; | |
1106 a4 = (int)pGlobalTXT_LocalizationStrings[279]; | |
1107 break; | |
1108 case 0xFu: | |
1109 v124 = 38; | |
1110 a4 = (int)pGlobalTXT_LocalizationStrings[442]; | |
1111 break; | |
1112 case 0x10u: | |
1113 v124 = 46; | |
1114 a4 = (int)pGlobalTXT_LocalizationStrings[443]; | |
1115 break; | |
1116 case 0x11u: | |
1117 v124 = 51; | |
1118 a4 = (int)pGlobalTXT_LocalizationStrings[440]; | |
1119 break; | |
1120 case 0x12u: | |
1121 v124 = 5; | |
1122 a4 = (int)pGlobalTXT_LocalizationStrings[441]; | |
1123 break; | |
1124 case 0x13u: | |
1125 v124 = 95; | |
1126 a4 = (int)pGlobalTXT_LocalizationStrings[229]; | |
1127 break; | |
1128 case 0x14u: | |
1129 v124 = 73; | |
1130 a4 = (int)pGlobalTXT_LocalizationStrings[228]; | |
1131 break; | |
1132 default: | |
1133 a4 = 0; | |
1134 break; | |
1135 } | |
1136 if ( a4 ) | |
1137 { | |
1138 v54 = (char *)a4; | |
1139 v55 = GetSpellColor(v124); | |
1140 a1->DrawText((GUIFont *)a2, 28, v50, v55, v54, 0, 0, 0); | |
1141 v50 = v50 + *(char *)(a2 + 5) - 3; | |
1142 v51 = v120; | |
1143 } | |
1144 } | |
1145 | |
1146 ++v51; | |
1147 v222 = v222 + 1; | |
1148 v120 = v51; | |
1149 | |
1150 __debugbreak(); // fix condition | |
1151 } | |
1152 //while ( (signed int)((char *)&v222->lpVtbl + 1) < 22 ); | |
1153 while (true); | |
1154 | |
1155 if ( !a4 ) | |
1156 { | |
1157 v78 = 0; | |
1158 v74 = 0; | |
1159 v69 = 0; | |
1160 v66 = pGlobalTXT_LocalizationStrings[153]; | |
1161 a1->DrawText((GUIFont *)a2, 28, v50, a5, v66, v69, v74, v78); | |
1162 } | |
1163 } | |
1164 v56 = pFontSmallnum; | |
1165 a4 = v106.uViewportY; | |
1166 if ( v119 ) | |
1167 { | |
1168 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[108], 0, v121->pMonsterInfo.uHP); | |
1169 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1170 a4 = a4 + LOBYTE(v56->uFontHeight) - 3; | |
1171 v79 = v121->pMonsterInfo.uAC; | |
1172 v75 = 0; | |
1173 v70 = pGlobalTXT_LocalizationStrings[12]; | |
1174 v67 = "%s\f%05u\t100%d\n"; | |
1175 } | |
1176 else | |
1177 { | |
1178 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[108], 0, pGlobalTXT_LocalizationStrings[630]); | |
1179 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1180 v79 = (unsigned int)pGlobalTXT_LocalizationStrings[630]; | |
1181 v75 = 0; | |
1182 v70 = pGlobalTXT_LocalizationStrings[12]; | |
1183 a4 = a4 + LOBYTE(v56->uFontHeight) - 3; | |
1184 v67 = "%s\f%05u\t100%s\n"; | |
1185 } | |
1186 sprintf(pTmpBuf.data(), v67, v70, v75, v79); | |
1187 a1->DrawText(v56, 150, a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1188 a4 = a4 + LOBYTE(v56->uFontHeight) - 6 + LOBYTE(v56->uFontHeight); | |
1189 v95[0] = pGlobalTXT_LocalizationStrings[87]; | |
1190 v95[1] = pGlobalTXT_LocalizationStrings[6]; | |
1191 v95[2] = pGlobalTXT_LocalizationStrings[240]; | |
1192 v95[3] = pGlobalTXT_LocalizationStrings[70]; | |
1193 v95[4] = pGlobalTXT_LocalizationStrings[624]; | |
1194 v95[5] = pGlobalTXT_LocalizationStrings[138]; | |
1195 v95[6] = pGlobalTXT_LocalizationStrings[214]; | |
1196 v95[7] = pGlobalTXT_LocalizationStrings[142]; | |
1197 v95[8] = pGlobalTXT_LocalizationStrings[29]; | |
1198 v95[9] = pGlobalTXT_LocalizationStrings[133]; | |
1199 v95[10] = pGlobalTXT_LocalizationStrings[54]; | |
1200 if ( v116 ) | |
1201 { | |
1202 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, v95[v121->pMonsterInfo.uAttack1Type]); | |
1203 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1204 a4 = a4 + LOBYTE(v56->uFontHeight) - 3; | |
1205 v57 = v121->pMonsterInfo.uAttack1DamageBonus; | |
1206 if ( v57 ) | |
1207 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53], | |
1208 0, v121->pMonsterInfo.uAttack1DamageDiceRolls, v121->pMonsterInfo.uAttack1DamageDiceSides, v57); | |
1209 else | |
1210 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d\n", pGlobalTXT_LocalizationStrings[53], | |
1211 0, v121->pMonsterInfo.uAttack1DamageDiceRolls, v121->pMonsterInfo.uAttack1DamageDiceSides); | |
1212 } | |
1213 else | |
1214 { | |
1215 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]); | |
1216 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1217 a4 = a4 + LOBYTE(v56->uFontHeight) - 3; | |
1218 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[53], 0, pGlobalTXT_LocalizationStrings[630]); | |
1219 } | |
1220 a1->DrawText(v56, 150, a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1221 v58 = LOBYTE(v56->uFontHeight); | |
1222 a4 = a4 + v58 - 6 + v58; | |
1223 if ( !i ) | |
1224 { | |
1225 v80 = pGlobalTXT_LocalizationStrings[630]; | |
1226 v76 = 0; | |
1227 v71 = pGlobalTXT_LocalizationStrings[628]; | |
1228 v68 = "%s\f%05u\t080%s\n"; | |
1229 sprintf(pTmpBuf.data(), v68, v71, v76, v80); | |
1230 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1231 v58 = LOBYTE(v56->uFontHeight); | |
1232 a4 = a4 + v58 - 3; | |
1233 } | |
1234 else | |
1235 { | |
1236 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[628]; | |
1237 v59 = v121; | |
1238 v114 = v121->pMonsterInfo.uSpell1ID; | |
1239 if ( v114 && v121->pMonsterInfo.uSpell2ID ) | |
1240 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[629]; | |
1241 if ( v114 ) | |
1242 { | |
1243 sprintf(pTmpBuf.data(), "%s\f%05u\t060%s\n", v120, 0, pSpellStats->pInfos[v114].pShortName); | |
1244 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1245 v58 = LOBYTE(v56->uFontHeight); | |
1246 a4 = a4 + v58 - 3; | |
1247 v59 = v121; | |
1248 } | |
1249 v60 = v59->pMonsterInfo.uSpell2ID; | |
1250 if ( v60 ) | |
1251 { | |
1252 sprintf(pTmpBuf.data(), "\f%05u\t060%s\n", 0, pSpellStats->pInfos[v60].pShortName); | |
1253 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1254 v58 = LOBYTE(v56->uFontHeight); | |
1255 a4 = a4 + v58 - 3; | |
1256 v59 = v121; | |
1257 } | |
1258 if ( !v59->pMonsterInfo.uSpell1ID && !v59->pMonsterInfo.uSpell2ID ) | |
1259 { | |
1260 v80 = pGlobalTXT_LocalizationStrings[153]; | |
1261 v76 = 0; | |
1262 v71 = pGlobalTXT_LocalizationStrings[628]; | |
1263 v68 = "%s\f%05u\t060%s\n"; | |
1264 sprintf(pTmpBuf.data(), v68, v71, v76, v80); | |
1265 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1266 v58 = LOBYTE(v56->uFontHeight); | |
1267 a4 = a4 + v58 - 3; | |
1268 } | |
1269 } | |
1270 a4 = a4 + v58 - 3; | |
1271 a1->DrawText(v56, 150, a4, a5, pGlobalTXT_LocalizationStrings[626], 0, 0, 0); | |
1272 a4 = a4 + LOBYTE(v56->uFontHeight) - 3; | |
1273 v85[0] = pGlobalTXT_LocalizationStrings[87]; | |
1274 v85[1] = pGlobalTXT_LocalizationStrings[6]; | |
1275 v85[2] = pGlobalTXT_LocalizationStrings[240]; | |
1276 v85[3] = pGlobalTXT_LocalizationStrings[70]; | |
1277 v85[4] = pGlobalTXT_LocalizationStrings[142]; | |
1278 v85[5] = pGlobalTXT_LocalizationStrings[214]; | |
1279 v85[6] = pGlobalTXT_LocalizationStrings[29]; | |
1280 v85[7] = pGlobalTXT_LocalizationStrings[133]; | |
1281 v85[8] = pGlobalTXT_LocalizationStrings[54]; | |
1282 v85[9] = pGlobalTXT_LocalizationStrings[624]; | |
1283 v95[1] = (char *)v121->pMonsterInfo.uResFire; | |
1284 v95[2] = (char *)v121->pMonsterInfo.uResAir; | |
1285 v95[3] = (char *)v121->pMonsterInfo.uResWater; | |
1286 v95[4] = (char *)v121->pMonsterInfo.uResEarth; | |
1287 v95[5] = (char *)v121->pMonsterInfo.uResMind; | |
1288 v95[6] = (char *)v121->pMonsterInfo.uResSpirit; | |
1289 v95[7] = (char *)v121->pMonsterInfo.uResBody; | |
1290 v95[8] = (char *)v121->pMonsterInfo.uResLight; | |
1291 v95[9] = (char *)v121->pMonsterInfo.uResPhysical; | |
1292 v95[10] = (char *)v121->pMonsterInfo.uResDark; | |
1293 if ( v112 ) | |
1294 { | |
1295 v124 = 0; | |
1296 do | |
1297 { | |
1298 v62 = v95[v124+1]; | |
1299 if ( v62 == (char *)200 ) | |
1300 { | |
1301 v81 = pGlobalTXT_LocalizationStrings[625]; | |
1302 } | |
1303 else | |
1304 { | |
1305 if ( v62 ) | |
1306 v81 = pGlobalTXT_LocalizationStrings[627]; | |
1307 else | |
1308 v81 = pGlobalTXT_LocalizationStrings[153]; | |
1309 } | |
1310 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", v85[v124], 0, v81); | |
1311 a1->DrawText(v56, 170, a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1312 v63 = LOBYTE(v56->uFontHeight); | |
1313 v124 += 4; | |
1314 a4 = a4 + v63 - 3; | |
1315 } | |
1316 while ( v124 < 40 ); | |
1317 } | |
1318 else | |
1319 { | |
1320 i = 0; | |
1321 do | |
1322 { | |
1323 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", v85[i], 0, pGlobalTXT_LocalizationStrings[630]); // "?" | |
1324 a1->DrawText(v56, 170, a4, a5, pTmpBuf.data(), 0, 0, 0); | |
1325 v65 = LOBYTE(v56->uFontHeight); | |
1326 ++i; | |
1327 a4 = a4 + v65 - 3; | |
1328 } | |
1329 while ( i < 10 ); | |
1330 } | |
1331 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].uExpireTime > 0 ) | |
1332 { | |
1333 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[650], v121->sCurrentHP); | |
1334 pFontSmallnum->GetLineWidth(pTmpBuf.data()); | |
1335 a1->DrawTitleText(pFontSmallnum, 0, a1->uFrameHeight - LOBYTE(pFontSmallnum->uFontHeight) - 12, 0, pTmpBuf.data(), 3); | |
1336 } | |
1337 } | |
1338 | |
1339 | |
1340 //----- (00417BB5) -------------------------------------------------------- | |
1341 const char *CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType) | |
1342 { | |
1343 //enum PLAYER_SKILL_TYPE v2; // esi@1 | |
1344 //unsigned int v3; // ebx@1 | |
1345 int v4; // edi@1 | |
1346 int v5; // eax@1 | |
1347 Player *pPlayer; // ebx@7 | |
1348 char v7; // al@7 | |
1349 char v8; // cl@7 | |
1350 unsigned int v9; // eax@8 | |
1351 unsigned int v10; // eax@8 | |
1352 unsigned int v11; // eax@8 | |
1353 PLAYER_SKILL_TYPE v12; // edi@8 | |
1354 unsigned int v13; // eax@8 | |
1355 unsigned int v14; // eax@8 | |
1356 PLAYER_SKILL_TYPE v15; // esi@8 | |
1357 int v16; // edi@8 | |
1358 char v17; // al@8 | |
1359 int v18; // ST5C_4@8 | |
1360 int v19; // ST4C_4@8 | |
1361 int v20; // ST3C_4@8 | |
1362 int v21; // ST2C_4@8 | |
1363 int v22; // ST1C_4@8 | |
1364 char *v23; // esi@8 | |
1365 unsigned int v24; // eax@9 | |
1366 unsigned int v25; // eax@9 | |
1367 unsigned int v26; // eax@9 | |
1368 unsigned int v27; // ecx@9 | |
1369 PLAYER_SKILL_TYPE v28; // ebx@9 | |
1370 unsigned int v29; // eax@9 | |
1371 char a2[1200]; // [sp+Ch] [bp-538h]@7 | |
1372 char Source[120]; // [sp+4BCh] [bp-88h]@7 | |
1373 unsigned __int16 *v33; // [sp+534h] [bp-10h]@1 | |
1374 int v34; // [sp+538h] [bp-Ch]@1 | |
1375 unsigned __int16 *v35; // [sp+53Ch] [bp-8h]@1 | |
1376 //enum PLAYER_SKILL_TYPE v36; // [sp+540h] [bp-4h]@1 | |
1377 | |
1378 //v2 = uPlayerSkillType; | |
1379 //v3 = uPlayerID; | |
1380 //v36 = uPlayerSkillType; | |
1381 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal | |
1382 v34 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert | |
1383 v33 = (unsigned __int16 *)pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master | |
1384 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand | |
1385 v35 = (unsigned __int16 *)v4; | |
1386 if ( v34 > v4 ) | |
1387 v35 = (unsigned __int16 *)v34; | |
1388 if ( (signed int)v33 > (signed int)v35 ) | |
1389 v35 = v33; | |
1390 if ( v5 > (signed int)v35 ) | |
1391 v35 = (unsigned __int16 *)v5; | |
1392 pPlayer = &pParty->pPlayers[uPlayerID]; | |
1393 //v33 = &pPlayer->pActiveSkills[uPlayerSkillType]; | |
1394 v7 = pPlayer->GetActualSkillLevel(uPlayerSkillType); | |
1395 v8 = pPlayer->pActiveSkills[uPlayerSkillType]; | |
1396 a2[0] = 0; | |
1397 Source[0] = 0; | |
1398 if ( (v8 & 0x3F) == (v7 & 0x3F) ) | |
1399 { | |
1400 strcpy(a2, "%s\n\n"); | |
1401 v24 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1); | |
1402 sprintf(Source, "\f%05d", v24); | |
1403 strcat(a2, Source); | |
1404 strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); | |
1405 v25 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2); | |
1406 sprintf(Source, "\f%05d", v25); | |
1407 strcat(a2, Source); | |
1408 strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); | |
1409 v26 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3); | |
1410 sprintf(Source, "\f%05d", v26); | |
1411 strcat(a2, Source); | |
1412 strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); | |
1413 v27 = pPlayer->classType; | |
1414 v28 = uPlayerSkillType; | |
1415 v29 = GetSkillColor(v27, uPlayerSkillType, 4); | |
1416 sprintf(Source, "\f%05d", v29); | |
1417 strcat(a2, Source); | |
1418 strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); | |
1419 | |
1420 v23 = static_sub_417BB5_out_string; | |
1421 sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[v28], pGlobalTXT_LocalizationStrings[431], // Normal | |
1422 (char *)v35 + 3, v35 + 5, pNormalSkillDesc[v28], pGlobalTXT_LocalizationStrings[433], // Expert | |
1423 (char *)v35 + 3, v35 + 5, pExpertSkillDesc[v28], pGlobalTXT_LocalizationStrings[432], // Master | |
1424 (char *)v35 + 3, v35 + 5, pMasterSkillDesc[v28], pGlobalTXT_LocalizationStrings[96], // Grand | |
1425 (char *)v35 + 3, v35 + 5, pGrandSkillDesc[v28]); | |
1426 } | |
1427 else | |
1428 { | |
1429 strcpy(a2, "%s\n\n"); | |
1430 v9 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1); | |
1431 sprintf(Source, "\f%05d", v9); | |
1432 strcat(a2, Source); | |
1433 strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); | |
1434 v10 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2); | |
1435 sprintf(Source, "\f%05d", v10); | |
1436 strcat(a2, Source); | |
1437 strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); | |
1438 v11 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3); | |
1439 sprintf(Source, "\f%05d", v11); | |
1440 strcat(a2, Source); | |
1441 strcat(a2, "%s\t%03d:\t%03d%s\t000\n"); | |
1442 v12 = uPlayerSkillType; | |
1443 v13 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 4); | |
1444 sprintf(Source, "\f%05d", v13); | |
1445 strcat(a2, Source); | |
1446 strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n"); | |
1447 v14 = TargetColor(0xFFu, 0xFFu, 0xFFu); | |
1448 sprintf(Source, "\f%05d", v14); | |
1449 strcat(a2, Source); | |
1450 strcat(a2, "%s: +%d"); | |
1451 v15 = v12; | |
1452 v16 = (int)(v35 + 5); | |
1453 v15 = (PLAYER_SKILL_TYPE)((int)v15 * 4); | |
1454 v34 = (int)((char *)v35 + 3); | |
1455 v17 = pPlayer->GetActualSkillLevel(uPlayerSkillType); | |
1456 v18 = *(int *)(pGrandSkillDesc[v15]); | |
1457 v19 = *(int *)(pMasterSkillDesc[v15]); | |
1458 v20 = *(int *)(pExpertSkillDesc[v15]); | |
1459 v21 = *(int *)(pNormalSkillDesc[v15]); | |
1460 v22 = *(int *)(pSkillDesc[v15]); | |
1461 v23 = static_sub_417BB5_out_string; | |
1462 sprintf( | |
1463 static_sub_417BB5_out_string, | |
1464 a2, | |
1465 v22, | |
1466 pGlobalTXT_LocalizationStrings[431], | |
1467 v34, | |
1468 v16, | |
1469 v21, | |
1470 pGlobalTXT_LocalizationStrings[433], | |
1471 v34, | |
1472 v16, | |
1473 v20, | |
1474 pGlobalTXT_LocalizationStrings[432], | |
1475 v34, | |
1476 v16, | |
1477 v19, | |
1478 pGlobalTXT_LocalizationStrings[96], | |
1479 v34, | |
1480 v16, | |
1481 v18, | |
1482 pGlobalTXT_LocalizationStrings[623], | |
1483 (v17 & 0x3F) - (*(char *)v33 & 0x3F)); | |
1484 } | |
1485 return v23; | |
1486 } | |
1487 | |
1488 //----- (00417FE5) -------------------------------------------------------- | |
1489 void CharacterUI_SkillsTab_ShowHint() | |
1490 { | |
1491 unsigned int v0; // ecx@1 | |
1492 unsigned int v1; // eax@1 | |
1493 GUIButton *i; // esi@6 | |
1494 const char *v3; // eax@12 | |
1495 unsigned int pX; // [sp+4h] [bp-8h]@1 | |
1496 unsigned int pY; // [sp+8h] [bp-4h]@1 | |
1497 | |
1498 pMouse->GetClickPos(&pX, &pY); | |
1499 v0 = pX; | |
1500 v1 = pY; | |
1501 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 ) | |
1502 { | |
1503 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext ) | |
1504 { | |
1505 if ( i->msg == UIMSG_SkillUp | |
1506 && (signed int)v0 >= (signed int)i->uX | |
1507 && (signed int)v0 <= (signed int)i->uZ | |
1508 && (signed int)v1 >= (signed int)i->uY | |
1509 && (signed int)v1 <= (signed int)i->uW ) | |
1510 { | |
1511 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)i->msg_param); | |
1393 | 1512 CharacterUI_DrawTooltip(pSkillNames[i->msg_param], v3); |
1298 | 1513 v1 = pY; |
1514 v0 = pX; | |
1515 } | |
1516 } | |
1517 } | |
1518 else | |
1519 { | |
1393 | 1520 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription); |
1298 | 1521 } |
1522 | |
1523 } | |
1524 | |
1525 //----- (00418083) -------------------------------------------------------- | |
1458 | 1526 void CharacterUI_StatsTab_ShowHint() |
1393 | 1527 { |
1298 | 1528 int pStringNum; // edi@1 |
1529 signed int pTextColor; // eax@15 | |
1530 char *pHourWord; // ecx@17 | |
1531 char *pDayWord; // eax@20 | |
1532 int v15; // ebx@28 | |
1533 int v16; // eax@33 | |
1534 POINT a2; // [sp+Ch] [bp-24h]@1 | |
1535 int pHour; // [sp+14h] [bp-1Ch]@15 | |
1536 unsigned int pDay; // [sp+24h] [bp-Ch]@15 | |
1537 | |
1393 | 1538 pMouse->GetCursorPos(&a2); |
1539 for ( pStringNum = 0; pStringNum < stat_string_coord.size(); ++pStringNum ) | |
1298 | 1540 { |
1393 | 1541 if (a2.x >= stat_string_coord[pStringNum].x && a2.x <= stat_string_coord[pStringNum].x + stat_string_coord[pStringNum].width ) |
1298 | 1542 { |
1393 | 1543 if (a2.y >= stat_string_coord[pStringNum].y && a2.y <= stat_string_coord[pStringNum].y + stat_string_coord[pStringNum].height ) |
1298 | 1544 break; |
1545 } | |
1546 } | |
1393 | 1547 |
1298 | 1548 switch ( pStringNum ) |
1549 { | |
1550 case 0:// Attributes | |
1551 case 1: | |
1552 case 2: | |
1553 case 3: | |
1554 case 4: | |
1555 case 5: | |
1556 case 6: | |
1557 if ( aAttributeNames[pStringNum] && pAttributeDescriptions[pStringNum] ) | |
1393 | 1558 CharacterUI_DrawTooltip(aAttributeNames[pStringNum], pAttributeDescriptions[pStringNum]); |
1298 | 1559 break; |
1560 case 7:// Health Points | |
1561 if ( pGlobalTXT_LocalizationStrings[108] && pHealthPointsAttributeDescription ) | |
1393 | 1562 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[108], pHealthPointsAttributeDescription); |
1298 | 1563 break; |
1564 case 8:// Spell Points | |
1565 if ( pGlobalTXT_LocalizationStrings[212] && pSpellPointsAttributeDescription ) | |
1393 | 1566 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[212], pSpellPointsAttributeDescription); |
1298 | 1567 break; |
1568 case 9:// Armor Class | |
1569 if ( pGlobalTXT_LocalizationStrings[12] && pArmourClassAttributeDescription ) | |
1393 | 1570 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[12], pArmourClassAttributeDescription); |
1298 | 1571 break; |
1572 case 10:// Player Condition | |
1573 strcpy(pTmpBuf2.data(), pPlayerConditionAttributeDescription); | |
1574 strcat(pTmpBuf2.data(), "\n"); | |
1575 extern std::array<unsigned int, 18> pConditionImportancyTable; | |
1576 for ( uint i = 0; i < 18; ++i ) | |
1577 { | |
1578 if ( pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]] ) | |
1579 { | |
1580 strcat(pTmpBuf2.data(), " \n"); | |
1581 pHour = pParty->uTimePlayed - pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]]; | |
1582 pHour = (unsigned int)((pHour * 0.234375) / 60 / 60); | |
1583 pDay = (unsigned int)pHour / 24; | |
1584 pHour %= 24i64; | |
1585 pTextColor = GetConditionDrawColor(pConditionImportancyTable[i]); | |
1586 sprintfex(pTmpBuf.data(), format_4E2DE8, pTextColor, aCharacterConditionNames[pConditionImportancyTable[i]]); | |
1587 strcat(pTmpBuf2.data(), pTmpBuf.data()); | |
1588 if ( pHour && pHour <= 1 ) | |
1589 pHourWord = pGlobalTXT_LocalizationStrings[109]; | |
1590 else | |
1591 pHourWord = pGlobalTXT_LocalizationStrings[110]; | |
1592 if ( !pDay || (pDayWord = pGlobalTXT_LocalizationStrings[56], pDay > 1) ) | |
1593 pDayWord = pGlobalTXT_LocalizationStrings[57]; | |
1594 sprintfex(pTmpBuf.data(), "%lu %s, %lu %s", pDay, pDayWord, pHour, pHourWord); | |
1595 strcat(pTmpBuf2.data(), pTmpBuf.data()); | |
1596 } | |
1597 } | |
1598 if ( pGlobalTXT_LocalizationStrings[47] && pTmpBuf2.data() ) | |
1393 | 1599 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[47], pTmpBuf2.data()); |
1298 | 1600 break; |
1601 case 11:// Fast Spell | |
1602 if ( pGlobalTXT_LocalizationStrings[172] && pFastSpellAttributeDescription ) | |
1393 | 1603 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[172], pFastSpellAttributeDescription); |
1298 | 1604 break; |
1605 case 12:// Player Age | |
1606 if ( pGlobalTXT_LocalizationStrings[5] && pPlayerAgeAttributeDescription ) | |
1393 | 1607 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[5], pPlayerAgeAttributeDescription); |
1298 | 1608 break; |
1609 case 13:// Player Level | |
1610 if ( pGlobalTXT_LocalizationStrings[131] && pPlayerLevelAttributeDescription ) | |
1393 | 1611 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[131], pPlayerLevelAttributeDescription); |
1298 | 1612 break; |
1613 case 14://Experience | |
1614 v15 = pPlayers[uActiveCharacter]->uLevel; | |
1615 do | |
1616 { | |
1459 | 1617 if ( (signed __int64)pPlayers[uActiveCharacter]->uExperience < (unsigned int)GetExperienceRequiredForLevel(v15) ) |
1298 | 1618 break; |
1619 ++v15; | |
1620 } | |
1621 while ( v15 <= 10000 ); | |
1622 pTmpBuf[0] = 0; | |
1623 pTmpBuf2[0] = 0; | |
1624 if ( v15 > pPlayers[uActiveCharacter]->uLevel ) | |
1625 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[147], v15); | |
1459 | 1626 v16 = GetExperienceRequiredForLevel(v15) - LODWORD(pPlayers[uActiveCharacter]->uExperience); |
1298 | 1627 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[538], v16, v15 + 1); |
1628 strcat(pTmpBuf.data(), "\n"); | |
1629 strcat(pTmpBuf.data(), pTmpBuf2.data()); | |
1630 sprintf(pTmpBuf2.data(), "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf.data()); | |
1631 if ( pGlobalTXT_LocalizationStrings[83] && pTmpBuf2.data() ) | |
1393 | 1632 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[83], pTmpBuf2.data()); |
1298 | 1633 break; |
1634 case 15:// Attack Bonus | |
1635 if ( pGlobalTXT_LocalizationStrings[587] && pAttackBonusAttributeDescription ) | |
1393 | 1636 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[587], pAttackBonusAttributeDescription); |
1298 | 1637 break; |
1638 case 16:// Attack Damage | |
1639 if ( pGlobalTXT_LocalizationStrings[588] && pAttackDamageAttributeDescription ) | |
1393 | 1640 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[588], pAttackDamageAttributeDescription); |
1298 | 1641 break; |
1642 case 17:// Missle Bonus | |
1643 if ( pGlobalTXT_LocalizationStrings[589] && pMissleBonusAttributeDescription ) | |
1393 | 1644 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[589], pMissleBonusAttributeDescription); |
1298 | 1645 break; |
1646 case 18:// Missle Damage | |
1647 if ( pGlobalTXT_LocalizationStrings[590] && pMissleDamageAttributeDescription ) | |
1393 | 1648 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[590], pMissleDamageAttributeDescription); |
1298 | 1649 break; |
1650 case 19:// Fire Resistance | |
1651 if ( pGlobalTXT_LocalizationStrings[87] && pFireResistanceAttributeDescription ) | |
1393 | 1652 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[87], pFireResistanceAttributeDescription); |
1298 | 1653 break; |
1654 case 20:// Air Resistance | |
1655 if ( pGlobalTXT_LocalizationStrings[6] && pAirResistanceAttributeDescription ) | |
1393 | 1656 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[6], pAirResistanceAttributeDescription); |
1298 | 1657 break; |
1658 case 21:// Water Resistance | |
1659 if ( pGlobalTXT_LocalizationStrings[240] && pWaterResistanceAttributeDescription ) | |
1393 | 1660 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[240], pWaterResistanceAttributeDescription); |
1298 | 1661 break; |
1662 case 22:// Earth Resistance | |
1663 if ( pGlobalTXT_LocalizationStrings[70] && pEarthResistanceAttributeDescription ) | |
1393 | 1664 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[70], pEarthResistanceAttributeDescription); |
1298 | 1665 break; |
1666 case 23:// Mind Resistance | |
1667 if ( pGlobalTXT_LocalizationStrings[142] && pMindResistanceAttributeDescription ) | |
1393 | 1668 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[142], pMindResistanceAttributeDescription); |
1298 | 1669 break; |
1670 case 24:// Body Resistance | |
1671 if ( pGlobalTXT_LocalizationStrings[29] && pBodyResistanceAttributeDescription ) | |
1393 | 1672 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[29], pBodyResistanceAttributeDescription); |
1298 | 1673 break; |
1674 case 25: // Skill Points | |
1675 if ( pGlobalTXT_LocalizationStrings[207] && pSkillPointsAttributeDescription ) | |
1393 | 1676 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription); |
1298 | 1677 break; |
1393 | 1678 case 26: // Class description |
1679 { | |
1678 | 1680 if (pClassDescriptions[pPlayers[uActiveCharacter]->classType] && pClassNames[pPlayers[uActiveCharacter]->classType]) |
1681 CharacterUI_DrawTooltip(pClassNames[pPlayers[uActiveCharacter]->classType], pClassDescriptions[pPlayers[uActiveCharacter]->classType]); | |
1393 | 1682 } |
1683 break; | |
1684 | |
1298 | 1685 default: |
1686 break; | |
1687 } | |
1688 } | |
1689 | |
1690 //----- (00410B28) -------------------------------------------------------- | |
1458 | 1691 void DrawSpellDescriptionPopup(int spell_index) |
1298 | 1692 { |
1693 Player *v1; // edi@1 | |
1694 SpellInfo *v2; // esi@1 | |
1695 unsigned int v3; // eax@2 | |
1696 int v4; // eax@4 | |
1697 LONG v5; // ecx@4 | |
1698 int v6; // eax@10 | |
1699 char *v7; // ST44_4@12 | |
1700 unsigned __int16 v8; // ax@12 | |
1701 GUIWindow a1; // [sp+Ch] [bp-68h]@4 | |
1702 int v10; // [sp+60h] [bp-14h]@1 | |
1703 POINT a2; // [sp+64h] [bp-10h]@1 | |
1704 int v12; // [sp+6Ch] [bp-8h]@4 | |
1705 int v13; // [sp+70h] [bp-4h]@4 | |
1706 | |
1707 v1 = pPlayers[uActiveCharacter]; | |
1708 v10 = spell_index; | |
1709 v2 = &pSpellStats->pInfos[spell_index + 11 * v1->lastOpenedSpellbookPage + 1]; | |
1710 if ( pMouse->GetCursorPos(&a2)->y <= 250 ) | |
1711 v3 = pMouse->GetCursorPos(&a2)->y + 30; | |
1712 else | |
1713 v3 = 30; | |
1714 a1.uFrameY = v3; | |
1715 a1.uFrameWidth = 328; | |
1716 a1.uFrameHeight = 68; | |
1717 a1.uFrameX = 90; | |
1718 a1.uFrameZ = 417; | |
1719 a1.uFrameW = v3 + 67; | |
1720 a1.Hint = 0; | |
1721 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL]); | |
1722 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_MASTER]); | |
1723 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT]); | |
1724 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_GRAND]); | |
1725 v5 = a2.y; | |
1726 if ( v13 > a2.y ) | |
1727 v5 = v13; | |
1728 if ( v12 > v5 ) | |
1729 v5 = v12; | |
1730 if ( v4 > v5 ) | |
1731 v5 = v4; | |
1732 sprintf( pTmpBuf2.data(), | |
1733 "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s", | |
1734 v2->pDescription, | |
1735 pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL], | |
1736 v5 + 3, v5 + 10, | |
1737 v2->pBasicSkillDesc, | |
1738 pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT], | |
1739 v5 + 3, v5 + 10, | |
1740 v2->pExpertSkillDesc, | |
1741 pGlobalTXT_LocalizationStrings[LOCSTR_MASTER], | |
1742 v5 + 3, v5 + 10, | |
1743 v2->pMasterSkillDesc, | |
1744 pGlobalTXT_LocalizationStrings[LOCSTR_GRAND], | |
1745 v5 + 3, v5 + 10, | |
1746 v2->pGrandmasterSkillDesc); | |
1747 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2.data(), &a1, 0, 0); | |
1748 a1.uFrameHeight += v6; | |
1749 if ( (signed int)a1.uFrameHeight < 150 ) | |
1750 a1.uFrameHeight = 150; | |
1751 a1.uFrameWidth = game_viewport_width; | |
1752 a1.DrawMessageBox(0); | |
1753 a1.uFrameWidth -= 12; | |
1754 a1.uFrameHeight -= 12; | |
1755 v7 = v2->pName; | |
1756 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | |
1757 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; | |
1758 v8 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | |
1759 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); | |
1760 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0); | |
1761 a1.uFrameWidth = 108; | |
1762 a1.uFrameZ = a1.uFrameX + 107; | |
1763 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->lastOpenedSpellbookPage + 12], 3u); | |
1764 sprintf( pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[LOCSTR_SP_COST], | |
1765 pSpellDatas[spell_index + 11 * v1->lastOpenedSpellbookPage + 1].mana_per_skill[v1->pActiveSkills[v1->lastOpenedSpellbookPage + PLAYER_SKILL_FIRE]]); | |
1766 // *(&[0].field_12 //temp_fix field_14 | |
1767 // + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->lastOpenedSpellbookPage + 12]) >> 6) | |
1768 // + 10 * (int)((char *)v10 + 11 * v1->lastOpenedSpellbookPage))); | |
1769 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf.data(), 3u); | |
1770 dword_507B00_spell_info_to_draw_in_popup = 0; | |
1771 } | |
1772 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup; | |
1773 | |
1774 | |
1775 | |
1776 | |
1777 | |
1778 //----- (00416D62) -------------------------------------------------------- | |
1779 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) | |
1780 { | |
1781 signed int pPlayerNum; // eax@12 | |
1782 char *v2; // eax@32 | |
1783 void *v3; // ecx@52 | |
1784 unsigned int v4; // eax@59 | |
1785 int v5; // esi@62 | |
1786 signed int v6; // esi@64 | |
1787 signed int v7; // esi@69 | |
1788 ItemGen *v8; // ecx@70 | |
1789 unsigned int v9; // eax@72 | |
1790 unsigned int v10; // eax@76 | |
1791 //char v11; // zf@83 | |
1792 GUIButton *pButton; // esi@84 | |
1793 unsigned int v13; // ecx@85 | |
1794 char *pStr; // edi@85 | |
1795 //signed int pControlID; // eax@92 | |
1796 int v16; // eax@95 | |
1797 int v17; // eax@96 | |
1798 PLAYER_SKILL_TYPE v18; // eax@98 | |
1799 char *pStr2; // eax@99 | |
1800 unsigned int v20; // eax@108 | |
1801 unsigned int pSkillId; // eax@109 | |
1802 const char *pSkillInfo; // eax@111 | |
1803 //char *v23; // ebx@112 | |
1804 char *pHint; // edx@113 | |
1805 unsigned int pColor; // eax@113 | |
1806 GUIWindow pWindow; // [sp+4h] [bp-74h]@32 | |
1807 double v27; // [sp+58h] [bp-20h]@33 | |
1808 struct tagPOINT Point; // [sp+60h] [bp-18h]@6 | |
1809 char *v29; // [sp+68h] [bp-10h]@33 | |
1810 float v30; // [sp+6Ch] [bp-Ch]@33 | |
1811 unsigned int pX; // [sp+70h] [bp-8h]@3 | |
1812 unsigned int pY; // [sp+74h] [bp-4h]@3 | |
1813 | |
1814 if ( pCurrentScreen == SCREEN_VIDEO ) | |
1815 return; | |
1816 if ( _this ) | |
1817 { | |
1818 pX = _this->x; | |
1819 pY = _this->y; | |
1820 } | |
1821 else | |
1822 { | |
1823 pMouse->GetClickPos(&pX, &pY); | |
1824 } | |
1825 if ( pRenderer->bWindowMode ) | |
1826 { | |
1827 GetCursorPos(&Point); | |
1828 ScreenToClient(hWnd, &Point); | |
1829 if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 ) | |
1830 { | |
1831 back_to_game(); | |
1832 return; | |
1833 } | |
1834 } | |
1835 | |
1836 if ( pParty->pPickedItem.uItemID )//нажатие на портрет перса правой кнопкой мыши с раствором | |
1837 { | |
1838 //v1 = 0; | |
1839 //do | |
1840 for ( pPlayerNum = 0; pPlayerNum < 4; ++pPlayerNum) | |
1841 { | |
1842 if ( (signed int)pX > RightClickPortraitXmin[pPlayerNum] && (signed int)pX < RightClickPortraitXmax[pPlayerNum] | |
1843 && (signed int)pY > 375 && (signed int)pY < 466 ) | |
1844 { | |
1845 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(pPlayerNum + 1, 1); | |
1846 return; | |
1847 } | |
1848 //++v1; | |
1849 } | |
1850 //while ( v1 < 4 ); | |
1851 } | |
1852 | |
1853 pEventTimer->Pause(); | |
1854 | |
1855 switch(pCurrentScreen) | |
1856 { | |
1857 case SCREEN_CASTING: | |
1858 { | |
1575 | 1859 OnInventoryItemRightClick(); |
1298 | 1860 break; |
1861 } | |
1862 | |
1863 case SCREEN_CHEST: | |
1864 { | |
1865 if ( !pPlayers[uActiveCharacter]->CanAct() ) | |
1866 { | |
1867 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[427],//%s не в состоянии %s | |
1868 pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);//Опознать предметы | |
1869 pWindow.Hint = pTmpBuf.data(); | |
1870 pWindow.uFrameWidth = 384; | |
1871 pWindow.uFrameHeight = 180; | |
1872 pWindow.uFrameY = 40; | |
1873 if ( (signed int)pX <= 320 ) | |
1874 v10 = pX + 30; | |
1875 else | |
1876 v10 = pX - 414; | |
1877 pWindow.uFrameX = v10; | |
1878 pWindow.DrawMessageBox(0); | |
1879 } | |
1880 else | |
1881 { | |
1882 v9 = pX + pSRZBufferLineOffsets[pY]; | |
1883 if ( pRenderer->pActiveZBuffer[v9] & 0xFFFF ) | |
1884 { | |
1885 | |
1886 // __debugbreak(); // invalid indexing will result in invalid object ptr | |
1887 // v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime | |
1888 // + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3)); | |
1889 v10=pChests[pChestWindow->par1C].pInventoryIndices[(pRenderer->pActiveZBuffer[v9] & 0xFFFF)-1]; | |
1890 v8 =&pChests[pChestWindow->par1C].igChestItems[v10-1]; | |
1891 GameUI_DrawItemInfo(v8); | |
1892 } | |
1893 } | |
1894 break; | |
1895 } | |
1896 case SCREEN_GAME: | |
1897 { | |
1898 if (GetCurrentMenuID() > 0) | |
1899 break; | |
1900 | |
1901 if ( (signed int)pY > (signed int)pViewport->uViewportBR_Y ) | |
1902 { | |
1903 pWindow.ptr_1C = (void *)((signed int)pX / 118); | |
1904 if ( (signed int)pX / 118 < 4 ) | |
1905 { | |
1906 pWindow.Hint = 0; | |
1907 pWindow.uFrameWidth = 400; | |
1908 pWindow.uFrameHeight = 200; | |
1909 pWindow.uFrameX = 38; | |
1910 pWindow.uFrameY = 60; | |
1911 pAudioPlayer->StopChannels(-1, -1); | |
1912 GameUI_CharacterQuickRecord_Draw(&pWindow, pPlayers[(int)pWindow.ptr_1C + 1]); | |
1913 } | |
1914 } | |
1915 else if ( (signed int)pX > (signed int)pViewport->uViewportBR_X ) | |
1916 { | |
1917 if ( (signed int)pY >= 130 ) | |
1918 { | |
1919 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 ) | |
1920 { | |
1921 pWindow.Hint = 0; | |
1922 pWindow.uFrameWidth = 400; | |
1923 pWindow.uFrameHeight = 200; | |
1924 pWindow.uFrameX = 38; | |
1925 pWindow.uFrameY = 60; | |
1926 pAudioPlayer->StopChannels(-1, -1); | |
1927 pWindow._41D73D_draw_buff_tooltip(); | |
1928 } | |
1929 else if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 ) | |
1930 { | |
1931 if (!( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 )) | |
1932 { | |
1933 pAudioPlayer->StopChannels(-1, -1); | |
1934 v3 = (void *)1; | |
1935 GameUI_DrawNPCPopup(v3); | |
1936 } | |
1937 } | |
1938 else | |
1939 { | |
1940 pAudioPlayer->StopChannels(-1, -1); | |
1941 v3 = 0; | |
1942 GameUI_DrawNPCPopup(v3); | |
1943 } | |
1944 } | |
1945 else | |
1946 { | |
1947 pWindow.Hint = (char *)GameUI_GetMinimapHintText(); | |
1948 pWindow.uFrameWidth = 256; | |
1949 pWindow.uFrameX = 130; | |
1950 pWindow.uFrameY = 140; | |
1951 pWindow.uFrameHeight = 64; | |
1952 pAudioPlayer->StopChannels(-1, -1); | |
1953 pWindow.DrawMessageBox(0); | |
1954 } | |
1955 } | |
1956 else | |
1957 { | |
1958 pWindow.Hint = 0; | |
1959 pWindow.uFrameWidth = 320; | |
1960 pWindow.uFrameHeight = 320; | |
1961 v4 = pX - 350; | |
1962 if ( (signed int)pX <= 320 ) | |
1963 v4 = pX + 30; | |
1964 pWindow.uFrameX = v4; | |
1965 pWindow.uFrameY = 40; | |
1966 if ( pRenderer->pRenderD3D ) | |
1967 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val(); | |
1968 else | |
1969 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; | |
1970 v6 = (unsigned __int16)v5; | |
1971 if (PID_TYPE(v6) != OBJECT_Item) | |
1972 { | |
1973 if (PID_TYPE(v6) == OBJECT_Actor) | |
1974 { | |
1975 if ( pRenderer->uNumSceneBegins ) | |
1976 { | |
1977 pWindow.DrawMessageBox(1); | |
1978 MonsterPopup_Draw(PID_ID(v6), &pWindow); | |
1979 } | |
1980 else | |
1981 { | |
1982 pRenderer->BeginScene(); | |
1983 pWindow.DrawMessageBox(1); | |
1984 MonsterPopup_Draw(PID_ID(v6), &pWindow); | |
1985 pRenderer->EndScene(); | |
1986 } | |
1987 } | |
1988 } | |
1989 else | |
1990 { | |
1991 v7 = PID_ID(v6); | |
1992 if ( ! (pObjectList->pObjects[pSpriteObjects[v7].uObjectDescID].uFlags & 0x10 ) ) | |
1993 { | |
1994 v8 = &pSpriteObjects[v7].stru_24; | |
1995 GameUI_DrawItemInfo(v8); | |
1996 } | |
1997 } | |
1998 } | |
1999 break; | |
2000 } | |
2001 case SCREEN_BOOKS: | |
2002 { | |
2003 if ( !dword_506364 | |
2004 || (signed int)pX < (signed int)pViewport->uViewportTL_X | |
2005 || (signed int)pX > (signed int)pViewport->uViewportBR_X | |
2006 || (signed int)pY < (signed int)pViewport->uViewportTL_Y | |
2007 || (signed int)pY > (signed int)pViewport->uViewportBR_Y | |
2008 || (v2 = (char *)sub_444564(), (pWindow.Hint = v2) == 0) ) | |
2009 break; | |
2010 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32); | |
2011 v27 = v30 + 6.7553994e15; | |
2012 v29 = (char *)LODWORD(v27); | |
2013 pWindow.uFrameWidth = LODWORD(v27); | |
2014 pWindow.uFrameX = pX + 5; | |
2015 pWindow.uFrameY = pY + 5; | |
2016 pWindow.uFrameHeight = 64; | |
2017 pAudioPlayer->StopChannels(-1, -1); | |
2018 pWindow.DrawMessageBox(0); | |
2019 break; | |
2020 } | |
2021 case SCREEN_CHARACTERS: | |
2022 case SCREEN_E: | |
2023 case SCREEN_CHEST_INVENTORY: | |
2024 { | |
2025 if ( (signed int)pX > 467 && pCurrentScreen != SCREEN_E ) | |
2026 { | |
1575 | 2027 OnInventoryItemRightClick(); |
1298 | 2028 } |
2029 else if ( (signed int)pY >= 345 ) | |
2030 break; | |
2031 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )//2DEvent - CharacerScreenStats | |
2032 { | |
2033 CharacterUI_StatsTab_ShowHint(); | |
2034 } | |
2035 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )//2DEvent - CharacerScreenSkills | |
2036 { | |
2037 CharacterUI_SkillsTab_ShowHint(); | |
2038 } | |
2039 else | |
2040 { | |
2041 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103 )//2DEvent - CharacerScreenInventory | |
1575 | 2042 OnInventoryItemRightClick(); |
1298 | 2043 } |
2044 break; | |
2045 } | |
2046 case SCREEN_SPELL_BOOK: | |
2047 { | |
2048 if ( dword_507B00_spell_info_to_draw_in_popup ) | |
2049 DrawSpellDescriptionPopup(dword_507B00_spell_info_to_draw_in_popup - 1); | |
2050 break; | |
2051 } | |
2052 case SCREEN_HOUSE: | |
2053 { | |
2054 if ( (signed int)pY < 345 && (signed int)pX < 469 ) | |
2055 ShowPopupShopItem(); | |
2056 break; | |
2057 } | |
2058 case SCREEN_PARTY_CREATION: | |
2059 { | |
2060 pWindow.Hint = 0; | |
2061 pStr = 0; | |
2062 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext) | |
2063 { | |
2064 if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ | |
2065 && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW ) | |
2066 { | |
2067 switch ( pButton->msg ) | |
2068 { | |
2069 case UIMSG_0: //stats info | |
2070 pWindow.Hint = pAttributeDescriptions[(signed int)pButton->msg_param % 7]; | |
2071 pStr = aAttributeNames[(signed int)pButton->msg_param % 7]; | |
2072 break; | |
2073 case UIMSG_PlayerCreationClickPlus: //Plus button info | |
2074 pStr = pGlobalTXT_LocalizationStrings[670];//Добавить | |
2075 pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков" | |
2076 break; | |
2077 case UIMSG_PlayerCreationClickMinus: //Minus button info | |
2078 pStr = pGlobalTXT_LocalizationStrings[668];//Вычесть | |
2079 pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков" | |
2080 break; | |
2081 case UIMSG_PlayerCreationSelectActiveSkill: //Available skill button info | |
2082 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->msg_param + 4); | |
2083 pStr = pSkillNames[v18]; | |
2084 pWindow.Hint = pSkillDesc[v18]; | |
2085 break; | |
2086 case UIMSG_PlayerCreationSelectClass: //Available Class Info | |
2087 pWindow.Hint = pClassDescriptions[pButton->msg_param]; | |
2088 pStr = pClassNames[pButton->msg_param]; | |
2089 break; | |
2090 case UIMSG_PlayerCreationClickOK: //OK Info | |
2091 pWindow.Hint = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры. | |
2092 pStr = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК | |
2093 break; | |
2094 case UIMSG_PlayerCreationClickReset: //Clear info | |
2095 pWindow.Hint = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда. | |
2096 pStr = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить | |
2097 break; | |
2098 case UIMSG_PlayerCreation_SelectAttribute: // Character info | |
2099 pStr = pParty->pPlayers[pButton->msg_param].pName; | |
2100 pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->msg_param].classType]; | |
2101 break; | |
2102 } | |
2103 if ( pButton->msg > UIMSG_44 && pButton->msg <= UIMSG_PlayerCreationRemoveDownSkill ) //Sellected skills info | |
2104 { | |
2105 pSkillId = pParty->pPlayers[pButton->msg_param].GetSkillIdxByOrder(pButton->msg - UIMSG_48); | |
2106 pY = 0; | |
2107 if ( (signed int)pSkillId < 37 ) | |
2108 { | |
2109 pSkillInfo = CharacterUI_GetSkillDescText(pButton->msg_param, (PLAYER_SKILL_TYPE)pSkillId); | |
2110 strcpy(pTmpBuf2.data(), pSkillInfo); | |
2111 pWindow.Hint = pTmpBuf2.data(); | |
2112 pStr = pSkillNames[pSkillId]; | |
2113 } | |
2114 } | |
2115 } | |
2116 } | |
2117 if ( pWindow.Hint ) | |
2118 { | |
2119 pHint = (char*)pWindow.Hint; | |
2120 pWindow.Hint = 0; | |
2121 pWindow.uFrameWidth = 384; | |
2122 pWindow.uFrameHeight = 256; | |
2123 pWindow.uFrameX = 128; | |
2124 pWindow.uFrameY = 40; | |
2125 pWindow.uFrameHeight = pFontSmallnum->CalcTextHeight(pHint, &pWindow, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24; | |
2126 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; | |
2127 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; | |
2128 pWindow.DrawMessageBox(0); | |
2129 pWindow.uFrameX += 12; | |
2130 pWindow.uFrameWidth -= 24; | |
2131 pWindow.uFrameY += 12; | |
2132 pWindow.uFrameHeight -= 12; | |
2133 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; | |
2134 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; | |
2135 pColor = TargetColor(0xFF, 0xFF, 0x9B); | |
2136 sprintf(pTmpBuf.data(), format_4E2D80, pColor, pStr);//"\f%05d%s\f00000\n" | |
2137 pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3); | |
2138 pWindow.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0); | |
2139 } | |
2140 break; | |
2141 } | |
2142 default: | |
2143 { | |
2144 break; | |
2145 } | |
2146 } | |
2147 dword_507BF0_is_there_popup_onscreen = 1; | |
2148 viewparams->bRedrawGameUI = 1; | |
2149 } |