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