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
|
|
47
|
|
48
|
|
49
|
|
50 //----- (00419719) --------------------------------------------------------
|
|
51 char __fastcall CharacterUI_SkillsTab_Draw(unsigned int uPlayerID)
|
|
52 {
|
|
53 unsigned int v1; // esi@1
|
|
54 Player *pPlayer; // ebp@1
|
|
55 unsigned int v3; // eax@1
|
|
56 signed int v4; // ecx@1
|
|
57 int v5; // edi@3
|
|
58 GUIWindow *v6; // ecx@3
|
|
59 int v7; // eax@4
|
|
60 GUIButton *v8; // edx@5
|
|
61 int v9; // eax@7
|
|
62 unsigned int v10; // ecx@9
|
|
63 unsigned __int16 v11; // ax@9
|
|
64 int v12; // eax@9
|
|
65 unsigned __int8 v13; // cf@12
|
|
66 unsigned __int8 v14; // zf@12
|
|
67 unsigned int v15; // eax@12
|
|
68 char *v16; // ecx@22
|
|
69 GUIWindow *v17; // ecx@33
|
|
70 int v18; // edx@34
|
|
71 GUIButton *v19; // eax@35
|
|
72 int v20; // edx@37
|
|
73 unsigned __int16 v21; // cx@39
|
|
74 unsigned int v22; // eax@39
|
|
75 int v23; // edi@39
|
|
76 unsigned int v24; // eax@42
|
|
77 char v25; // sf@52
|
|
78 char *v26; // ecx@52
|
|
79 int v27; // edi@63
|
|
80 GUIWindow *v28; // ecx@63
|
|
81 int v29; // edx@64
|
|
82 GUIButton *v30; // eax@65
|
|
83 int v31; // edx@67
|
|
84 unsigned int v32; // ecx@69
|
|
85 int v33; // eax@69
|
|
86 unsigned int v34; // eax@72
|
|
87 char *v35; // ecx@82
|
|
88 GUIWindow *v36; // ecx@93
|
|
89 int v37; // edx@94
|
|
90 GUIButton *v38; // eax@94
|
|
91 int v39; // edx@97
|
|
92 unsigned __int16 v40; // cx@99
|
|
93 unsigned int v41; // eax@99
|
|
94 int v42; // edi@99
|
|
95 unsigned int v43; // eax@102
|
|
96 char *v44; // ecx@112
|
|
97 char *v46; // [sp-Ch] [bp-4Ch]@19
|
|
98 char *v47; // [sp-Ch] [bp-4Ch]@49
|
|
99 char *v48; // [sp-Ch] [bp-4Ch]@79
|
|
100 char *v49; // [sp-Ch] [bp-4Ch]@109
|
|
101 unsigned int v50; // [sp-8h] [bp-48h]@19
|
|
102 unsigned int v51; // [sp-8h] [bp-48h]@49
|
|
103 unsigned int v52; // [sp-8h] [bp-48h]@79
|
|
104 unsigned int v53; // [sp-8h] [bp-48h]@109
|
|
105 int v54; // [sp-4h] [bp-44h]@19
|
|
106 int v55; // [sp-4h] [bp-44h]@49
|
|
107 int v56; // [sp-4h] [bp-44h]@79
|
|
108 int v57; // [sp-4h] [bp-44h]@109
|
|
109 unsigned int v58; // [sp+10h] [bp-30h]@9
|
|
110 unsigned int v59; // [sp+10h] [bp-30h]@39
|
|
111 unsigned int v60; // [sp+10h] [bp-30h]@69
|
|
112 unsigned int v61; // [sp+10h] [bp-30h]@99
|
|
113 int v62; // [sp+14h] [bp-2Ch]@4
|
|
114 int v63; // [sp+14h] [bp-2Ch]@34
|
|
115 int v64; // [sp+14h] [bp-2Ch]@64
|
|
116 int v65; // [sp+14h] [bp-2Ch]@94
|
|
117 signed int i; // [sp+18h] [bp-28h]@4
|
|
118 signed int v67; // [sp+18h] [bp-28h]@34
|
|
119 signed int v68; // [sp+18h] [bp-28h]@64
|
|
120 signed int v69; // [sp+18h] [bp-28h]@94
|
|
121 int v70; // [sp+1Ch] [bp-24h]@3
|
|
122 int v71; // [sp+1Ch] [bp-24h]@33
|
|
123 int v72; // [sp+1Ch] [bp-24h]@63
|
|
124 int v73; // [sp+1Ch] [bp-24h]@93
|
|
125 int uY; // [sp+20h] [bp-20h]@9
|
|
126 int uYa; // [sp+20h] [bp-20h]@33
|
|
127 int uYb; // [sp+20h] [bp-20h]@69
|
|
128 int uYc; // [sp+20h] [bp-20h]@93
|
|
129 unsigned int a5; // [sp+24h] [bp-1Ch]@1
|
|
130 unsigned int v79; // [sp+28h] [bp-18h]@1
|
|
131 int *v80; // [sp+2Ch] [bp-14h]@3
|
|
132 int *v81; // [sp+2Ch] [bp-14h]@33
|
|
133 int *v82; // [sp+2Ch] [bp-14h]@63
|
|
134 int *v83; // [sp+2Ch] [bp-14h]@93
|
|
135 unsigned int v84; // [sp+30h] [bp-10h]@1
|
|
136 int v85; // [sp+34h] [bp-Ch]@1
|
|
137 unsigned int v86; // [sp+38h] [bp-8h]@1
|
|
138 unsigned __int16 v87; // [sp+3Ch] [bp-4h]@9
|
|
139 char *v88; // [sp+3Ch] [bp-4h]@24
|
|
140 char *v89; // [sp+3Ch] [bp-4h]@54
|
|
141 unsigned __int16 v90; // [sp+3Ch] [bp-4h]@69
|
|
142 char *v91; // [sp+3Ch] [bp-4h]@84
|
|
143 char *v92; // [sp+3Ch] [bp-4h]@114
|
|
144
|
|
145 v1 = uPlayerID;
|
949
|
146 a5 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
|
147 v84 = TargetColor(0, 0xAFu, 0xFFu);
|
706
|
148 v85 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem;
|
949
|
149 v86 = TargetColor(0xFFu, 0, 0);
|
|
150 v79 = TargetColor(0, 0xFFu, 0);
|
706
|
151 pPlayer = &pParty->pPlayers[v1-1];
|
|
152 v3 = pIcons_LOD->LoadTexture("fr_skill", TEXTURE_16BIT_PALETTE);
|
948
|
153 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(v3));
|
706
|
154 v4 = v79;
|
|
155 if ( !pPlayer->uSkillPoints )
|
|
156 v4 = 65535;
|
|
157 sprintf(
|
|
158 pTmpBuf,
|
|
159 "%s \f%05d%s\f00000\r177%s: \f%05d%d\f00000",
|
|
160 pGlobalTXT_LocalizationStrings[206], // Skills for
|
|
161 a5,
|
|
162 pPlayer->pName,
|
|
163 pGlobalTXT_LocalizationStrings[207], // Skill Points
|
|
164 v4,
|
|
165 pPlayer->uSkillPoints);
|
|
166 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0);
|
|
167 v5 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;// Weapons, Level
|
|
168 sprintf(pTmpBuf, "%s\r400%s", pGlobalTXT_LocalizationStrings[242], pGlobalTXT_LocalizationStrings[131]);
|
|
169 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, v5, a5, pTmpBuf, 0, 0, 0);
|
|
170 v6 = pGUIWindow_CurrentMenu;
|
|
171 v70 = 0;
|
|
172 v80 = pWeaponSkills;
|
|
173 do
|
|
174 {
|
|
175 v62 = *v80;
|
|
176 v7 = 0;
|
|
177 for ( i = 0; i < (signed int)v6->uNumControls; v7 = i++ + 1 )
|
|
178 {
|
|
179 v8 = v6->pControlsHead;
|
|
180 if ( v7 > 0 )
|
|
181 {
|
|
182 do
|
|
183 {
|
|
184 v8 = v8->pNext;
|
|
185 --v7;
|
|
186 }
|
|
187 while ( v7 );
|
|
188 }
|
|
189 v9 = v8->field_1C;
|
|
190 if ( SBYTE1(v9) >= 0 )
|
|
191 continue;
|
|
192 BYTE1(v9) &= 0x7Fu;
|
|
193 if ( v9 != v62 )
|
|
194 continue;
|
|
195 v5 = v8->uY;
|
|
196 v10 = pPlayer->uSkillPoints;
|
|
197 ++v70;
|
|
198 v11 = pPlayer->pActiveSkills[v62];
|
|
199 v87 = pPlayer->pActiveSkills[v62];
|
|
200 v12 = v11 & 0x3F;
|
|
201 v58 = 0;
|
|
202 uY = v12;
|
|
203 if ( v10 >= v12 + 1 )
|
|
204 v58 = v84;
|
|
205 if ( v85 == i )
|
|
206 {
|
|
207 v13 = v10 < v12;
|
|
208 v14 = v10 == v12;
|
|
209 v15 = v86;
|
|
210 if ( !(v13 | v14) )
|
|
211 v15 = v79;
|
|
212 v58 = v15;
|
|
213 }
|
|
214 else
|
|
215 {
|
|
216 v15 = v58;
|
|
217 }
|
|
218 if ( HIBYTE(v87) & 1 )
|
|
219 {
|
|
220 if ( !v15 )
|
949
|
221 v15 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
222 v54 = uY;
|
|
223 v50 = v58;
|
|
224 v46 = pGlobalTXT_LocalizationStrings[96];
|
|
225 }
|
|
226 else
|
|
227 {
|
|
228 if ( !(v87 & 0xC0) )
|
|
229 {
|
|
230 sprintf(pTmpBuf, "%s\r400%2d", pSkillNames[v62], uY);
|
|
231 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 24, v5, v58, pTmpBuf, 0, 0, 0);
|
|
232 v6 = pGUIWindow_CurrentMenu;
|
|
233 continue;
|
|
234 }
|
|
235 v16 = pGlobalTXT_LocalizationStrings[432];
|
|
236 if ( (v87 & 0x80u) == 0 )
|
|
237 v16 = pGlobalTXT_LocalizationStrings[433];
|
|
238 v88 = v16;
|
|
239 if ( !v15 )
|
949
|
240 v15 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
241 v54 = uY;
|
|
242 v50 = v58;
|
|
243 v46 = v88;
|
|
244 }
|
|
245 sprintf(pTmpBuf, "%s ", pSkillNames[v62], v15, v46, v50, v54);
|
|
246 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 24, v5, v58, pTmpBuf, 0, 0, 0);
|
|
247 v6 = pGUIWindow_CurrentMenu;
|
|
248 }
|
|
249 ++v80;
|
|
250 }
|
|
251 while ( v80 <= &pWeaponSkills[8]);
|
|
252 if ( !v70 )
|
|
253 {
|
|
254 v5 = v5 + LOBYTE(pFontLucida->uFontHeight) - 3;
|
|
255 v6->DrawText(pFontLucida, 24, v5, 0, pGlobalTXT_LocalizationStrings[153], 0, 0, 0);
|
|
256 }
|
|
257 uYa = v5 + 2 * LOBYTE(pFontLucida->uFontHeight) - 10;
|
|
258 sprintf(pTmpBuf, "%s\r400%s", pGlobalTXT_LocalizationStrings[138], pGlobalTXT_LocalizationStrings[131]);
|
|
259 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, uYa, a5, pTmpBuf, 0, 0, 0);
|
|
260 v17 = pGUIWindow_CurrentMenu;
|
|
261 v71 = 0;
|
|
262 v81 = pMagicSkills;
|
|
263 do
|
|
264 {
|
|
265 v18 = 0;
|
|
266 v67 = 0;
|
|
267 v63 = *v81;
|
|
268 while ( v67 < (signed int)v17->uNumControls )
|
|
269 {
|
|
270 v19 = v17->pControlsHead;
|
|
271 if ( v18 > 0 )
|
|
272 {
|
|
273 do
|
|
274 {
|
|
275 v19 = v19->pNext;
|
|
276 --v18;
|
|
277 }
|
|
278 while ( v18 );
|
|
279 }
|
|
280 v20 = v19->field_1C;
|
|
281 if ( SBYTE1(v20) >= 0 || (BYTE1(v20) &= 0x7Fu, v20 != v63) )
|
|
282 {
|
|
283 v18 = v67++ + 1;
|
|
284 continue;
|
|
285 }
|
|
286 ++v71;
|
|
287 uYa = v19->uY;
|
|
288 v21 = pPlayer->pActiveSkills[v63];
|
|
289 v22 = pPlayer->uSkillPoints;
|
|
290 v23 = pPlayer->pActiveSkills[v63] & 0x3F;
|
|
291 v59 = 0;
|
|
292 if ( v22 >= v23 + 1 )
|
|
293 v59 = v84;
|
|
294 if ( v85 == v67 )
|
|
295 {
|
|
296 v13 = v22 < v23;
|
|
297 v14 = v22 == v23;
|
|
298 v24 = v86;
|
|
299 if ( !(v13 | v14) )
|
|
300 v24 = v79;
|
|
301 v59 = v24;
|
|
302 }
|
|
303 else
|
|
304 {
|
|
305 v24 = v59;
|
|
306 }
|
|
307 if ( HIBYTE(v21) & 1 )
|
|
308 {
|
|
309 if ( !v24 )
|
949
|
310 v24 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
311 v55 = v23;
|
|
312 v51 = v59;
|
|
313 v47 = pGlobalTXT_LocalizationStrings[96];
|
|
314 }
|
|
315 else
|
|
316 {
|
|
317 if ( !(v21 & 0xC0) )
|
|
318 {
|
|
319 sprintf(pTmpBuf, "%s\r400%2d", pSkillNames[v63], v23);
|
|
320 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 24, uYa, v59, pTmpBuf, 0, 0, 0);
|
|
321 v17 = pGUIWindow_CurrentMenu;
|
|
322 v18 = v67++ + 1;
|
|
323 continue;
|
|
324 }
|
|
325 v25 = (v21 & 0x80u) != 0;
|
|
326 v26 = pGlobalTXT_LocalizationStrings[432];
|
|
327 if ( !v25 )
|
|
328 v26 = pGlobalTXT_LocalizationStrings[433];
|
|
329 v89 = v26;
|
|
330 if ( !v24 )
|
949
|
331 v24 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
332 v55 = v23;
|
|
333 v51 = v59;
|
|
334 v47 = v89;
|
|
335 }
|
|
336 sprintf(pTmpBuf, "%s ", pSkillNames[v63], v24, v47, v51, v55);
|
|
337 //LABEL_58:
|
|
338 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 24, uYa, v59, pTmpBuf, 0, 0, 0);
|
|
339 v17 = pGUIWindow_CurrentMenu;
|
|
340 //LABEL_59:
|
|
341 v18 = v67++ + 1;
|
|
342 }
|
|
343 ++v81;
|
|
344 }
|
|
345 while ( v81 <= &pMagicSkills[8]);
|
|
346 if ( !v71 )
|
|
347 v17->DrawText(
|
|
348 pFontLucida,
|
|
349 24,
|
|
350 LOBYTE(pFontLucida->uFontHeight) + uYa - 3,
|
|
351 0,
|
|
352 pGlobalTXT_LocalizationStrings[153],
|
|
353 0,
|
|
354 0,
|
|
355 0);
|
|
356 v27 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
|
|
357 sprintf(pTmpBuf, "%s\r177%s", pGlobalTXT_LocalizationStrings[11], pGlobalTXT_LocalizationStrings[131]);
|
|
358 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 248, v27, a5, pTmpBuf, 0, 0, 0);
|
|
359 v28 = pGUIWindow_CurrentMenu;
|
|
360 v72 = 0;
|
|
361 v82 = pArmorSkills;
|
|
362 do
|
|
363 {
|
|
364 v29 = 0;
|
|
365 v68 = 0;
|
|
366 v64 = *v82;
|
|
367 while ( v68 < (signed int)v28->uNumControls )
|
|
368 {
|
|
369 v30 = v28->pControlsHead;
|
|
370 if ( v29 > 0 )
|
|
371 {
|
|
372 do
|
|
373 {
|
|
374 v30 = v30->pNext;
|
|
375 --v29;
|
|
376 }
|
|
377 while ( v29 );
|
|
378 }
|
|
379 v31 = v30->field_1C;
|
|
380 if ( SBYTE1(v31) >= 0 || (BYTE1(v31) &= 0x7Fu, v31 != v64) )
|
|
381 {
|
|
382 v29 = v68++ + 1;
|
|
383 continue;
|
|
384 }
|
|
385 v27 = v30->uY;
|
|
386 ++v72;
|
|
387 v60 = 0;
|
|
388 v90 = pPlayer->pActiveSkills[v64];
|
|
389 v32 = pPlayer->uSkillPoints;
|
|
390 v33 = pPlayer->pActiveSkills[v64] & 0x3F;
|
|
391 uYb = v33;
|
|
392 if ( v32 >= v33 + 1 )
|
|
393 v60 = v84;
|
|
394 if ( v85 == v68 )
|
|
395 {
|
|
396 v13 = v32 < v33;
|
|
397 v14 = v32 == v33;
|
|
398 v34 = v86;
|
|
399 if ( !(v13 | v14) )
|
|
400 v34 = v79;
|
|
401 v60 = v34;
|
|
402 }
|
|
403 else
|
|
404 {
|
|
405 v34 = v60;
|
|
406 }
|
|
407 if ( (pPlayer->pActiveSkills[v64] >> 8) & 1 )
|
|
408 {
|
|
409 if ( !v34 )
|
949
|
410 v34 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
411 v56 = uYb;
|
|
412 v52 = v60;
|
|
413 v48 = pGlobalTXT_LocalizationStrings[96];
|
|
414 }
|
|
415 else
|
|
416 {
|
|
417 if ( !(v90 & 0xC0) )
|
|
418 {
|
|
419 sprintf(pTmpBuf, "%s\r177%2d", pSkillNames[v64], uYb);
|
|
420 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 248, v27, v60, pTmpBuf, 0, 0, 0);
|
|
421 v28 = pGUIWindow_CurrentMenu;
|
|
422 v29 = v68++ + 1;
|
|
423 continue;
|
|
424 }
|
|
425 v35 = pGlobalTXT_LocalizationStrings[432];
|
|
426 if ( (v90 & 0x80u) == 0 )
|
|
427 v35 = pGlobalTXT_LocalizationStrings[433];
|
|
428 v91 = v35;
|
|
429 if ( !v34 )
|
949
|
430 v34 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
431 v56 = uYb;
|
|
432 v52 = v60;
|
|
433 v48 = v91;
|
|
434 }
|
|
435 sprintf(pTmpBuf, "%s ", pSkillNames[v64], v34, v48, v52, v56);
|
|
436 //LABEL_88:
|
|
437 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 248, v27, v60, pTmpBuf, 0, 0, 0);
|
|
438 v28 = pGUIWindow_CurrentMenu;
|
|
439 //LABEL_89:
|
|
440 v29 = v68++ + 1;
|
|
441 }
|
|
442 ++v82;
|
|
443 }
|
|
444 while ( v82 <= &pArmorSkills[4]);
|
|
445 if ( !v72 )
|
|
446 {
|
|
447 v27 = v27 + LOBYTE(pFontLucida->uFontHeight) - 3;
|
|
448 v28->DrawText(pFontLucida, 248, v27, 0, pGlobalTXT_LocalizationStrings[153], 0, 0, 0);
|
|
449 }
|
|
450 uYc = v27 + 2 * LOBYTE(pFontLucida->uFontHeight) - 10;
|
|
451 sprintf(pTmpBuf, "%s\r177%s", pGlobalTXT_LocalizationStrings[143], pGlobalTXT_LocalizationStrings[131]);
|
|
452 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 248, uYc, a5, pTmpBuf, 0, 0, 0);
|
|
453 v36 = pGUIWindow_CurrentMenu;
|
|
454 v73 = 0;
|
|
455 v83 = pMiscSkills;
|
|
456 do
|
|
457 {
|
|
458 v37 = 0;
|
|
459 v69 = 0;
|
|
460 v38 = (GUIButton *)*v83;
|
|
461 v65 = *v83;
|
|
462 while ( v69 < (signed int)v36->uNumControls )
|
|
463 {
|
|
464 v38 = v36->pControlsHead;
|
|
465 if ( v37 > 0 )
|
|
466 {
|
|
467 do
|
|
468 {
|
|
469 v38 = v38->pNext;
|
|
470 --v37;
|
|
471 }
|
|
472 while ( v37 );
|
|
473 }
|
|
474 v39 = v38->field_1C;
|
|
475 if ( SBYTE1(v39) >= 0 || (BYTE1(v39) &= 0x7Fu, v39 != v65) )
|
|
476 {
|
|
477 //goto LABEL_119;
|
|
478 v37 = v69++ + 1;
|
|
479 continue;
|
|
480 }
|
|
481 ++v73;
|
|
482 uYc = v38->uY;
|
|
483 v40 = pPlayer->pActiveSkills[v65];
|
|
484 v41 = pPlayer->uSkillPoints;
|
|
485 v42 = pPlayer->pActiveSkills[v65] & 0x3F;
|
|
486 v61 = 0;
|
|
487 if ( v41 >= v42 + 1 )
|
|
488 v61 = v84;
|
|
489 if ( v85 == v69 )
|
|
490 {
|
|
491 v13 = v41 < v42;
|
|
492 v14 = v41 == v42;
|
|
493 v43 = v86;
|
|
494 if ( !(v13 | v14) )
|
|
495 v43 = v79;
|
|
496 v61 = v43;
|
|
497 }
|
|
498 else
|
|
499 {
|
|
500 v43 = v61;
|
|
501 }
|
|
502 if ( HIBYTE(v40) & 1 )
|
|
503 {
|
|
504 if ( !v43 )
|
949
|
505 v43 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
506 v57 = v42;
|
|
507 v53 = v61;
|
|
508 v49 = pGlobalTXT_LocalizationStrings[96];
|
|
509 }
|
|
510 else
|
|
511 {
|
|
512 if ( !(v40 & 0xC0) )
|
|
513 {
|
|
514 sprintf(pTmpBuf, "%s\r177%2d", pSkillNames[v65], v42);
|
|
515 LOBYTE(v38) = pGUIWindow_CurrentMenu->DrawText(pFontLucida, 248, uYc, v61, pTmpBuf, 0, 0, 0);
|
|
516 v36 = pGUIWindow_CurrentMenu;
|
|
517 v37 = v69++ + 1;
|
|
518 continue;
|
|
519 }
|
|
520 v25 = (v40 & 0x80u) != 0;
|
|
521 v44 = pGlobalTXT_LocalizationStrings[432];
|
|
522 if ( !v25 )
|
|
523 v44 = pGlobalTXT_LocalizationStrings[433];
|
|
524 v92 = v44;
|
|
525 if ( !v43 )
|
949
|
526 v43 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
706
|
527 v57 = v42;
|
|
528 v53 = v61;
|
|
529 v49 = v92;
|
|
530 }
|
|
531 sprintf(pTmpBuf, "%s ", pSkillNames[v65], v43, v49, v53, v57);
|
|
532 LOBYTE(v38) = pGUIWindow_CurrentMenu->DrawText(pFontLucida, 248, uYc, v61, pTmpBuf, 0, 0, 0);
|
|
533 v36 = pGUIWindow_CurrentMenu;
|
|
534 v37 = v69++ + 1;
|
|
535 }
|
|
536 ++v83;
|
|
537 }
|
|
538 while ( v83 <= &pMiscSkills[11]);
|
|
539 if ( !v73 )
|
|
540 LOBYTE(v38) = v36->DrawText(
|
|
541 pFontLucida,
|
|
542 248,
|
|
543 LOBYTE(pFontLucida->uFontHeight) + uYc - 3,
|
|
544 0,
|
|
545 pGlobalTXT_LocalizationStrings[153],
|
|
546 0,
|
|
547 0,
|
|
548 0);
|
|
549 return (char)v38;
|
949
|
550 }
|
|
551
|
|
552
|
|
553
|
|
554
|
|
555
|
|
556
|
|
557 unsigned int GetAwardColor(unsigned int priority)
|
|
558 {
|
|
559 static unsigned __int8 pAwardsTextColors[6][3] =
|
|
560 {
|
|
561 {248, 108, 160},
|
|
562 {112, 220, 248},
|
|
563 {192, 192, 240},
|
|
564 { 64, 244, 96},
|
|
565 {232, 244, 96},
|
|
566 {240, 252, 192}
|
|
567 };
|
|
568
|
|
569 return TargetColor(pAwardsTextColors[priority % 6][0],
|
|
570 pAwardsTextColors[priority % 6][1],
|
|
571 pAwardsTextColors[priority % 6][2]);
|
|
572 }
|
|
573
|
706
|
574
|
|
575 //----- (0041A000) --------------------------------------------------------
|
949
|
576 void CharacterUI_AwardsTab_Draw(unsigned int uPlayerID)
|
|
577 {
|
706
|
578 //unsigned int v1; // esi@1
|
949
|
579 //unsigned int v2; // ebx@1
|
|
580 //unsigned int award_texture_id; // eax@1
|
706
|
581 unsigned int result; // eax@1
|
|
582 int v5; // eax@15
|
|
583 char *v6; // ebx@15
|
|
584 int v7; // eax@23
|
|
585 int v8; // eax@24
|
|
586 int v9; // eax@25
|
949
|
587 //int v10; // eax@27
|
706
|
588 int v11; // eax@32
|
|
589 int v12; // eax@33
|
|
590 int v13; // eax@34
|
949
|
591 //signed int v14; // eax@43
|
|
592 //unsigned int v15; // eax@43
|
|
593 //int v16; // eax@43
|
|
594 //int v17; // [sp-4h] [bp-D4h]@16
|
706
|
595 char Source[100]; // [sp+Ch] [bp-C4h]@1
|
|
596 GUIWindow a1; // [sp+70h] [bp-60h]@1
|
949
|
597 //unsigned int v20; // [sp+C4h] [bp-Ch]@15
|
|
598 //int v21; // [sp+C8h] [bp-8h]@14
|
|
599 //int v22; // [sp+CCh] [bp-4h]@40
|
706
|
600
|
|
601 auto player = &pParty->pPlayers[uPlayerID - 1];
|
|
602 //v1 = uPlayerID;
|
949
|
603 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_award", TEXTURE_16BIT_PALETTE));
|
|
604 sprintfex(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], TargetColor(0xFF, 0xFF, 0x9B));
|
706
|
605 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]);
|
|
606 strcat(pTmpBuf, Source);
|
|
607 strcat(pTmpBuf, "\f00000");
|
|
608 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0);
|
|
609 result = dword_506528;
|
|
610 a1.uFrameX = 12;
|
|
611 a1.uFrameY = 48;
|
|
612 a1.uFrameWidth = 424;
|
|
613 a1.uFrameHeight = 290;
|
|
614 a1.uFrameZ = 435;
|
|
615 a1.uFrameW = 337;
|
949
|
616 if ( dword_506544 && num_achieved_awards + dword_506528 < num_achieved_awards_2 )
|
706
|
617 result = dword_506528++ + 1;
|
|
618 if ( dword_506548 && result )
|
|
619 {
|
|
620 --result;
|
|
621 dword_506528 = result;
|
|
622 }
|
|
623 if ( dword_50651C < 0 )
|
|
624 {
|
949
|
625 result += num_achieved_awards;
|
706
|
626 dword_506528 = result;
|
949
|
627 if ( (signed int)(num_achieved_awards + result) > num_achieved_awards_2 )
|
706
|
628 {
|
949
|
629 result = num_achieved_awards_2 - num_achieved_awards;
|
706
|
630 dword_506528 = result;
|
|
631 }
|
|
632 }
|
|
633 else if ( dword_50651C > 0 )
|
|
634 {
|
949
|
635 result -= num_achieved_awards;
|
706
|
636 dword_506528 = result;
|
|
637 if ( (result & 0x80000000u) != 0 )
|
|
638 {
|
|
639 result = 0;
|
|
640 dword_506528 = result;
|
|
641 }
|
|
642 }
|
|
643 //LABEL_14:
|
|
644 dword_506544 = 0;
|
|
645 dword_506548 = 0;
|
949
|
646 num_achieved_awards = 0;
|
706
|
647 dword_50651C = 0;
|
949
|
648
|
|
649
|
|
650 for (uint i = result; i < num_achieved_awards_2; ++i)
|
|
651 {
|
|
652 v5 = achieved_awards[i];
|
|
653 v6 = (char *)pAwards[v5].pText;//(char *)dword_723E80_award_related[v20 / 4];
|
|
654
|
|
655 pTmpBuf[0] = 0;
|
|
656 switch (v5)
|
706
|
657 {
|
949
|
658 case Award_Arena_PageWins: sprintf(pTmpBuf, v6, pParty->uNumArenaPageWins); break;
|
|
659 case Award_Arena_SquireWins: sprintf(pTmpBuf, v6, pParty->uNumArenaSquireWins); break;
|
|
660 case Award_Arena_KnightWins: sprintf(pTmpBuf, v6, pParty->uNumArenaKnightWins); break;
|
|
661 case Award_Arena_LordWins: sprintf(pTmpBuf, v6, pParty->uNumArenaLordWins); break;
|
|
662 case Award_ArcomageWins: sprintf(pTmpBuf, v6, pParty->uNumArcomageWins); break;
|
|
663 case Award_ArcomageLoses: sprintf(pTmpBuf, v6, pParty->uNumArcomageLoses); break;
|
|
664 case Award_Deaths: sprintf(pTmpBuf, v6, pParty->uNumDeaths); break;
|
|
665 case Award_BountiesCollected: sprintf(pTmpBuf, v6, pParty->uNumBountiesCollected); break;
|
|
666 case Award_Fine: sprintf(pTmpBuf, v6, pParty->uFine); break;
|
|
667 case Award_PrisonTerms: sprintf(pTmpBuf, v6, pParty->uNumPrisonTerms); break;
|
706
|
668 }
|
|
669
|
949
|
670 if (*pTmpBuf)
|
|
671 v6 = pTmpBuf;
|
|
672
|
|
673
|
|
674 a1.DrawText(pFontArrus, 0, 0, GetAwardColor(pAwards[v5].uPriority), v6, 0, 0, 0);
|
|
675 a1.uFrameY = pFontArrus->CalcTextHeight(v6, &a1, 0, 0) + a1.uFrameY + 4;
|
|
676 if (a1.uFrameY > a1.uFrameHeight)
|
|
677 break;
|
|
678
|
|
679 ++num_achieved_awards;
|
706
|
680 }
|
949
|
681 }
|
706
|
682
|
|
683
|
|
684
|
|
685
|
|
686
|
|
687
|
|
688 //----- (0041A2C1) --------------------------------------------------------
|
|
689 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels)
|
|
690 {
|
|
691 if ( (signed int)uNumPixels < 14 )
|
|
692 uNumPixels = 14;
|
|
693 return ((signed int)(uNumPixels - 14) >> 5) + 1;
|
|
694 }
|
|
695
|
|
696 //----- (0041A2D1) --------------------------------------------------------
|
|
697 void __fastcall CharacterUI_InventoryTab_Draw(unsigned int uPlayerID, char a2)
|
|
698 {
|
|
699 Player *pPlayer; // esi@1
|
|
700 char v3; // bl@1
|
|
701 unsigned int v4; // eax@2
|
|
702 ItemGen *pItem; // ebx@5
|
|
703 unsigned int v6; // eax@6
|
|
704 Texture *v7; // esi@6
|
|
705 __int16 v8; // ax@6
|
|
706 signed int v9; // edi@6
|
|
707 signed int v10; // ecx@6
|
|
708 signed int v11; // edx@6
|
|
709 signed int v12; // eax@11
|
|
710 int v13; // eax@13
|
|
711 signed int v14; // edx@13
|
|
712 int v15; // eax@13
|
|
713 unsigned int v16; // ebx@15
|
|
714 unsigned int v17; // edi@15
|
|
715 Texture *pTexture; // ebx@24
|
|
716 double v19; // st7@26
|
|
717 const char *v20; // [sp-8h] [bp-40h]@20
|
|
718 Player *pPlayer2; // [sp+14h] [bp-24h]@1
|
|
719 int uTextureId; // [sp+18h] [bp-20h]@6
|
|
720 int *v23; // [sp+1Ch] [bp-1Ch]@1
|
|
721 int v24; // [sp+20h] [bp-18h]@5
|
|
722 ItemGen *pItem2; // [sp+24h] [bp-14h]@5
|
|
723 int v26; // [sp+28h] [bp-10h]@3
|
|
724 unsigned int uCellID; // [sp+2Ch] [bp-Ch]@3
|
|
725 unsigned int uCellX; // [sp+30h] [bp-8h]@5
|
|
726 unsigned int uCellY; // [sp+34h] [bp-4h]@5
|
|
727
|
|
728 v23 = pRenderer->pActiveZBuffer;
|
|
729 pPlayer = pPlayers[uPlayerID];
|
|
730 v3 = a2;
|
|
731 pPlayer2 = pPlayers[uPlayerID];
|
948
|
732 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_507958));
|
706
|
733 if ( v3 )
|
|
734 {
|
|
735 v4 = pIcons_LOD->LoadTexture("fr_strip", TEXTURE_16BIT_PALETTE);
|
948
|
736 pRenderer->DrawTextureIndexed(8u, 0x131u, pIcons_LOD->GetTexture(v4));
|
706
|
737 }
|
|
738 uCellID = 0;
|
|
739 v26 = (int)pPlayer->pInventoryIndices;
|
|
740 do
|
|
741 {
|
|
742 if ( *(int *)v26 > 0 )
|
|
743 {
|
|
744 v24 = *(int *)v26 - 1;
|
|
745 uCellY = 32 * (uCellID / 14) + 17;
|
|
746 pItem = &pPlayer->pInventoryItems[v24];
|
|
747 uCellX = 32 * (uCellID % 14) + 14;
|
|
748 pItem2 = pItem;
|
|
749 if ( pItem->uItemID )
|
|
750 {
|
|
751 v6 = pIcons_LOD->LoadTexture(pItemsTable->pItems[pItem->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
752 uTextureId = v6;
|
948
|
753 v7 = pIcons_LOD->GetTexture(v6);
|
|
754 v8 = v7->uTextureWidth;
|
706
|
755 v9 = v7->uTextureHeight;
|
|
756 v10 = v7->uTextureWidth;
|
|
757 v11 = v7->uTextureWidth;
|
|
758 if ( v10 < 14 )
|
|
759 v11 = 14;
|
|
760 if ( (v11 - 14) >> 5 == 0 && v8 < 32 )
|
|
761 uCellX += (32 - v10) / 2;
|
|
762 v12 = v7->uTextureWidth;
|
|
763 if ( v10 < 14 )
|
|
764 v12 = 14;
|
|
765 v13 = v12 - 14;
|
|
766 v14 = v7->uTextureHeight;
|
|
767 LOBYTE(v13) = v13 & 0xE0;
|
|
768 v15 = v13 + 32;
|
|
769 if ( v9 < 14 )
|
|
770 v14 = 14;
|
|
771 v16 = pItem->uAttributes;
|
|
772 v17 = uCellX + ((v15 - v10) >> 1) + pSRZBufferLineOffsets[uCellY + ((((v14 - 14) & 0xFFFFFFE0) - v9 + 32) >> 1)];
|
|
773 if ( !(v16 & 0xF0) )
|
|
774 {
|
|
775 if (pItem->Identified() || pCurrentScreen != SCREEN_HOUSE )
|
|
776 {
|
|
777 if (pItem->Broken())
|
|
778 pRenderer->DrawTransparentRedShade(uCellX, uCellY, v7);
|
|
779 else
|
|
780 pRenderer->DrawTextureTransparent(uCellX, uCellY, v7);
|
|
781 }
|
|
782 else
|
|
783 {
|
|
784 pRenderer->DrawTransparentGreenShade(uCellX, uCellY, v7);
|
|
785 }
|
|
786 ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
|
|
787 pPlayer = pPlayer2;
|
|
788 //goto LABEL_34;
|
|
789 ++uCellID;
|
|
790 v26 += 4;
|
|
791 continue;
|
|
792 }
|
|
793 if ( (unsigned __int8)(v16 & 0xF0) != 16 )
|
|
794 {
|
|
795 if ( (unsigned __int8)(v16 & 0xF0) == 32 )
|
|
796 {
|
|
797 v20 = "sp28a";
|
948
|
798 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE);
|
706
|
799 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
800 if ( dword_50C9A8 <= 0 )
|
|
801 {
|
|
802 dword_50C9A8 = 0;
|
|
803 LOBYTE(pItem2->uAttributes) &= 0xFu;
|
|
804 ptr_50C9A4 = 0;
|
|
805 }
|
|
806 v19 = (double)GetTickCount() * 0.1;
|
|
807 pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
|
|
808 ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
|
|
809 pPlayer = pPlayer2;
|
|
810 //goto LABEL_34;
|
|
811 ++uCellID;
|
|
812 v26 += 4;
|
|
813 continue;
|
|
814 }
|
|
815 if ( (unsigned __int8)(v16 & 0xF0) == 64 )
|
|
816 {
|
|
817 v20 = "sp30a";
|
948
|
818 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE);
|
706
|
819 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
820 if ( dword_50C9A8 <= 0 )
|
|
821 {
|
|
822 dword_50C9A8 = 0;
|
|
823 LOBYTE(pItem2->uAttributes) &= 0xFu;
|
|
824 ptr_50C9A4 = 0;
|
|
825 }
|
|
826 v19 = (double)GetTickCount() * 0.1;
|
|
827 pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
|
|
828 ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
|
|
829 pPlayer = pPlayer2;
|
|
830 //goto LABEL_34;
|
|
831 ++uCellID;
|
|
832 v26 += 4;
|
|
833 continue;
|
|
834 }
|
|
835 if ( (unsigned __int8)(v16 & 0xF0) == 128 )
|
|
836 {
|
|
837 v20 = "sp91a";
|
948
|
838 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE);
|
706
|
839 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
840 if ( dword_50C9A8 <= 0 )
|
|
841 {
|
|
842 dword_50C9A8 = 0;
|
|
843 LOBYTE(pItem2->uAttributes) &= 0xFu;
|
|
844 ptr_50C9A4 = 0;
|
|
845 }
|
|
846 v19 = (double)GetTickCount() * 0.1;
|
|
847 pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
|
|
848 ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
|
|
849 pPlayer = pPlayer2;
|
|
850 //goto LABEL_34;
|
|
851 ++uCellID;
|
|
852 v26 += 4;
|
|
853 continue;
|
|
854 }
|
|
855 }
|
|
856 v20 = "sptext01";
|
948
|
857 pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE);
|
706
|
858 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
859 if ( dword_50C9A8 <= 0 )
|
|
860 {
|
|
861 dword_50C9A8 = 0;
|
|
862 LOBYTE(pItem2->uAttributes) &= 0xFu;
|
|
863 ptr_50C9A4 = 0;
|
|
864 }
|
|
865 v19 = (double)GetTickCount() * 0.1;
|
|
866 pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, (signed __int64)v19, 0, 255);
|
|
867 ZBuffer_Fill(&v23[v17], uTextureId, v24 + 1);
|
|
868 pPlayer = pPlayer2;
|
|
869 }
|
|
870 }
|
|
871 //LABEL_34:
|
|
872 ++uCellID;
|
|
873 v26 += 4;
|
|
874 }
|
|
875 while ( uCellID < 126 );
|
|
876 }
|
|
877
|
|
878 //----- (0041A556) --------------------------------------------------------
|
|
879 void __cdecl draw_leather()
|
|
880 {
|
|
881 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather));
|
|
882 }
|
|
883
|
|
884 //----- (0041A57E) --------------------------------------------------------
|
|
885 void QuickRefDraw()
|
|
886 {
|
|
887 unsigned int v0; // ebx@1
|
|
888 //unsigned int v1; // eax@1
|
|
889 Player *pPlayer; // ebp@2
|
|
890 int v3; // eax@6
|
|
891 int v4; // edi@6
|
|
892 unsigned int v5; // eax@7
|
|
893 unsigned int v6; // edi@9
|
|
894 unsigned int v7; // edi@11
|
|
895 signed int v8; // eax@13
|
|
896 unsigned int v9; // eax@13
|
|
897 unsigned int v10; // edi@13
|
|
898 int v11; // eax@15
|
|
899 unsigned int v12; // eax@15
|
|
900 unsigned int v13; // edi@15
|
|
901 int v14; // eax@17
|
|
902 int v15; // ST18_4@17
|
|
903 int v16; // ebx@17
|
|
904 int v17; // eax@17
|
|
905 unsigned int v18; // eax@17
|
|
906 unsigned int v19; // edi@17
|
|
907 int v20; // eax@19
|
|
908 unsigned int v21; // edi@19
|
|
909 char *v22; // eax@21
|
|
910 unsigned int v23; // edi@21
|
|
911 int v24; // eax@23
|
|
912 unsigned int v25; // edi@23
|
|
913 char *v26; // eax@25
|
|
914 unsigned int v27; // edi@25
|
|
915 int v28; // ecx@27
|
|
916 char *v29; // eax@27
|
|
917 signed int v30; // edx@27
|
|
918 unsigned int v31; // edi@31
|
|
919 unsigned int v32; // edi@33
|
|
920 const char *v33; // ST10_4@35
|
|
921 unsigned int v34; // eax@35
|
|
922 unsigned int v35; // edi@35
|
|
923 unsigned __int8 v36; // al@37
|
|
924 char *v37; // eax@38
|
|
925 int v38; // eax@41
|
|
926 signed int v39; // edi@42
|
|
927 char *v40; // eax@45
|
|
928 unsigned int v41; // eax@45
|
|
929 signed int v43; // [sp+10h] [bp-1Ch]@1
|
|
930 unsigned int v44; // [sp+14h] [bp-18h]@2
|
|
931 int v45; // [sp+18h] [bp-14h]@1
|
|
932 unsigned int v46; // [sp+1Ch] [bp-10h]@1
|
|
933 unsigned int v47; // [sp+20h] [bp-Ch]@1
|
|
934 unsigned int v48; // [sp+24h] [bp-8h]@33
|
|
935 //unsigned int v49; // [sp+28h] [bp-4h]@1
|
|
936
|
|
937 v0 = 0;
|
949
|
938 v47 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
|
|
939 //v49 = TargetColor(0xFFu, 0, 0);
|
|
940 v46 = TargetColor(0, 0xFFu, 0);
|
706
|
941 //v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE);
|
|
942 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("quikref", TEXTURE_16BIT_PALETTE));
|
|
943 v43 = 0;
|
|
944 v45 = LOBYTE(pFontArrus->uFontHeight) + 1;
|
|
945 do
|
|
946 {
|
|
947 pPlayer = &pParty->pPlayers[v43];
|
|
948 v44 = 94 * v43 + 89;
|
|
949 if ( v43 == v0 )
|
|
950 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x12u, v0, pGlobalTXT_LocalizationStrings[149], 60, v0);//Name
|
|
951 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 94 * v43 + 89, 0x12u, v47, pPlayer->pName, 84, v0);
|
|
952 if ( v43 == v0 )
|
|
953 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, 0x2Fu, v0, pGlobalTXT_LocalizationStrings[131], 60, v0); //Óðîâ.
|
|
954 v3 = pPlayer->GetActualLevel();
|
|
955 sprintf(pTmpBuf, "%lu", v3);
|
|
956 v4 = pPlayer->GetBaseLevel();
|
|
957 if ( pPlayer->GetActualLevel() <= v4 )
|
|
958 v5 = pPlayer->GetExperienceDisplayColor();
|
|
959 else
|
949
|
960 v5 = TargetColor(0, 0xFFu, v0);
|
706
|
961 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, 0x2Fu, v5, pTmpBuf, 84, v0);
|
|
962 v6 = v45 + 47;
|
|
963 if ( v43 == v0 )
|
|
964 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v45 + 47, v0, pGlobalTXT_LocalizationStrings[41], 60, v0);//Êëàññ
|
|
965 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v6, v0, pClassNames[pPlayer->classType], 84, v0);
|
|
966 v7 = v45 + v6;
|
|
967 if ( v43 == v0 )
|
|
968 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v7, v0, pGlobalTXT_LocalizationStrings[107], 60, v0);//Çäîð.
|
|
969 sprintf(pTmpBuf, "%d", pPlayer->sHealth);
|
|
970 v8 = pPlayer->GetMaxHealth();
|
|
971 v9 = UI_GetHealthManaStringColor(pPlayer->sHealth, v8);
|
|
972 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v7, v9, pTmpBuf, 84, v0);
|
|
973 v10 = v45 + v7;
|
|
974 if ( v43 == v0 )
|
|
975 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v10, v0, pGlobalTXT_LocalizationStrings[209], 60, v0);//Ìàíà
|
|
976 sprintf(pTmpBuf, "%d", pPlayer->sMana);
|
|
977 v11 = pPlayer->GetMaxMana();
|
|
978 v12 = UI_GetHealthManaStringColor(pPlayer->sMana, v11);
|
|
979 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v10, v12, pTmpBuf, 84, v0);
|
|
980 v13 = v45 + v10;
|
|
981 if ( v43 == v0 )
|
|
982 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v13, v0, pGlobalTXT_LocalizationStrings[0], 60, v0);//Êëàññ áðîíè
|
|
983 v14 = pPlayer->GetActualAC();
|
|
984 sprintf(pTmpBuf, "%d", v14);
|
|
985 v15 = v0;
|
|
986 v16 = pPlayer->GetBaseAC();
|
|
987 v17 = pPlayer->GetActualAC();
|
|
988 v18 = UI_GetHealthManaStringColor(v17, v16);
|
|
989 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v13, v18, pTmpBuf, 84, v15);
|
|
990 v0 = 0;
|
|
991 v19 = v45 + v13;
|
|
992 if ( !v43 )
|
|
993 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v19, 0, pGlobalTXT_LocalizationStrings[18], 60, 0);//Àòàêà
|
|
994 v20 = pPlayer->GetActualAttack(0);
|
|
995 sprintf(pTmpBuf, "%+d", v20);
|
|
996 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v19, 0, pTmpBuf, 84, 0);
|
|
997 v21 = v45 + v19;
|
|
998 if ( !v43 )
|
|
999 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v21, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Ïîâð.
|
|
1000 v22 = pPlayer->GetMeleeDamageString();
|
|
1001 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v21, 0, v22, 84, 0);
|
|
1002 v23 = v45 + v21;
|
|
1003 if ( !v43 )
|
|
1004 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v23, 0, pGlobalTXT_LocalizationStrings[203], 60, 0);// Ñòðåëÿòü
|
|
1005 v24 = pPlayer->GetRangedAttack();
|
|
1006 sprintf(pTmpBuf, "%+d", v24);
|
|
1007 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v23, 0, pTmpBuf, 84, 0);
|
|
1008 v25 = v45 + v23;
|
|
1009 if ( !v43 )
|
|
1010 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v25, 0, pGlobalTXT_LocalizationStrings[66], 60, 0);//Ïîâð.
|
|
1011 v26 = pPlayer->GetRangedDamageString();
|
|
1012 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v25, 0, v26, 84, 0);
|
|
1013 v27 = v45 + v25;
|
|
1014 if ( !v43 )
|
|
1015 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v27, 0, pGlobalTXT_LocalizationStrings[205], 60, 0);//Íàâûêè
|
|
1016 v28 = 0;
|
|
1017 v29 = (char *)pPlayer->pActiveSkills;
|
|
1018 v30 = 36;
|
|
1019 do
|
|
1020 {
|
|
1021 if ( *(short *)v29 )
|
|
1022 ++v28;
|
|
1023 v29 += 2;
|
|
1024 --v30;
|
|
1025 }
|
|
1026 while ( v30 );
|
|
1027 sprintf(pTmpBuf, "%lu", v28);
|
|
1028 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v27, 0, pTmpBuf, 84, 0);
|
|
1029 v31 = v45 + v27;
|
|
1030 if ( !v43 )
|
|
1031 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v31, 0, pGlobalTXT_LocalizationStrings[168], 60, 0);//Î÷êè
|
|
1032 sprintf(pTmpBuf, "%lu", pPlayer->uSkillPoints);
|
|
1033 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v31, pPlayer->uSkillPoints != 0 ? v46 : 0, pTmpBuf, 84, 0);
|
|
1034 v32 = v45 + v31;
|
|
1035 v48 = pPlayer->GetMajorConditionIdx();
|
|
1036 if ( !v43 )
|
|
1037 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v32, 0, pGlobalTXT_LocalizationStrings[45], 60, 0);//Ñîñò.
|
|
1038 v33 = aCharacterConditionNames[v48];
|
|
1039 v34 = GetConditionDrawColor(v48);
|
|
1040 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v32, v34, v33, 84, 0);
|
|
1041 v35 = v45 + v32;
|
|
1042 if ( !v43 )
|
|
1043 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x16u, v35, 0, pGlobalTXT_LocalizationStrings[170], 60, 0);//Á.Ïðèì.
|
|
1044 v36 = pPlayer->uQuickSpell;
|
|
1045 if ( v36 )
|
|
1046 v37 = pSpellStats->pInfos[v36].pShortName;
|
|
1047 else
|
|
1048 v37 = pGlobalTXT_LocalizationStrings[153];//Íåò
|
|
1049 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, v44, v35, 0, v37, 84, 0);
|
|
1050 ++v43;
|
|
1051 }
|
|
1052 while ( v43 < 4 );
|
|
1053
|
|
1054 v38 = GetPartyReputation();
|
|
1055 if ( v38 >= 0 )
|
|
1056 {
|
|
1057 if ( v38 <= 5 )
|
949
|
1058 v39 = TargetColor(0xFF, 0xFF, 0xFF);
|
706
|
1059 else
|
949
|
1060 v39 = TargetColor(0xFF, 0, 0);
|
706
|
1061 }
|
|
1062 else
|
|
1063 v39 = v46;
|
|
1064
|
|
1065 v40 = GetReputationString(v38);
|
|
1066 sprintf(pTmpBuf, "%s: \f%05d%s\f00000", pGlobalTXT_LocalizationStrings[180], v39, v40);//Reputation
|
|
1067 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, pTmpBuf, 0, 0, 0);
|
|
1068 v41 = pParty->GetPartyFame();
|
|
1069 sprintf(pTmpBuf, "\r261%s: %d", pGlobalTXT_LocalizationStrings[84], v41);// Fame Ñëàâà
|
|
1070 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 0, 323, 0, pTmpBuf, 0, 0, 0);
|
|
1071 }
|
|
1072
|
|
1073 //----- (0041ABFD) --------------------------------------------------------
|
910
|
1074 void __thiscall CharacterUI_CharacterScreen_Draw(unsigned int uPlayerIdx)
|
|
1075 {
|
|
1076 unsigned int v2; // eax@6
|
|
1077 Texture *pTexture; // ecx@6
|
|
1078 GUIButton *pButton; // eax@6
|
|
1079 unsigned int v5; // eax@7
|
|
1080 unsigned int v6; // eax@10
|
|
1081 unsigned int v7; // eax@11
|
706
|
1082
|
910
|
1083 if ( uPlayerIdx )
|
|
1084 {
|
|
1085 pRenderer->ClearZBuffer(0, 479);
|
|
1086 switch ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] )
|
|
1087 {
|
|
1088 case WINDOW_CharacterWindow_Stats: // stats
|
|
1089 sub_4196A0();
|
|
1090 sub_419379();
|
|
1091 CharacterUI_StatsTab_Draw(uPlayerIdx);
|
|
1092 v7 = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE);
|
948
|
1093 pTexture = pIcons_LOD->GetTexture(v7);
|
910
|
1094 pButton = pCharacterScreen_StatsBtn;
|
|
1095 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture);
|
|
1096 break;
|
|
1097 case WINDOW_CharacterWindow_Skills: // skills
|
|
1098 if ( dword_507CC0 != uActiveCharacter )
|
|
1099 {
|
|
1100 sub_4196A0();
|
|
1101 CharacterUI_SkillScreen_Draw();
|
706
|
1102 }
|
910
|
1103 sub_419379();
|
|
1104 CharacterUI_SkillsTab_Draw(uPlayerIdx);
|
|
1105 v6 = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE);
|
948
|
1106 pTexture = pIcons_LOD->GetTexture(v6);
|
910
|
1107 pButton = pCharacterScreen_SkillsBtn;
|
|
1108 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture);
|
|
1109 break;
|
|
1110 case WINDOW_CharacterWindow_Awards: // awards
|
|
1111 sub_4196A0();
|
|
1112 sub_419379();
|
|
1113 sub_419220();
|
|
1114 CharacterUI_AwardsTab_Draw(uPlayerIdx);
|
|
1115 v5 = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE);
|
948
|
1116 pTexture = pIcons_LOD->GetTexture(v5);
|
910
|
1117 pButton = pCharacterScreen_AwardsBtn;
|
|
1118 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture);
|
|
1119 break;
|
|
1120 case WINDOW_CharacterWindow_Inventory: // inventory and other
|
|
1121 sub_4196A0();
|
|
1122 sub_419379();
|
|
1123 CharacterUI_InventoryTab_Draw(uPlayerIdx, 0);
|
|
1124 v2 = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE);
|
948
|
1125 pTexture = pIcons_LOD->GetTexture(v2);
|
910
|
1126 pButton = pCharacterScreen_InventoryBtn;
|
|
1127 pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture);
|
|
1128 break;
|
|
1129 default:
|
|
1130 break;
|
|
1131 }
|
|
1132 if ( bRingsShownInCharScreen )
|
|
1133 CharacterUI_DrawPaperdollWithRingOverlay(uPlayerIdx);
|
|
1134 else
|
|
1135 CharacterUI_DrawPaperdoll(uPlayerIdx);
|
|
1136 }
|
|
1137 }
|
706
|
1138
|
898
|
1139 //----- (0043CC7C) --------------------------------------------------------
|
|
1140 void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID)
|
|
1141 {
|
|
1142 signed int pSex; // eax@1
|
|
1143 unsigned int v6; // ecx@9
|
899
|
1144 int v7; // ecx@10
|
|
1145 unsigned int pMainHandNum4; // eax@14
|
|
1146 ItemGen *item_MainHand4; // eax@15
|
|
1147 int v10; // edx@15
|
|
1148 unsigned int pX_MainHand4; // edi@15
|
|
1149 unsigned int v14; // ebx@18
|
|
1150 Texture *v16; // ebp@27
|
|
1151 double v17; // st7@29
|
|
1152 int v18; // edi@30
|
|
1153 char *v19; // eax@30
|
|
1154 unsigned int pBowNum; // eax@37
|
|
1155 ItemGen *itemBow; // edi@38
|
|
1156 int pX_Bow; // ebx@38
|
|
1157 double v28; // st7@51
|
|
1158 char *v30; // eax@54
|
|
1159 unsigned int pCloakNum; // eax@59
|
|
1160 ItemGen *item_Cloak; // edx@60
|
|
1161 int v33; // eax@65
|
|
1162 int v34; // eax@74
|
|
1163 int v35; // ebx@74
|
|
1164 LODFile_IconsBitmaps *v38; // ecx@78
|
|
1165 Texture *v39; // edi@85
|
|
1166 double v40; // st7@87
|
|
1167 int v41; // edi@88
|
|
1168 unsigned int pArmorNum; // eax@93
|
|
1169 ItemGen *item_Armor; // edx@94
|
|
1170 int v45; // eax@98
|
|
1171 int v48; // ebx@106
|
|
1172 LODFile_IconsBitmaps *v50; // ecx@110
|
|
1173 Texture *v51; // edi@117
|
|
1174 double v52; // st7@119
|
|
1175 int v53; // edi@120
|
|
1176 char *v55; // eax@122
|
|
1177 unsigned int pBootNum; // eax@127
|
|
1178 ItemGen *item_Boot; // edi@128
|
|
1179 int v59; // ebx@129
|
|
1180 int v60; // ecx@132
|
|
1181 Texture *v63; // edi@145
|
|
1182 double v64; // st7@147
|
|
1183 int v65; // edi@148
|
|
1184 char *v66; // eax@148
|
|
1185 unsigned int pMainHandNum; // edx@155
|
|
1186 int v70; // edx@156
|
|
1187 unsigned int pBeltNum; // eax@160
|
|
1188 ItemGen *item_Belt; // edi@161
|
|
1189 int v73; // edx@163
|
|
1190 unsigned int v75; // ebx@170
|
|
1191 Texture *v77; // edi@181
|
|
1192 double v78; // st7@183
|
|
1193 int v79; // edi@184
|
|
1194 char *v80; // eax@184
|
|
1195 unsigned int pMainHandNum2; // eax@192
|
|
1196 int v83; // eax@193
|
|
1197 int pArmorShoulderNum; // eax@197
|
|
1198 int v87; // eax@197
|
|
1199 int v88; // eax@198
|
|
1200 int v89; // eax@199
|
|
1201 int v94; // ebx@214
|
|
1202 int v95; // eax@214
|
|
1203 char *v96; // edi@226
|
|
1204 double v97; // st7@228
|
|
1205 int v98; // edi@229
|
|
1206 char *v99; // eax@229
|
|
1207 int pX_ArmorShoulder; // eax@237
|
|
1208 int pY_ArmorShoulder; // ecx@237
|
|
1209 int v106; // edx@238
|
|
1210 int v107; // edx@239
|
938
|
1211 int v108; // edx@240papredoll_flying_feet
|
899
|
1212 int v109; // edi@250
|
|
1213 char *v110; // edx@250
|
|
1214 unsigned int pCloakCollarNum; // eax@259
|
|
1215 ItemGen *item_CloakCollar; // eax@260
|
|
1216 int v114; // eax@265
|
|
1217 int v116; // ebx@274
|
706
|
1218 double v118; // st7@286
|
|
1219 int v119; // edi@287
|
|
1220 char *v120; // eax@287
|
|
1221 unsigned int v122; // edi@295
|
898
|
1222 int pHelmNum; // ebx@297
|
|
1223 ItemGen *item_Helm; // edi@298
|
706
|
1224 int v125; // ecx@303
|
|
1225 unsigned int v127; // ebx@314
|
|
1226 Texture *v129; // edi@325
|
|
1227 double v130; // st7@327
|
|
1228 int v131; // edi@328
|
|
1229 char *v132; // eax@328
|
898
|
1230 unsigned int pMainHandNum3; // eax@335
|
|
1231 ItemGen *item_MainHand3; // eax@336
|
706
|
1232 unsigned int v138; // ebx@339
|
|
1233 Texture *v140; // edi@348
|
|
1234 double v141; // st7@350
|
|
1235 int v142; // edi@351
|
|
1236 char *v143; // eax@351
|
898
|
1237 unsigned int pShieldNum; // eax@358
|
|
1238 ItemGen *item_Shield; // eax@359
|
706
|
1239 int v149; // edx@359
|
898
|
1240 int pX_Shield; // ebx@362
|
706
|
1241 int v151; // ecx@363
|
|
1242 int v152; // ecx@364
|
|
1243 unsigned int v153; // eax@370
|
|
1244 Texture *v157; // ebp@381
|
|
1245 double v158; // st7@383
|
|
1246 char *v160; // eax@386
|
898
|
1247 unsigned int pMainHandNum5; // eax@393
|
|
1248 ItemGen *item_MainHand5; // eax@394
|
706
|
1249 char *v166; // [sp-8h] [bp-54h]@16
|
|
1250 const char *v167; // [sp-8h] [bp-54h]@23
|
|
1251 const char *v168; // [sp-8h] [bp-54h]@43
|
|
1252 const char *v169; // [sp-8h] [bp-54h]@79
|
|
1253 const char *v170; // [sp-8h] [bp-54h]@111
|
|
1254 const char *v171; // [sp-8h] [bp-54h]@141
|
|
1255 const char *v172; // [sp-8h] [bp-54h]@177
|
|
1256 const char *v173; // [sp-8h] [bp-54h]@222
|
|
1257 const char *v178; // [sp-8h] [bp-54h]@242
|
|
1258 const char *v179; // [sp-8h] [bp-54h]@280
|
|
1259 const char *v180; // [sp-8h] [bp-54h]@321
|
|
1260 char *v181; // [sp-8h] [bp-54h]@337
|
|
1261 const char *v182; // [sp-8h] [bp-54h]@344
|
|
1262 const char *v183; // [sp-8h] [bp-54h]@375
|
|
1263 signed int v186; // [sp-4h] [bp-50h]@202
|
|
1264 signed int v191; // [sp-4h] [bp-50h]@266
|
|
1265 signed int v192; // [sp-4h] [bp-50h]@304
|
898
|
1266 int pY_MainHand4; // [sp+10h] [bp-3Ch]@15
|
|
1267 int pY_Bow; // [sp+10h] [bp-3Ch]@38
|
|
1268 unsigned int pY_Cloak; // [sp+10h] [bp-3Ch]@74
|
|
1269 unsigned int pY_Armor; // [sp+10h] [bp-3Ch]@106
|
|
1270 int pY_Boot; // [sp+10h] [bp-3Ch]@129
|
|
1271 int pY_Belt; // [sp+10h] [bp-3Ch]@168
|
|
1272 unsigned int pY_shoulder; // [sp+10h] [bp-3Ch]@216
|
|
1273 unsigned int pY_CloakCollar; // [sp+10h] [bp-3Ch]@274
|
|
1274 int pY_Helm; // [sp+10h] [bp-3Ch]@312
|
|
1275 int pY_MainHand3; // [sp+10h] [bp-3Ch]@336
|
|
1276 int pY_Shield; // [sp+10h] [bp-3Ch]@362
|
706
|
1277 Texture *a2b; // [sp+14h] [bp-38h]@49
|
898
|
1278 int pX_Cloak; // [sp+14h] [bp-38h]@74
|
|
1279 int pX_Armor; // [sp+14h] [bp-38h]@106
|
|
1280 int pX_Boot; // [sp+14h] [bp-38h]@129
|
|
1281 int pX_Belt; // [sp+14h] [bp-38h]@168
|
|
1282 int pX_shoulder; // [sp+14h] [bp-38h]@214
|
|
1283 int pX_CloakCollar; // [sp+14h] [bp-38h]@274
|
706
|
1284 Texture *a2i; // [sp+14h] [bp-38h]@284
|
898
|
1285 int pX_Helm; // [sp+14h] [bp-38h]@312
|
|
1286 int pX_MainHand3; // [sp+14h] [bp-38h]@336
|
706
|
1287 int pBodyComplection; // [sp+24h] [bp-28h]@6
|
898
|
1288 unsigned int pBowTextureNum; // [sp+2Ch] [bp-20h]@38
|
706
|
1289 signed int v245; // [sp+34h] [bp-18h]@361
|
|
1290 signed int IsDwarf; // [sp+40h] [bp-Ch]@4
|
|
1291
|
898
|
1292 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
|
|
1293 pSex = pPlayers[uPlayerID]->GetSexByVoice();
|
|
1294 if ( pPlayers[uPlayerID]->GetRace() && pPlayers[uPlayerID]->GetRace() != 1 && pPlayers[uPlayerID]->GetRace() != 2 )
|
|
1295 {
|
|
1296 IsDwarf = 1;
|
|
1297 pBodyComplection = (pSex != 0) + 2;
|
|
1298 }
|
|
1299 else
|
|
1300 {
|
|
1301 IsDwarf = 0;
|
|
1302 pBodyComplection = pSex != 0;
|
|
1303 }
|
|
1304 pRenderer->ResetTextureClipRect();
|
|
1305 pRenderer->DrawTextureIndexed(0x1D3u, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Ïîäëîæêà
|
|
1306 if ( IsPlayerWearingWatersuit[uPlayerID] )//àêâàëàíã
|
|
1307 {
|
948
|
1308 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
|
898
|
1309 if ( !bRingsShownInCharScreen )
|
948
|
1310 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), pPlayers[uPlayerID]->pEquipment.uArmor);
|
898
|
1311 v6 = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
1312 if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1)
|
|
1313 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) )
|
|
1314 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
|
948
|
1315 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
|
898
|
1316 pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
1317 if ( pMainHandNum4 )
|
|
1318 {
|
|
1319 item_MainHand4 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum4 - 1];
|
|
1320 pX_MainHand4 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipX;
|
|
1321 pY_MainHand4 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipY;
|
|
1322 if ( item_MainHand4->uItemID == 64 )
|
|
1323 v166 = "item64v1";
|
|
1324 else
|
|
1325 v166 = pItemsTable->pItems[item_MainHand4->uItemID].pIconName;
|
|
1326 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE);
|
|
1327 if ( !( item_MainHand4->uAttributes & 0xF0 ) )
|
|
1328 {
|
|
1329 v18 = v14 + 1;
|
948
|
1330 v19 = (char *)pIcons_LOD->GetTexture(v14);
|
898
|
1331 if ( item_MainHand4->uAttributes & 2 )
|
948
|
1332 pRenderer->DrawTransparentRedShade(pX_MainHand4, pY_MainHand4, (Texture *)v19);
|
898
|
1333 else
|
|
1334 {
|
|
1335 if ( item_MainHand4->uAttributes & 1 )
|
948
|
1336 pRenderer->DrawTextureTransparent(pX_MainHand4, pY_MainHand4, (Texture *)v19);
|
898
|
1337 else
|
948
|
1338 pRenderer->DrawTransparentGreenShade(pX_MainHand4, pY_MainHand4, (Texture *)v19);
|
898
|
1339 }
|
|
1340 }
|
|
1341 if ( item_MainHand4->uAttributes & 0xF0 )
|
|
1342 {
|
910
|
1343 if ( ( item_MainHand4->uAttributes & 0xF0) == 16 )
|
898
|
1344 v167 = "sptext01";
|
|
1345 if ( ( item_MainHand4->uAttributes & 0xF0) == 32 )
|
|
1346 v167 = "sp28a";
|
|
1347 if ( (item_MainHand4->uAttributes & 0xF0) == 64 )
|
|
1348 v167 = "sp30a";
|
|
1349 if ( (item_MainHand4->uAttributes & 0xF0) == 128 )
|
|
1350 v167 = "sp91a";
|
948
|
1351 v16 = pIcons_LOD->LoadTexturePtr(v167, TEXTURE_16BIT_PALETTE);
|
898
|
1352 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1353 if ( dword_50C9A8 <= 0 )
|
|
1354 {
|
|
1355 dword_50C9A8 = 0;
|
|
1356 item_MainHand4->uAttributes &= 0xFu;
|
|
1357 ptr_50C9A4 = 0;
|
|
1358 }
|
|
1359 v17 = (double)GetTickCount() * 0.1;
|
948
|
1360 pRenderer->_4A63E6(pX_MainHand4, pY_MainHand4, pIcons_LOD->GetTexture(v14), v16, (signed __int64)v17, 0, 255);
|
898
|
1361 }
|
|
1362 if ( !bRingsShownInCharScreen )
|
948
|
1363 pRenderer->DrawMaskToZBuffer(pX_MainHand4, pY_MainHand4, (Texture *)v19, pMainHandNum4);
|
898
|
1364 }
|
|
1365 }
|
|
1366 else// áåç àêâàëàíãà
|
|
1367 {
|
|
1368 pBowNum = pPlayers[uPlayerID]->pEquipment.uBow; //ñíà÷àëà ðèñóåòñÿ ëóê
|
|
1369 if ( pBowNum )
|
|
1370 {
|
|
1371 itemBow = &pPlayers[uPlayerID]->pInventoryItems[pBowNum - 1];
|
|
1372 pX_Bow = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[itemBow->uItemID].uEquipX;
|
|
1373 pY_Bow = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[itemBow->uItemID].uEquipY;
|
|
1374 pBowTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[itemBow->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
1375 if ( !(itemBow->uAttributes & 0xF0) )// åñëè íå ïðèìåí¸í çàêë
|
|
1376 {
|
|
1377 if ( itemBow->uAttributes & 2 )
|
948
|
1378 pRenderer->DrawTransparentRedShade(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum));
|
706
|
1379 else
|
898
|
1380 {
|
948
|
1381 v30 = (char *)pIcons_LOD->GetTexture(pBowTextureNum);
|
898
|
1382 if ( !(itemBow->uAttributes & 1) )//íå îïîçíàííûé ëóê çåë¸íûé
|
948
|
1383 pRenderer->DrawTransparentGreenShade(pX_Bow, pY_Bow, (Texture *)v30);
|
898
|
1384 else // îïîçíàííûé ëóê
|
948
|
1385 pRenderer->DrawTextureTransparent(pX_Bow, pY_Bow, (Texture *)v30);
|
898
|
1386 }
|
|
1387 }
|
|
1388 else
|
|
1389 {
|
|
1390 if ( (itemBow->uAttributes & 0xF0) == 16 )
|
|
1391 v168 = "sptext01";
|
|
1392 if ( (itemBow->uAttributes & 0xF0) == 32 )
|
|
1393 v168 = "sp28a";
|
|
1394 if ( (itemBow->uAttributes & 0xF0) == 64 )
|
|
1395 v168 = "sp30a";
|
|
1396 if ( (itemBow->uAttributes & 0xF0) == 128 )
|
|
1397 v168 = "sp91a";
|
948
|
1398 a2b = pIcons_LOD->LoadTexturePtr(v168, TEXTURE_16BIT_PALETTE);
|
898
|
1399 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1400 if ( dword_50C9A8 <= 0 )
|
|
1401 {
|
|
1402 dword_50C9A8 = 0;
|
|
1403 itemBow->uAttributes &= 0xFu;
|
|
1404 ptr_50C9A4 = 0;
|
|
1405 }
|
|
1406 v28 = (double)GetTickCount() * 0.1;
|
948
|
1407 pRenderer->_4A63E6(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), a2b, (signed __int64)v28, 0, 255);
|
898
|
1408 }
|
|
1409 if ( !bRingsShownInCharScreen )
|
948
|
1410 pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), pBowNum);
|
898
|
1411 }
|
|
1412 pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// ïîòîì ïëàù
|
|
1413 if ( pCloakNum )
|
|
1414 {
|
|
1415 item_Cloak = &pPlayers[uPlayerID]->pInventoryItems[pCloakNum - 1];
|
|
1416 switch ( item_Cloak->uItemID )
|
|
1417 {
|
|
1418 case 525:
|
|
1419 v33 = 5;
|
|
1420 break;
|
|
1421 case 530:
|
|
1422 v33 = 6;
|
|
1423 break;
|
|
1424 case 547:
|
|
1425 v33 = 7;
|
|
1426 break;
|
|
1427 case 548:
|
|
1428 v33 = 8;
|
|
1429 break;
|
|
1430 case 550:
|
|
1431 v33 = 9;
|
|
1432 break;
|
|
1433 default:
|
|
1434 v33 = item_Cloak->uItemID - 105;
|
|
1435 break;
|
|
1436 }
|
|
1437 if ( v33 >= 0 && v33 < 10 )
|
|
1438 {
|
899
|
1439 v35 = paperdoll_cloak_texture[pBodyComplection][v33];//Texture_Cloak
|
|
1440 pX_Cloak = pPaperdoll_BodyX + paperdoll_Cloak[pBodyComplection][v33][0];
|
|
1441 pY_Cloak = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][v33][1];
|
898
|
1442 if ( !(item_Cloak->uAttributes & 0xF0) )
|
|
1443 {
|
|
1444 v41 = v35 + 1;
|
|
1445 if ( item_Cloak->uAttributes & 2 )
|
948
|
1446 pRenderer->DrawTransparentRedShade(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35));
|
898
|
1447 else
|
948
|
1448 pRenderer->DrawTextureTransparent(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35));
|
898
|
1449 }
|
|
1450 else
|
|
1451 {
|
|
1452 if ( (item_Cloak->uAttributes & 0xF0) == 16 )
|
|
1453 v169 = "sptext01";
|
|
1454 if ( (item_Cloak->uAttributes & 0xF0) == 32 )
|
|
1455 v169 = "sp28a";
|
|
1456 if ( (item_Cloak->uAttributes & 0xF0) != 64 )
|
|
1457 v169 = "sp30a";
|
|
1458 if ( (item_Cloak->uAttributes & 0xF0) == 128 )
|
|
1459 v169 = "sp91a";
|
948
|
1460 v39 = pIcons_LOD->LoadTexturePtr(v169, TEXTURE_16BIT_PALETTE);
|
898
|
1461 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1462 if ( dword_50C9A8 <= 0 )
|
|
1463 {
|
|
1464 dword_50C9A8 = 0;
|
|
1465 item_Cloak->uAttributes &= 0xFu;
|
|
1466 ptr_50C9A4 = 0;
|
|
1467 }
|
|
1468 v40 = (double)GetTickCount() * 0.1;
|
948
|
1469 pRenderer->_4A63E6(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), v39, (signed __int64)v40, 0, 255);
|
898
|
1470 }
|
|
1471 if ( !bRingsShownInCharScreen )
|
948
|
1472 pRenderer->DrawMaskToZBuffer(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), pCloakNum);
|
898
|
1473 }
|
|
1474 }
|
|
1475 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,//ðèñóåòñÿ êóêëà
|
948
|
1476 pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
|
898
|
1477 pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// ïîòîì áðîíÿ
|
|
1478 if ( pArmorNum )
|
|
1479 {
|
|
1480 item_Armor = &pPlayers[uPlayerID]->pInventoryItems[pArmorNum - 1];
|
|
1481 switch ( item_Armor->uItemID )
|
|
1482 {
|
|
1483 case 504:
|
|
1484 v45 = 15;
|
|
1485 break;
|
|
1486 case 505:
|
|
1487 v45 = 14;
|
|
1488 break;
|
|
1489 case 516:
|
|
1490 v45 = 13;
|
|
1491 break;
|
|
1492 case 533:
|
|
1493 v45 = 16;
|
|
1494 break;
|
|
1495 default:
|
|
1496 v45 = item_Armor->uItemID - 66;
|
|
1497 break;
|
|
1498 }
|
|
1499 if ( v45 >= 0 && v45 < 17 )
|
|
1500 {
|
899
|
1501 pX_Armor = pPaperdoll_BodyX + paperdoll_Armor[pBodyComplection][v45][0];
|
|
1502 pY_Armor = pPaperdoll_BodyY + paperdoll_Armor[pBodyComplection][v45][1];
|
|
1503 v48 = paperdoll_armor_texture[pBodyComplection][v45][0];
|
898
|
1504 if ( !(item_Armor->uAttributes & 0xF0) )
|
|
1505 {
|
|
1506 v53 = v48 + 1;
|
|
1507 if ( item_Armor->uAttributes & 2 )
|
948
|
1508 pRenderer->DrawTransparentRedShade(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48));
|
898
|
1509 else
|
|
1510 {
|
|
1511 v55 = (char *)&pIcons_LOD->pTextures[v48];
|
|
1512 if ( !(item_Armor->uAttributes & 1) )
|
948
|
1513 pRenderer->DrawTransparentGreenShade(pX_Armor, pY_Armor, (Texture *)v55);
|
898
|
1514 else
|
948
|
1515 pRenderer->DrawTextureTransparent(pX_Armor, pY_Armor, (Texture *)v55);
|
898
|
1516 }
|
|
1517 }
|
|
1518 else
|
|
1519 {
|
|
1520 if ( (item_Armor->uAttributes & 0xF0) == 16 )
|
|
1521 v170 = "sptext01";
|
|
1522 if ( (item_Armor->uAttributes & 0xF0) == 32 )
|
|
1523 v170 = "sp28a";
|
|
1524 if ( (item_Armor->uAttributes & 0xF0) == 64 )
|
|
1525 v170 = "sp30a";
|
|
1526 if ( (item_Armor->uAttributes & 0xF0) == 128 )
|
|
1527 v170 = "sp91a";
|
948
|
1528 v51 = pIcons_LOD->LoadTexturePtr(v170, TEXTURE_16BIT_PALETTE);
|
898
|
1529 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1530 if ( dword_50C9A8 <= 0 )
|
|
1531 {
|
|
1532 dword_50C9A8 = 0;
|
|
1533 item_Armor->uAttributes &= 0xFu;
|
|
1534 ptr_50C9A4 = 0;
|
|
1535 }
|
|
1536 v52 = (double)GetTickCount() * 0.1;
|
948
|
1537 pRenderer->_4A63E6(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48), v51, (signed __int64)v52, 0, 255);
|
898
|
1538 }
|
|
1539 if ( pPlayers[uPlayerID]->pEquipment.uMainHand //äàëåå ïëå÷è áðîíè
|
|
1540 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND ||
|
|
1541 pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD &&
|
|
1542 !pPlayers[uPlayerID]->pEquipment.uShield) )
|
|
1543 {
|
899
|
1544 v94 = paperdoll_armor_texture[pBodyComplection][v45][2];
|
898
|
1545 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
|
|
1546 {
|
899
|
1547 v94 = paperdoll_armor_texture[pBodyComplection][v45][1];
|
|
1548 pX_shoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0];
|
|
1549 pY_shoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1];
|
898
|
1550 }
|
|
1551 else
|
|
1552 {
|
899
|
1553 pX_shoulder = pPaperdoll_BodyX + dword_4E5270[v45][0];
|
|
1554 pY_shoulder = pPaperdoll_BodyY + dword_4E5270[v45][1];
|
898
|
1555 }
|
|
1556 if ( !(item_Armor->uAttributes & 0xF0) )
|
|
1557 {
|
|
1558 v98 = v94 + 1;
|
948
|
1559 v99 = (char *)pIcons_LOD->GetTexture(v94);
|
898
|
1560 if ( item_Armor->uAttributes & 2 )
|
948
|
1561 pRenderer->DrawTransparentRedShade(pX_shoulder, pY_shoulder, (Texture *)v99);
|
898
|
1562 else
|
706
|
1563 {
|
898
|
1564 if ( item_Armor->uAttributes & 1 )
|
948
|
1565 pRenderer->DrawTextureTransparent(pX_shoulder, pY_shoulder, (Texture *)v99);
|
898
|
1566 else
|
948
|
1567 pRenderer->DrawTransparentGreenShade(pX_shoulder, pY_shoulder, (Texture *)v99);
|
898
|
1568 }
|
|
1569 }
|
|
1570 else
|
|
1571 {
|
|
1572 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
|
|
1573 {
|
|
1574 if ( item_Armor->uAttributes & 0xF0 )
|
|
1575 {
|
|
1576 if ( (item_Armor->uAttributes & 0xF0) == 16 )
|
|
1577 v173 = "sptext01";
|
|
1578 if ( (item_Armor->uAttributes & 0xF0) == 32 )
|
|
1579 v173 = "sp28a";
|
|
1580 if ( ( item_Armor->uAttributes & 0xF0) == 64 )
|
|
1581 v173 = "sp30a";
|
|
1582 if ( (item_Armor->uAttributes & 0xF0) == 128 )
|
|
1583 v173 = "sp91a";
|
948
|
1584 v96 = (char *)pIcons_LOD->LoadTexturePtr(v173, TEXTURE_16BIT_PALETTE);
|
706
|
1585 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1586 if ( dword_50C9A8 <= 0 )
|
898
|
1587 {
|
|
1588 dword_50C9A8 = 0;
|
|
1589 item_Armor->uAttributes &= 0xFu;
|
|
1590 ptr_50C9A4 = 0;
|
706
|
1591 }
|
898
|
1592 v97 = (double)GetTickCount();
|
948
|
1593 pRenderer->_4A63E6(pX_shoulder, pY_shoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255);
|
898
|
1594 }
|
|
1595 }
|
|
1596 }
|
|
1597 }
|
|
1598 else
|
|
1599 {
|
899
|
1600 v94 = paperdoll_armor_texture[pBodyComplection][v45][1];
|
898
|
1601 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
|
|
1602 {
|
899
|
1603 pX_ArmorShoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0];
|
|
1604 pY_ArmorShoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1];
|
898
|
1605 if ( !(item_Armor->uAttributes & 0xF0) )
|
|
1606 {
|
|
1607 v109 = v94 + 1;
|
948
|
1608 v110 = (char *)pIcons_LOD->GetTexture(v94);
|
898
|
1609 if ( item_Armor->uAttributes & 2 )
|
948
|
1610 pRenderer->DrawTransparentRedShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110);
|
898
|
1611 else
|
|
1612 {
|
|
1613 if ( item_Armor->uAttributes & 1 )
|
948
|
1614 pRenderer->DrawTextureTransparent(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110);
|
898
|
1615 else
|
948
|
1616 pRenderer->DrawTransparentGreenShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110);
|
898
|
1617 }
|
|
1618 }
|
|
1619 else
|
|
1620 {
|
|
1621 if ( (item_Armor->uAttributes & 0xF0) == 16 )
|
|
1622 v178 = "sptext01";
|
|
1623 if ( (item_Armor->uAttributes & 0xF0) == 32 )
|
|
1624 v178 = "sp28a";
|
|
1625 if ( (item_Armor->uAttributes & 0xF0) == 64 )
|
|
1626 v178 = "sp30a";
|
|
1627 if ( (item_Armor->uAttributes & 0xF0) == 128 )
|
|
1628 v178 = "sp91a";
|
948
|
1629 v96 = (char *)pIcons_LOD->LoadTexturePtr(v178, TEXTURE_16BIT_PALETTE);
|
898
|
1630 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1631 if ( dword_50C9A8 <= 0 )
|
|
1632 {
|
|
1633 dword_50C9A8 = 0;
|
|
1634 item_Armor->uAttributes &= 0xFu;
|
|
1635 ptr_50C9A4 = 0;
|
|
1636 }
|
|
1637 v97 = (double)GetTickCount();
|
948
|
1638 pRenderer->_4A63E6(pX_ArmorShoulder, pY_ArmorShoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255);
|
898
|
1639 }
|
|
1640 }
|
|
1641 }
|
|
1642 if ( !bRingsShownInCharScreen )
|
948
|
1643 pRenderer->DrawMaskToZBuffer(pX_Armor, pY_Armor, (Texture *)v55, pArmorNum);
|
898
|
1644 }
|
|
1645 }
|
|
1646 pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;//äàëåå îáóâü
|
|
1647 if ( pBootNum )
|
|
1648 {
|
|
1649 item_Boot = &pPlayers[uPlayerID]->pInventoryItems[pBootNum - 1];
|
|
1650 switch ( item_Boot->uItemID )
|
|
1651 {
|
|
1652 case 529:
|
|
1653 v60 = 5;
|
|
1654 v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uFace];
|
|
1655 break;
|
|
1656 case 512:
|
|
1657 v60 = 6;
|
899
|
1658 v59 = paperdoll_boots_texture[pBodyComplection][5];
|
898
|
1659 break;
|
|
1660 default:
|
|
1661 v60 = item_Boot->uItemID - 115;
|
899
|
1662 v59 = paperdoll_boots_texture[pBodyComplection][v60];
|
898
|
1663 break;
|
|
1664 }
|
|
1665 if ( v60 >= 0 && v60 < 7 )
|
|
1666 {
|
899
|
1667 pX_Boot = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][v60][0];
|
|
1668 pY_Boot = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][v60][1];
|
898
|
1669 if ( !(item_Boot->uAttributes & 0xF0) )
|
|
1670 {
|
|
1671 v65 = v59 + 1;
|
948
|
1672 v66 = (char *)pIcons_LOD->GetTexture(v59);
|
898
|
1673 if ( item_Boot->uAttributes & 2 )
|
948
|
1674 pRenderer->DrawTransparentRedShade(pX_Boot, pY_Boot, (Texture *)v66);
|
898
|
1675 else
|
|
1676 {
|
|
1677 if ( item_Boot->uAttributes & 1 )
|
948
|
1678 pRenderer->DrawTextureTransparent(pX_Boot, pY_Boot, (Texture *)v66);
|
898
|
1679 else
|
948
|
1680 pRenderer->DrawTransparentGreenShade(pX_Boot, pY_Boot, (Texture *)v66);
|
898
|
1681 }
|
|
1682 }
|
|
1683 else
|
|
1684 {
|
|
1685 if ( (item_Boot->uAttributes & 0xF0) == 16 )
|
|
1686 v171 = "sptext01";
|
|
1687 if ( (item_Boot->uAttributes & 0xF0) == 32 )
|
|
1688 v171 = "sp28a";
|
|
1689 if ( (item_Boot->uAttributes & 0xF0) == 64 )
|
|
1690 v171 = "sp30a";
|
|
1691 if ( (item_Boot->uAttributes & 0xF0) == 128 )
|
|
1692 v171 = "sp91a";
|
948
|
1693 v63 = pIcons_LOD->LoadTexturePtr(v171, TEXTURE_16BIT_PALETTE);
|
898
|
1694 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1695 if ( dword_50C9A8 <= 0 )
|
|
1696 {
|
|
1697 dword_50C9A8 = 0;
|
|
1698 item_Boot->uAttributes &= 0xFu;
|
|
1699 ptr_50C9A4 = 0;
|
|
1700 }
|
|
1701 v64 = (double)GetTickCount() * 0.1;
|
948
|
1702 pRenderer->_4A63E6(pX_Boot, pY_Boot, pIcons_LOD->GetTexture(v59), v63, (signed __int64)v64, 0, 255);
|
898
|
1703 }
|
|
1704 if ( !bRingsShownInCharScreen )
|
948
|
1705 pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)v66, pBootNum);
|
898
|
1706 }
|
|
1707 }
|
|
1708 pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
1709 if ( !pMainHandNum || (v70 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum -1], pItemsTable->pItems[v70].uEquipType != 1)
|
|
1710 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) )
|
|
1711 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
|
|
1712 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
|
948
|
1713 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
|
898
|
1714 pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// äàëåå ïîÿñ
|
|
1715 if ( pBeltNum )
|
|
1716 {
|
|
1717 item_Belt = &pPlayers[uPlayerID]->pInventoryItems[pBeltNum - 1];
|
|
1718 switch ( item_Belt->uItemID )
|
|
1719 {
|
|
1720 case 524:
|
|
1721 v73 = 5;
|
|
1722 break;
|
|
1723 case 535:
|
|
1724 v73 = 6;
|
|
1725 break;
|
|
1726 default:
|
|
1727 v73 = item_Belt->uItemID - 100;
|
|
1728 break;
|
|
1729 }
|
|
1730 if ( v73 >= 0 && v73 < 7 )
|
|
1731 {
|
899
|
1732 pX_Belt = pPaperdoll_BodyX + paperdoll_Belt[pBodyComplection][v73][0];
|
|
1733 pY_Belt = pPaperdoll_BodyY + paperdoll_Belt[pBodyComplection][v73][1];
|
898
|
1734 if ( IsDwarf != 1 || v73 == 5 )
|
899
|
1735 v75 = paperdoll_belt_texture[pBodyComplection][v73];
|
898
|
1736 else
|
899
|
1737 v75 = paperdoll_belt_texture[pBodyComplection - 2][v73];
|
898
|
1738 if ( !(item_Belt->uAttributes & 0xF0) )
|
|
1739 {
|
|
1740 v79 = v75 + 1;
|
948
|
1741 v80 = (char *)pIcons_LOD->GetTexture(v75);
|
898
|
1742 if ( item_Belt->uAttributes & 2 )
|
948
|
1743 pRenderer->DrawTransparentRedShade(pX_Belt, pY_Belt, (Texture *)v80);
|
898
|
1744 else
|
|
1745 {
|
|
1746 if ( item_Belt->uAttributes & 1 )
|
948
|
1747 pRenderer->DrawTextureTransparent(pX_Belt, pY_Belt, (Texture *)v80);
|
898
|
1748 else
|
948
|
1749 pRenderer->DrawTransparentGreenShade(pX_Belt, pY_Belt, (Texture *)v80);
|
898
|
1750 }
|
|
1751 if ( !bRingsShownInCharScreen )
|
948
|
1752 pRenderer->DrawMaskToZBuffer(pX_Belt, pY_Belt, (Texture *)v80, pBeltNum);
|
898
|
1753 }
|
|
1754 else
|
|
1755 {
|
|
1756 if ( (item_Belt->uAttributes & 0xF0) == 16 )
|
|
1757 v172 = "sptext01";
|
|
1758 if ( (item_Belt->uAttributes & 0xF0) == 32 )
|
|
1759 v172 = "sp28a";
|
|
1760 if ( (item_Belt->uAttributes & 0xF0) == 64 )
|
|
1761 v172 = "sp30a";
|
|
1762 if ( (item_Belt->uAttributes & 0xF0) == 128 )
|
|
1763 v172 = "sp91a";
|
948
|
1764 v77 = pIcons_LOD->LoadTexturePtr(v172, TEXTURE_16BIT_PALETTE);
|
706
|
1765 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1766 if ( dword_50C9A8 <= 0 )
|
898
|
1767 {
|
|
1768 dword_50C9A8 = 0;
|
|
1769 item_Belt->uAttributes &= 0xFu;
|
|
1770 ptr_50C9A4 = 0;
|
706
|
1771 }
|
898
|
1772 v78 = (double)GetTickCount() * 0.1;
|
948
|
1773 pRenderer->_4A63E6(pX_Belt, pY_Belt, pIcons_LOD->GetTexture(v75), v77, (signed __int64)v78, 0, 255);
|
898
|
1774 }
|
|
1775 }
|
|
1776 }
|
|
1777 pMainHandNum2 = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
1778 if ( pMainHandNum2 )
|
|
1779 {
|
|
1780 v83 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum2 - 1];
|
|
1781 if ( pItemsTable->pItems[v83].uEquipType == 1
|
|
1782 || pItemsTable->pItems[v83].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield )
|
|
1783 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
|
|
1784 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1],
|
948
|
1785 pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
|
898
|
1786 }
|
|
1787 pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;//äàëåå âîðîòíèê ïëàùà
|
|
1788 if ( pCloakCollarNum )
|
|
1789 {
|
|
1790 item_CloakCollar = &pPlayers[uPlayerID]->pInventoryItems[pCloakCollarNum - 1];
|
|
1791 switch ( item_CloakCollar->uItemID )
|
|
1792 {
|
|
1793 case 525:
|
|
1794 v114 = 5;
|
|
1795 break;
|
|
1796 case 530:
|
|
1797 v114 = 6;
|
|
1798 break;
|
|
1799 case 547:
|
|
1800 v114 = 7;
|
|
1801 break;
|
|
1802 case 548:
|
|
1803 v114 = 8;
|
|
1804 break;
|
|
1805 case 550:
|
|
1806 v114 = 9;
|
|
1807 break;
|
|
1808 default:
|
|
1809 v114 = item_CloakCollar->uItemID - 105;
|
|
1810 }
|
|
1811 if ( v114 >= 0 && v114 < 10 )
|
|
1812 {
|
899
|
1813 v116 = paperdoll_cloak_collar_texture[pBodyComplection][v114];
|
|
1814 pX_CloakCollar = pPaperdoll_BodyX + paperdoll_CloakCollar[pBodyComplection][v114][0];
|
|
1815 pY_CloakCollar = pPaperdoll_BodyY + paperdoll_CloakCollar[pBodyComplection][v114][1];
|
898
|
1816 if ( v116 != pIcons_LOD->FindTextureByName("pending") )
|
|
1817 {
|
|
1818 if ( !(item_CloakCollar->uAttributes & 0xF0) )
|
706
|
1819 {
|
898
|
1820 v119 = v116 + 1;
|
948
|
1821 v120 = (char *)pIcons_LOD->GetTexture(v116);
|
898
|
1822 if ( item_CloakCollar->uAttributes & 2 )
|
948
|
1823 pRenderer->DrawTransparentRedShade(pX_CloakCollar, pY_CloakCollar, (Texture *)v120);
|
898
|
1824 else
|
948
|
1825 pRenderer->DrawTextureTransparent(pX_CloakCollar, pY_CloakCollar, (Texture *)v120);
|
898
|
1826 if ( !bRingsShownInCharScreen )
|
948
|
1827 pRenderer->DrawMaskToZBuffer(pX_CloakCollar, pY_CloakCollar, (Texture *)v120, pCloakCollarNum);
|
898
|
1828 }
|
706
|
1829 else
|
898
|
1830 {
|
|
1831 if ( (item_CloakCollar->uAttributes & 0xF0) == 16 )
|
|
1832 v179 = "sptext01";
|
|
1833 if ( (item_CloakCollar->uAttributes & 0xF0) == 32 )
|
|
1834 v179 = "sp28a";
|
|
1835 if ( (item_CloakCollar->uAttributes & 0xF0) == 64 )
|
|
1836 v179 = "sp30a";
|
|
1837 if ( (item_CloakCollar->uAttributes & 0xF0) == 128 )
|
|
1838 v179 = "sp91a";
|
948
|
1839 a2i = pIcons_LOD->LoadTexturePtr(v179, TEXTURE_16BIT_PALETTE);
|
898
|
1840 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1841 if ( dword_50C9A8 <= 0 )
|
|
1842 {
|
|
1843 dword_50C9A8 = 0;
|
|
1844 item_CloakCollar->uAttributes &= 0xFu;
|
|
1845 ptr_50C9A4 = 0;
|
|
1846 }
|
|
1847 v118 = (double)GetTickCount() * 0.1;
|
948
|
1848 pRenderer->_4A63E6(pX_CloakCollar, pY_CloakCollar, pIcons_LOD->GetTexture(v116), a2i, (signed __int64)v118, 0, 255);
|
898
|
1849 }
|
|
1850 }
|
|
1851 }
|
|
1852 }
|
|
1853 if ( pPlayers[uPlayerID]->uFace == 12 || pPlayers[uPlayerID]->uFace == 13 )
|
|
1854 {
|
|
1855 v122 = papredoll_dbrds[pPlayers[uPlayerID]->uFace];
|
|
1856 if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
|
|
1857 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 24],
|
|
1858 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 23],
|
948
|
1859 pIcons_LOD->GetTexture(v122));
|
898
|
1860 }
|
|
1861 pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;//äàëåå øëåì
|
|
1862 if ( pHelmNum )
|
|
1863 {
|
|
1864 item_Helm = &pPlayers[uPlayerID]->pInventoryItems[pHelmNum-1];
|
|
1865 switch ( item_Helm->uItemID )
|
|
1866 {
|
|
1867 case 521:
|
|
1868 v125 = 11;
|
|
1869 break;
|
|
1870 case 522:
|
|
1871 v125 = 12;
|
|
1872 break;
|
|
1873 case 523:
|
|
1874 v125 = 13;
|
|
1875 break;
|
|
1876 case 532:
|
|
1877 v125 = 14;
|
|
1878 break;
|
|
1879 case 544:
|
|
1880 v125 = 15;
|
|
1881 break;
|
|
1882 default:
|
|
1883 v125 = item_Helm->uItemID - 89;
|
|
1884 }
|
|
1885 if ( v125 >= 0 && v125 < 16 )
|
|
1886 {
|
899
|
1887 pX_Helm = pPaperdoll_BodyX + paperdoll_Helm[pBodyComplection][v125][0];
|
|
1888 pY_Helm = pPaperdoll_BodyY + paperdoll_Helm[pBodyComplection][v125][1];
|
898
|
1889 if ( IsDwarf != 1 || item_Helm->uItemID != 92 )
|
899
|
1890 v127 = paperdoll_helm_texture[pSex][v125];
|
898
|
1891 else
|
|
1892 v127 = papredoll_dbrds[11];
|
|
1893 if ( item_Helm->uAttributes & 0xF0 )
|
|
1894 {
|
|
1895 if ( (item_Helm->uAttributes & 0xF0) == 16 )
|
|
1896 v180 = "sptext01";
|
|
1897 if ( (item_Helm->uAttributes & 0xF0) == 32 )
|
|
1898 v180 = "sp28a";
|
|
1899 if ( (item_Helm->uAttributes & 0xF0) == 64 )
|
|
1900 v180 = "sp30a";
|
|
1901 if ( (item_Helm->uAttributes & 0xF0) == 128 )
|
|
1902 v180 = "sp91a";
|
948
|
1903 v129 = pIcons_LOD->LoadTexturePtr(v180, TEXTURE_16BIT_PALETTE);
|
898
|
1904 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1905 if ( dword_50C9A8 <= 0 )
|
|
1906 {
|
|
1907 dword_50C9A8 = 0;
|
|
1908 item_Helm->uAttributes &= 0xFu;
|
|
1909 ptr_50C9A4 = 0;
|
|
1910 }
|
|
1911 v130 = (double)GetTickCount() * 0.1;
|
948
|
1912 pRenderer->_4A63E6(pX_Helm, pY_Helm, pIcons_LOD->GetTexture(v127), v129, (signed __int64)v130, 0, 255);
|
898
|
1913 }
|
|
1914 else
|
|
1915 {
|
|
1916 v131 = v127 + 1;
|
948
|
1917 v132 = (char *)pIcons_LOD->GetTexture(v127);
|
898
|
1918 if ( item_Helm->uAttributes & 2 )
|
948
|
1919 pRenderer->DrawTransparentRedShade(pX_Helm, pY_Helm, (Texture *)v132);
|
898
|
1920 else
|
|
1921 {
|
|
1922 if ( item_Helm->uAttributes & 1 )
|
948
|
1923 pRenderer->DrawTextureTransparent(pX_Helm, pY_Helm, (Texture *)v132);
|
706
|
1924 else
|
948
|
1925 pRenderer->DrawTransparentGreenShade(pX_Helm, pY_Helm, (Texture *)v132);
|
898
|
1926 }
|
|
1927 }
|
706
|
1928 if ( !bRingsShownInCharScreen )
|
948
|
1929 pRenderer->DrawMaskToZBuffer(pX_Helm, pY_Helm, (Texture *)v132, pHelmNum);
|
898
|
1930 }
|
|
1931 }
|
|
1932 pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand
|
|
1933 if ( pMainHandNum3 )
|
|
1934 {
|
|
1935 item_MainHand3 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum3 - 1];
|
|
1936 pX_MainHand3 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipX;
|
|
1937 pY_MainHand3 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipY;
|
|
1938 if ( item_MainHand3->uItemID == 64 )
|
|
1939 v181 = "item64v1";
|
|
1940 else
|
|
1941 v181 = pItemsTable->pItems[item_MainHand3->uItemID].pIconName;
|
|
1942 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE);
|
|
1943 if ( !(item_MainHand3->uAttributes & 0xF0) )
|
|
1944 {
|
|
1945 v142 = v138 + 1;
|
948
|
1946 v143 = (char *)pIcons_LOD->GetTexture(v138);
|
898
|
1947 if ( item_MainHand3->uAttributes & 2 )
|
948
|
1948 pRenderer->DrawTransparentRedShade(pX_MainHand3, pY_MainHand3, (Texture *)v143);
|
898
|
1949 else
|
|
1950 {
|
|
1951 if ( item_MainHand3->uAttributes & 1 )
|
948
|
1952 pRenderer->DrawTextureTransparent(pX_MainHand3, pY_MainHand3, (Texture *)v143);
|
898
|
1953 else
|
948
|
1954 pRenderer->DrawTransparentGreenShade(pX_MainHand3, pY_MainHand3, (Texture *)v143);
|
898
|
1955 }
|
|
1956 }
|
|
1957 else
|
|
1958 {
|
|
1959 if ( (item_MainHand3->uAttributes & 0xF0) == 16 )
|
|
1960 v182 = "sptext01";
|
|
1961 if ( (item_MainHand3->uAttributes & 0xF0) == 32 )
|
|
1962 v182 = "sp28a";
|
|
1963 if ( (item_MainHand3->uAttributes & 0xF0) == 64 )
|
|
1964 v182 = "sp30a";
|
|
1965 if ( (item_MainHand3->uAttributes & 0xF0) == 128 )
|
|
1966 v182 = "sp91a";
|
948
|
1967 v140 = pIcons_LOD->LoadTexturePtr(v182, TEXTURE_16BIT_PALETTE);
|
898
|
1968 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
1969 if ( dword_50C9A8 <= 0 )
|
|
1970 {
|
|
1971 dword_50C9A8 = 0;
|
|
1972 item_MainHand3->uAttributes &= 0xFu;
|
|
1973 ptr_50C9A4 = 0;
|
706
|
1974 }
|
898
|
1975 v141 = (double)GetTickCount() * 0.1;
|
948
|
1976 pRenderer->_4A63E6(pX_MainHand3, pY_MainHand3, pIcons_LOD->GetTexture(v138), v140, (signed __int64)v141, 0, 255);
|
898
|
1977 }
|
|
1978 if ( !bRingsShownInCharScreen )
|
948
|
1979 pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)v143, pMainHandNum3);
|
898
|
1980 }
|
|
1981 pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// äàëåå ùèò
|
|
1982 if ( pShieldNum )
|
|
1983 {
|
|
1984 item_Shield = &pPlayers[uPlayerID]->pInventoryItems[pShieldNum - 1];
|
|
1985 v149 = pItemsTable->pItems[item_Shield->uItemID].uSkillType;
|
|
1986 if ( v149 == 2 || v149 == 1 )
|
|
1987 {
|
|
1988 v151 = item_Shield->uItemID - 400;
|
|
1989 pX_Shield = 596;
|
|
1990 v245 = 1;
|
|
1991 switch ( item_Shield->uItemID )
|
|
1992 {
|
|
1993 case 400:
|
|
1994 pY_Shield = 86;
|
|
1995 break;
|
|
1996 case 403:
|
|
1997 pY_Shield = 28;
|
|
1998 break;
|
|
1999 case 415:
|
|
2000 pX_Shield = 595;
|
|
2001 pY_Shield = 33;
|
|
2002 break;
|
|
2003 default:
|
|
2004 pX_Shield = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item_Shield->uItemID].uEquipX;
|
|
2005 pY_Shield = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item_Shield->uItemID].uEquipY;
|
|
2006 break;
|
|
2007 }
|
|
2008 }
|
|
2009 else
|
|
2010 {
|
|
2011 v245 = 0;
|
|
2012 pX_Shield = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item_Shield->uItemID].uEquipX;
|
|
2013 pY_Shield = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item_Shield->uItemID].uEquipY;
|
|
2014 }
|
|
2015 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[item_Shield->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
2016 if ( !(item_Shield->uAttributes & 0xF0) )
|
|
2017 {
|
|
2018 if ( item_Shield->uAttributes & 2 )
|
948
|
2019 pRenderer->DrawTransparentRedShade(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153));
|
898
|
2020 else
|
|
2021 {
|
948
|
2022 v160 = (char *)pIcons_LOD->GetTexture(v153);
|
898
|
2023 if ( !(item_Shield->uAttributes & 1) )
|
948
|
2024 pRenderer->DrawTransparentGreenShade(pX_Shield, pY_Shield, (Texture *)v160);
|
898
|
2025 else
|
948
|
2026 pRenderer->DrawTextureTransparent(pX_Shield, pY_Shield, (Texture *)v160);
|
898
|
2027 }
|
|
2028 }
|
|
2029 else
|
|
2030 {
|
|
2031 if ( (item_Shield->uAttributes & 0xF0) == 16 )
|
|
2032 v183 = "sptext01";
|
|
2033 if ( (item_Shield->uAttributes & 0xF0) == 32 )
|
|
2034 v183 = "sp28a";
|
|
2035 if ( (item_Shield->uAttributes & 0xF0) == 64 )
|
|
2036 v183 = "sp30a";
|
|
2037 if ( (item_Shield->uAttributes & 0xF0) == 128 )
|
|
2038 v183 = "sp91a";
|
948
|
2039 v157 = pIcons_LOD->LoadTexturePtr(v183, TEXTURE_16BIT_PALETTE);
|
898
|
2040 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
2041 if ( dword_50C9A8 <= 0 )
|
|
2042 {
|
|
2043 dword_50C9A8 = 0;
|
|
2044 item_Shield->uAttributes &= 0xFu;
|
|
2045 ptr_50C9A4 = 0;
|
|
2046 }
|
|
2047 v158 = (double)GetTickCount() * 0.1;
|
948
|
2048 pRenderer->_4A63E6(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), v157, (signed __int64)v158, 0, 255);
|
898
|
2049 if ( v245 )
|
|
2050 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0],
|
948
|
2051 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1]));
|
898
|
2052 }
|
|
2053 if ( !bRingsShownInCharScreen )
|
948
|
2054 pRenderer->DrawMaskToZBuffer(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), pShieldNum);
|
898
|
2055 }
|
|
2056 }
|
948
|
2057 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
|
898
|
2058 pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
2059 if ( pMainHandNum5 )
|
|
2060 {
|
|
2061 item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum5 - 1];
|
|
2062 if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield )
|
948
|
2063 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1]));
|
898
|
2064 }
|
|
2065 if ( !bRingsShownInCharScreen )//ðèñîâàíèå ëóïû
|
948
|
2066 pRenderer->DrawTextureTransparent(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B));
|
|
2067 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//îáðàìëåíèå
|
898
|
2068 }
|
706
|
2069
|
910
|
2070 //----- (0043E825) --------------------------------------------------------
|
|
2071 void __fastcall CharacterUI_DrawPaperdollWithRingOverlay(unsigned int uPlayerID)
|
|
2072 {
|
913
|
2073 int v3; // ecx@1
|
|
2074 unsigned int pItemTextureNum; // ebx@3
|
948
|
2075 //int v9; // edi@17
|
913
|
2076 char v13; // sf@24
|
|
2077 unsigned __int8 v14; // of@24
|
|
2078 unsigned int pItemNum; // eax@25
|
948
|
2079 //int v20; // edi@40
|
|
2080 //int v21; // eax@41
|
|
2081 //int v33; // esi@61
|
913
|
2082 const char *spell_texture_name; // [sp-8h] [bp-38h]@8
|
|
2083 Texture *spell_texture; // [sp+10h] [bp-20h]@14
|
|
2084 int v41; // [sp+10h] [bp-20h]@26
|
|
2085 unsigned int pY_Ring; // [sp+14h] [bp-1Ch]@3
|
|
2086 unsigned int pX_Ring; // [sp+18h] [bp-18h]@3
|
|
2087 int v48; // [sp+24h] [bp-Ch]@1
|
|
2088 ItemGen *item;
|
706
|
2089
|
910
|
2090 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
|
|
2091 CharacterUI_DrawPaperdoll(uPlayerID);
|
948
|
2092 pRenderer->DrawTextureTransparent(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND));
|
|
2093 pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));
|
|
2094 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, pIcons_LOD->GetTexture(uTextureID_detaliz_close_button));
|
910
|
2095 v3 = 0;
|
|
2096 v48 = 0;
|
|
2097 do
|
|
2098 {
|
913
|
2099 pItemNum = pPlayers[uPlayerID]->pEquipment.uRings[v3];
|
910
|
2100 if ( pPlayers[uPlayerID]->pEquipment.uRings[v3] )
|
|
2101 {
|
913
|
2102 item = &pPlayers[uPlayerID]->pInventoryItems[pItemNum - 1];
|
910
|
2103 pX_Ring = pPaperdollRingsX[v3];
|
|
2104 pY_Ring = pPaperdollRingsY[v3];
|
913
|
2105 pItemTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
2106 if ( item->uAttributes & 0xF0 )
|
910
|
2107 {
|
913
|
2108 if ( (item->uAttributes & 0xF0) == 16 )
|
|
2109 spell_texture_name = "sptext01";
|
|
2110 if ( (item->uAttributes & 0xF0) == 32 )
|
|
2111 spell_texture_name = "sp28a";
|
|
2112 if ( (item->uAttributes & 0xF0) == 64 )
|
|
2113 spell_texture_name = "sp30a";
|
|
2114 if ( (item->uAttributes & 0xF0) == 128 )
|
|
2115 spell_texture_name = "sp91a";
|
948
|
2116 spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE);
|
910
|
2117 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
2118 if ( dword_50C9A8 <= 0 )
|
|
2119 {
|
|
2120 dword_50C9A8 = 0;
|
913
|
2121 item->uAttributes &= 0xFu;
|
910
|
2122 ptr_50C9A4 = 0;
|
|
2123 }
|
948
|
2124 pRenderer->_4A63E6(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum), spell_texture, GetTickCount() * 0.1, 0, 255);
|
910
|
2125 }
|
|
2126 else
|
|
2127 {
|
948
|
2128 if (item->Broken())
|
|
2129 pRenderer->DrawTransparentRedShade(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum));
|
|
2130 else if (!item->Identified())
|
|
2131 pRenderer->DrawTransparentGreenShade(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum));
|
910
|
2132 else
|
948
|
2133 pRenderer->DrawTextureTransparent(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum));
|
|
2134
|
|
2135 pRenderer->_4A601E(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum), pItemNum);
|
910
|
2136 }
|
|
2137 }
|
|
2138 v3++;
|
913
|
2139 pItemNum = pPlayers[uPlayerID]->pEquipment.uRings[v3];
|
910
|
2140 v14 = (v48 + 1) > 5;
|
|
2141 v13 = v48 - 4 < 0;
|
|
2142 v48++;
|
|
2143 }
|
|
2144 while ( (unsigned __int8)(v13 ^ v14) | (v48 == 4) );
|
913
|
2145 pItemNum = pPlayers[uPlayerID]->pEquipment.uAmulet;
|
|
2146 if ( pItemNum )
|
910
|
2147 {
|
|
2148 v41 = pPlayers[uPlayerID]->pEquipment.uAmulet;
|
913
|
2149 item = &pPlayers[uPlayerID]->pInventoryItems[pItemNum - 1];
|
|
2150 pItemTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
2151 if ( item->uAttributes & 0xF0 )
|
910
|
2152 {
|
913
|
2153 if ( (item->uAttributes & 0xF0) == 16 )
|
|
2154 spell_texture_name = "sptext01";
|
|
2155 if ( (item->uAttributes & 0xF0) == 32 )
|
|
2156 spell_texture_name = "sp28a";
|
|
2157 if ( (item->uAttributes & 0xF0) == 64 )
|
|
2158 spell_texture_name = "sp30a";
|
|
2159 if ( (item->uAttributes & 0xF0) == 128 )
|
|
2160 spell_texture_name = "sp91a";
|
948
|
2161 spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE);
|
910
|
2162 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
2163 if ( dword_50C9A8 <= 0 )
|
|
2164 {
|
|
2165 dword_50C9A8 = 0;
|
913
|
2166 item->uAttributes &= 0xFu;
|
910
|
2167 ptr_50C9A4 = 0;
|
|
2168 }
|
948
|
2169 pRenderer->_4A63E6(493, 91, pIcons_LOD->GetTexture(pItemTextureNum), spell_texture, GetTickCount() * 0.1, 0, 255);
|
910
|
2170 }
|
|
2171 else
|
|
2172 {
|
948
|
2173 if (item->Broken())
|
|
2174 pRenderer->DrawTransparentRedShade(493, 91, pIcons_LOD->GetTexture(pItemTextureNum));
|
|
2175 else if (!item->Identified())
|
|
2176 pRenderer->DrawTransparentGreenShade(493, 91, pIcons_LOD->GetTexture(pItemTextureNum));
|
910
|
2177 else
|
948
|
2178 pRenderer->DrawTextureTransparent(493, 91, pIcons_LOD->GetTexture(pItemTextureNum));
|
|
2179
|
|
2180 pRenderer->_4A601E(493, 91, pIcons_LOD->GetTexture(pItemTextureNum), v41);
|
910
|
2181 }
|
|
2182 }
|
913
|
2183 pItemNum = pPlayers[uPlayerID]->pEquipment.uGlove;
|
|
2184 if ( !pItemNum )
|
|
2185 return;
|
|
2186 item = &pPlayers[uPlayerID]->pInventoryItems[pItemNum - 1];
|
|
2187 pItemTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
2188 if ( !(item->uAttributes & 0xF0) )
|
|
2189 {
|
948
|
2190 if (item->Broken())
|
|
2191 pRenderer->DrawTransparentRedShade(586, 88, pIcons_LOD->GetTexture(pItemTextureNum));
|
|
2192 else if (!item->Identified())
|
|
2193 pRenderer->DrawTransparentGreenShade(586, 88, pIcons_LOD->GetTexture(pItemTextureNum));
|
913
|
2194 else
|
948
|
2195 pRenderer->DrawTextureTransparent(586, 88, pIcons_LOD->GetTexture(pItemTextureNum));
|
|
2196
|
|
2197 pRenderer->_4A601E(586, 88,pIcons_LOD->GetTexture(pItemTextureNum), pItemNum);
|
913
|
2198 }
|
|
2199 else
|
|
2200 {
|
|
2201 if ( (item->uAttributes & 0xF0) == 16 )
|
|
2202 spell_texture_name = "sptext01";
|
|
2203 if ( (item->uAttributes & 0xF0) == 32 )
|
|
2204 spell_texture_name = "sp28a";
|
|
2205 if ( (item->uAttributes & 0xF0) == 64 )
|
|
2206 spell_texture_name = "sp30a";
|
|
2207 if ( (item->uAttributes & 0xF0) == 128 )
|
|
2208 spell_texture_name = "sp91a";
|
948
|
2209 spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE);
|
913
|
2210 dword_50C9A8 -= pEventTimer->uTimeElapsed;
|
|
2211 if ( dword_50C9A8 <= 0 )
|
|
2212 {
|
|
2213 dword_50C9A8 = 0;
|
|
2214 item->uAttributes &= 0xFu;
|
|
2215 ptr_50C9A4 = 0;
|
|
2216 }
|
|
2217 pRenderer->_4A63E6(586, 88, pIcons_LOD->GetTexture(pItemTextureNum), spell_texture, GetTickCount() * 0.1, 0, 255);
|
|
2218 }
|
|
2219 }
|
706
|
2220
|
|
2221 //----- (0043BCA7) --------------------------------------------------------
|
|
2222 void CharacterUI_LoadPaperdollTextures()
|
|
2223 {
|
|
2224 int v0; // edi@7
|
|
2225 enum CHARACTER_RACE pRace; // ebx@7
|
|
2226 signed int pSex; // eax@7
|
|
2227 int v3; // ebx@10
|
|
2228 Player *pPlayer; // edi@12
|
|
2229 unsigned __int8 v5; // cl@12
|
|
2230 int v6; // edi@16
|
|
2231 unsigned int v7; // eax@16
|
|
2232 Player *pPlayer2; // ebx@16
|
|
2233 char *v9; // ebx@16
|
|
2234 char v10; // al@16
|
|
2235 signed int v11; // edi@21
|
|
2236 unsigned int v22; // eax@76
|
|
2237 int v23; // ecx@76
|
|
2238 unsigned int v24; // eax@78
|
|
2239 int v25; // ecx@78
|
|
2240 int v26; // ebx@79
|
|
2241 unsigned int v27; // eax@80
|
|
2242 int v28; // ecx@80
|
|
2243 int v30; // [sp+10h] [bp-28h]@5
|
|
2244 signed int v32; // [sp+10h] [bp-28h]@75
|
|
2245 signed int v33; // [sp+10h] [bp-28h]@77
|
|
2246 int v34; // [sp+10h] [bp-28h]@79
|
899
|
2247 int pItemTXTNum; // [sp+14h] [bp-24h]@75
|
706
|
2248 int v37; // [sp+14h] [bp-24h]@77
|
|
2249 signed int v38; // [sp+14h] [bp-24h]@79
|
|
2250 int v42; // [sp+20h] [bp-18h]@6
|
|
2251 int v43; // [sp+20h] [bp-18h]@73
|
|
2252 char pContainer[128]; // [sp+24h] [bp-14h]@12
|
|
2253
|
|
2254 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE);
|
|
2255 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 )
|
|
2256 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE);
|
910
|
2257 uTextureID_right_panel_loop = uTextureID_right_panel;
|
706
|
2258 v30 = 0;
|
|
2259 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE);
|
910
|
2260 uTextureID_detaliz_close_button = uExitCancelTextureId;
|
706
|
2261 do
|
|
2262 {
|
|
2263 v42 = v30 + 1;
|
|
2264 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(v30 + 1) )
|
|
2265 {
|
|
2266 v0 = v30;
|
|
2267 pRace = pPlayers[v30 + 1]->GetRace();
|
|
2268 pSex = pPlayers[v30 + 1]->GetSexByVoice();
|
|
2269 if ( pRace && pRace != 1 && pRace != 2 )//race == 3
|
|
2270 v3 = (pSex != 0) + 3;
|
|
2271 else
|
|
2272 v3 = (pSex != 0) + 1;
|
|
2273 wsprintfA(pContainer, "pc23v%dBod", v3);
|
|
2274 papredoll_dbods[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Body texture
|
|
2275 wsprintfA(pContainer, "pc23v%dlad", v3);
|
|
2276 papredoll_dlads[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand
|
|
2277 wsprintfA(pContainer, "pc23v%dlau", v3);
|
|
2278 papredoll_dlaus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand2
|
|
2279 wsprintfA(pContainer, "pc23v%drh", v3);
|
|
2280 papredoll_drhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Right Hand
|
|
2281 wsprintfA(pContainer, "pc23v%dlh", v3);
|
|
2282 papredoll_dlhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Fist
|
|
2283 wsprintfA(pContainer, "pc23v%dlhu", v3);
|
|
2284 papredoll_dlhus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); // Left Fist 2
|
|
2285 pPlayer = pPlayers[v0 + 1];
|
|
2286 v5 = pPlayer->uFace;
|
|
2287 if ( v5 == 12 || v5 == 13 )
|
|
2288 papredoll_dbrds[(char)v5] = 0;
|
|
2289 papredoll_flying_feet[pPlayer->uFace] = 0;
|
|
2290 IsPlayerWearingWatersuit[v30 + 1] = 1;
|
|
2291 }
|
|
2292 else
|
|
2293 {
|
|
2294 v6 = v30;
|
|
2295 papredoll_dbods[v30] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE);
|
|
2296 papredoll_dlads[v30] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE);
|
|
2297 papredoll_dlaus[v30] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE);
|
|
2298 papredoll_drhs[v30] = pIcons_LOD->LoadTexture(drh_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE);
|
|
2299 papredoll_dlhs[v30] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE);
|
|
2300 v7 = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[v30 + 1]->uFace], TEXTURE_16BIT_PALETTE);
|
|
2301 pPlayer2 = pPlayers[v30 + 1];
|
|
2302 papredoll_dlhus[v30] = v7;
|
|
2303 v9 = (char *)&pPlayer2->uFace;
|
|
2304 v10 = *v9;
|
|
2305 if ( *v9 == 12 || v10 == 13 )
|
|
2306 {
|
|
2307 wsprintfA(pContainer, "pc%02dbrd", v10 + 1);
|
|
2308 v9 = (char *)&pPlayers[v6 + 1]->uFace;
|
|
2309 papredoll_dbrds[*v9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2310 }
|
|
2311 wsprintfA(pContainer, "item281pc%02d", *v9 + 1);
|
|
2312 papredoll_flying_feet[pPlayers[v6 + 1]->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2313 IsPlayerWearingWatersuit[v30 + 1] = 0;
|
|
2314 }
|
|
2315 ++v30;
|
|
2316 }
|
|
2317 while ( v42 < 4 );
|
|
2318 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE);
|
|
2319 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE);
|
|
2320 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE);
|
|
2321 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE);
|
|
2322 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE);
|
|
2323 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE);
|
|
2324 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE);
|
|
2325 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE);
|
|
2326 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE);
|
899
|
2327 for ( v11 = 0; v11 < 54; ++v11 )// test equipment
|
706
|
2328 {
|
899
|
2329 party_has_equipment[v11] = 0;
|
706
|
2330 if ( pParty->pPickedItem.uItemID != v11 + 66 )
|
|
2331 {
|
899
|
2332 for ( uint i = 0; i < 4; ++i)
|
706
|
2333 {
|
899
|
2334 if ( Player_has_item(v11 + 66, &pParty->pPlayers[i], 0) )
|
|
2335 party_has_equipment[v11] = 1;
|
706
|
2336 }
|
|
2337 }
|
|
2338 }
|
|
2339 memset(byte_5111F6, 0, 16);
|
|
2340 for (uint i = 0; i < 4; ++i)
|
|
2341 {
|
|
2342 auto player = pParty->pPlayers + i;
|
|
2343
|
899
|
2344 if (Player_has_item(ITEM_ARTICACT_GOVERNONS_ARMOR, player, 1)) byte_5111F6[0] = 1;
|
|
2345 if (Player_has_item(ITEM_ARTIFACT_YORUBA, player, 1)) byte_5111F6[1] = 1;
|
|
2346 if (Player_has_item(ITEM_RELIC_HARECS_LEATHER, player, 1)) byte_5111F6[2] = 1;
|
|
2347 if (Player_has_item(ITEM_ARTIFACT_LEAGUE_BOOTS, player, 1)) byte_5111F6[3] = 1;
|
|
2348 if (Player_has_item(ITEM_RELIC_TALEDONS_HELM, player, 1)) byte_5111F6[4] = 1;
|
|
2349 if (Player_has_item(ITEM_RELIC_SCHOLARS_CAP, player, 1)) byte_5111F6[5] = 1;
|
|
2350 if (Player_has_item(ITEM_RELIC_PHYNAXIAN_CROWN, player, 1)) byte_5111F6[6] = 1;
|
|
2351 if (Player_has_item(ITEM_ARTIFACT_MINDS_EYE, player, 1)) byte_5111F6[7] = 1;
|
|
2352 if (Player_has_item(ITEM_RARE_SHADOWS_MASK, player, 1)) byte_5111F6[8] = 1;
|
|
2353 if (Player_has_item(ITEM_RILIC_TITANS_BELT, player, 1)) byte_5111F6[9] = 1;
|
|
2354 if (Player_has_item(ITEM_ARTIFACT_HEROS_BELT, player, 1)) byte_5111F6[10] = 1;
|
|
2355 if (Player_has_item(ITEM_RELIC_TWILIGHT, player, 1)) byte_5111F6[11] = 1;
|
|
2356 if (Player_has_item(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, player, 1)) byte_5111F6[12] = 1;
|
|
2357 if (Player_has_item(ITEM_RARE_SUN_CLOAK, player, 1)) byte_5111F6[13] = 1;
|
|
2358 if (Player_has_item(ITEM_RARE_MOON_CLOAK, player, 1)) byte_5111F6[14] = 1;
|
|
2359 if (Player_has_item(ITEM_RARE_VAMPIRES_CAPE, player, 1)) byte_5111F6[15] = 1;
|
|
2360 if (Player_has_item(ITEM_ELVEN_CHAINMAIL, player, 1)) byte_5111F6[16] = 1;
|
706
|
2361 }
|
938
|
2362
|
|
2363
|
706
|
2364 for (uint i = 0; i < 2; ++i)
|
|
2365 {
|
899
|
2366 for ( uint j = 0; j < 5; ++j )//Belt
|
706
|
2367 {
|
899
|
2368 GetItemTextureFilename(pContainer, j + 100, i + 1, 0);
|
|
2369 paperdoll_belt_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
2370 }
|
899
|
2371 GetItemTextureFilename(pContainer, 535, i + 1, 0);
|
|
2372 paperdoll_belt_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2373 for ( uint j = 0; j < 11; ++j )//Helm
|
706
|
2374 {
|
899
|
2375 GetItemTextureFilename(pContainer, j + 89, i + 1, 0);
|
|
2376 paperdoll_helm_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
2377 }
|
899
|
2378 GetItemTextureFilename(pContainer, 521, i + 1, 0);
|
|
2379 paperdoll_helm_texture[i][11] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2380 GetItemTextureFilename(pContainer, 522, i + 1, 0);
|
|
2381 paperdoll_helm_texture[i][12] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2382 GetItemTextureFilename(pContainer, 523, i + 1, 0);
|
|
2383 paperdoll_helm_texture[i][13] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2384 GetItemTextureFilename(pContainer, 532, i + 1, 0);
|
|
2385 paperdoll_helm_texture[i][14] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2386 GetItemTextureFilename(pContainer, 544, i + 1, 0);
|
|
2387 paperdoll_helm_texture[i][15] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
2388 if ( _43ED6F_check_party_races(true) )
|
|
2389 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE);
|
|
2390 }
|
|
2391 v43 = 0;
|
|
2392 for (uint i = 0; i < 4; ++i)
|
|
2393 {
|
|
2394 if ( sub_43EDB9_get_some_race_sex_relation_2(i) )
|
|
2395 {
|
899
|
2396 GetItemTextureFilename(pContainer, 524, i + 1, 0);
|
938
|
2397 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt
|
899
|
2398 pItemTXTNum = 66;
|
|
2399 for ( v32 = 0; v32 < 13; ++v32 )//simple armor
|
706
|
2400 {
|
899
|
2401 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 0);
|
|
2402 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2403 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 1);
|
|
2404 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2405 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 2);
|
|
2406 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2407 pItemTXTNum++;
|
706
|
2408 }
|
899
|
2409 GetItemTextureFilename(pContainer, 516, i + 1, 0);//artefacts
|
|
2410 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2411 GetItemTextureFilename(pContainer, 516, i + 1, 1);
|
|
2412 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2413 GetItemTextureFilename(pContainer, 516, i + 1, 2);
|
|
2414 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2415 GetItemTextureFilename(pContainer, 505, i + 1, 0);
|
|
2416 paperdoll_armor_texture[i][v32 + 1][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2417 GetItemTextureFilename(pContainer, 505, i + 1, 1);
|
|
2418 paperdoll_armor_texture[i][v32 + 1][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2419 GetItemTextureFilename(pContainer, 505, i + 1, 2);
|
|
2420 paperdoll_armor_texture[i][v32 + 1][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2421 GetItemTextureFilename(pContainer, 504, i + 1, 0);
|
|
2422 paperdoll_armor_texture[i][v32 + 2][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2423 GetItemTextureFilename(pContainer, 504, i + 1, 1);
|
|
2424 paperdoll_armor_texture[i][v32 + 2][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2425 GetItemTextureFilename(pContainer, 504, i + 1, 2);
|
|
2426 paperdoll_armor_texture[i][v32 + 2][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2427 GetItemTextureFilename(pContainer, 533, i + 1, 0);
|
|
2428 paperdoll_armor_texture[i][v32 + 3][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2429 GetItemTextureFilename(pContainer, 533, i + 1, 1);
|
|
2430 paperdoll_armor_texture[i][v32 + 3][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2431 GetItemTextureFilename(pContainer, 533, i + 1, 2);
|
|
2432 paperdoll_armor_texture[i][v32 + 3][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2433 for ( v33 = 0; v33 < 5; ++v33 )//boots
|
706
|
2434 {
|
899
|
2435 GetItemTextureFilename(pContainer, v33 + 115, i + 1, 0);
|
|
2436 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2437 }
|
|
2438 GetItemTextureFilename(pContainer, 512, i + 1, 0);
|
|
2439 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2440 for ( v38 = 0; v38 < 5; ++v38 )//Cloak
|
|
2441 {
|
|
2442 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 0);
|
|
2443 paperdoll_cloak_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2444 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 1);
|
|
2445 paperdoll_cloak_collar_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
2446 }
|
899
|
2447 GetItemTextureFilename(pContainer, 525, i + 1, 0);
|
|
2448 paperdoll_cloak_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2449 GetItemTextureFilename(pContainer, 530, i + 1, 0);
|
|
2450 paperdoll_cloak_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2451 GetItemTextureFilename(pContainer, 547, i + 1, 0);
|
|
2452 paperdoll_cloak_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2453 GetItemTextureFilename(pContainer, 548, i + 1, 0);
|
|
2454 paperdoll_cloak_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2455 GetItemTextureFilename(pContainer, 550, i + 1, 0);
|
|
2456 paperdoll_cloak_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2457 GetItemTextureFilename(pContainer, 525, i + 1, 1);
|
|
2458 paperdoll_cloak_collar_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2459 GetItemTextureFilename(pContainer, 530, i + 1, 1);
|
|
2460 paperdoll_cloak_collar_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2461 GetItemTextureFilename(pContainer, 547, i + 1, 1);
|
|
2462 paperdoll_cloak_collar_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2463 GetItemTextureFilename(pContainer, 548, i + 1, 1);
|
|
2464 paperdoll_cloak_collar_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2465 GetItemTextureFilename(pContainer, 550, i + 1, 1);
|
|
2466 paperdoll_cloak_collar_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
2467 }
|
|
2468 else
|
|
2469 {
|
|
2470 v26 = v43;
|
|
2471 }
|
|
2472 v43 = v26 + 40;
|
|
2473 }
|
|
2474 }
|
|
2475
|
|
2476 //----- (00419401) --------------------------------------------------------
|
|
2477 void __cdecl CharacterUI_SkillScreen_Draw()
|
|
2478 {
|
|
2479 unsigned int v0; // ecx@3
|
|
2480 GUIButton *pButton; // eax@3
|
|
2481 GUIFont *v2; // eax@8
|
|
2482 unsigned int v3; // esi@8
|
|
2483 int v4; // eax@10
|
|
2484 unsigned int v5; // esi@14
|
|
2485 int v6; // eax@17
|
|
2486 unsigned int v7; // esi@19
|
|
2487 int v8; // eax@21
|
|
2488 unsigned int v9; // esi@25
|
|
2489 int v10; // eax@27
|
|
2490 int a2; // [sp+10h] [bp-14h]@1
|
|
2491 int v12; // [sp+14h] [bp-10h]@8
|
|
2492 int v13; // [sp+14h] [bp-10h]@19
|
|
2493 int *v14; // [sp+18h] [bp-Ch]@8
|
|
2494 int *v15; // [sp+18h] [bp-Ch]@14
|
|
2495 int *v16; // [sp+18h] [bp-Ch]@19
|
|
2496 int *v17; // [sp+18h] [bp-Ch]@25
|
|
2497 Player *v18; // [sp+1Ch] [bp-8h]@8
|
|
2498 int a5; // [sp+20h] [bp-4h]@8
|
|
2499
|
|
2500 a2 = 0;
|
|
2501 if ( dword_507CC0 )
|
|
2502 sub_4196A0();
|
|
2503 v0 = uActiveCharacter;
|
|
2504 dword_507CC0 = uActiveCharacter;
|
|
2505 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext )
|
832
|
2506 {
|
|
2507 if ( pButton->msg == UIMSG_InventoryLeftClick )
|
706
|
2508 {
|
|
2509 dword_50698C = pButton->uX;
|
|
2510 dword_506988 = pButton->uY;
|
|
2511 dword_506984 = pButton->uZ;
|
|
2512 dword_506980 = pButton->uW;
|
|
2513 pButton->uW = 0;
|
|
2514 pButton->uZ = 0;
|
|
2515 pButton->uY = 0;
|
|
2516 pButton->uX = 0;
|
|
2517 v0 = uActiveCharacter;
|
|
2518 }
|
|
2519 }
|
|
2520 v12 = 0;
|
|
2521 a5 = pGUIWindow_CurrentMenu->uNumControls;
|
|
2522 v18 = &pParty->pPlayers[v0-1];
|
|
2523 v2 = pFontLucida;
|
|
2524 v14 = pWeaponSkills;
|
|
2525 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
|
|
2526 do
|
|
2527 {
|
|
2528 if ( v18->pActiveSkills[*v14] & 0x3F )//crash
|
|
2529 {
|
|
2530 v4 = LOBYTE(v2->uFontHeight);
|
|
2531 v3 = v3 + v4 - 3;
|
|
2532 ++a2;
|
|
2533 ++v12;
|
832
|
2534 pGUIWindow_CurrentMenu->CreateButton(0x18u, v3, 0xCCu, v4 - 3, 3, *v14 | 0x8000, UIMSG_SkillUp, *v14, 0, "", 0, 0);
|
706
|
2535 v2 = pFontLucida;
|
|
2536 }
|
|
2537 ++v14;
|
|
2538 }
|
|
2539 while ( v14 <= &pWeaponSkills[8] );
|
|
2540 if ( !v12 )
|
|
2541 v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
|
|
2542 v15 = pMagicSkills;
|
|
2543 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
|
|
2544 do
|
|
2545 {
|
|
2546 if ( v18->pActiveSkills[*v15] & 0x3F && a2 < 15 )
|
|
2547 {
|
|
2548 v6 = LOBYTE(v2->uFontHeight);
|
|
2549 v5 = v5 + v6 - 3;
|
|
2550 ++a2;
|
832
|
2551 pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, UIMSG_SkillUp, *v15, 0, "", 0, 0);
|
706
|
2552 v2 = pFontLucida;
|
|
2553 }
|
|
2554 ++v15;
|
|
2555 }
|
|
2556 while ( v15 <= &pMagicSkills[8] );
|
|
2557 v13 = 0;
|
|
2558 v16 = pArmorSkills;
|
|
2559 v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
|
|
2560 do
|
|
2561 {
|
|
2562 if ( v18->pActiveSkills[*v16] & 0x3F )
|
|
2563 {
|
|
2564 v8 = LOBYTE(v2->uFontHeight);
|
|
2565 v7 = v7 + v8 - 3;
|
|
2566 ++a2;
|
|
2567 ++v13;
|
832
|
2568 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v7, 0xCCu, v8 - 3, 3, *v16 | 0x8000, UIMSG_SkillUp, *v16, 0, "", 0, 0);
|
706
|
2569 v2 = pFontLucida;
|
|
2570 }
|
|
2571 ++v16;
|
|
2572 }
|
|
2573 while ( v16 <= &pArmorSkills[4] );
|
|
2574 if ( !v13 )
|
|
2575 v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
|
|
2576 v17 = pMiscSkills;
|
|
2577 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
|
|
2578 do
|
|
2579 {
|
|
2580 if ( v18->pActiveSkills[*v17] & 0x3F )
|
|
2581 {
|
|
2582 v10 = LOBYTE(v2->uFontHeight);
|
|
2583 v9 = v9 + v10 - 3;
|
|
2584 ++a2;
|
832
|
2585 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, UIMSG_SkillUp, *v17, 0, "", 0, 0);
|
706
|
2586 v2 = pFontLucida;
|
|
2587 }
|
|
2588 ++v17;
|
|
2589 }
|
|
2590 while ( v17 <= &pMiscSkills[11] );
|
|
2591 if ( a2 )
|
972
|
2592 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(a2, 1, 0, a5);
|
706
|
2593 }
|
|
2594
|
949
|
2595 //----- (00418511) --------------------------------------------------------
|
|
2596 char __fastcall CharacterUI_StatsTab_Draw(unsigned int uPlayerID)
|
|
2597 {
|
706
|
2598 Player *pPlayer; // edi@1
|
|
2599 unsigned int v4; // eax@2
|
|
2600 int v7; // ebp@4
|
|
2601 int v8; // eax@4
|
|
2602 unsigned int v9; // eax@4
|
|
2603 int v10; // ST34_4@4
|
|
2604 int v13; // ebp@4
|
|
2605 int v14; // eax@4
|
|
2606 unsigned int v15; // eax@4
|
|
2607 int v19; // ebp@4
|
|
2608 int v20; // eax@4
|
|
2609 unsigned int v21; // eax@4
|
|
2610 int v25; // ebp@4
|
|
2611 int v26; // eax@4
|
|
2612 unsigned int v27; // eax@4
|
|
2613 int v31; // ebp@4
|
|
2614 int v32; // eax@4
|
|
2615 unsigned int v33; // eax@4
|
|
2616 int v37; // ebp@4
|
|
2617 int v38; // eax@4
|
|
2618 unsigned int v39; // eax@4
|
|
2619 int v43; // ebp@4
|
|
2620 int v44; // eax@4
|
|
2621 unsigned int v45; // eax@4
|
|
2622 signed int v49; // eax@6
|
|
2623 unsigned int v50; // eax@6
|
|
2624 int v53; // eax@8
|
|
2625 unsigned int v54; // eax@8
|
|
2626 int v58; // ebp@8
|
|
2627 int v59; // eax@8
|
|
2628 unsigned int v60; // eax@8
|
|
2629 unsigned int v62; // eax@8
|
|
2630 signed int v64; // eax@8
|
|
2631 unsigned __int8 v66; // al@8
|
|
2632 char *v67; // eax@9
|
|
2633 signed int v70; // ebp@11
|
|
2634 signed int v71; // eax@11
|
|
2635 unsigned int v72; // eax@11
|
|
2636 int v75; // ebp@13
|
|
2637 int v76; // eax@13
|
|
2638 unsigned int v77; // eax@13
|
|
2639 char *v78; // ecx@14
|
|
2640 unsigned int v81; // eax@16
|
|
2641 int v83; // eax@16
|
|
2642 char *v85; // eax@16
|
|
2643 int v87; // eax@16
|
|
2644 char *v89; // eax@16
|
|
2645 int v90; // eax@16
|
|
2646 unsigned int v92; // eax@19
|
|
2647 int v93; // eax@19
|
|
2648 unsigned int v95; // eax@22
|
|
2649 int v96; // eax@22
|
|
2650 unsigned int v98; // eax@25
|
|
2651 int v99; // eax@25
|
|
2652 unsigned int v101; // eax@27
|
|
2653 int v102; // eax@27
|
|
2654 unsigned int v104; // eax@30
|
|
2655 unsigned int v106; // eax@32
|
|
2656 int v107; // eax@33
|
|
2657 unsigned int v109; // eax@36
|
|
2658 unsigned int v111; // eax@38
|
|
2659 const char *a2; // [sp+14h] [bp-Ch]@4
|
|
2660 const char *a2a; // [sp+14h] [bp-Ch]@6
|
|
2661 const char *a2b; // [sp+14h] [bp-Ch]@11
|
|
2662 const char *a2c; // [sp+14h] [bp-Ch]@16
|
|
2663 const char *a2d; // [sp+14h] [bp-Ch]@19
|
|
2664 const char *a2e; // [sp+14h] [bp-Ch]@22
|
|
2665 const char *a2f; // [sp+14h] [bp-Ch]@25
|
|
2666 const char *a2g; // [sp+14h] [bp-Ch]@27
|
|
2667 const char *a2h; // [sp+14h] [bp-Ch]@33
|
|
2668 int v131; // [sp+18h] [bp-8h]@16
|
|
2669 int v132; // [sp+18h] [bp-8h]@19
|
|
2670 int v133; // [sp+18h] [bp-8h]@22
|
|
2671 int v134; // [sp+18h] [bp-8h]@25
|
|
2672 int v135; // [sp+18h] [bp-8h]@27
|
|
2673 int v136; // [sp+18h] [bp-8h]@33
|
|
2674
|
|
2675 pPlayer = &pParty->pPlayers[uPlayerID-1];
|
949
|
2676 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE));
|
|
2677 sprintf(pTmpBuf, "\f%05d", TargetColor(0xFF, 0xFF, 0x9B));
|
809
|
2678 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]);//^Pi[%s] %s
|
706
|
2679 strcat(pTmpBuf, pTmpBuf2);
|
|
2680 if ( pPlayer->uSkillPoints )
|
949
|
2681 v4 = TargetColor(0, 0xFFu, 0);
|
706
|
2682 else
|
|
2683 v4 = 0xFFFFu;
|
|
2684 sprintf(pTmpBuf2, "\f00000\r180%s: \f%05d%d\f00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints);//Skill points
|
|
2685 strcat(pTmpBuf, pTmpBuf2);
|
|
2686 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
|
949
|
2687
|
|
2688 v10 = 53;
|
706
|
2689 v7 = pPlayer->GetBaseStrength();
|
|
2690 v8 = pPlayer->GetActualMight();
|
|
2691 v9 = UI_GetHealthManaStringColor(v8, v7);
|
949
|
2692 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v8, v7);//Might
|
|
2693 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2694
|
|
2695 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2696 v13 = pPlayer->GetBaseIntelligence();
|
|
2697 v14 = pPlayer->GetActualIntelligence();
|
|
2698 v15 = UI_GetHealthManaStringColor(v14, v13);
|
949
|
2699 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v14, v13);//Intellect
|
706
|
2700 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
949
|
2701
|
|
2702 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2703 v19 = pPlayer->GetBaseWillpower();
|
|
2704 v20 = pPlayer->GetActualWillpower();
|
|
2705 v21 = UI_GetHealthManaStringColor(v20, v19);
|
949
|
2706 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v20, v19);//
|
|
2707 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2708
|
|
2709 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2710 v25 = pPlayer->GetBaseEndurance();
|
|
2711 v26 = pPlayer->GetActualEndurance();
|
|
2712 v27 = UI_GetHealthManaStringColor(v26, v25);
|
949
|
2713 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v26, v25);//
|
|
2714 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2715
|
|
2716 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2717 v31 = pPlayer->GetBaseAccuracy();
|
|
2718 v32 = pPlayer->GetActualAccuracy();
|
|
2719 v33 = UI_GetHealthManaStringColor(v32, v31);
|
949
|
2720 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v32, v31);
|
|
2721 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2722
|
|
2723 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2724 v37 = pPlayer->GetBaseSpeed();
|
|
2725 v38 = pPlayer->GetActualSpeed();
|
|
2726 v39 = UI_GetHealthManaStringColor(v38, v37);
|
949
|
2727 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v38, v37);
|
|
2728 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2729
|
|
2730 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2731 v43 = pPlayer->GetBaseLuck();
|
|
2732 v44 = pPlayer->GetActualLuck();
|
|
2733 v45 = UI_GetHealthManaStringColor(v44, v43);
|
949
|
2734 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v44, v43);
|
|
2735 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2736
|
706
|
2737 a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n";
|
949
|
2738 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
|
706
|
2739 if ( pPlayer->GetMaxHealth() >= 1000 )
|
|
2740 a2 = "%s\f%05u\r388%d\f00000 / %d\n";
|
|
2741 v49 = pPlayer->GetMaxHealth();
|
|
2742 v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49);
|
949
|
2743 sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, pPlayer->sHealth, v49);
|
|
2744 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2745
|
706
|
2746 a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n";
|
949
|
2747 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2748 if ( pPlayer->GetMaxMana() >= 1000 )
|
|
2749 a2a = "%s\f%05u\r388%d\f00000 / %d\n";
|
|
2750 v53 = pPlayer->GetMaxMana();
|
|
2751 v54 = UI_GetHealthManaStringColor(pPlayer->sMana, v53);
|
949
|
2752 sprintf(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, pPlayer->sMana, v53);
|
|
2753 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2754
|
|
2755 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2756 v58 = pPlayer->GetBaseAC();
|
|
2757 v59 = pPlayer->GetActualAC();
|
|
2758 v60 = UI_GetHealthManaStringColor(v59, v58);
|
949
|
2759 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v59, v58);
|
|
2760 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2761
|
|
2762 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2763 v62 = pPlayer->GetMajorConditionIdx();
|
|
2764 v64 = GetConditionDrawColor(v62);
|
949
|
2765 sprintf(pTmpBuf, "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, aCharacterConditionNames[v62]);
|
|
2766 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf, 226, 0);
|
|
2767
|
|
2768 v10 += LOBYTE(pFontArrus->uFontHeight) + - 1;
|
706
|
2769 v66 = pPlayer->uQuickSpell;
|
|
2770 if ( v66 )
|
|
2771 v67 = pSpellStats->pInfos[v66].pShortName;
|
|
2772 else
|
|
2773 v67 = pGlobalTXT_LocalizationStrings[153];
|
|
2774 sprintf(pTmpBuf, "%s: %s", pGlobalTXT_LocalizationStrings[172], v67);
|
949
|
2775 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf, 226, 0);
|
|
2776
|
|
2777 v10 = 50;
|
706
|
2778 v70 = pPlayer->GetBaseAge();
|
|
2779 v71 = pPlayer->GetActualAge();
|
|
2780 v72 = UI_GetHealthManaStringColor(v71, v70);
|
949
|
2781 sprintf(pTmpBuf, "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v71, v70);
|
|
2782 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2783
|
706
|
2784 a2b = "%s\f%05u\t100%d\f00000 / %d\n";
|
949
|
2785 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2786 if ( pPlayer->GetBaseLevel() > 99 )
|
|
2787 a2b = format_4E2E68;
|
|
2788 v75 = pPlayer->GetBaseLevel();
|
|
2789 v76 = pPlayer->GetActualLevel();
|
|
2790 v77 = UI_GetHealthManaStringColor(v76, v75);
|
949
|
2791 sprintf(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v76, v75);
|
|
2792 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2793
|
|
2794 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2795 if ( (signed __int64)pPlayer->uExperience <= 9999999 )
|
|
2796 v78 = pGlobalTXT_LocalizationStrings[83];
|
|
2797 else
|
|
2798 v78 = pGlobalTXT_LocalizationStrings[17];
|
|
2799 v81 = pPlayer->GetExperienceDisplayColor();
|
949
|
2800 sprintf(pTmpBuf, "%s\r180\f%05d%lu\f00000\n\n", v78, v81, LODWORD(pPlayer->uExperience));
|
|
2801 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2802
|
|
2803 v10 += 2 * LOBYTE(pFontArrus->uFontHeight);
|
706
|
2804 v83 = pPlayer->GetActualAttack(0);
|
|
2805 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83);
|
949
|
2806 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2807
|
|
2808 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2809 v85 = pPlayer->GetMeleeDamageString();
|
|
2810 sprintf(pTmpBuf, "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85);
|
949
|
2811 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2812
|
|
2813 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2814 v87 = pPlayer->GetRangedAttack();
|
|
2815 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87);
|
949
|
2816 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2817
|
|
2818 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2819 v89 = pPlayer->GetRangedDamageString();
|
|
2820 sprintf(pTmpBuf, "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89);
|
949
|
2821 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2822
|
706
|
2823 a2c = format_4E2E10;
|
949
|
2824 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
|
706
|
2825 v131 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
|
|
2826 v90 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
|
|
2827 if ( v131 > 99 || v90 > 99 )
|
|
2828 a2c = format_4E2E68;
|
|
2829 v92 = UI_GetHealthManaStringColor(v131, v90);
|
949
|
2830 sprintf(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v90);
|
|
2831 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2832
|
706
|
2833 a2d = format_4E2E10;
|
949
|
2834 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2835 v132 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
|
|
2836 v93 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
|
|
2837 if ( v132 > 99 || v93 > 99 )
|
|
2838 a2d = format_4E2E68;
|
|
2839 v95 = UI_GetHealthManaStringColor(v132, v93);
|
949
|
2840 sprintf(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v93);
|
|
2841 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2842
|
706
|
2843 a2e = format_4E2E10;
|
949
|
2844 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2845 v133 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
|
|
2846 v96 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
|
|
2847 if ( v133 > 99 || v96 > 99 )
|
|
2848 a2e = format_4E2E68;
|
|
2849 v98 = UI_GetHealthManaStringColor(v133, v96);
|
949
|
2850 sprintf(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v96);
|
|
2851 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2852
|
706
|
2853 a2f = format_4E2E10;
|
949
|
2854 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2855 v134 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
|
|
2856 v99 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
|
|
2857 if ( v134 > 99 )
|
|
2858 a2f = format_4E2E68;
|
|
2859 v101 = UI_GetHealthManaStringColor(v134, v99);
|
949
|
2860 sprintf(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v99);
|
|
2861 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2862
|
706
|
2863 a2g = format_4E2E10;
|
949
|
2864 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2865 v135 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
|
|
2866 v102 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
|
|
2867 if ( v135 > 99 || v102 > 99 )
|
|
2868 a2g = format_4E2E68;
|
|
2869 v104 = UI_GetHealthManaStringColor(v135, v102);
|
949
|
2870 sprintf(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v102);
|
|
2871 if ( pPlayer->classType == PLAYER_CLASS_LICH && v102 == 200 )
|
|
2872 {
|
706
|
2873 v106 = UI_GetHealthManaStringColor(v135, 200);
|
949
|
2874 sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, pGlobalTXT_LocalizationStrings[625]);
|
|
2875 }
|
|
2876 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2877
|
706
|
2878 a2h = format_4E2E10;
|
949
|
2879 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
706
|
2880 v136 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
|
|
2881 v107 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
|
|
2882 if ( v136 > 99 || v107 > 99 )
|
|
2883 a2h = format_4E2E68;
|
|
2884 v109 = UI_GetHealthManaStringColor(v136, v107);
|
949
|
2885 sprintf(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v107);
|
|
2886 if ( pPlayer->classType == PLAYER_CLASS_LICH && v107 == 200 )
|
|
2887 {
|
706
|
2888 v111 = UI_GetHealthManaStringColor(v136, 200);
|
949
|
2889 sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, pGlobalTXT_LocalizationStrings[625]);
|
706
|
2890 }
|
949
|
2891 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2892 }
|
706
|
2893
|
949
|
2894 //----- (00419100) --------------------------------------------------------
|
|
2895 void FillAwardsData()
|
|
2896 {
|
|
2897 auto pPlayer = pPlayers[uActiveCharacter];
|
706
|
2898
|
949
|
2899 memset(achieved_awards, 0, 4000);
|
|
2900 num_achieved_awards = 0;
|
|
2901
|
706
|
2902 memset(pTmpBuf2, 0, 0x7D0u);
|
|
2903 dword_506544 = 0;
|
|
2904 dword_506548 = 0;
|
|
2905 dword_50651C = 0;
|
|
2906 dword_506528 = 0;
|
949
|
2907 for (int i = 0; i < 105; ++i)
|
|
2908 {
|
|
2909 if ( _449B57_test_bit(pPlayer->_guilds_member_bits, i) && pAwards[i].pText )
|
|
2910 achieved_awards[num_achieved_awards++] = (AwardType)i;
|
|
2911 }
|
|
2912 num_achieved_awards_2 = num_achieved_awards;
|
|
2913 num_achieved_awards = 0;
|
|
2914
|
706
|
2915 //sort awards index
|
949
|
2916 if (num_achieved_awards_2 > 0)
|
|
2917 {
|
|
2918 for(int i=0; i<num_achieved_awards_2; ++i)
|
|
2919 achieved_awards[num_achieved_awards_2 + i] = (AwardType)(rand() % 16);
|
706
|
2920
|
949
|
2921 for(int i=1; i<num_achieved_awards_2-1; ++i)
|
706
|
2922 {
|
949
|
2923 for (int j = i; j < num_achieved_awards_2-1; ++j )
|
706
|
2924 {
|
949
|
2925 auto tmp=achieved_awards[j];
|
|
2926 if (pAwards[j].uPriority < pAwards[i].uPriority)
|
706
|
2927 {
|
949
|
2928 achieved_awards[j] = achieved_awards[i];
|
|
2929 achieved_awards[i] = tmp;
|
706
|
2930 }
|
|
2931 }
|
|
2932 }
|
|
2933 }
|
|
2934 }
|