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