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
|
995
|
48
|
|
49 int bRingsShownInCharScreen; // 5118E0
|
|
50
|
|
51
|
1004
|
52 unsigned int ui_mainmenu_copyright_color;
|
995
|
53
|
|
54 unsigned int ui_character_default_text_color;
|
|
55 unsigned int ui_character_skill_highlight_color;
|
|
56 unsigned int ui_character_header_text_color;
|
|
57 unsigned int ui_character_bonus_text_color;
|
|
58 unsigned int ui_character_bonus_text_color_neg;
|
|
59 unsigned int ui_character_skill_upgradeable_color;
|
|
60 unsigned int ui_character_skill_default_color;
|
|
61 unsigned int ui_character_award_color[6];
|
|
62
|
|
63 unsigned int ui_game_minimap_outline_color;
|
|
64 unsigned int ui_game_minimap_actor_friendly_color;
|
|
65 unsigned int ui_game_minimap_actor_hostile_color;
|
|
66 unsigned int ui_game_minimap_actor_corpse_color;
|
|
67 unsigned int ui_game_minimap_decoration_color_1;
|
|
68 unsigned int ui_game_minimap_projectile_color;
|
|
69 unsigned int ui_game_minimap_treasure_color;
|
1004
|
70 unsigned int ui_game_character_record_playerbuff_colors[24];
|
995
|
71
|
|
72 unsigned int ui_book_quests_title_color;
|
|
73 unsigned int ui_book_quests_text_color;
|
|
74 unsigned int ui_book_autonotes_title_color;
|
|
75 unsigned int ui_book_autonotes_text_color;
|
|
76 unsigned int ui_book_map_title_color;
|
|
77 unsigned int ui_book_map_coordinates_color;
|
1004
|
78
|
|
79 unsigned int ui_book_calendar_title_color;
|
|
80 unsigned int ui_book_calendar_time_color;
|
|
81 unsigned int ui_book_calendar_day_color;
|
|
82 unsigned int ui_book_calendar_month_color;
|
|
83 unsigned int ui_book_calendar_year_color;
|
|
84 unsigned int ui_book_calendar_moon_color;
|
|
85 unsigned int ui_book_calendar_location_color;
|
|
86
|
|
87 unsigned int ui_book_journal_title_color;
|
|
88 unsigned int ui_book_journal_text_color;
|
|
89 unsigned int ui_book_journal_text_shadow;
|
1006
|
90
|
|
91
|
983
|
92 void set_default_ui_skin()
|
|
93 {
|
1004
|
94 ui_mainmenu_copyright_color = TargetColor(255, 255, 255);
|
|
95
|
995
|
96 ui_character_default_text_color = TargetColor(255, 255, 255);
|
|
97 ui_character_header_text_color = TargetColor(255, 255, 155);
|
|
98 ui_character_bonus_text_color = TargetColor(0, 255, 0);
|
|
99 ui_character_bonus_text_color_neg = TargetColor(255, 0, 0);
|
|
100
|
|
101 ui_character_skill_upgradeable_color = TargetColor(0, 175, 255);
|
|
102 ui_character_skill_default_color = TargetColor(255, 0, 0);
|
|
103 ui_character_skill_highlight_color = TargetColor(255, 0, 0);
|
|
104
|
|
105 ui_character_award_color[0] = TargetColor(248, 108, 160);
|
|
106 ui_character_award_color[1] = TargetColor(112, 220, 248);
|
|
107 ui_character_award_color[2] = TargetColor(192, 192, 240);
|
|
108 ui_character_award_color[3] = TargetColor( 64, 244, 96);
|
|
109 ui_character_award_color[4] = TargetColor(232, 244, 96);
|
|
110 ui_character_award_color[5] = TargetColor(240, 252, 192);
|
|
111
|
|
112 ui_game_minimap_outline_color = TargetColor(0, 0, 255);
|
|
113 ui_game_minimap_actor_friendly_color = TargetColor(0, 255, 0);
|
|
114 ui_game_minimap_actor_hostile_color = TargetColor(255, 0, 0);
|
|
115 ui_game_minimap_actor_corpse_color = TargetColor(255, 255, 0);
|
|
116 ui_game_minimap_decoration_color_1 = TargetColor(255, 255, 255);
|
|
117 ui_game_minimap_projectile_color = TargetColor(255, 0, 0);
|
|
118 ui_game_minimap_treasure_color = TargetColor(0, 0, 255);
|
1004
|
119 ui_game_character_record_playerbuff_colors[0] = TargetColor(150, 212, 255);
|
|
120 ui_game_character_record_playerbuff_colors[1] = TargetColor(225, 225, 225);
|
|
121 ui_game_character_record_playerbuff_colors[2] = TargetColor(255, 128, 0);
|
|
122 ui_game_character_record_playerbuff_colors[3] = TargetColor(128, 128, 128);
|
|
123 ui_game_character_record_playerbuff_colors[4] = TargetColor(225, 225, 225);
|
|
124 ui_game_character_record_playerbuff_colors[5] = TargetColor(255, 85, 0);
|
|
125 ui_game_character_record_playerbuff_colors[6] = TargetColor(255, 128, 0);
|
|
126 ui_game_character_record_playerbuff_colors[7] = TargetColor(255, 85, 0);
|
|
127 ui_game_character_record_playerbuff_colors[8] = TargetColor(225, 225, 225);
|
|
128 ui_game_character_record_playerbuff_colors[9] = TargetColor(235, 15, 255);
|
|
129 ui_game_character_record_playerbuff_colors[10] = TargetColor(192, 192, 240);
|
|
130 ui_game_character_record_playerbuff_colors[11] = TargetColor(225, 225, 225);
|
|
131 ui_game_character_record_playerbuff_colors[12] = TargetColor(255, 128, 0);
|
|
132 ui_game_character_record_playerbuff_colors[13] = TargetColor(150, 212, 255);
|
|
133 ui_game_character_record_playerbuff_colors[14] = TargetColor(128, 128, 128);
|
|
134 ui_game_character_record_playerbuff_colors[15] = TargetColor(255, 255, 155);
|
|
135 ui_game_character_record_playerbuff_colors[16] = TargetColor(255, 255, 155);
|
|
136 ui_game_character_record_playerbuff_colors[17] = TargetColor(255, 255, 155);
|
|
137 ui_game_character_record_playerbuff_colors[18] = TargetColor(255, 255, 155);
|
|
138 ui_game_character_record_playerbuff_colors[19] = TargetColor(255, 255, 155);
|
|
139 ui_game_character_record_playerbuff_colors[20] = TargetColor(255, 255, 155);
|
|
140 ui_game_character_record_playerbuff_colors[21] = TargetColor(255, 255, 155);
|
|
141 ui_game_character_record_playerbuff_colors[22] = TargetColor(0, 128, 255);
|
|
142 ui_game_character_record_playerbuff_colors[23] = TargetColor(0, 128, 255);
|
995
|
143
|
|
144 ui_book_quests_title_color = TargetColor(255, 255, 255);
|
|
145 ui_book_quests_text_color = TargetColor(255, 255, 255);
|
|
146 ui_book_autonotes_title_color = TargetColor(255, 255, 255);
|
|
147 ui_book_autonotes_text_color = TargetColor(255, 255, 255);
|
|
148 ui_book_map_title_color = TargetColor(255, 255, 255);
|
|
149 ui_book_map_coordinates_color = TargetColor(255, 255, 255);
|
1004
|
150
|
|
151 ui_book_calendar_title_color = TargetColor(255, 255, 255);
|
|
152 ui_book_calendar_time_color = TargetColor(75, 75, 75);
|
|
153 ui_book_calendar_day_color = TargetColor(75, 75, 75);
|
|
154 ui_book_calendar_month_color = TargetColor(75, 75, 75);
|
|
155 ui_book_calendar_year_color = TargetColor(75, 75, 75);
|
|
156 ui_book_calendar_moon_color = TargetColor(75, 75, 75);
|
|
157 ui_book_calendar_location_color = TargetColor(75, 75, 75);
|
|
158
|
|
159 ui_book_journal_title_color = TargetColor(255, 255, 255);
|
|
160 ui_book_journal_text_color = TargetColor(255, 255, 255);
|
|
161 ui_book_journal_text_shadow = TargetColor(0, 0, 0);
|
995
|
162 }
|
|
163
|
|
164
|
|
165
|
|
166
|
|
167 //----- (00421626) --------------------------------------------------------
|
|
168 GUIWindow *CharacterUI_Initialize(unsigned int _this)
|
|
169 {
|
|
170 GUIWindow *pWindow; // edi@3
|
|
171
|
|
172 ++pIcons_LOD->uTexturePacksCount;
|
|
173 if ( !pIcons_LOD->uNumPrevLoadedFiles )
|
|
174 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
|
|
175
|
|
176 pEventTimer->Pause();
|
|
177 pAudioPlayer->StopChannels(-1, -1);
|
|
178 bRingsShownInCharScreen = false;
|
|
179 CharacterUI_LoadPaperdollTextures();
|
|
180 pCurrentScreen = _this;
|
983
|
181
|
995
|
182 pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0);
|
|
183 pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308,
|
|
184 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth,
|
|
185 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight,
|
|
186 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats
|
|
187 pIcons_LOD->GetTexture(papredoll_dbrds[10]),
|
|
188 pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0);
|
|
189 pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308,
|
|
190 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth,
|
|
191 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight,
|
|
192 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills
|
|
193 pIcons_LOD->GetTexture(papredoll_dbrds[8]),
|
|
194 pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0);
|
|
195 pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308,
|
|
196 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth,
|
|
197 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight,
|
|
198 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory
|
|
199 pIcons_LOD->GetTexture(papredoll_dbrds[6]),
|
|
200 pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0);
|
|
201 pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308,
|
|
202 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth,
|
|
203 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight,
|
|
204 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards
|
|
205 pIcons_LOD->GetTexture(papredoll_dbrds[4]),
|
|
206 pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0);
|
|
207 pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308,
|
|
208 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth,
|
|
209 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight,
|
|
210 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit
|
|
211 pIcons_LOD->GetTexture(papredoll_dbrds[2]),
|
|
212 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0);
|
|
213 pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
|
|
214 pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 30, 30, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0);
|
|
215 pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
|
991
|
216
|
995
|
217 pWindow->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
|
|
218 pWindow->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
|
|
219 pWindow->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
|
|
220 pWindow->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
|
|
221
|
|
222 pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0);
|
|
223 FillAwardsData();
|
|
224 return pWindow;
|
983
|
225 }
|
|
226
|
995
|
227 //----- (004219BE) --------------------------------------------------------
|
|
228 GUIWindow *CastSpellInfo::sub_4219BE()
|
|
229 {
|
|
230 GUIWindow *v2; // ebx@1
|
|
231
|
|
232 pEventTimer->Pause();
|
|
233 pAudioPlayer->StopChannels(-1, -1);
|
|
234 bRingsShownInCharScreen = 0;
|
|
235 CharacterUI_LoadPaperdollTextures();
|
|
236 pCurrentScreen = SCREEN_CASTING;
|
|
237 v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell_InInventory, (int)this, 0);
|
|
238 pCharacterScreen_ExitBtn = v2->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0,
|
|
239 pGlobalTXT_LocalizationStrings[79], // Close
|
|
240 pIcons_LOD->GetTexture(papredoll_dbrds[2]),
|
|
241 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0);
|
|
242 v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
|
|
243 pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
|
|
244
|
|
245 v2->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
|
|
246 v2->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
|
|
247 v2->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
|
|
248 v2->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
|
|
249
|
|
250 return v2;
|
|
251 }
|
|
252
|
|
253
|
|
254
|
|
255
|
983
|
256
|
|
257
|
|
258 static int CharacterUI_SkillsTab_Draw__DrawSkillTable(Player *player, int x, int y, int *skill_list, int skill_list_size, int right_margin, const char *skill_group_name)
|
|
259 {
|
|
260 int y_offset = y;
|
|
261
|
|
262 sprintf(pTmpBuf, "%s\r%03d%s", skill_group_name, right_margin, pGlobalTXT_LocalizationStrings[131]); //"Level"
|
995
|
263 pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf, 0, 0, 0);
|
983
|
264
|
|
265 int num_skills_drawn = 0;
|
|
266 for (uint i = 0; i < skill_list_size; ++i)
|
|
267 {
|
|
268 auto skill = (PLAYER_SKILL_TYPE)skill_list[i];
|
|
269 for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j)
|
|
270 {
|
|
271 auto v8 = pGUIWindow_CurrentMenu->pControlsHead;
|
|
272
|
|
273 for (int v7 = j; v7 > 0; --v7)
|
|
274 v8 = v8->pNext;
|
|
275
|
|
276 auto v9 = v8->field_1C;
|
|
277 if ((short)(v8->field_1C) >= 0)
|
|
278 continue;
|
|
279 if ( (v9 & 0x7FFF) != skill )
|
|
280 continue;
|
|
281
|
|
282 ++num_skills_drawn;
|
|
283 y_offset = v8->uY;
|
|
284
|
|
285 auto skill_value = player->pActiveSkills[skill];
|
|
286 auto skill_level = skill_value & 0x3F;
|
|
287
|
|
288 uint skill_color = 0;
|
|
289 uint skill_mastery_color = 0;
|
|
290 if (player->uSkillPoints > skill_level)
|
995
|
291 skill_color = ui_character_skill_upgradeable_color;
|
983
|
292
|
|
293 if (pGUIWindow_CurrentMenu->pCurrentPosActiveItem == j)
|
|
294 {
|
|
295 if (player->uSkillPoints > skill_level)
|
995
|
296 skill_mastery_color = ui_character_bonus_text_color;
|
983
|
297 else
|
995
|
298 skill_mastery_color = ui_character_skill_default_color;
|
983
|
299 skill_color = skill_mastery_color;
|
|
300 }
|
|
301
|
|
302 if (SkillToMastery(skill_value) == 1)
|
|
303 {
|
|
304 sprintfex(pTmpBuf, "%s\r%03d%2d", pSkillNames[skill], right_margin, skill_level);
|
|
305 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf, 0, 0, 0);
|
|
306 }
|
|
307 else
|
|
308 {
|
|
309 const char *v46 = nullptr;
|
|
310
|
|
311 switch (SkillToMastery(skill_value))
|
|
312 {
|
|
313 case 4: v46 = pGlobalTXT_LocalizationStrings[96]; break; // "Grand"
|
|
314 case 3: v46 = pGlobalTXT_LocalizationStrings[432]; break; // Master
|
|
315 case 2: v46 = pGlobalTXT_LocalizationStrings[433]; break; // Expert
|
|
316 }
|
|
317
|
|
318 if (!skill_mastery_color)
|
995
|
319 skill_mastery_color = ui_character_header_text_color;
|
983
|
320
|
|
321
|
|
322 sprintfex(pTmpBuf, "%s \f%05d%s\f%05d\r%03d%2d", pSkillNames[skill], skill_mastery_color, v46, skill_color, right_margin, skill_level);
|
|
323 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf, 0, 0, 0);
|
|
324 }
|
|
325 }
|
|
326 }
|
|
327
|
|
328 if (!num_skills_drawn)
|
|
329 {
|
|
330 y_offset += LOBYTE(pFontLucida->uFontHeight) - 3;
|
|
331 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, y_offset, 0, pGlobalTXT_LocalizationStrings[153], 0, 0, 0); //"None"
|
|
332 }
|
|
333
|
|
334 return y_offset;
|
|
335 }
|
|
336
|
706
|
337
|
|
338
|
|
339 //----- (00419719) --------------------------------------------------------
|
983
|
340 void CharacterUI_SkillsTab_Draw(Player *player)
|
|
341 {
|
|
342 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_skill", TEXTURE_16BIT_PALETTE));
|
|
343
|
|
344 sprintfex(pTmpBuf, "%s \f%05d^Pv[%s]\f00000\r177%s: \f%05d%d\f00000",
|
|
345 pGlobalTXT_LocalizationStrings[206], // Skills for
|
995
|
346 ui_character_header_text_color,
|
983
|
347 player->pName,
|
|
348 pGlobalTXT_LocalizationStrings[207], // Skill Points
|
995
|
349 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color,
|
983
|
350 player->uSkillPoints);
|
|
351 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0);
|
706
|
352
|
983
|
353 int y = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
|
|
354 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 24, y, pWeaponSkills, 9, 400, pGlobalTXT_LocalizationStrings[242]); // "Weapons"
|
|
355
|
|
356 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10;
|
|
357 CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 24, y, pMagicSkills, 9, 400, pGlobalTXT_LocalizationStrings[138]); // "Magic"
|
|
358
|
|
359 y = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
|
|
360 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pArmorSkills, 5, 177, pGlobalTXT_LocalizationStrings[11]); // "Armor"
|
|
361
|
|
362 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10;
|
|
363 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pMiscSkills, 12, 177, pGlobalTXT_LocalizationStrings[143]); //"Misc"
|
949
|
364 }
|
|
365
|
|
366
|
|
367
|
|
368
|
|
369
|
983
|
370
|
|
371
|
|
372
|
|
373
|
706
|
374
|
|
375 //----- (0041A000) --------------------------------------------------------
|
991
|
376 void CharacterUI_AwardsTab_Draw(Player *player)
|
949
|
377 {
|
706
|
378 //unsigned int v1; // esi@1
|
949
|
379 //unsigned int v2; // ebx@1
|
|
380 //unsigned int award_texture_id; // eax@1
|
706
|
381 unsigned int result; // eax@1
|
|
382 int v5; // eax@15
|
|
383 char *v6; // ebx@15
|
|
384 int v7; // eax@23
|
|
385 int v8; // eax@24
|
|
386 int v9; // eax@25
|
949
|
387 //int v10; // eax@27
|
706
|
388 int v11; // eax@32
|
|
389 int v12; // eax@33
|
|
390 int v13; // eax@34
|
949
|
391 //signed int v14; // eax@43
|
|
392 //unsigned int v15; // eax@43
|
|
393 //int v16; // eax@43
|
|
394 //int v17; // [sp-4h] [bp-D4h]@16
|
706
|
395 char Source[100]; // [sp+Ch] [bp-C4h]@1
|
|
396 GUIWindow a1; // [sp+70h] [bp-60h]@1
|
949
|
397 //unsigned int v20; // [sp+C4h] [bp-Ch]@15
|
|
398 //int v21; // [sp+C8h] [bp-8h]@14
|
|
399 //int v22; // [sp+CCh] [bp-4h]@40
|
706
|
400
|
991
|
401 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_award", TEXTURE_16BIT_PALETTE));
|
995
|
402 sprintfex(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], ui_character_header_text_color);
|
991
|
403 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]);
|
|
404 strcat(pTmpBuf, Source);
|
|
405 strcat(pTmpBuf, "\f00000");
|
|
406
|
|
407 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0);
|
|
408 result = dword_506528;
|
|
409 a1.uFrameX = 12;
|
|
410 a1.uFrameY = 48;
|
|
411 a1.uFrameWidth = 424;
|
|
412 a1.uFrameHeight = 290;
|
|
413 a1.uFrameZ = 435;
|
|
414 a1.uFrameW = 337;
|
992
|
415 if (BtnDown_flag && num_achieved_awards + dword_506528 < num_achieved_awards_2)
|
991
|
416 result = dword_506528++ + 1;
|
992
|
417 if (BtnUp_flag && result)
|
991
|
418 {
|
|
419 --result;
|
|
420 dword_506528 = result;
|
|
421 }
|
|
422
|
706
|
423 if ( dword_50651C < 0 )
|
|
424 {
|
949
|
425 result += num_achieved_awards;
|
706
|
426 dword_506528 = result;
|
949
|
427 if ( (signed int)(num_achieved_awards + result) > num_achieved_awards_2 )
|
706
|
428 {
|
949
|
429 result = num_achieved_awards_2 - num_achieved_awards;
|
706
|
430 dword_506528 = result;
|
|
431 }
|
|
432 }
|
|
433 else if ( dword_50651C > 0 )
|
|
434 {
|
949
|
435 result -= num_achieved_awards;
|
706
|
436 dword_506528 = result;
|
|
437 if ( (result & 0x80000000u) != 0 )
|
|
438 {
|
|
439 result = 0;
|
|
440 dword_506528 = result;
|
|
441 }
|
|
442 }
|
|
443 //LABEL_14:
|
990
|
444 BtnDown_flag = 0;
|
|
445 BtnUp_flag = 0;
|
949
|
446 num_achieved_awards = 0;
|
706
|
447 dword_50651C = 0;
|
949
|
448
|
|
449
|
|
450 for (uint i = result; i < num_achieved_awards_2; ++i)
|
|
451 {
|
|
452 v5 = achieved_awards[i];
|
|
453 v6 = (char *)pAwards[v5].pText;//(char *)dword_723E80_award_related[v20 / 4];
|
|
454
|
|
455 pTmpBuf[0] = 0;
|
|
456 switch (v5)
|
706
|
457 {
|
949
|
458 case Award_Arena_PageWins: sprintf(pTmpBuf, v6, pParty->uNumArenaPageWins); break;
|
|
459 case Award_Arena_SquireWins: sprintf(pTmpBuf, v6, pParty->uNumArenaSquireWins); break;
|
|
460 case Award_Arena_KnightWins: sprintf(pTmpBuf, v6, pParty->uNumArenaKnightWins); break;
|
|
461 case Award_Arena_LordWins: sprintf(pTmpBuf, v6, pParty->uNumArenaLordWins); break;
|
|
462 case Award_ArcomageWins: sprintf(pTmpBuf, v6, pParty->uNumArcomageWins); break;
|
|
463 case Award_ArcomageLoses: sprintf(pTmpBuf, v6, pParty->uNumArcomageLoses); break;
|
|
464 case Award_Deaths: sprintf(pTmpBuf, v6, pParty->uNumDeaths); break;
|
|
465 case Award_BountiesCollected: sprintf(pTmpBuf, v6, pParty->uNumBountiesCollected); break;
|
|
466 case Award_Fine: sprintf(pTmpBuf, v6, pParty->uFine); break;
|
|
467 case Award_PrisonTerms: sprintf(pTmpBuf, v6, pParty->uNumPrisonTerms); break;
|
706
|
468 }
|
|
469
|
949
|
470 if (*pTmpBuf)
|
|
471 v6 = pTmpBuf;
|
|
472
|
|
473
|
995
|
474 a1.DrawText(pFontArrus, 0, 0, ui_character_award_color[pAwards[v5].uPriority % 6], v6, 0, 0, 0);
|
949
|
475 a1.uFrameY = pFontArrus->CalcTextHeight(v6, &a1, 0, 0) + a1.uFrameY + 4;
|
|
476 if (a1.uFrameY > a1.uFrameHeight)
|
|
477 break;
|
|
478
|
|
479 ++num_achieved_awards;
|
706
|
480 }
|
949
|
481 }
|
706
|
482
|
|
483
|
|
484
|
|
485
|
|
486
|
|
487
|
984
|
488 //----- (0041A2C1) --------------------------------------------------------
|
|
489 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels)
|
|
490 {
|
|
491 if ( (signed int)uNumPixels < 14 )
|
|
492 uNumPixels = 14;
|
|
493 return ((signed int)(uNumPixels - 14) >> 5) + 1;
|
|
494 }
|
706
|
495
|
|
496
|
|
497
|
983
|
498 //----- (0041A556) --------------------------------------------------------
|
|
499 void draw_leather()
|
|
500 {
|
|
501 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather));
|
|
502 }
|
706
|
503
|
991
|
504
|
|
505 //----- (0041ABFD) --------------------------------------------------------
|
|
506 void CharacterUI_CharacterScreen_Draw(Player *player)
|
|
507 {
|
|
508 pRenderer->ClearZBuffer(0, 479);
|
|
509 switch (pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0])
|
|
510 {
|
|
511 case WINDOW_CharacterWindow_Stats: // stats
|
|
512 CharacterUI_ReleaseButtons();
|
|
513 sub_419379();
|
|
514 CharacterUI_StatsTab_Draw(player);
|
|
515 pRenderer->DrawTextureIndexed(pCharacterScreen_StatsBtn->uX,
|
|
516 pCharacterScreen_StatsBtn->uY,
|
|
517 pIcons_LOD->LoadTexturePtr("ib-cd1-d", TEXTURE_16BIT_PALETTE));
|
|
518 break;
|
706
|
519
|
991
|
520 case WINDOW_CharacterWindow_Skills: // skills
|
|
521 if (dword_507CC0 != uActiveCharacter)
|
|
522 {
|
|
523 CharacterUI_ReleaseButtons();
|
|
524 CharacterUI_SkillsTab_CreateButtons();
|
|
525 }
|
|
526 sub_419379();
|
|
527 CharacterUI_SkillsTab_Draw(player);
|
|
528 pRenderer->DrawTextureIndexed(pCharacterScreen_SkillsBtn->uX,
|
|
529 pCharacterScreen_SkillsBtn->uY,
|
|
530 pIcons_LOD->LoadTexturePtr("ib-cd2-d", TEXTURE_16BIT_PALETTE));
|
|
531 break;
|
706
|
532
|
991
|
533 case WINDOW_CharacterWindow_Awards: // awards
|
|
534 CharacterUI_ReleaseButtons();
|
|
535 sub_419379();
|
|
536 sub_419220();
|
|
537 CharacterUI_AwardsTab_Draw(player);
|
|
538 pRenderer->DrawTextureIndexed(pCharacterScreen_AwardsBtn->uX,
|
|
539 pCharacterScreen_AwardsBtn->uY,
|
|
540 pIcons_LOD->LoadTexturePtr("ib-cd4-d", TEXTURE_16BIT_PALETTE));
|
|
541 break;
|
706
|
542
|
991
|
543 case WINDOW_CharacterWindow_Inventory: // inventory and other
|
|
544 CharacterUI_ReleaseButtons();
|
|
545 sub_419379();
|
|
546 CharacterUI_InventoryTab_Draw(player, false);
|
|
547 pRenderer->DrawTextureIndexed(pCharacterScreen_InventoryBtn->uX,
|
|
548 pCharacterScreen_InventoryBtn->uY,
|
|
549 pIcons_LOD->LoadTexturePtr("ib-cd3-d", TEXTURE_16BIT_PALETTE));
|
|
550 break;
|
|
551
|
|
552 default: break;
|
910
|
553 }
|
991
|
554
|
|
555 if (bRingsShownInCharScreen)
|
|
556 CharacterUI_DrawPaperdollWithRingOverlay(player);
|
|
557 else
|
|
558 CharacterUI_DrawPaperdoll(player);
|
910
|
559 }
|
706
|
560
|
898
|
561 //----- (0043CC7C) --------------------------------------------------------
|
991
|
562 void CharacterUI_DrawPaperdoll(Player *player)
|
898
|
563 {
|
991
|
564 //signed int pSex; // eax@1
|
898
|
565 unsigned int v6; // ecx@9
|
899
|
566 int v7; // ecx@10
|
|
567 unsigned int pMainHandNum4; // eax@14
|
|
568 ItemGen *item_MainHand4; // eax@15
|
|
569 int v10; // edx@15
|
|
570 unsigned int pX_MainHand4; // edi@15
|
|
571 unsigned int v14; // ebx@18
|
|
572 Texture *v16; // ebp@27
|
|
573 double v17; // st7@29
|
|
574 int v18; // edi@30
|
|
575 char *v19; // eax@30
|
|
576 unsigned int pBowNum; // eax@37
|
|
577 ItemGen *itemBow; // edi@38
|
|
578 int pX_Bow; // ebx@38
|
|
579 double v28; // st7@51
|
|
580 char *v30; // eax@54
|
|
581 unsigned int pCloakNum; // eax@59
|
|
582 ItemGen *item_Cloak; // edx@60
|
|
583 int v33; // eax@65
|
|
584 int v34; // eax@74
|
|
585 int v35; // ebx@74
|
|
586 LODFile_IconsBitmaps *v38; // ecx@78
|
|
587 Texture *v39; // edi@85
|
|
588 double v40; // st7@87
|
|
589 int v41; // edi@88
|
|
590 unsigned int pArmorNum; // eax@93
|
|
591 ItemGen *item_Armor; // edx@94
|
|
592 int v45; // eax@98
|
|
593 int v48; // ebx@106
|
|
594 LODFile_IconsBitmaps *v50; // ecx@110
|
|
595 Texture *v51; // edi@117
|
|
596 double v52; // st7@119
|
|
597 int v53; // edi@120
|
|
598 char *v55; // eax@122
|
|
599 unsigned int pBootNum; // eax@127
|
|
600 ItemGen *item_Boot; // edi@128
|
|
601 int v59; // ebx@129
|
|
602 int v60; // ecx@132
|
|
603 Texture *v63; // edi@145
|
|
604 double v64; // st7@147
|
|
605 int v65; // edi@148
|
|
606 char *v66; // eax@148
|
|
607 unsigned int pMainHandNum; // edx@155
|
|
608 int v70; // edx@156
|
|
609 unsigned int pBeltNum; // eax@160
|
|
610 ItemGen *item_Belt; // edi@161
|
|
611 int v73; // edx@163
|
|
612 unsigned int v75; // ebx@170
|
|
613 Texture *v77; // edi@181
|
|
614 double v78; // st7@183
|
|
615 int v79; // edi@184
|
|
616 char *v80; // eax@184
|
|
617 unsigned int pMainHandNum2; // eax@192
|
|
618 int v83; // eax@193
|
|
619 int pArmorShoulderNum; // eax@197
|
|
620 int v87; // eax@197
|
|
621 int v88; // eax@198
|
|
622 int v89; // eax@199
|
|
623 int v94; // ebx@214
|
|
624 int v95; // eax@214
|
|
625 char *v96; // edi@226
|
|
626 double v97; // st7@228
|
|
627 int v98; // edi@229
|
|
628 char *v99; // eax@229
|
|
629 int pX_ArmorShoulder; // eax@237
|
|
630 int pY_ArmorShoulder; // ecx@237
|
|
631 int v106; // edx@238
|
|
632 int v107; // edx@239
|
938
|
633 int v108; // edx@240papredoll_flying_feet
|
899
|
634 int v109; // edi@250
|
|
635 char *v110; // edx@250
|
|
636 unsigned int pCloakCollarNum; // eax@259
|
|
637 ItemGen *item_CloakCollar; // eax@260
|
|
638 int v114; // eax@265
|
|
639 int v116; // ebx@274
|
706
|
640 double v118; // st7@286
|
|
641 int v119; // edi@287
|
|
642 char *v120; // eax@287
|
|
643 unsigned int v122; // edi@295
|
898
|
644 int pHelmNum; // ebx@297
|
|
645 ItemGen *item_Helm; // edi@298
|
706
|
646 int v125; // ecx@303
|
|
647 unsigned int v127; // ebx@314
|
|
648 Texture *v129; // edi@325
|
|
649 double v130; // st7@327
|
|
650 int v131; // edi@328
|
|
651 char *v132; // eax@328
|
898
|
652 unsigned int pMainHandNum3; // eax@335
|
|
653 ItemGen *item_MainHand3; // eax@336
|
706
|
654 unsigned int v138; // ebx@339
|
|
655 Texture *v140; // edi@348
|
|
656 double v141; // st7@350
|
|
657 int v142; // edi@351
|
|
658 char *v143; // eax@351
|
898
|
659 unsigned int pShieldNum; // eax@358
|
|
660 ItemGen *item_Shield; // eax@359
|
706
|
661 int v149; // edx@359
|
898
|
662 int pX_Shield; // ebx@362
|
706
|
663 int v151; // ecx@363
|
|
664 int v152; // ecx@364
|
|
665 unsigned int v153; // eax@370
|
|
666 Texture *v157; // ebp@381
|
|
667 double v158; // st7@383
|
|
668 char *v160; // eax@386
|
898
|
669 unsigned int pMainHandNum5; // eax@393
|
|
670 ItemGen *item_MainHand5; // eax@394
|
706
|
671 char *v166; // [sp-8h] [bp-54h]@16
|
|
672 const char *v167; // [sp-8h] [bp-54h]@23
|
|
673 const char *v168; // [sp-8h] [bp-54h]@43
|
|
674 const char *v169; // [sp-8h] [bp-54h]@79
|
|
675 const char *v170; // [sp-8h] [bp-54h]@111
|
|
676 const char *v171; // [sp-8h] [bp-54h]@141
|
|
677 const char *v172; // [sp-8h] [bp-54h]@177
|
|
678 const char *v173; // [sp-8h] [bp-54h]@222
|
|
679 const char *v178; // [sp-8h] [bp-54h]@242
|
|
680 const char *v179; // [sp-8h] [bp-54h]@280
|
|
681 const char *v180; // [sp-8h] [bp-54h]@321
|
|
682 char *v181; // [sp-8h] [bp-54h]@337
|
|
683 const char *v182; // [sp-8h] [bp-54h]@344
|
|
684 const char *v183; // [sp-8h] [bp-54h]@375
|
|
685 signed int v186; // [sp-4h] [bp-50h]@202
|
|
686 signed int v191; // [sp-4h] [bp-50h]@266
|
|
687 signed int v192; // [sp-4h] [bp-50h]@304
|
898
|
688 int pY_MainHand4; // [sp+10h] [bp-3Ch]@15
|
|
689 int pY_Bow; // [sp+10h] [bp-3Ch]@38
|
|
690 unsigned int pY_Cloak; // [sp+10h] [bp-3Ch]@74
|
|
691 unsigned int pY_Armor; // [sp+10h] [bp-3Ch]@106
|
|
692 int pY_Boot; // [sp+10h] [bp-3Ch]@129
|
|
693 int pY_Belt; // [sp+10h] [bp-3Ch]@168
|
|
694 unsigned int pY_shoulder; // [sp+10h] [bp-3Ch]@216
|
|
695 unsigned int pY_CloakCollar; // [sp+10h] [bp-3Ch]@274
|
|
696 int pY_Helm; // [sp+10h] [bp-3Ch]@312
|
|
697 int pY_MainHand3; // [sp+10h] [bp-3Ch]@336
|
|
698 int pY_Shield; // [sp+10h] [bp-3Ch]@362
|
706
|
699 Texture *a2b; // [sp+14h] [bp-38h]@49
|
898
|
700 int pX_Cloak; // [sp+14h] [bp-38h]@74
|
|
701 int pX_Armor; // [sp+14h] [bp-38h]@106
|
|
702 int pX_Boot; // [sp+14h] [bp-38h]@129
|
|
703 int pX_Belt; // [sp+14h] [bp-38h]@168
|
|
704 int pX_shoulder; // [sp+14h] [bp-38h]@214
|
|
705 int pX_CloakCollar; // [sp+14h] [bp-38h]@274
|
706
|
706 Texture *a2i; // [sp+14h] [bp-38h]@284
|
898
|
707 int pX_Helm; // [sp+14h] [bp-38h]@312
|
|
708 int pX_MainHand3; // [sp+14h] [bp-38h]@336
|
706
|
709 int pBodyComplection; // [sp+24h] [bp-28h]@6
|
898
|
710 unsigned int pBowTextureNum; // [sp+2Ch] [bp-20h]@38
|
706
|
711 signed int v245; // [sp+34h] [bp-18h]@361
|
|
712 signed int IsDwarf; // [sp+40h] [bp-Ch]@4
|
|
713
|
898
|
714 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
|
991
|
715 if (player->GetRace() == CHARACTER_RACE_DWARF)
|
898
|
716 {
|
|
717 IsDwarf = 1;
|
991
|
718 pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 2 : 3;
|
898
|
719 }
|
|
720 else
|
|
721 {
|
|
722 IsDwarf = 0;
|
991
|
723 pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 0 : 1;
|
898
|
724 }
|
991
|
725
|
|
726 int uPlayerID = 0;
|
|
727 for (uint i = 0; i < 4; ++i)
|
|
728 if (pPlayers[i + 1] == player)
|
|
729 {
|
|
730 uPlayerID = i + 1;
|
|
731 break;
|
|
732 }
|
|
733
|
898
|
734 pRenderer->ResetTextureClipRect();
|
991
|
735 pRenderer->DrawTextureIndexed(467, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Ïîäëîæêà
|
898
|
736 if ( IsPlayerWearingWatersuit[uPlayerID] )//àêâàëàíã
|
|
737 {
|
948
|
738 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
|
898
|
739 if ( !bRingsShownInCharScreen )
|
991
|
740 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor);
|
|
741 v6 = player->pEquipment.uMainHand;
|
898
|
742 if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1)
|
|
743 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) )
|
|
744 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
|
948
|
745 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
|
898
|
746 pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
747 if ( pMainHandNum4 )
|
|
748 {
|
|
749 item_MainHand4 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum4 - 1];
|
|
750 pX_MainHand4 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipX;
|
|
751 pY_MainHand4 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipY;
|
|
752 if ( item_MainHand4->uItemID == 64 )
|
|
753 v166 = "item64v1";
|
|
754 else
|
|
755 v166 = pItemsTable->pItems[item_MainHand4->uItemID].pIconName;
|
|
756 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE);
|
|
757 if ( !( item_MainHand4->uAttributes & 0xF0 ) )
|
|
758 {
|
|
759 v18 = v14 + 1;
|
948
|
760 v19 = (char *)pIcons_LOD->GetTexture(v14);
|
898
|
761 if ( item_MainHand4->uAttributes & 2 )
|
948
|
762 pRenderer->DrawTransparentRedShade(pX_MainHand4, pY_MainHand4, (Texture *)v19);
|
898
|
763 else
|
|
764 {
|
|
765 if ( item_MainHand4->uAttributes & 1 )
|
948
|
766 pRenderer->DrawTextureTransparent(pX_MainHand4, pY_MainHand4, (Texture *)v19);
|
898
|
767 else
|
948
|
768 pRenderer->DrawTransparentGreenShade(pX_MainHand4, pY_MainHand4, (Texture *)v19);
|
898
|
769 }
|
|
770 }
|
|
771 if ( item_MainHand4->uAttributes & 0xF0 )
|
|
772 {
|
910
|
773 if ( ( item_MainHand4->uAttributes & 0xF0) == 16 )
|
898
|
774 v167 = "sptext01";
|
|
775 if ( ( item_MainHand4->uAttributes & 0xF0) == 32 )
|
|
776 v167 = "sp28a";
|
|
777 if ( (item_MainHand4->uAttributes & 0xF0) == 64 )
|
|
778 v167 = "sp30a";
|
|
779 if ( (item_MainHand4->uAttributes & 0xF0) == 128 )
|
|
780 v167 = "sp91a";
|
948
|
781 v16 = pIcons_LOD->LoadTexturePtr(v167, TEXTURE_16BIT_PALETTE);
|
984
|
782 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
783 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
784 {
|
984
|
785 _50C9A8_item_enchantment_timer = 0;
|
898
|
786 item_MainHand4->uAttributes &= 0xFu;
|
|
787 ptr_50C9A4 = 0;
|
|
788 }
|
|
789 v17 = (double)GetTickCount() * 0.1;
|
948
|
790 pRenderer->_4A63E6(pX_MainHand4, pY_MainHand4, pIcons_LOD->GetTexture(v14), v16, (signed __int64)v17, 0, 255);
|
898
|
791 }
|
|
792 if ( !bRingsShownInCharScreen )
|
948
|
793 pRenderer->DrawMaskToZBuffer(pX_MainHand4, pY_MainHand4, (Texture *)v19, pMainHandNum4);
|
898
|
794 }
|
|
795 }
|
|
796 else// áåç àêâàëàíãà
|
|
797 {
|
|
798 pBowNum = pPlayers[uPlayerID]->pEquipment.uBow; //ñíà÷àëà ðèñóåòñÿ ëóê
|
|
799 if ( pBowNum )
|
|
800 {
|
|
801 itemBow = &pPlayers[uPlayerID]->pInventoryItems[pBowNum - 1];
|
|
802 pX_Bow = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[itemBow->uItemID].uEquipX;
|
|
803 pY_Bow = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[itemBow->uItemID].uEquipY;
|
|
804 pBowTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[itemBow->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
805 if ( !(itemBow->uAttributes & 0xF0) )// åñëè íå ïðèìåí¸í çàêë
|
|
806 {
|
|
807 if ( itemBow->uAttributes & 2 )
|
948
|
808 pRenderer->DrawTransparentRedShade(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum));
|
706
|
809 else
|
898
|
810 {
|
948
|
811 v30 = (char *)pIcons_LOD->GetTexture(pBowTextureNum);
|
898
|
812 if ( !(itemBow->uAttributes & 1) )//íå îïîçíàííûé ëóê çåë¸íûé
|
948
|
813 pRenderer->DrawTransparentGreenShade(pX_Bow, pY_Bow, (Texture *)v30);
|
898
|
814 else // îïîçíàííûé ëóê
|
948
|
815 pRenderer->DrawTextureTransparent(pX_Bow, pY_Bow, (Texture *)v30);
|
898
|
816 }
|
|
817 }
|
|
818 else
|
|
819 {
|
|
820 if ( (itemBow->uAttributes & 0xF0) == 16 )
|
|
821 v168 = "sptext01";
|
|
822 if ( (itemBow->uAttributes & 0xF0) == 32 )
|
|
823 v168 = "sp28a";
|
|
824 if ( (itemBow->uAttributes & 0xF0) == 64 )
|
|
825 v168 = "sp30a";
|
|
826 if ( (itemBow->uAttributes & 0xF0) == 128 )
|
|
827 v168 = "sp91a";
|
948
|
828 a2b = pIcons_LOD->LoadTexturePtr(v168, TEXTURE_16BIT_PALETTE);
|
984
|
829 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
830 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
831 {
|
984
|
832 _50C9A8_item_enchantment_timer = 0;
|
898
|
833 itemBow->uAttributes &= 0xFu;
|
|
834 ptr_50C9A4 = 0;
|
|
835 }
|
|
836 v28 = (double)GetTickCount() * 0.1;
|
948
|
837 pRenderer->_4A63E6(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), a2b, (signed __int64)v28, 0, 255);
|
898
|
838 }
|
|
839 if ( !bRingsShownInCharScreen )
|
948
|
840 pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), pBowNum);
|
898
|
841 }
|
|
842 pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// ïîòîì ïëàù
|
|
843 if ( pCloakNum )
|
|
844 {
|
|
845 item_Cloak = &pPlayers[uPlayerID]->pInventoryItems[pCloakNum - 1];
|
|
846 switch ( item_Cloak->uItemID )
|
|
847 {
|
|
848 case 525:
|
|
849 v33 = 5;
|
|
850 break;
|
|
851 case 530:
|
|
852 v33 = 6;
|
|
853 break;
|
|
854 case 547:
|
|
855 v33 = 7;
|
|
856 break;
|
|
857 case 548:
|
|
858 v33 = 8;
|
|
859 break;
|
|
860 case 550:
|
|
861 v33 = 9;
|
|
862 break;
|
|
863 default:
|
|
864 v33 = item_Cloak->uItemID - 105;
|
|
865 break;
|
|
866 }
|
|
867 if ( v33 >= 0 && v33 < 10 )
|
|
868 {
|
899
|
869 v35 = paperdoll_cloak_texture[pBodyComplection][v33];//Texture_Cloak
|
|
870 pX_Cloak = pPaperdoll_BodyX + paperdoll_Cloak[pBodyComplection][v33][0];
|
|
871 pY_Cloak = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][v33][1];
|
898
|
872 if ( !(item_Cloak->uAttributes & 0xF0) )
|
|
873 {
|
|
874 v41 = v35 + 1;
|
|
875 if ( item_Cloak->uAttributes & 2 )
|
948
|
876 pRenderer->DrawTransparentRedShade(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35));
|
898
|
877 else
|
948
|
878 pRenderer->DrawTextureTransparent(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35));
|
898
|
879 }
|
|
880 else
|
|
881 {
|
|
882 if ( (item_Cloak->uAttributes & 0xF0) == 16 )
|
|
883 v169 = "sptext01";
|
|
884 if ( (item_Cloak->uAttributes & 0xF0) == 32 )
|
|
885 v169 = "sp28a";
|
|
886 if ( (item_Cloak->uAttributes & 0xF0) != 64 )
|
|
887 v169 = "sp30a";
|
|
888 if ( (item_Cloak->uAttributes & 0xF0) == 128 )
|
|
889 v169 = "sp91a";
|
948
|
890 v39 = pIcons_LOD->LoadTexturePtr(v169, TEXTURE_16BIT_PALETTE);
|
984
|
891 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
892 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
893 {
|
984
|
894 _50C9A8_item_enchantment_timer = 0;
|
898
|
895 item_Cloak->uAttributes &= 0xFu;
|
|
896 ptr_50C9A4 = 0;
|
|
897 }
|
|
898 v40 = (double)GetTickCount() * 0.1;
|
948
|
899 pRenderer->_4A63E6(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), v39, (signed __int64)v40, 0, 255);
|
898
|
900 }
|
|
901 if ( !bRingsShownInCharScreen )
|
948
|
902 pRenderer->DrawMaskToZBuffer(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), pCloakNum);
|
898
|
903 }
|
|
904 }
|
|
905 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,//ðèñóåòñÿ êóêëà
|
948
|
906 pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
|
898
|
907 pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// ïîòîì áðîíÿ
|
|
908 if ( pArmorNum )
|
|
909 {
|
|
910 item_Armor = &pPlayers[uPlayerID]->pInventoryItems[pArmorNum - 1];
|
|
911 switch ( item_Armor->uItemID )
|
|
912 {
|
|
913 case 504:
|
|
914 v45 = 15;
|
|
915 break;
|
|
916 case 505:
|
|
917 v45 = 14;
|
|
918 break;
|
|
919 case 516:
|
|
920 v45 = 13;
|
|
921 break;
|
|
922 case 533:
|
|
923 v45 = 16;
|
|
924 break;
|
|
925 default:
|
|
926 v45 = item_Armor->uItemID - 66;
|
|
927 break;
|
|
928 }
|
|
929 if ( v45 >= 0 && v45 < 17 )
|
|
930 {
|
899
|
931 pX_Armor = pPaperdoll_BodyX + paperdoll_Armor[pBodyComplection][v45][0];
|
|
932 pY_Armor = pPaperdoll_BodyY + paperdoll_Armor[pBodyComplection][v45][1];
|
|
933 v48 = paperdoll_armor_texture[pBodyComplection][v45][0];
|
898
|
934 if ( !(item_Armor->uAttributes & 0xF0) )
|
|
935 {
|
|
936 v53 = v48 + 1;
|
|
937 if ( item_Armor->uAttributes & 2 )
|
948
|
938 pRenderer->DrawTransparentRedShade(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48));
|
898
|
939 else
|
|
940 {
|
|
941 v55 = (char *)&pIcons_LOD->pTextures[v48];
|
|
942 if ( !(item_Armor->uAttributes & 1) )
|
948
|
943 pRenderer->DrawTransparentGreenShade(pX_Armor, pY_Armor, (Texture *)v55);
|
898
|
944 else
|
948
|
945 pRenderer->DrawTextureTransparent(pX_Armor, pY_Armor, (Texture *)v55);
|
898
|
946 }
|
|
947 }
|
|
948 else
|
|
949 {
|
|
950 if ( (item_Armor->uAttributes & 0xF0) == 16 )
|
|
951 v170 = "sptext01";
|
|
952 if ( (item_Armor->uAttributes & 0xF0) == 32 )
|
|
953 v170 = "sp28a";
|
|
954 if ( (item_Armor->uAttributes & 0xF0) == 64 )
|
|
955 v170 = "sp30a";
|
|
956 if ( (item_Armor->uAttributes & 0xF0) == 128 )
|
|
957 v170 = "sp91a";
|
948
|
958 v51 = pIcons_LOD->LoadTexturePtr(v170, TEXTURE_16BIT_PALETTE);
|
984
|
959 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
960 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
961 {
|
984
|
962 _50C9A8_item_enchantment_timer = 0;
|
898
|
963 item_Armor->uAttributes &= 0xFu;
|
|
964 ptr_50C9A4 = 0;
|
|
965 }
|
|
966 v52 = (double)GetTickCount() * 0.1;
|
948
|
967 pRenderer->_4A63E6(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48), v51, (signed __int64)v52, 0, 255);
|
898
|
968 }
|
|
969 if ( pPlayers[uPlayerID]->pEquipment.uMainHand //äàëåå ïëå÷è áðîíè
|
|
970 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND ||
|
|
971 pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD &&
|
|
972 !pPlayers[uPlayerID]->pEquipment.uShield) )
|
|
973 {
|
899
|
974 v94 = paperdoll_armor_texture[pBodyComplection][v45][2];
|
898
|
975 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
|
|
976 {
|
899
|
977 v94 = paperdoll_armor_texture[pBodyComplection][v45][1];
|
|
978 pX_shoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0];
|
|
979 pY_shoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1];
|
898
|
980 }
|
|
981 else
|
|
982 {
|
899
|
983 pX_shoulder = pPaperdoll_BodyX + dword_4E5270[v45][0];
|
|
984 pY_shoulder = pPaperdoll_BodyY + dword_4E5270[v45][1];
|
898
|
985 }
|
|
986 if ( !(item_Armor->uAttributes & 0xF0) )
|
|
987 {
|
|
988 v98 = v94 + 1;
|
948
|
989 v99 = (char *)pIcons_LOD->GetTexture(v94);
|
898
|
990 if ( item_Armor->uAttributes & 2 )
|
948
|
991 pRenderer->DrawTransparentRedShade(pX_shoulder, pY_shoulder, (Texture *)v99);
|
898
|
992 else
|
706
|
993 {
|
898
|
994 if ( item_Armor->uAttributes & 1 )
|
948
|
995 pRenderer->DrawTextureTransparent(pX_shoulder, pY_shoulder, (Texture *)v99);
|
898
|
996 else
|
948
|
997 pRenderer->DrawTransparentGreenShade(pX_shoulder, pY_shoulder, (Texture *)v99);
|
898
|
998 }
|
|
999 }
|
|
1000 else
|
|
1001 {
|
|
1002 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
|
|
1003 {
|
|
1004 if ( item_Armor->uAttributes & 0xF0 )
|
|
1005 {
|
|
1006 if ( (item_Armor->uAttributes & 0xF0) == 16 )
|
|
1007 v173 = "sptext01";
|
|
1008 if ( (item_Armor->uAttributes & 0xF0) == 32 )
|
|
1009 v173 = "sp28a";
|
|
1010 if ( ( item_Armor->uAttributes & 0xF0) == 64 )
|
|
1011 v173 = "sp30a";
|
|
1012 if ( (item_Armor->uAttributes & 0xF0) == 128 )
|
|
1013 v173 = "sp91a";
|
948
|
1014 v96 = (char *)pIcons_LOD->LoadTexturePtr(v173, TEXTURE_16BIT_PALETTE);
|
984
|
1015 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1016 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1017 {
|
984
|
1018 _50C9A8_item_enchantment_timer = 0;
|
898
|
1019 item_Armor->uAttributes &= 0xFu;
|
|
1020 ptr_50C9A4 = 0;
|
706
|
1021 }
|
898
|
1022 v97 = (double)GetTickCount();
|
948
|
1023 pRenderer->_4A63E6(pX_shoulder, pY_shoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255);
|
898
|
1024 }
|
|
1025 }
|
|
1026 }
|
|
1027 }
|
|
1028 else
|
|
1029 {
|
899
|
1030 v94 = paperdoll_armor_texture[pBodyComplection][v45][1];
|
898
|
1031 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
|
|
1032 {
|
899
|
1033 pX_ArmorShoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0];
|
|
1034 pY_ArmorShoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1];
|
898
|
1035 if ( !(item_Armor->uAttributes & 0xF0) )
|
|
1036 {
|
|
1037 v109 = v94 + 1;
|
948
|
1038 v110 = (char *)pIcons_LOD->GetTexture(v94);
|
898
|
1039 if ( item_Armor->uAttributes & 2 )
|
948
|
1040 pRenderer->DrawTransparentRedShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110);
|
898
|
1041 else
|
|
1042 {
|
|
1043 if ( item_Armor->uAttributes & 1 )
|
948
|
1044 pRenderer->DrawTextureTransparent(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110);
|
898
|
1045 else
|
948
|
1046 pRenderer->DrawTransparentGreenShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110);
|
898
|
1047 }
|
|
1048 }
|
|
1049 else
|
|
1050 {
|
|
1051 if ( (item_Armor->uAttributes & 0xF0) == 16 )
|
|
1052 v178 = "sptext01";
|
|
1053 if ( (item_Armor->uAttributes & 0xF0) == 32 )
|
|
1054 v178 = "sp28a";
|
|
1055 if ( (item_Armor->uAttributes & 0xF0) == 64 )
|
|
1056 v178 = "sp30a";
|
|
1057 if ( (item_Armor->uAttributes & 0xF0) == 128 )
|
|
1058 v178 = "sp91a";
|
948
|
1059 v96 = (char *)pIcons_LOD->LoadTexturePtr(v178, TEXTURE_16BIT_PALETTE);
|
984
|
1060 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1061 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1062 {
|
984
|
1063 _50C9A8_item_enchantment_timer = 0;
|
898
|
1064 item_Armor->uAttributes &= 0xFu;
|
|
1065 ptr_50C9A4 = 0;
|
|
1066 }
|
|
1067 v97 = (double)GetTickCount();
|
948
|
1068 pRenderer->_4A63E6(pX_ArmorShoulder, pY_ArmorShoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255);
|
898
|
1069 }
|
|
1070 }
|
|
1071 }
|
|
1072 if ( !bRingsShownInCharScreen )
|
948
|
1073 pRenderer->DrawMaskToZBuffer(pX_Armor, pY_Armor, (Texture *)v55, pArmorNum);
|
898
|
1074 }
|
|
1075 }
|
|
1076 pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;//äàëåå îáóâü
|
|
1077 if ( pBootNum )
|
|
1078 {
|
|
1079 item_Boot = &pPlayers[uPlayerID]->pInventoryItems[pBootNum - 1];
|
|
1080 switch ( item_Boot->uItemID )
|
|
1081 {
|
|
1082 case 529:
|
|
1083 v60 = 5;
|
1014
|
1084 v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace];
|
898
|
1085 break;
|
|
1086 case 512:
|
|
1087 v60 = 6;
|
899
|
1088 v59 = paperdoll_boots_texture[pBodyComplection][5];
|
898
|
1089 break;
|
|
1090 default:
|
|
1091 v60 = item_Boot->uItemID - 115;
|
899
|
1092 v59 = paperdoll_boots_texture[pBodyComplection][v60];
|
898
|
1093 break;
|
|
1094 }
|
|
1095 if ( v60 >= 0 && v60 < 7 )
|
|
1096 {
|
899
|
1097 pX_Boot = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][v60][0];
|
|
1098 pY_Boot = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][v60][1];
|
898
|
1099 if ( !(item_Boot->uAttributes & 0xF0) )
|
|
1100 {
|
|
1101 v65 = v59 + 1;
|
948
|
1102 v66 = (char *)pIcons_LOD->GetTexture(v59);
|
898
|
1103 if ( item_Boot->uAttributes & 2 )
|
948
|
1104 pRenderer->DrawTransparentRedShade(pX_Boot, pY_Boot, (Texture *)v66);
|
898
|
1105 else
|
|
1106 {
|
|
1107 if ( item_Boot->uAttributes & 1 )
|
948
|
1108 pRenderer->DrawTextureTransparent(pX_Boot, pY_Boot, (Texture *)v66);
|
898
|
1109 else
|
948
|
1110 pRenderer->DrawTransparentGreenShade(pX_Boot, pY_Boot, (Texture *)v66);
|
898
|
1111 }
|
|
1112 }
|
|
1113 else
|
|
1114 {
|
|
1115 if ( (item_Boot->uAttributes & 0xF0) == 16 )
|
|
1116 v171 = "sptext01";
|
|
1117 if ( (item_Boot->uAttributes & 0xF0) == 32 )
|
|
1118 v171 = "sp28a";
|
|
1119 if ( (item_Boot->uAttributes & 0xF0) == 64 )
|
|
1120 v171 = "sp30a";
|
|
1121 if ( (item_Boot->uAttributes & 0xF0) == 128 )
|
|
1122 v171 = "sp91a";
|
948
|
1123 v63 = pIcons_LOD->LoadTexturePtr(v171, TEXTURE_16BIT_PALETTE);
|
984
|
1124 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1125 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1126 {
|
984
|
1127 _50C9A8_item_enchantment_timer = 0;
|
898
|
1128 item_Boot->uAttributes &= 0xFu;
|
|
1129 ptr_50C9A4 = 0;
|
|
1130 }
|
|
1131 v64 = (double)GetTickCount() * 0.1;
|
948
|
1132 pRenderer->_4A63E6(pX_Boot, pY_Boot, pIcons_LOD->GetTexture(v59), v63, (signed __int64)v64, 0, 255);
|
898
|
1133 }
|
|
1134 if ( !bRingsShownInCharScreen )
|
948
|
1135 pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)v66, pBootNum);
|
898
|
1136 }
|
|
1137 }
|
|
1138 pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
1139 if ( !pMainHandNum || (v70 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum -1], pItemsTable->pItems[v70].uEquipType != 1)
|
|
1140 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) )
|
|
1141 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
|
|
1142 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
|
948
|
1143 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
|
898
|
1144 pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// äàëåå ïîÿñ
|
|
1145 if ( pBeltNum )
|
|
1146 {
|
|
1147 item_Belt = &pPlayers[uPlayerID]->pInventoryItems[pBeltNum - 1];
|
|
1148 switch ( item_Belt->uItemID )
|
|
1149 {
|
|
1150 case 524:
|
|
1151 v73 = 5;
|
|
1152 break;
|
|
1153 case 535:
|
|
1154 v73 = 6;
|
|
1155 break;
|
|
1156 default:
|
|
1157 v73 = item_Belt->uItemID - 100;
|
|
1158 break;
|
|
1159 }
|
|
1160 if ( v73 >= 0 && v73 < 7 )
|
|
1161 {
|
899
|
1162 pX_Belt = pPaperdoll_BodyX + paperdoll_Belt[pBodyComplection][v73][0];
|
|
1163 pY_Belt = pPaperdoll_BodyY + paperdoll_Belt[pBodyComplection][v73][1];
|
898
|
1164 if ( IsDwarf != 1 || v73 == 5 )
|
899
|
1165 v75 = paperdoll_belt_texture[pBodyComplection][v73];
|
898
|
1166 else
|
899
|
1167 v75 = paperdoll_belt_texture[pBodyComplection - 2][v73];
|
898
|
1168 if ( !(item_Belt->uAttributes & 0xF0) )
|
|
1169 {
|
|
1170 v79 = v75 + 1;
|
948
|
1171 v80 = (char *)pIcons_LOD->GetTexture(v75);
|
898
|
1172 if ( item_Belt->uAttributes & 2 )
|
948
|
1173 pRenderer->DrawTransparentRedShade(pX_Belt, pY_Belt, (Texture *)v80);
|
898
|
1174 else
|
|
1175 {
|
|
1176 if ( item_Belt->uAttributes & 1 )
|
948
|
1177 pRenderer->DrawTextureTransparent(pX_Belt, pY_Belt, (Texture *)v80);
|
898
|
1178 else
|
948
|
1179 pRenderer->DrawTransparentGreenShade(pX_Belt, pY_Belt, (Texture *)v80);
|
898
|
1180 }
|
|
1181 if ( !bRingsShownInCharScreen )
|
948
|
1182 pRenderer->DrawMaskToZBuffer(pX_Belt, pY_Belt, (Texture *)v80, pBeltNum);
|
898
|
1183 }
|
|
1184 else
|
|
1185 {
|
|
1186 if ( (item_Belt->uAttributes & 0xF0) == 16 )
|
|
1187 v172 = "sptext01";
|
|
1188 if ( (item_Belt->uAttributes & 0xF0) == 32 )
|
|
1189 v172 = "sp28a";
|
|
1190 if ( (item_Belt->uAttributes & 0xF0) == 64 )
|
|
1191 v172 = "sp30a";
|
|
1192 if ( (item_Belt->uAttributes & 0xF0) == 128 )
|
|
1193 v172 = "sp91a";
|
948
|
1194 v77 = pIcons_LOD->LoadTexturePtr(v172, TEXTURE_16BIT_PALETTE);
|
984
|
1195 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1196 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1197 {
|
984
|
1198 _50C9A8_item_enchantment_timer = 0;
|
898
|
1199 item_Belt->uAttributes &= 0xFu;
|
|
1200 ptr_50C9A4 = 0;
|
706
|
1201 }
|
898
|
1202 v78 = (double)GetTickCount() * 0.1;
|
948
|
1203 pRenderer->_4A63E6(pX_Belt, pY_Belt, pIcons_LOD->GetTexture(v75), v77, (signed __int64)v78, 0, 255);
|
898
|
1204 }
|
|
1205 }
|
|
1206 }
|
|
1207 pMainHandNum2 = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
1208 if ( pMainHandNum2 )
|
|
1209 {
|
|
1210 v83 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum2 - 1];
|
|
1211 if ( pItemsTable->pItems[v83].uEquipType == 1
|
|
1212 || pItemsTable->pItems[v83].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield )
|
|
1213 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
|
|
1214 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1],
|
948
|
1215 pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
|
898
|
1216 }
|
|
1217 pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;//äàëåå âîðîòíèê ïëàùà
|
|
1218 if ( pCloakCollarNum )
|
|
1219 {
|
|
1220 item_CloakCollar = &pPlayers[uPlayerID]->pInventoryItems[pCloakCollarNum - 1];
|
|
1221 switch ( item_CloakCollar->uItemID )
|
|
1222 {
|
|
1223 case 525:
|
|
1224 v114 = 5;
|
|
1225 break;
|
|
1226 case 530:
|
|
1227 v114 = 6;
|
|
1228 break;
|
|
1229 case 547:
|
|
1230 v114 = 7;
|
|
1231 break;
|
|
1232 case 548:
|
|
1233 v114 = 8;
|
|
1234 break;
|
|
1235 case 550:
|
|
1236 v114 = 9;
|
|
1237 break;
|
|
1238 default:
|
|
1239 v114 = item_CloakCollar->uItemID - 105;
|
|
1240 }
|
|
1241 if ( v114 >= 0 && v114 < 10 )
|
|
1242 {
|
899
|
1243 v116 = paperdoll_cloak_collar_texture[pBodyComplection][v114];
|
|
1244 pX_CloakCollar = pPaperdoll_BodyX + paperdoll_CloakCollar[pBodyComplection][v114][0];
|
|
1245 pY_CloakCollar = pPaperdoll_BodyY + paperdoll_CloakCollar[pBodyComplection][v114][1];
|
898
|
1246 if ( v116 != pIcons_LOD->FindTextureByName("pending") )
|
|
1247 {
|
|
1248 if ( !(item_CloakCollar->uAttributes & 0xF0) )
|
706
|
1249 {
|
898
|
1250 v119 = v116 + 1;
|
948
|
1251 v120 = (char *)pIcons_LOD->GetTexture(v116);
|
898
|
1252 if ( item_CloakCollar->uAttributes & 2 )
|
948
|
1253 pRenderer->DrawTransparentRedShade(pX_CloakCollar, pY_CloakCollar, (Texture *)v120);
|
898
|
1254 else
|
948
|
1255 pRenderer->DrawTextureTransparent(pX_CloakCollar, pY_CloakCollar, (Texture *)v120);
|
898
|
1256 if ( !bRingsShownInCharScreen )
|
948
|
1257 pRenderer->DrawMaskToZBuffer(pX_CloakCollar, pY_CloakCollar, (Texture *)v120, pCloakCollarNum);
|
898
|
1258 }
|
706
|
1259 else
|
898
|
1260 {
|
|
1261 if ( (item_CloakCollar->uAttributes & 0xF0) == 16 )
|
|
1262 v179 = "sptext01";
|
|
1263 if ( (item_CloakCollar->uAttributes & 0xF0) == 32 )
|
|
1264 v179 = "sp28a";
|
|
1265 if ( (item_CloakCollar->uAttributes & 0xF0) == 64 )
|
|
1266 v179 = "sp30a";
|
|
1267 if ( (item_CloakCollar->uAttributes & 0xF0) == 128 )
|
|
1268 v179 = "sp91a";
|
948
|
1269 a2i = pIcons_LOD->LoadTexturePtr(v179, TEXTURE_16BIT_PALETTE);
|
984
|
1270 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1271 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1272 {
|
984
|
1273 _50C9A8_item_enchantment_timer = 0;
|
898
|
1274 item_CloakCollar->uAttributes &= 0xFu;
|
|
1275 ptr_50C9A4 = 0;
|
|
1276 }
|
|
1277 v118 = (double)GetTickCount() * 0.1;
|
948
|
1278 pRenderer->_4A63E6(pX_CloakCollar, pY_CloakCollar, pIcons_LOD->GetTexture(v116), a2i, (signed __int64)v118, 0, 255);
|
898
|
1279 }
|
|
1280 }
|
|
1281 }
|
|
1282 }
|
1014
|
1283 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 )
|
898
|
1284 {
|
1014
|
1285 v122 = papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace];
|
898
|
1286 if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
|
1014
|
1287 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 24],
|
|
1288 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 23],
|
948
|
1289 pIcons_LOD->GetTexture(v122));
|
898
|
1290 }
|
|
1291 pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;//äàëåå øëåì
|
|
1292 if ( pHelmNum )
|
|
1293 {
|
|
1294 item_Helm = &pPlayers[uPlayerID]->pInventoryItems[pHelmNum-1];
|
|
1295 switch ( item_Helm->uItemID )
|
|
1296 {
|
|
1297 case 521:
|
|
1298 v125 = 11;
|
|
1299 break;
|
|
1300 case 522:
|
|
1301 v125 = 12;
|
|
1302 break;
|
|
1303 case 523:
|
|
1304 v125 = 13;
|
|
1305 break;
|
|
1306 case 532:
|
|
1307 v125 = 14;
|
|
1308 break;
|
|
1309 case 544:
|
|
1310 v125 = 15;
|
|
1311 break;
|
|
1312 default:
|
|
1313 v125 = item_Helm->uItemID - 89;
|
|
1314 }
|
|
1315 if ( v125 >= 0 && v125 < 16 )
|
|
1316 {
|
899
|
1317 pX_Helm = pPaperdoll_BodyX + paperdoll_Helm[pBodyComplection][v125][0];
|
|
1318 pY_Helm = pPaperdoll_BodyY + paperdoll_Helm[pBodyComplection][v125][1];
|
898
|
1319 if ( IsDwarf != 1 || item_Helm->uItemID != 92 )
|
991
|
1320 v127 = paperdoll_helm_texture[player->GetSexByVoice()][v125];
|
898
|
1321 else
|
|
1322 v127 = papredoll_dbrds[11];
|
|
1323 if ( item_Helm->uAttributes & 0xF0 )
|
|
1324 {
|
|
1325 if ( (item_Helm->uAttributes & 0xF0) == 16 )
|
|
1326 v180 = "sptext01";
|
|
1327 if ( (item_Helm->uAttributes & 0xF0) == 32 )
|
|
1328 v180 = "sp28a";
|
|
1329 if ( (item_Helm->uAttributes & 0xF0) == 64 )
|
|
1330 v180 = "sp30a";
|
|
1331 if ( (item_Helm->uAttributes & 0xF0) == 128 )
|
|
1332 v180 = "sp91a";
|
948
|
1333 v129 = pIcons_LOD->LoadTexturePtr(v180, TEXTURE_16BIT_PALETTE);
|
984
|
1334 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1335 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1336 {
|
984
|
1337 _50C9A8_item_enchantment_timer = 0;
|
898
|
1338 item_Helm->uAttributes &= 0xFu;
|
|
1339 ptr_50C9A4 = 0;
|
|
1340 }
|
|
1341 v130 = (double)GetTickCount() * 0.1;
|
948
|
1342 pRenderer->_4A63E6(pX_Helm, pY_Helm, pIcons_LOD->GetTexture(v127), v129, (signed __int64)v130, 0, 255);
|
898
|
1343 }
|
|
1344 else
|
|
1345 {
|
|
1346 v131 = v127 + 1;
|
948
|
1347 v132 = (char *)pIcons_LOD->GetTexture(v127);
|
898
|
1348 if ( item_Helm->uAttributes & 2 )
|
948
|
1349 pRenderer->DrawTransparentRedShade(pX_Helm, pY_Helm, (Texture *)v132);
|
898
|
1350 else
|
|
1351 {
|
|
1352 if ( item_Helm->uAttributes & 1 )
|
948
|
1353 pRenderer->DrawTextureTransparent(pX_Helm, pY_Helm, (Texture *)v132);
|
706
|
1354 else
|
948
|
1355 pRenderer->DrawTransparentGreenShade(pX_Helm, pY_Helm, (Texture *)v132);
|
898
|
1356 }
|
|
1357 }
|
706
|
1358 if ( !bRingsShownInCharScreen )
|
948
|
1359 pRenderer->DrawMaskToZBuffer(pX_Helm, pY_Helm, (Texture *)v132, pHelmNum);
|
898
|
1360 }
|
|
1361 }
|
|
1362 pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand
|
|
1363 if ( pMainHandNum3 )
|
|
1364 {
|
|
1365 item_MainHand3 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum3 - 1];
|
|
1366 pX_MainHand3 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipX;
|
|
1367 pY_MainHand3 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipY;
|
|
1368 if ( item_MainHand3->uItemID == 64 )
|
|
1369 v181 = "item64v1";
|
|
1370 else
|
|
1371 v181 = pItemsTable->pItems[item_MainHand3->uItemID].pIconName;
|
|
1372 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE);
|
|
1373 if ( !(item_MainHand3->uAttributes & 0xF0) )
|
|
1374 {
|
|
1375 v142 = v138 + 1;
|
948
|
1376 v143 = (char *)pIcons_LOD->GetTexture(v138);
|
898
|
1377 if ( item_MainHand3->uAttributes & 2 )
|
948
|
1378 pRenderer->DrawTransparentRedShade(pX_MainHand3, pY_MainHand3, (Texture *)v143);
|
898
|
1379 else
|
|
1380 {
|
|
1381 if ( item_MainHand3->uAttributes & 1 )
|
948
|
1382 pRenderer->DrawTextureTransparent(pX_MainHand3, pY_MainHand3, (Texture *)v143);
|
898
|
1383 else
|
948
|
1384 pRenderer->DrawTransparentGreenShade(pX_MainHand3, pY_MainHand3, (Texture *)v143);
|
898
|
1385 }
|
|
1386 }
|
|
1387 else
|
|
1388 {
|
|
1389 if ( (item_MainHand3->uAttributes & 0xF0) == 16 )
|
|
1390 v182 = "sptext01";
|
|
1391 if ( (item_MainHand3->uAttributes & 0xF0) == 32 )
|
|
1392 v182 = "sp28a";
|
|
1393 if ( (item_MainHand3->uAttributes & 0xF0) == 64 )
|
|
1394 v182 = "sp30a";
|
|
1395 if ( (item_MainHand3->uAttributes & 0xF0) == 128 )
|
|
1396 v182 = "sp91a";
|
948
|
1397 v140 = pIcons_LOD->LoadTexturePtr(v182, TEXTURE_16BIT_PALETTE);
|
984
|
1398 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1399 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1400 {
|
984
|
1401 _50C9A8_item_enchantment_timer = 0;
|
898
|
1402 item_MainHand3->uAttributes &= 0xFu;
|
|
1403 ptr_50C9A4 = 0;
|
706
|
1404 }
|
898
|
1405 v141 = (double)GetTickCount() * 0.1;
|
948
|
1406 pRenderer->_4A63E6(pX_MainHand3, pY_MainHand3, pIcons_LOD->GetTexture(v138), v140, (signed __int64)v141, 0, 255);
|
898
|
1407 }
|
|
1408 if ( !bRingsShownInCharScreen )
|
948
|
1409 pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)v143, pMainHandNum3);
|
898
|
1410 }
|
|
1411 pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// äàëåå ùèò
|
|
1412 if ( pShieldNum )
|
|
1413 {
|
|
1414 item_Shield = &pPlayers[uPlayerID]->pInventoryItems[pShieldNum - 1];
|
|
1415 v149 = pItemsTable->pItems[item_Shield->uItemID].uSkillType;
|
|
1416 if ( v149 == 2 || v149 == 1 )
|
|
1417 {
|
|
1418 v151 = item_Shield->uItemID - 400;
|
|
1419 pX_Shield = 596;
|
|
1420 v245 = 1;
|
|
1421 switch ( item_Shield->uItemID )
|
|
1422 {
|
|
1423 case 400:
|
|
1424 pY_Shield = 86;
|
|
1425 break;
|
|
1426 case 403:
|
|
1427 pY_Shield = 28;
|
|
1428 break;
|
|
1429 case 415:
|
|
1430 pX_Shield = 595;
|
|
1431 pY_Shield = 33;
|
|
1432 break;
|
|
1433 default:
|
|
1434 pX_Shield = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item_Shield->uItemID].uEquipX;
|
|
1435 pY_Shield = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item_Shield->uItemID].uEquipY;
|
|
1436 break;
|
|
1437 }
|
|
1438 }
|
|
1439 else
|
|
1440 {
|
|
1441 v245 = 0;
|
|
1442 pX_Shield = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item_Shield->uItemID].uEquipX;
|
|
1443 pY_Shield = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item_Shield->uItemID].uEquipY;
|
|
1444 }
|
|
1445 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[item_Shield->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
1446 if ( !(item_Shield->uAttributes & 0xF0) )
|
|
1447 {
|
|
1448 if ( item_Shield->uAttributes & 2 )
|
948
|
1449 pRenderer->DrawTransparentRedShade(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153));
|
898
|
1450 else
|
|
1451 {
|
948
|
1452 v160 = (char *)pIcons_LOD->GetTexture(v153);
|
898
|
1453 if ( !(item_Shield->uAttributes & 1) )
|
948
|
1454 pRenderer->DrawTransparentGreenShade(pX_Shield, pY_Shield, (Texture *)v160);
|
898
|
1455 else
|
948
|
1456 pRenderer->DrawTextureTransparent(pX_Shield, pY_Shield, (Texture *)v160);
|
898
|
1457 }
|
|
1458 }
|
|
1459 else
|
|
1460 {
|
|
1461 if ( (item_Shield->uAttributes & 0xF0) == 16 )
|
|
1462 v183 = "sptext01";
|
|
1463 if ( (item_Shield->uAttributes & 0xF0) == 32 )
|
|
1464 v183 = "sp28a";
|
|
1465 if ( (item_Shield->uAttributes & 0xF0) == 64 )
|
|
1466 v183 = "sp30a";
|
|
1467 if ( (item_Shield->uAttributes & 0xF0) == 128 )
|
|
1468 v183 = "sp91a";
|
948
|
1469 v157 = pIcons_LOD->LoadTexturePtr(v183, TEXTURE_16BIT_PALETTE);
|
984
|
1470 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1471 if ( _50C9A8_item_enchantment_timer <= 0 )
|
898
|
1472 {
|
984
|
1473 _50C9A8_item_enchantment_timer = 0;
|
898
|
1474 item_Shield->uAttributes &= 0xFu;
|
|
1475 ptr_50C9A4 = 0;
|
|
1476 }
|
|
1477 v158 = (double)GetTickCount() * 0.1;
|
948
|
1478 pRenderer->_4A63E6(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), v157, (signed __int64)v158, 0, 255);
|
898
|
1479 if ( v245 )
|
|
1480 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0],
|
948
|
1481 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1]));
|
898
|
1482 }
|
|
1483 if ( !bRingsShownInCharScreen )
|
948
|
1484 pRenderer->DrawMaskToZBuffer(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), pShieldNum);
|
898
|
1485 }
|
|
1486 }
|
948
|
1487 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
|
898
|
1488 pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand;
|
|
1489 if ( pMainHandNum5 )
|
|
1490 {
|
|
1491 item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum5 - 1];
|
|
1492 if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield )
|
948
|
1493 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1]));
|
898
|
1494 }
|
|
1495 if ( !bRingsShownInCharScreen )//ðèñîâàíèå ëóïû
|
948
|
1496 pRenderer->DrawTextureTransparent(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B));
|
|
1497 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//îáðàìëåíèå
|
898
|
1498 }
|
706
|
1499
|
991
|
1500
|
|
1501
|
|
1502
|
|
1503
|
|
1504
|
|
1505
|
|
1506 //----- (0041A2D1) --------------------------------------------------------
|
|
1507 void CharacterUI_InventoryTab_Draw(Player *player, bool a2)
|
910
|
1508 {
|
991
|
1509 Texture *v7; // esi@6
|
|
1510 signed int v11; // edx@6
|
|
1511 int v13; // eax@13
|
|
1512 signed int v14; // edx@13
|
|
1513 int v15; // eax@13
|
|
1514 unsigned int v17; // edi@15
|
|
1515 Texture *pTexture; // ebx@24
|
|
1516 unsigned int uCellX; // [sp+30h] [bp-8h]@5
|
|
1517 unsigned int uCellY; // [sp+34h] [bp-4h]@5
|
|
1518
|
|
1519 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_CharacterUI_InventoryBackground));
|
|
1520 if (a2)
|
|
1521 pRenderer->DrawTextureIndexed(8, 305, pIcons_LOD->LoadTexturePtr("fr_strip", TEXTURE_16BIT_PALETTE));
|
|
1522
|
|
1523 int i = 0;
|
|
1524 for (uint i = 0; i < 126; ++i)
|
|
1525 {
|
|
1526 int v26 = (int)(player->pInventoryIndices + i);
|
|
1527
|
|
1528 if (player->pInventoryIndices[i] <= 0)
|
|
1529 continue;
|
706
|
1530
|
991
|
1531 int item_idx = player->pInventoryIndices[i];
|
|
1532 auto item = &player->pInventoryItems[item_idx - 1];
|
|
1533 if (!item->uItemID)
|
|
1534 continue;
|
|
1535
|
|
1536 uCellY = 32 * (i / 14) + 17;
|
|
1537 uCellX = 32 * (i % 14) + 14;
|
|
1538
|
|
1539 uint item_texture_id = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
1540 v7 = pIcons_LOD->GetTexture(item_texture_id);
|
|
1541
|
|
1542 v11 = v7->uTextureWidth;
|
|
1543 if (v11 < 14)
|
|
1544 v11 = 14;
|
|
1545
|
|
1546 if ( (v11 - 14) / 32 == 0 && v7->uTextureWidth < 32)
|
|
1547 uCellX += (32 - v7->uTextureWidth) / 2;
|
|
1548 v13 = v11 - 14;
|
|
1549 LOBYTE(v13) = v13 & 0xE0;
|
|
1550 v15 = v13 + 32;
|
|
1551 v14 = v7->uTextureHeight;
|
|
1552 if (v14 < 14 )
|
|
1553 v14 = 14;
|
|
1554 v17 = uCellX + ((v15 - v7->uTextureWidth) >> 1) + pSRZBufferLineOffsets[uCellY + ((((v14 - 14) & 0xFFFFFFE0) - v7->uTextureHeight + 32) >> 1)];
|
|
1555
|
|
1556 if (item->uAttributes & 0xF0)
|
910
|
1557 {
|
991
|
1558 switch (item->uAttributes & 0xF0)
|
910
|
1559 {
|
991
|
1560 case ITEM_AURA_EFFECT_RED: pTexture = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break;
|
|
1561 case ITEM_AURA_EFFECT_BLUE: pTexture = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break;
|
|
1562 case ITEM_AURA_EFFECT_GREEN: pTexture = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break;
|
|
1563 case ITEM_AURA_EFFECT_PURPLE: pTexture = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break;
|
910
|
1564 }
|
948
|
1565
|
984
|
1566 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
991
|
1567 if (_50C9A8_item_enchantment_timer <= 0)
|
910
|
1568 {
|
984
|
1569 _50C9A8_item_enchantment_timer = 0;
|
991
|
1570 LOBYTE(item->uAttributes) &= 0xF;
|
910
|
1571 ptr_50C9A4 = 0;
|
|
1572 }
|
991
|
1573
|
|
1574 pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, GetTickCount() * 0.1, 0, 255);
|
|
1575 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, item_idx);
|
910
|
1576 }
|
|
1577 else
|
|
1578 {
|
991
|
1579 if (item->Identified() || pCurrentScreen != SCREEN_HOUSE)
|
|
1580 {
|
|
1581 if (item->Broken())
|
|
1582 pRenderer->DrawTransparentRedShade(uCellX, uCellY, v7);
|
|
1583 else
|
|
1584 pRenderer->DrawTextureTransparent(uCellX, uCellY, v7);
|
|
1585 }
|
910
|
1586 else
|
991
|
1587 pRenderer->DrawTransparentGreenShade(uCellX, uCellY, v7);
|
948
|
1588
|
991
|
1589 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, item_idx);
|
|
1590 continue;
|
910
|
1591 }
|
|
1592 }
|
991
|
1593 }
|
|
1594
|
|
1595
|
|
1596
|
|
1597 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id)
|
|
1598 {
|
|
1599 auto item_texture = pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
|
|
1600
|
|
1601 if (item->uAttributes & 0xF0) // enchant animation
|
913
|
1602 {
|
991
|
1603 Texture *enchantment_texture = nullptr;
|
|
1604 switch (item->uAttributes & 0xF0)
|
|
1605 {
|
|
1606 case ITEM_AURA_EFFECT_RED: enchantment_texture = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break;
|
|
1607 case ITEM_AURA_EFFECT_BLUE: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break;
|
|
1608 case ITEM_AURA_EFFECT_GREEN: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break;
|
|
1609 case ITEM_AURA_EFFECT_PURPLE: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break;
|
|
1610 }
|
948
|
1611
|
991
|
1612 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1613 if (_50C9A8_item_enchantment_timer <= 0)
|
|
1614 {
|
|
1615 _50C9A8_item_enchantment_timer = 0;
|
|
1616 item->uAttributes &= 0xF;
|
|
1617 ptr_50C9A4 = 0;
|
|
1618 }
|
|
1619 pRenderer->_4A63E6(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255);
|
913
|
1620 }
|
|
1621 else
|
|
1622 {
|
991
|
1623 if (item->Broken())
|
|
1624 pRenderer->DrawTransparentRedShade(x, y, item_texture);
|
|
1625 else if (!item->Identified())
|
|
1626 pRenderer->DrawTransparentGreenShade(x, y, item_texture);
|
|
1627 else
|
|
1628 pRenderer->DrawTextureTransparent(x, y, item_texture);
|
|
1629
|
|
1630 pRenderer->ZBuffer_Fill_2(x, y, item_texture, id);
|
|
1631 }
|
|
1632 }
|
|
1633
|
|
1634
|
|
1635 //----- (0043E825) --------------------------------------------------------
|
|
1636 void CharacterUI_DrawPaperdollWithRingOverlay(Player *player)
|
|
1637 {
|
|
1638 CharacterUI_DrawPaperdoll(player);
|
|
1639
|
|
1640 pRenderer->DrawTextureTransparent(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND));
|
|
1641 pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));
|
|
1642 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX,
|
|
1643 pCharacterScreen_DetalizBtn->uY,
|
|
1644 pIcons_LOD->GetTexture(uTextureID_detaliz_close_button));
|
|
1645
|
|
1646 for (uint i = 0; i < 6; ++i)
|
|
1647 {
|
|
1648 if (!player->pEquipment.uRings[i])
|
|
1649 continue;
|
|
1650
|
|
1651 static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248};
|
|
1652 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA};
|
|
1653
|
|
1654 CharacterUI_DrawItem(pPaperdollRingsX[i],
|
|
1655 pPaperdollRingsY[i],
|
|
1656 &player->pInventoryItems[player->pEquipment.uRings[i] - 1],
|
|
1657 player->pEquipment.uRings[i]);
|
|
1658 }
|
|
1659
|
|
1660
|
|
1661 if (player->pEquipment.uAmulet)
|
|
1662 {
|
|
1663 CharacterUI_DrawItem(493, 91,
|
|
1664 &player->pInventoryItems[player->pEquipment.uAmulet - 1],
|
|
1665 player->pEquipment.uAmulet);
|
|
1666 }
|
|
1667
|
|
1668 if (player->pEquipment.uGlove)
|
|
1669 {
|
|
1670 CharacterUI_DrawItem(586, 88,
|
|
1671 &player->pInventoryItems[player->pEquipment.uGlove - 1],
|
|
1672 player->pEquipment.uGlove);
|
913
|
1673 }
|
|
1674 }
|
706
|
1675
|
|
1676 //----- (0043BCA7) --------------------------------------------------------
|
|
1677 void CharacterUI_LoadPaperdollTextures()
|
|
1678 {
|
|
1679 int v0; // edi@7
|
|
1680 enum CHARACTER_RACE pRace; // ebx@7
|
|
1681 signed int pSex; // eax@7
|
|
1682 int v3; // ebx@10
|
|
1683 Player *pPlayer; // edi@12
|
|
1684 unsigned __int8 v5; // cl@12
|
|
1685 int v6; // edi@16
|
|
1686 unsigned int v7; // eax@16
|
|
1687 Player *pPlayer2; // ebx@16
|
|
1688 char *v9; // ebx@16
|
|
1689 char v10; // al@16
|
|
1690 signed int v11; // edi@21
|
|
1691 unsigned int v22; // eax@76
|
|
1692 int v23; // ecx@76
|
|
1693 unsigned int v24; // eax@78
|
|
1694 int v25; // ecx@78
|
|
1695 int v26; // ebx@79
|
|
1696 unsigned int v27; // eax@80
|
|
1697 int v28; // ecx@80
|
|
1698 int v30; // [sp+10h] [bp-28h]@5
|
|
1699 signed int v32; // [sp+10h] [bp-28h]@75
|
|
1700 signed int v33; // [sp+10h] [bp-28h]@77
|
|
1701 int v34; // [sp+10h] [bp-28h]@79
|
899
|
1702 int pItemTXTNum; // [sp+14h] [bp-24h]@75
|
706
|
1703 int v37; // [sp+14h] [bp-24h]@77
|
|
1704 signed int v38; // [sp+14h] [bp-24h]@79
|
|
1705 int v42; // [sp+20h] [bp-18h]@6
|
|
1706 int v43; // [sp+20h] [bp-18h]@73
|
|
1707 char pContainer[128]; // [sp+24h] [bp-14h]@12
|
|
1708
|
|
1709 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE);
|
|
1710 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 )
|
|
1711 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE);
|
910
|
1712 uTextureID_right_panel_loop = uTextureID_right_panel;
|
706
|
1713 v30 = 0;
|
|
1714 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE);
|
910
|
1715 uTextureID_detaliz_close_button = uExitCancelTextureId;
|
706
|
1716 do
|
|
1717 {
|
|
1718 v42 = v30 + 1;
|
|
1719 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(v30 + 1) )
|
|
1720 {
|
|
1721 v0 = v30;
|
|
1722 pRace = pPlayers[v30 + 1]->GetRace();
|
|
1723 pSex = pPlayers[v30 + 1]->GetSexByVoice();
|
|
1724 if ( pRace && pRace != 1 && pRace != 2 )//race == 3
|
|
1725 v3 = (pSex != 0) + 3;
|
|
1726 else
|
|
1727 v3 = (pSex != 0) + 1;
|
|
1728 wsprintfA(pContainer, "pc23v%dBod", v3);
|
|
1729 papredoll_dbods[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Body texture
|
|
1730 wsprintfA(pContainer, "pc23v%dlad", v3);
|
|
1731 papredoll_dlads[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand
|
|
1732 wsprintfA(pContainer, "pc23v%dlau", v3);
|
|
1733 papredoll_dlaus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand2
|
|
1734 wsprintfA(pContainer, "pc23v%drh", v3);
|
|
1735 papredoll_drhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Right Hand
|
|
1736 wsprintfA(pContainer, "pc23v%dlh", v3);
|
|
1737 papredoll_dlhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Fist
|
|
1738 wsprintfA(pContainer, "pc23v%dlhu", v3);
|
|
1739 papredoll_dlhus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); // Left Fist 2
|
|
1740 pPlayer = pPlayers[v0 + 1];
|
1014
|
1741 v5 = pPlayer->uCurrentFace;
|
706
|
1742 if ( v5 == 12 || v5 == 13 )
|
|
1743 papredoll_dbrds[(char)v5] = 0;
|
1014
|
1744 papredoll_flying_feet[pPlayer->uCurrentFace] = 0;
|
706
|
1745 IsPlayerWearingWatersuit[v30 + 1] = 1;
|
|
1746 }
|
|
1747 else
|
|
1748 {
|
|
1749 v6 = v30;
|
1014
|
1750 papredoll_dbods[v30] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1751 papredoll_dlads[v30] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1752 papredoll_dlaus[v30] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1753 papredoll_drhs[v30] = pIcons_LOD->LoadTexture(drh_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1754 papredoll_dlhs[v30] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1755 v7 = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[v30 + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
706
|
1756 pPlayer2 = pPlayers[v30 + 1];
|
|
1757 papredoll_dlhus[v30] = v7;
|
1014
|
1758 v9 = (char *)&pPlayer2->uCurrentFace;
|
706
|
1759 v10 = *v9;
|
|
1760 if ( *v9 == 12 || v10 == 13 )
|
|
1761 {
|
|
1762 wsprintfA(pContainer, "pc%02dbrd", v10 + 1);
|
1014
|
1763 v9 = (char *)&pPlayers[v6 + 1]->uCurrentFace;
|
706
|
1764 papredoll_dbrds[*v9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1765 }
|
|
1766 wsprintfA(pContainer, "item281pc%02d", *v9 + 1);
|
1014
|
1767 papredoll_flying_feet[pPlayers[v6 + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
1768 IsPlayerWearingWatersuit[v30 + 1] = 0;
|
|
1769 }
|
|
1770 ++v30;
|
|
1771 }
|
|
1772 while ( v42 < 4 );
|
|
1773 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE);
|
|
1774 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE);
|
|
1775 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE);
|
|
1776 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE);
|
|
1777 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE);
|
|
1778 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE);
|
|
1779 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE);
|
|
1780 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE);
|
|
1781 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE);
|
899
|
1782 for ( v11 = 0; v11 < 54; ++v11 )// test equipment
|
706
|
1783 {
|
899
|
1784 party_has_equipment[v11] = 0;
|
706
|
1785 if ( pParty->pPickedItem.uItemID != v11 + 66 )
|
|
1786 {
|
899
|
1787 for ( uint i = 0; i < 4; ++i)
|
706
|
1788 {
|
899
|
1789 if ( Player_has_item(v11 + 66, &pParty->pPlayers[i], 0) )
|
|
1790 party_has_equipment[v11] = 1;
|
706
|
1791 }
|
|
1792 }
|
|
1793 }
|
|
1794 memset(byte_5111F6, 0, 16);
|
|
1795 for (uint i = 0; i < 4; ++i)
|
|
1796 {
|
|
1797 auto player = pParty->pPlayers + i;
|
|
1798
|
899
|
1799 if (Player_has_item(ITEM_ARTICACT_GOVERNONS_ARMOR, player, 1)) byte_5111F6[0] = 1;
|
|
1800 if (Player_has_item(ITEM_ARTIFACT_YORUBA, player, 1)) byte_5111F6[1] = 1;
|
|
1801 if (Player_has_item(ITEM_RELIC_HARECS_LEATHER, player, 1)) byte_5111F6[2] = 1;
|
|
1802 if (Player_has_item(ITEM_ARTIFACT_LEAGUE_BOOTS, player, 1)) byte_5111F6[3] = 1;
|
|
1803 if (Player_has_item(ITEM_RELIC_TALEDONS_HELM, player, 1)) byte_5111F6[4] = 1;
|
|
1804 if (Player_has_item(ITEM_RELIC_SCHOLARS_CAP, player, 1)) byte_5111F6[5] = 1;
|
|
1805 if (Player_has_item(ITEM_RELIC_PHYNAXIAN_CROWN, player, 1)) byte_5111F6[6] = 1;
|
|
1806 if (Player_has_item(ITEM_ARTIFACT_MINDS_EYE, player, 1)) byte_5111F6[7] = 1;
|
|
1807 if (Player_has_item(ITEM_RARE_SHADOWS_MASK, player, 1)) byte_5111F6[8] = 1;
|
|
1808 if (Player_has_item(ITEM_RILIC_TITANS_BELT, player, 1)) byte_5111F6[9] = 1;
|
|
1809 if (Player_has_item(ITEM_ARTIFACT_HEROS_BELT, player, 1)) byte_5111F6[10] = 1;
|
|
1810 if (Player_has_item(ITEM_RELIC_TWILIGHT, player, 1)) byte_5111F6[11] = 1;
|
|
1811 if (Player_has_item(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, player, 1)) byte_5111F6[12] = 1;
|
|
1812 if (Player_has_item(ITEM_RARE_SUN_CLOAK, player, 1)) byte_5111F6[13] = 1;
|
|
1813 if (Player_has_item(ITEM_RARE_MOON_CLOAK, player, 1)) byte_5111F6[14] = 1;
|
|
1814 if (Player_has_item(ITEM_RARE_VAMPIRES_CAPE, player, 1)) byte_5111F6[15] = 1;
|
|
1815 if (Player_has_item(ITEM_ELVEN_CHAINMAIL, player, 1)) byte_5111F6[16] = 1;
|
706
|
1816 }
|
938
|
1817
|
|
1818
|
706
|
1819 for (uint i = 0; i < 2; ++i)
|
|
1820 {
|
899
|
1821 for ( uint j = 0; j < 5; ++j )//Belt
|
706
|
1822 {
|
899
|
1823 GetItemTextureFilename(pContainer, j + 100, i + 1, 0);
|
|
1824 paperdoll_belt_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
1825 }
|
899
|
1826 GetItemTextureFilename(pContainer, 535, i + 1, 0);
|
|
1827 paperdoll_belt_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1828 for ( uint j = 0; j < 11; ++j )//Helm
|
706
|
1829 {
|
899
|
1830 GetItemTextureFilename(pContainer, j + 89, i + 1, 0);
|
|
1831 paperdoll_helm_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
1832 }
|
899
|
1833 GetItemTextureFilename(pContainer, 521, i + 1, 0);
|
|
1834 paperdoll_helm_texture[i][11] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1835 GetItemTextureFilename(pContainer, 522, i + 1, 0);
|
|
1836 paperdoll_helm_texture[i][12] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1837 GetItemTextureFilename(pContainer, 523, i + 1, 0);
|
|
1838 paperdoll_helm_texture[i][13] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1839 GetItemTextureFilename(pContainer, 532, i + 1, 0);
|
|
1840 paperdoll_helm_texture[i][14] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1841 GetItemTextureFilename(pContainer, 544, i + 1, 0);
|
|
1842 paperdoll_helm_texture[i][15] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
1843 if ( _43ED6F_check_party_races(true) )
|
|
1844 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE);
|
|
1845 }
|
|
1846 v43 = 0;
|
|
1847 for (uint i = 0; i < 4; ++i)
|
|
1848 {
|
|
1849 if ( sub_43EDB9_get_some_race_sex_relation_2(i) )
|
|
1850 {
|
899
|
1851 GetItemTextureFilename(pContainer, 524, i + 1, 0);
|
938
|
1852 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt
|
899
|
1853 pItemTXTNum = 66;
|
|
1854 for ( v32 = 0; v32 < 13; ++v32 )//simple armor
|
706
|
1855 {
|
899
|
1856 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 0);
|
|
1857 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1858 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 1);
|
|
1859 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1860 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 2);
|
|
1861 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1862 pItemTXTNum++;
|
706
|
1863 }
|
899
|
1864 GetItemTextureFilename(pContainer, 516, i + 1, 0);//artefacts
|
|
1865 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1866 GetItemTextureFilename(pContainer, 516, i + 1, 1);
|
|
1867 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1868 GetItemTextureFilename(pContainer, 516, i + 1, 2);
|
|
1869 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1870 GetItemTextureFilename(pContainer, 505, i + 1, 0);
|
|
1871 paperdoll_armor_texture[i][v32 + 1][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1872 GetItemTextureFilename(pContainer, 505, i + 1, 1);
|
|
1873 paperdoll_armor_texture[i][v32 + 1][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1874 GetItemTextureFilename(pContainer, 505, i + 1, 2);
|
|
1875 paperdoll_armor_texture[i][v32 + 1][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1876 GetItemTextureFilename(pContainer, 504, i + 1, 0);
|
|
1877 paperdoll_armor_texture[i][v32 + 2][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1878 GetItemTextureFilename(pContainer, 504, i + 1, 1);
|
|
1879 paperdoll_armor_texture[i][v32 + 2][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1880 GetItemTextureFilename(pContainer, 504, i + 1, 2);
|
|
1881 paperdoll_armor_texture[i][v32 + 2][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1882 GetItemTextureFilename(pContainer, 533, i + 1, 0);
|
|
1883 paperdoll_armor_texture[i][v32 + 3][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1884 GetItemTextureFilename(pContainer, 533, i + 1, 1);
|
|
1885 paperdoll_armor_texture[i][v32 + 3][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1886 GetItemTextureFilename(pContainer, 533, i + 1, 2);
|
|
1887 paperdoll_armor_texture[i][v32 + 3][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1888 for ( v33 = 0; v33 < 5; ++v33 )//boots
|
706
|
1889 {
|
899
|
1890 GetItemTextureFilename(pContainer, v33 + 115, i + 1, 0);
|
|
1891 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1892 }
|
|
1893 GetItemTextureFilename(pContainer, 512, i + 1, 0);
|
|
1894 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1895 for ( v38 = 0; v38 < 5; ++v38 )//Cloak
|
|
1896 {
|
|
1897 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 0);
|
|
1898 paperdoll_cloak_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1899 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 1);
|
|
1900 paperdoll_cloak_collar_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
1901 }
|
899
|
1902 GetItemTextureFilename(pContainer, 525, i + 1, 0);
|
|
1903 paperdoll_cloak_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1904 GetItemTextureFilename(pContainer, 530, i + 1, 0);
|
|
1905 paperdoll_cloak_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1906 GetItemTextureFilename(pContainer, 547, i + 1, 0);
|
|
1907 paperdoll_cloak_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1908 GetItemTextureFilename(pContainer, 548, i + 1, 0);
|
|
1909 paperdoll_cloak_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1910 GetItemTextureFilename(pContainer, 550, i + 1, 0);
|
|
1911 paperdoll_cloak_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1912 GetItemTextureFilename(pContainer, 525, i + 1, 1);
|
|
1913 paperdoll_cloak_collar_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1914 GetItemTextureFilename(pContainer, 530, i + 1, 1);
|
|
1915 paperdoll_cloak_collar_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1916 GetItemTextureFilename(pContainer, 547, i + 1, 1);
|
|
1917 paperdoll_cloak_collar_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1918 GetItemTextureFilename(pContainer, 548, i + 1, 1);
|
|
1919 paperdoll_cloak_collar_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1920 GetItemTextureFilename(pContainer, 550, i + 1, 1);
|
|
1921 paperdoll_cloak_collar_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
706
|
1922 }
|
|
1923 else
|
|
1924 {
|
|
1925 v26 = v43;
|
|
1926 }
|
|
1927 v43 = v26 + 40;
|
|
1928 }
|
|
1929 }
|
|
1930
|
|
1931 //----- (00419401) --------------------------------------------------------
|
991
|
1932 void CharacterUI_SkillsTab_CreateButtons()
|
|
1933 {
|
706
|
1934 unsigned int v0; // ecx@3
|
|
1935 GUIButton *pButton; // eax@3
|
|
1936 GUIFont *v2; // eax@8
|
|
1937 unsigned int v3; // esi@8
|
|
1938 int v4; // eax@10
|
|
1939 unsigned int v5; // esi@14
|
|
1940 int v6; // eax@17
|
|
1941 unsigned int v7; // esi@19
|
|
1942 int v8; // eax@21
|
|
1943 unsigned int v9; // esi@25
|
|
1944 int v10; // eax@27
|
|
1945 int a2; // [sp+10h] [bp-14h]@1
|
|
1946 int v12; // [sp+14h] [bp-10h]@8
|
|
1947 int v13; // [sp+14h] [bp-10h]@19
|
|
1948 int *v14; // [sp+18h] [bp-Ch]@8
|
|
1949 int *v15; // [sp+18h] [bp-Ch]@14
|
|
1950 int *v16; // [sp+18h] [bp-Ch]@19
|
|
1951 int *v17; // [sp+18h] [bp-Ch]@25
|
|
1952 Player *v18; // [sp+1Ch] [bp-8h]@8
|
|
1953 int a5; // [sp+20h] [bp-4h]@8
|
|
1954
|
|
1955 a2 = 0;
|
|
1956 if ( dword_507CC0 )
|
991
|
1957 CharacterUI_ReleaseButtons();
|
706
|
1958 v0 = uActiveCharacter;
|
|
1959 dword_507CC0 = uActiveCharacter;
|
|
1960 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext )
|
832
|
1961 {
|
|
1962 if ( pButton->msg == UIMSG_InventoryLeftClick )
|
706
|
1963 {
|
|
1964 dword_50698C = pButton->uX;
|
|
1965 dword_506988 = pButton->uY;
|
|
1966 dword_506984 = pButton->uZ;
|
|
1967 dword_506980 = pButton->uW;
|
|
1968 pButton->uW = 0;
|
|
1969 pButton->uZ = 0;
|
|
1970 pButton->uY = 0;
|
|
1971 pButton->uX = 0;
|
|
1972 v0 = uActiveCharacter;
|
|
1973 }
|
|
1974 }
|
|
1975 v12 = 0;
|
|
1976 a5 = pGUIWindow_CurrentMenu->uNumControls;
|
|
1977 v18 = &pParty->pPlayers[v0-1];
|
|
1978 v2 = pFontLucida;
|
|
1979 v14 = pWeaponSkills;
|
|
1980 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
|
|
1981 do
|
|
1982 {
|
|
1983 if ( v18->pActiveSkills[*v14] & 0x3F )//crash
|
|
1984 {
|
|
1985 v4 = LOBYTE(v2->uFontHeight);
|
|
1986 v3 = v3 + v4 - 3;
|
|
1987 ++a2;
|
|
1988 ++v12;
|
832
|
1989 pGUIWindow_CurrentMenu->CreateButton(0x18u, v3, 0xCCu, v4 - 3, 3, *v14 | 0x8000, UIMSG_SkillUp, *v14, 0, "", 0, 0);
|
706
|
1990 v2 = pFontLucida;
|
|
1991 }
|
|
1992 ++v14;
|
|
1993 }
|
|
1994 while ( v14 <= &pWeaponSkills[8] );
|
|
1995 if ( !v12 )
|
|
1996 v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
|
|
1997 v15 = pMagicSkills;
|
|
1998 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
|
|
1999 do
|
|
2000 {
|
|
2001 if ( v18->pActiveSkills[*v15] & 0x3F && a2 < 15 )
|
|
2002 {
|
|
2003 v6 = LOBYTE(v2->uFontHeight);
|
|
2004 v5 = v5 + v6 - 3;
|
|
2005 ++a2;
|
832
|
2006 pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, UIMSG_SkillUp, *v15, 0, "", 0, 0);
|
706
|
2007 v2 = pFontLucida;
|
|
2008 }
|
|
2009 ++v15;
|
|
2010 }
|
|
2011 while ( v15 <= &pMagicSkills[8] );
|
|
2012 v13 = 0;
|
|
2013 v16 = pArmorSkills;
|
|
2014 v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
|
|
2015 do
|
|
2016 {
|
|
2017 if ( v18->pActiveSkills[*v16] & 0x3F )
|
|
2018 {
|
|
2019 v8 = LOBYTE(v2->uFontHeight);
|
|
2020 v7 = v7 + v8 - 3;
|
|
2021 ++a2;
|
|
2022 ++v13;
|
832
|
2023 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v7, 0xCCu, v8 - 3, 3, *v16 | 0x8000, UIMSG_SkillUp, *v16, 0, "", 0, 0);
|
706
|
2024 v2 = pFontLucida;
|
|
2025 }
|
|
2026 ++v16;
|
|
2027 }
|
|
2028 while ( v16 <= &pArmorSkills[4] );
|
|
2029 if ( !v13 )
|
|
2030 v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
|
|
2031 v17 = pMiscSkills;
|
|
2032 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
|
|
2033 do
|
|
2034 {
|
|
2035 if ( v18->pActiveSkills[*v17] & 0x3F )
|
|
2036 {
|
|
2037 v10 = LOBYTE(v2->uFontHeight);
|
|
2038 v9 = v9 + v10 - 3;
|
|
2039 ++a2;
|
832
|
2040 pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, UIMSG_SkillUp, *v17, 0, "", 0, 0);
|
706
|
2041 v2 = pFontLucida;
|
|
2042 }
|
|
2043 ++v17;
|
|
2044 }
|
|
2045 while ( v17 <= &pMiscSkills[11] );
|
|
2046 if ( a2 )
|
972
|
2047 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(a2, 1, 0, a5);
|
706
|
2048 }
|
|
2049
|
994
|
2050
|
|
2051
|
949
|
2052 //----- (00418511) --------------------------------------------------------
|
1006
|
2053 void CharacterUI_StatsTab_Draw( Player *player )
|
|
2054 {
|
991
|
2055 //Player *pPlayer; // edi@1
|
|
2056 //unsigned int v4; // eax@2
|
706
|
2057 int v7; // ebp@4
|
|
2058 int v8; // eax@4
|
|
2059 unsigned int v9; // eax@4
|
|
2060 int v10; // ST34_4@4
|
|
2061 int v13; // ebp@4
|
|
2062 int v14; // eax@4
|
|
2063 unsigned int v15; // eax@4
|
|
2064 int v19; // ebp@4
|
|
2065 int v20; // eax@4
|
|
2066 unsigned int v21; // eax@4
|
|
2067 int v25; // ebp@4
|
|
2068 int v26; // eax@4
|
|
2069 unsigned int v27; // eax@4
|
|
2070 int v31; // ebp@4
|
|
2071 int v32; // eax@4
|
|
2072 unsigned int v33; // eax@4
|
|
2073 int v37; // ebp@4
|
|
2074 int v38; // eax@4
|
|
2075 unsigned int v39; // eax@4
|
|
2076 int v43; // ebp@4
|
|
2077 int v44; // eax@4
|
|
2078 unsigned int v45; // eax@4
|
|
2079 signed int v49; // eax@6
|
|
2080 unsigned int v50; // eax@6
|
|
2081 int v53; // eax@8
|
|
2082 unsigned int v54; // eax@8
|
|
2083 int v58; // ebp@8
|
|
2084 int v59; // eax@8
|
|
2085 unsigned int v60; // eax@8
|
|
2086 unsigned int v62; // eax@8
|
|
2087 signed int v64; // eax@8
|
991
|
2088 //unsigned __int8 v66; // al@8
|
706
|
2089 char *v67; // eax@9
|
|
2090 signed int v70; // ebp@11
|
|
2091 signed int v71; // eax@11
|
|
2092 unsigned int v72; // eax@11
|
|
2093 int v75; // ebp@13
|
|
2094 int v76; // eax@13
|
|
2095 unsigned int v77; // eax@13
|
|
2096 char *v78; // ecx@14
|
|
2097 unsigned int v81; // eax@16
|
|
2098 int v83; // eax@16
|
|
2099 char *v85; // eax@16
|
|
2100 int v87; // eax@16
|
|
2101 char *v89; // eax@16
|
|
2102 int v90; // eax@16
|
|
2103 unsigned int v92; // eax@19
|
|
2104 int v93; // eax@19
|
|
2105 unsigned int v95; // eax@22
|
|
2106 int v96; // eax@22
|
|
2107 unsigned int v98; // eax@25
|
|
2108 int v99; // eax@25
|
|
2109 unsigned int v101; // eax@27
|
|
2110 int v102; // eax@27
|
|
2111 unsigned int v104; // eax@30
|
|
2112 unsigned int v106; // eax@32
|
|
2113 int v107; // eax@33
|
|
2114 unsigned int v109; // eax@36
|
|
2115 unsigned int v111; // eax@38
|
|
2116 const char *a2; // [sp+14h] [bp-Ch]@4
|
|
2117 const char *a2a; // [sp+14h] [bp-Ch]@6
|
|
2118 const char *a2b; // [sp+14h] [bp-Ch]@11
|
|
2119 const char *a2c; // [sp+14h] [bp-Ch]@16
|
|
2120 const char *a2d; // [sp+14h] [bp-Ch]@19
|
|
2121 const char *a2e; // [sp+14h] [bp-Ch]@22
|
|
2122 const char *a2f; // [sp+14h] [bp-Ch]@25
|
|
2123 const char *a2g; // [sp+14h] [bp-Ch]@27
|
|
2124 const char *a2h; // [sp+14h] [bp-Ch]@33
|
|
2125 int v131; // [sp+18h] [bp-8h]@16
|
|
2126 int v132; // [sp+18h] [bp-8h]@19
|
|
2127 int v133; // [sp+18h] [bp-8h]@22
|
|
2128 int v134; // [sp+18h] [bp-8h]@25
|
|
2129 int v135; // [sp+18h] [bp-8h]@27
|
|
2130 int v136; // [sp+18h] [bp-8h]@33
|
|
2131
|
991
|
2132 //pPlayer = &pParty->pPlayers[uPlayerID-1];
|
|
2133 //pPlayer = player;
|
|
2134 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE));
|
995
|
2135 sprintf(pTmpBuf, "\f%05d", ui_character_header_text_color);
|
991
|
2136 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);//"^Pi[%s] %s" / "%s the %s"
|
|
2137 strcat(pTmpBuf, pTmpBuf2);
|
|
2138 sprintfex(pTmpBuf2, "\f00000\r180%s: \f%05d%d\f00000\n\n\n",
|
|
2139 pGlobalTXT_LocalizationStrings[207], // "Skill points"
|
995
|
2140 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color,
|
991
|
2141 player->uSkillPoints);
|
|
2142 strcat(pTmpBuf, pTmpBuf2);
|
|
2143 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
|
|
2144
|
|
2145 v10 = 53;
|
|
2146 v7 = player->GetBaseStrength();
|
|
2147 v8 = player->GetActualMight();
|
|
2148 v9 = UI_GetHealthManaStringColor(v8, v7);
|
|
2149 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v8, v7);//Might
|
|
2150 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
949
|
2151
|
991
|
2152 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2153 v13 = player->GetBaseIntelligence();
|
|
2154 v14 = player->GetActualIntelligence();
|
|
2155 v15 = UI_GetHealthManaStringColor(v14, v13);
|
|
2156 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v14, v13);//Intellect
|
|
2157 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2158
|
|
2159 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2160 v19 = player->GetBaseWillpower();
|
|
2161 v20 = player->GetActualWillpower();
|
|
2162 v21 = UI_GetHealthManaStringColor(v20, v19);
|
|
2163 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v20, v19);//
|
|
2164 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2165
|
|
2166 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2167 v25 = player->GetBaseEndurance();
|
|
2168 v26 = player->GetActualEndurance();
|
|
2169 v27 = UI_GetHealthManaStringColor(v26, v25);
|
|
2170 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v26, v25);//
|
|
2171 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2172
|
|
2173 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2174 v31 = player->GetBaseAccuracy();
|
|
2175 v32 = player->GetActualAccuracy();
|
|
2176 v33 = UI_GetHealthManaStringColor(v32, v31);
|
|
2177 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v32, v31);
|
|
2178 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
949
|
2179
|
|
2180 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2181 v37 = player->GetBaseSpeed();
|
|
2182 v38 = player->GetActualSpeed();
|
706
|
2183 v39 = UI_GetHealthManaStringColor(v38, v37);
|
949
|
2184 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v38, v37);
|
|
2185 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2186
|
|
2187 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2188 v43 = player->GetBaseLuck();
|
|
2189 v44 = player->GetActualLuck();
|
706
|
2190 v45 = UI_GetHealthManaStringColor(v44, v43);
|
949
|
2191 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v44, v43);
|
|
2192 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2193
|
706
|
2194 a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n";
|
949
|
2195 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
|
991
|
2196 if ( player->GetMaxHealth() >= 1000 )
|
706
|
2197 a2 = "%s\f%05u\r388%d\f00000 / %d\n";
|
991
|
2198 v49 = player->GetMaxHealth();
|
|
2199 v50 = UI_GetHealthManaStringColor(player->sHealth, v49);
|
|
2200 sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, player->sHealth, v49);
|
949
|
2201 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2202
|
706
|
2203 a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n";
|
949
|
2204 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2205 if ( player->GetMaxMana() >= 1000 )
|
706
|
2206 a2a = "%s\f%05u\r388%d\f00000 / %d\n";
|
991
|
2207 v53 = player->GetMaxMana();
|
|
2208 v54 = UI_GetHealthManaStringColor(player->sMana, v53);
|
|
2209 sprintf(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, player->sMana, v53);
|
949
|
2210 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2211
|
|
2212 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2213 v58 = player->GetBaseAC();
|
|
2214 v59 = player->GetActualAC();
|
706
|
2215 v60 = UI_GetHealthManaStringColor(v59, v58);
|
949
|
2216 sprintf(pTmpBuf, "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v59, v58);
|
|
2217 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2218
|
|
2219 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2220 v62 = player->GetMajorConditionIdx();
|
706
|
2221 v64 = GetConditionDrawColor(v62);
|
949
|
2222 sprintf(pTmpBuf, "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, aCharacterConditionNames[v62]);
|
|
2223 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf, 226, 0);
|
|
2224
|
|
2225 v10 += LOBYTE(pFontArrus->uFontHeight) + - 1;
|
991
|
2226 if (player->uQuickSpell)
|
|
2227 v67 = pSpellStats->pInfos[player->uQuickSpell].pShortName;
|
706
|
2228 else
|
|
2229 v67 = pGlobalTXT_LocalizationStrings[153];
|
|
2230 sprintf(pTmpBuf, "%s: %s", pGlobalTXT_LocalizationStrings[172], v67);
|
949
|
2231 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf, 226, 0);
|
|
2232
|
|
2233 v10 = 50;
|
991
|
2234 v70 = player->GetBaseAge();
|
|
2235 v71 = player->GetActualAge();
|
706
|
2236 v72 = UI_GetHealthManaStringColor(v71, v70);
|
949
|
2237 sprintf(pTmpBuf, "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v71, v70);
|
|
2238 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2239
|
706
|
2240 a2b = "%s\f%05u\t100%d\f00000 / %d\n";
|
949
|
2241 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2242 if ( player->GetBaseLevel() > 99 )
|
|
2243 a2b = "%s\f%05u\t180%d\f00000 / %d\n";
|
|
2244 v75 = player->GetBaseLevel();
|
|
2245 v76 = player->GetActualLevel();
|
706
|
2246 v77 = UI_GetHealthManaStringColor(v76, v75);
|
949
|
2247 sprintf(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v76, v75);
|
|
2248 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2249
|
|
2250 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2251 if (player->uExperience <= 9999999)
|
|
2252 v78 = pGlobalTXT_LocalizationStrings[83]; // "Experience"
|
706
|
2253 else
|
991
|
2254 v78 = pGlobalTXT_LocalizationStrings[17]; // "Exp."
|
|
2255 v81 = player->GetExperienceDisplayColor();
|
|
2256 sprintf(pTmpBuf, "%s\r180\f%05d%lu\f00000\n\n", v78, v81, LODWORD(player->uExperience));
|
949
|
2257 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2258
|
|
2259 v10 += 2 * LOBYTE(pFontArrus->uFontHeight);
|
991
|
2260 v83 = player->GetActualAttack(0);
|
706
|
2261 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83);
|
949
|
2262 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2263
|
|
2264 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2265 v85 = player->GetMeleeDamageString();
|
706
|
2266 sprintf(pTmpBuf, "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85);
|
949
|
2267 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2268
|
|
2269 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2270 v87 = player->GetRangedAttack();
|
706
|
2271 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87);
|
949
|
2272 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2273
|
|
2274 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2275 v89 = player->GetRangedDamageString();
|
706
|
2276 sprintf(pTmpBuf, "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89);
|
949
|
2277 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2278
|
706
|
2279 a2c = format_4E2E10;
|
949
|
2280 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
|
991
|
2281 v131 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
|
|
2282 v90 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
|
706
|
2283 if ( v131 > 99 || v90 > 99 )
|
991
|
2284 a2c = "%s\f%05u\t180%d\f00000 / %d\n";
|
706
|
2285 v92 = UI_GetHealthManaStringColor(v131, v90);
|
949
|
2286 sprintf(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v90);
|
|
2287 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2288
|
706
|
2289 a2d = format_4E2E10;
|
949
|
2290 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2291 v132 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
|
|
2292 v93 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
|
706
|
2293 if ( v132 > 99 || v93 > 99 )
|
991
|
2294 a2d = "%s\f%05u\t180%d\f00000 / %d\n";
|
706
|
2295 v95 = UI_GetHealthManaStringColor(v132, v93);
|
949
|
2296 sprintf(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v93);
|
|
2297 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2298
|
706
|
2299 a2e = format_4E2E10;
|
949
|
2300 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2301 v133 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
|
|
2302 v96 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
|
706
|
2303 if ( v133 > 99 || v96 > 99 )
|
991
|
2304 a2e = "%s\f%05u\t180%d\f00000 / %d\n";
|
706
|
2305 v98 = UI_GetHealthManaStringColor(v133, v96);
|
949
|
2306 sprintf(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v96);
|
|
2307 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2308
|
706
|
2309 a2f = format_4E2E10;
|
949
|
2310 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2311 v134 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
|
|
2312 v99 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
|
706
|
2313 if ( v134 > 99 )
|
991
|
2314 a2f = "%s\f%05u\t180%d\f00000 / %d\n";
|
706
|
2315 v101 = UI_GetHealthManaStringColor(v134, v99);
|
949
|
2316 sprintf(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v99);
|
|
2317 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2318
|
706
|
2319 a2g = format_4E2E10;
|
949
|
2320 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2321 v135 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
|
|
2322 v102 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
|
706
|
2323 if ( v135 > 99 || v102 > 99 )
|
991
|
2324 a2g = "%s\f%05u\t180%d\f00000 / %d\n";
|
706
|
2325 v104 = UI_GetHealthManaStringColor(v135, v102);
|
949
|
2326 sprintf(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v102);
|
991
|
2327 if ( player->classType == PLAYER_CLASS_LICH && v102 == 200 )
|
949
|
2328 {
|
706
|
2329 v106 = UI_GetHealthManaStringColor(v135, 200);
|
949
|
2330 sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, pGlobalTXT_LocalizationStrings[625]);
|
|
2331 }
|
|
2332 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
|
2333
|
706
|
2334 a2h = format_4E2E10;
|
949
|
2335 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
|
991
|
2336 v136 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
|
|
2337 v107 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
|
706
|
2338 if ( v136 > 99 || v107 > 99 )
|
991
|
2339 a2h = "%s\f%05u\t180%d\f00000 / %d\n";
|
706
|
2340 v109 = UI_GetHealthManaStringColor(v136, v107);
|
949
|
2341 sprintf(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v107);
|
991
|
2342 if ( player->classType == PLAYER_CLASS_LICH && v107 == 200 )
|
949
|
2343 {
|
706
|
2344 v111 = UI_GetHealthManaStringColor(v136, 200);
|
949
|
2345 sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, pGlobalTXT_LocalizationStrings[625]);
|
706
|
2346 }
|
1006
|
2347 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf, 0, 0, 0);
|
949
|
2348 }
|
706
|
2349
|
949
|
2350 //----- (00419100) --------------------------------------------------------
|
|
2351 void FillAwardsData()
|
|
2352 {
|
|
2353 auto pPlayer = pPlayers[uActiveCharacter];
|
706
|
2354
|
949
|
2355 memset(achieved_awards, 0, 4000);
|
|
2356 num_achieved_awards = 0;
|
|
2357
|
706
|
2358 memset(pTmpBuf2, 0, 0x7D0u);
|
990
|
2359 BtnDown_flag = 0;
|
|
2360 BtnUp_flag = 0;
|
706
|
2361 dword_50651C = 0;
|
|
2362 dword_506528 = 0;
|
949
|
2363 for (int i = 0; i < 105; ++i)
|
|
2364 {
|
|
2365 if ( _449B57_test_bit(pPlayer->_guilds_member_bits, i) && pAwards[i].pText )
|
|
2366 achieved_awards[num_achieved_awards++] = (AwardType)i;
|
|
2367 }
|
|
2368 num_achieved_awards_2 = num_achieved_awards;
|
|
2369 num_achieved_awards = 0;
|
|
2370
|
706
|
2371 //sort awards index
|
949
|
2372 if (num_achieved_awards_2 > 0)
|
|
2373 {
|
|
2374 for(int i=0; i<num_achieved_awards_2; ++i)
|
|
2375 achieved_awards[num_achieved_awards_2 + i] = (AwardType)(rand() % 16);
|
706
|
2376
|
949
|
2377 for(int i=1; i<num_achieved_awards_2-1; ++i)
|
706
|
2378 {
|
949
|
2379 for (int j = i; j < num_achieved_awards_2-1; ++j )
|
706
|
2380 {
|
949
|
2381 auto tmp=achieved_awards[j];
|
|
2382 if (pAwards[j].uPriority < pAwards[i].uPriority)
|
706
|
2383 {
|
949
|
2384 achieved_awards[j] = achieved_awards[i];
|
|
2385 achieved_awards[i] = tmp;
|
706
|
2386 }
|
|
2387 }
|
|
2388 }
|
|
2389 }
|
|
2390 }
|