World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
UICharacter.cpp
См. документацию.
1 #include "GUI/UI/UICharacter.h"
2 
3 #include <algorithm>
4 #include <vector>
5 
6 #include "Engine/AssetsManager.h"
7 #include "Engine/Awards.h"
8 #include "Engine/Engine.h"
9 #include "Engine/LOD.h"
10 #include "Engine/Localization.h"
11 #include "Engine/MapInfo.h"
12 #include "Engine/Party.h"
13 #include "Engine/Time.h"
14 
17 
19 
20 #include "GUI/GUIWindow.h"
21 #include "GUI/GUIButton.h"
22 #include "GUI/GUIFont.h"
23 #include "GUI/GUIProgressBar.h"
24 #include "GUI/UI/UIInventory.h"
25 
27 
28 #include "IO/Mouse.h"
29 
31 
33 
35 void WetsuitOn(unsigned int uPlayerID);
36 void WetsuitOff(unsigned int uPlayerID);
37 
39 
41 
60 std::array<unsigned int, 6> ui_character_award_color;
61 
69 std::array<unsigned int, 24> ui_game_character_record_playerbuff_colors;
70 
76 
83 
91 
95 
99 
101 
103  ui_mainmenu_copyright_color = Color16(255, 255, 255);
104 
106  ui_character_default_text_color = Color16(255, 255, 255);
107  ui_character_header_text_color = Color16(255, 255, 155);
110 
114 
115  ui_character_stat_default_color = Color16(255, 255, 255);
118 
119  ui_character_skillinfo_can_learn = Color16(255, 255, 255);
122 
127 
128  ui_character_award_color[0] = Color16(248, 108, 160);
129  ui_character_award_color[1] = Color16(112, 220, 248);
130  ui_character_award_color[2] = Color16(192, 192, 240);
131  ui_character_award_color[3] = Color16(64, 244, 96);
132  ui_character_award_color[4] = Color16(232, 244, 96);
133  ui_character_award_color[5] = Color16(240, 252, 192);
134 
142 
167 
173 
174  ui_book_quests_title_color = Color16(255, 255, 255);
175  ui_book_quests_text_color = Color16(255, 255, 255);
176  ui_book_autonotes_title_color = Color16(255, 255, 255);
177  ui_book_autonotes_text_color = Color16(255, 255, 255);
178  ui_book_map_title_color = Color16(255, 255, 255);
179  ui_book_map_coordinates_color = Color16(255, 255, 255);
180 
181  ui_book_calendar_title_color = Color16(255, 255, 255);
182  ui_book_calendar_time_color = Color16(75, 75, 75);
183  ui_book_calendar_day_color = Color16(75, 75, 75);
185  ui_book_calendar_year_color = Color16(75, 75, 75);
186  ui_book_calendar_moon_color = Color16(75, 75, 75);
188 
189  ui_book_journal_title_color = Color16(255, 255, 255);
190  ui_book_journal_text_color = Color16(255, 255, 255);
192 
196 
198 }
199 
204 Image *paperdoll_armor_texture[4][17][3]; // 0x511294
205 // int paperdoll_array_51132C[165];
208 Image *papredoll_flying_feet[22]; // 005115E0
212 Image *paperdoll_helm_texture[2][16]; // 511698
213 Image *paperdoll_belt_texture[4][7]; // 511718
214 
215 const int paperdoll_Weapon[4][16][2] = {
216  // 4E4C30
217  {{128, 205},
218  {30, 144},
219  {88, 85},
220  {0, 0},
221  {0, 0},
222  {0, 0},
223  {17, 104},
224  {0, 0},
225  {0, 0},
226  {0, 0},
227  {0, 0},
228  {0, 0},
229  {0, 0},
230  {0, 0},
231  {0, 0},
232  {0, 0}},
233  {{131, 201},
234  {38, 158},
235  {98, 87},
236  {0, 0},
237  {0, 0},
238  {0, 0},
239  {21, 100},
240  {0, 0},
241  {0, 0},
242  {0, 0},
243  {0, 0},
244  {0, 0},
245  {0, 0},
246  {0, 0},
247  {0, 0},
248  {0, 0}},
249  {{131, 216},
250  {29, 186},
251  {88, 119},
252  {0, 0},
253  {0, 0},
254  {0, 0},
255  {0, 0},
256  {0, 0},
257  {0, 0},
258  {0, 0},
259  {0, 0},
260  {0, 0},
261  {0, 0},
262  {0, 0},
263  {0, 0},
264  {0, 0}},
265  {{123, 216},
266  {35, 184},
267  {98, 119},
268  {0, 0},
269  {0, 0},
270  {0, 0},
271  {0, 0},
272  {0, 0},
273  {0, 0},
274  {0, 0},
275  {0, 0},
276  {0, 0},
277  {0, 0},
278  {0, 0},
279  {0, 0},
280  {0, 0}},
281 };
282 
283 const int paperdoll_Boot[4][7][2] = { // 4E5490
284  0xE, 0x11D, 0xD, 0x11D, 0xC, 0x10A, 0xA, 0xFF, 0xD, 0xF9,
285  0xD, 0x137, 0xC, 0x10E, 0x14, 0x125, 0x13, 0x122, 0x15, 0x120,
286  0x15, 0x114, 0x13, 0x10A, 0x11, 0x13E, 0x11, 0x116, 0x1D, 0x121,
287  0x1C, 0x11F, 0x1B, 0x11B, 0x1C, 0x117, 0x16, 0x116, 0x1B, 0x137,
288  0x1B, 0x11B, 0x1F, 0x127, 0x1F, 0x122, 0x1B, 0x11B, 0x1D, 0x117,
289  0x1D, 0x116, 0x1D, 0x137, 0x1B, 0x11F,
290 };
291 const int paperdoll_Cloak[4][10][2] = { // 4E5570
292  0x11, 0x68, 0xF, 0x68, 0x14, 0x71, 0x19, 0x6B, 0x21, 0x6F, 0x5, 0x68,
293  0x5, 0x68, 0x14, 0x71, 0x3, 0x6B, 0xF, 0x6F, 0x15, 0x64, 0xB, 0x6B,
294  0xE, 0x67, 0x15, 0x6B, 0x1B, 0x6F, 0x3, 0x6B, 0, 0x6B, 0xE, 0x67,
295  0, 0x6B, 0x3, 0x6F, 0x10, 0x8A, 0x9, 0x8B, 0x18, 0x98, 0x25, 0x91,
296  0x29, 0x90, 0x8, 0x8A, 0x9, 0x8B, 0x18, 0x98, 0x3, 0x91, 0x3, 0x90,
297  0x14, 0x92, 0x10, 0x92, 0x15, 0x98, 0x1F, 0x91, 0x22, 0x90, 0x8, 0x92,
298  0xC, 0x92, 0x15, 0x98, 0x3, 0x91, 0x3, 0x90,
299 };
300 const int paperdoll_CloakCollar[4][10][2] = { // 4E56B0
301  0x11, 0x68, 0x34, 0x64, 0x21, 0x69, 0x1D, 0x67, 0x20, 0x67, 0x21, 0x68,
302  0x34, 0x64, 0x21, 0x69, 0x1D, 0x67, 0x1F, 0x67, 0x13, 0x64, 0x35, 0x66,
303  0x29, 0x68, 0x1F, 0x68, 0x1F, 0x6A, 0x21, 0x6A, 0x2B, 0x66, 0x26, 0x68,
304  0x1F, 0x68, 0x1F, 0x6A, 0, 0, 0x30, 0x87, 0x1E, 0x86, 0x1B, 0x86,
305  0x1C, 0x8A, 0x21, 0x87, 0x30, 0x87, 0x1E, 0x86, 0x1B, 0x86, 0x1C, 0x8A,
306  0, 0, 0x38, 0x8A, 0x24, 0x8B, 0x1D, 0x8B, 0x21, 0x8C, 0x27, 0x8A,
307  0x34, 0x8A, 0x24, 0x8B, 0x25, 0x8B, 0x21, 0x8C,
308 };
309 // int dword_4E56B4;
310 const int paperdoll_Belt[4][7][2] = { // 4E57F0
311  0x3A, 0xB6, 0x37, 0xB2, 0x34, 0xB9, 0x3A, 0xB9, 0x37, 0xB7, 0x38, 0xAC,
312  0x37, 0xB7, 0x3E, 0xAD, 0x3A, 0xAC, 0x37, 0xB0, 0x3A, 0xB1, 0x39, 0xB0,
313  0x3C, 0xA5, 0x39, 0xB0, 0x3B, 0xD5, 0x37, 0xD2, 0x31, 0xD5, 0x39, 0xD6,
314  0x37, 0xD8, 0x37, 0xD1, 0x37, 0xD8, 0x42, 0xD2, 0x3F, 0xD0, 0x3B, 0xD7,
315  0x3C, 0xD5, 0x3B, 0xD6, 0x3E, 0xCF, 0x36, 0xD6,
316 };
317 const int paperdoll_Helm[4][16][2] = { // 4E58D0
318  0x3E, 0x1F, 0x41, 0x2C, 0x37, 0x2F, 0x31, 0x32, 0x37, 0x2A, 0x39, 0x28,
319  0x36, 0x34, 0x41, 0x38, 0x40, 0x31, 0x40, 0x21, 0x40, 0x31, 0x3C, 0x33,
320  0x3D, 0x24, 0x3A, 0x1A, 0x37, 0x2A, 0x41, 0x48, 0x41, 0x1E, 0x42, 0x2B,
321  0x37, 0x2F, 0x34, 0x30, 0x39, 0x29, 0x3A, 0x26, 0x36, 0x34, 0x41, 0x37,
322  0x42, 0x32, 0x40, 0x21, 0x40, 0x31, 0x40, 0x2F, 0x3E, 0x22, 0x3B, 0x1A,
323  0x39, 0x29, 0x42, 0x47, 0x3F, 0x47, 0x41, 0x56, 0x37, 0x59, 0x32, 0x5E,
324  0x37, 0x58, 0x39, 0x54, 0x34, 0x61, 0x40, 0x61, 0x41, 0x5D, 0x3E, 0x4F,
325  0x3E, 0x5B, 0x3D, 0x5B, 0x3F, 0x4C, 0x3B, 0x45, 0x37, 0x58, 0x41, 0x74,
326  0x45, 0x45, 0x46, 0x54, 0x3A, 0x55, 0x38, 0x58, 0x3C, 0x54, 0x3F, 0x52,
327  0x39, 0x5B, 0x45, 0x5C, 0x47, 0x5C, 0x44, 0x4B, 0x44, 0x57, 0x43, 0x55,
328  0x44, 0x4A, 0x3E, 0x45, 0x3C, 0x54, 0x47, 0x70,
329 };
330 const int pPaperdoll_Beards[4] = { // 4E5AD0
331  52,
332  130,
333  56,
334  136,
335 };
336 const int pPaperdoll_LeftHand[4][2] = { // 4E5AE0
337  0x67, 0x6A, 0x65, 0x6C, 0x74, 0x8D, 0x74, 0x93,
338 };
339 const int pPaperdoll_SecondLeftHand[4][2] = { // 4E5B00
340  0x1A, 0x6B, 0x28, 0x6D, 0x19, 0x8D, 0x20, 0x92,
341 };
342 const int pPaperdoll_RightHand[4][2] = { // 4E5B20
343  0x1E, 0x90, 0x22, 0x9E, 0x19, 0xBA, 0x1F, 0xB8,
344 };
345 const int pPaperdollLeftEmptyHand[4][2] = { // 4E5B40
346  0x80, 0xCD, 0x83, 0xC9, 0x83, 0xD8, 0x7B, 0xD8,
347 };
348 
349 int pPaperdoll_BodyX = 481; // 004E4C28
350 int pPaperdoll_BodyY = 0; // 004E4C2C
351 const int paperdoll_Armor_Coord[4][17][2] = { // 4E4E30
352  // X Y
353  0x2C, 0x67, 0x30, 0x69, 0x2D, 0x67, 0x2C, 0x64, 0x14, 0x66, 0x22, 0x67,
354  0x20, 0x66, 0x25, 0x66, 0x12, 0x66, // Human
355  0x0A, 0x66, 0x13, 0x64, 0x0E, 0x64, 0x0A, 0x63, 0x14, 0x66, 0x0A, 0x63,
356  0x0A, 0x66, 0x25, 0x66,
357 
358  0x32, 0x68, 0x32, 0x69, 0x35, 0x69, 0x33, 0x68, 0x24, 0x67, 0x30, 0x69,
359  0x33, 0x68, 0x31, 0x69, 0x19, 0x69, 0x19, 0x6A, 0x16, 0x66, 0x16, 0x65,
360  0x0F, 0x6B, 0x24, 0x67, 0x0F, 0x6B, 0x19, 0x6A, 0x31, 0x69,
361 
362  0x2A, 0x8C, 0x29, 0x8C, 0x2A, 0x89, 0x29, 0x86, 0x12, 0x87, 0x2D, 0x89,
363  0x2A, 0x88, 0x25, 0x87, 0x12, 0x8B, 0x12, 0x8B, 0x11, 0x8A, 0x15, 0x87,
364  0x09, 0x89, 0x12, 0x87, 0x09, 0x89, 0x12, 0x8B, 0x25, 0x87,
365 
366  0x33, 0x90, 0x32, 0x90, 0x34, 0x91, 0x32, 0x8E, 0x21, 0x8B, 0x31, 0x8B,
367  0x33, 0x8E, 0x2F, 0x8F, 0x16, 0x8D, 0x18, 0x8C, 0x19, 0x8C, 0x1B, 0x8E,
368  0x0C, 0x8C, 0x21, 0x8B, 0x0C, 0x8C, 0x18, 0x8C, 0x2F, 0x8F,
369 };
370 const int paperdoll_shoulder_coord[4][17][2] = { // 4E5050
371  0x64, 0x67, 0x61, 0x67, 0x65, 0x68, 0x6E, 0x74, 0x6C, 0x68, 0x61, 0x67,
372  0x66, 0x68, 0x6C, 0x6A, 0x6E, 0x6D, 0x67, 0x69, 0x70, 0x67, 0x6E, 0x6D,
373  0x6C, 0x6F, 0x6C, 0x68, 0x6C, 0x6F, 0x67, 0x69, 0x6C, 0x6A,
374 
375  0x60, 0x6B, 0x60, 0x6C, 0x60, 0x6B, 0x61, 0x6A, 0x60, 0x69, 0x60, 0x6A,
376  0x60, 0x6A, 0x61, 0x69, 0x63, 0x6A, 0x64, 0x6A, 0x61, 0x66, 0x66, 0x67,
377  0x64, 0x6C, 0x60, 0x69, 0x64, 0x6C, 0x64, 0x6A, 0x61, 0x69,
378 
379  0x6D, 0x8C, 0x75, 0x8C, 0, 0, 0x72, 0x8D, 0x6A, 0x89, 0, 0,
380  0x73, 0x8C, 0x69, 0x8C, 0x6E, 0x8D, 0x71, 0x8D, 0x70, 0x8D, 0x72, 0x8D,
381  0x74, 0x8E, 0x6A, 0x89, 0x74, 0x8E, 0x71, 0x8D, 0x69, 0x8C,
382 
383  0x72, 0x91, 0x72, 0x91, 0, 0, 0x6E, 0x92, 0x6F, 0x91, 0, 0,
384  0, 0, 0x6E, 0x91, 0x71, 0x90, 0x72, 0x8D, 0x72, 0x90, 0x73, 0x93,
385  0x73, 0x90, 0x6F, 0x91, 0x73, 0x90, 0x72, 0x8D, 0x6E, 0x91,
386 };
387 const int paperdoll_shoulder_second_coord[4][17][2] = { // dword_4E5270
388  0, 0, 0x61, 0x67, 0, 0, 0x64, 0x69, 0x64, 0x68, 0, 0,
389  0, 0, 0x5E, 0x66, 0x5F, 0x69, 0x55, 0x69, 0x5F, 0x67, 0x5F, 0x68,
390  0x32, 0x69, 0x64, 0x68, 0x32, 0x69, 0x55, 0x69, 0x5E, 0x66,
391 
392  0, 0, 0x60, 0x6C, 0, 0, 0x60, 0x6C, 0x5E, 0x69, 0, 0,
393  0, 0, 0x5D, 0x6A, 0x5B, 0x6A, 0x5B, 0x6A, 0x59, 0x69, 0x56, 0x68,
394  0x38, 0x6E, 0x5E, 0x69, 0x38, 0x6E, 0x5B, 0x6A, 0x5D, 0x6A,
395 
396  0, 0, 0x75, 0x8C, 0, 0, 0x72, 0x8D, 0x62, 0x89, 0, 0,
397  0, 0, 0x69, 0x8C, 0x5E, 0x8D, 0x61, 0x8D, 0x5F, 0x8D, 0x60, 0x8D,
398  0x2E, 0x8C, 0x62, 0x89, 0x2E, 0x8C, 0x61, 0x8D, 0x69, 0x8C,
399 
400  0, 0, 0x72, 0x91, 0, 0, 0x72, 0x91, 0x67, 0x8F, 0, 0,
401  0, 0, 0x6E, 0x91, 0x64, 0x93, 0x65, 0x8C, 0x65, 0x91, 0x67, 0x91,
402  0x36, 0x90, 0x67, 0x8F, 0x36, 0x90, 0x65, 0x8C, 0x6E, 0x91,
403 };
404 
405 const char *dlad_texnames_by_face[25] = {
406  "pc01lad", "pc02lad", "pc03lad", "pc04lad", "pc05lad", "pc06lad", "pc07lad",
407  "pc08lad", "pc09lad", "pc10lad", "pc11lad", "pc12lad", "pc13lad", "pc14lad",
408  "pc15lad", "pc16lad", "pc17lad", "pc18lad", "pc19lad", "pc20lad", "pc21lad",
409  "pc22lad", "pc23lad", "pc24lad", "pc25lad"};
410 const char *dlau_texnames_by_face[25] = {
411  "pc01lau", "pc02lau", "pc03lau", "pc04lau", "pc05lau", "pc06lau", "pc07lau",
412  "pc08lau", "pc09lau", "pc10lau", "pc11lau", "pc12lau", "pc13lau", "pc14lau",
413  "pc15lau", "pc16lau", "pc17lau", "pc18lau", "pc19lau", "pc20lau", "pc21lau",
414  "pc22lau", "pc23lau", "pc24lau", "pc25lau"};
415 const char *dbod_texnames_by_face[25] = {
416  "pc01bod", "pc02bod", "pc03bod", "pc04bod", "pc05bod", "pc06bod", "pc07bod",
417  "pc08bod", "pc09bod", "pc10bod", "pc11bod", "pc12bod", "pc13bod", "pc14bod",
418  "pc15bod", "pc16bod", "pc17bod", "pc18bod", "pc19bod", "pc20bod", "pc21bod",
419  "pc22bod", "pc23bod", "pc24bod", "pc25bod"};
420 const char *drh_texnames_by_face[25] = {
421  "pc01rh", "pc02rh", "pc03rh", "pc04rh", "pc05rh", "pc06rh", "pc07rh",
422  "pc08rh", "pc09rh", "pc10rh", "pc11rh", "pc12rh", "pc13rh", "pc14rh",
423  "pc15rh", "pc16rh", "pc17rh", "pc18rh", "pc19rh", "pc20rh", "pc21rh",
424  "pc22rh", "pc23rh", "pc24rh", "pc25rh"};
425 const char *dlh_texnames_by_face[25] = {
426  "pc01lh", "pc02lh", "pc03lh", "pc04lh", "pc05lh", "pc06lh", "pc07lh",
427  "pc08lh", "pc09lh", "pc10lh", "pc11lh", "pc12lh", "pc13lh", "pc14lh",
428  "pc15lh", "pc16lh", "pc17lh", "pc18lh", "pc19lh", "pc20lh", "pc21lh",
429  "pc22lh", "pc23lh", "pc24lh", "pc25lh"};
430 const char *dlhu_texnames_by_face[25] = {
431  "pc01lhu", "pc02lhu", "pc03lhu", "pc04lhu", "pc05lhu", "pc06lhu", "pc07lhu",
432  "pc08lhu", "pc09lhu", "pc10lhu", "pc11lhu", "pc12lhu", "pc13lhu", "pc14lhu",
433  "pc15lhu", "pc16lhu", "pc17lhu", "pc18lhu", "pc19lhu", "pc20lhu", "pc21lhu",
434  "pc22lhu", "pc23lhu", "pc24lhu", "pc25lhu"};
435 
439 const int pWeaponSkills[9] = {
449 const int pMagicSkills[9] = {
453 
463 
464 std::array<Image *, 16> paperdoll_dbrds;
465 
467  unsigned int uActiveCharacter, enum CURRENT_SCREEN screen)
470  pEventTimer->Pause();
471  pAudioPlayer->StopChannels(-1, -1);
472  bRingsShownInCharScreen = false;
474  current_screen_type = screen;
475 
478  paperdoll_dbrds[9]->GetWidth(), paperdoll_dbrds[9]->GetHeight(), 1, 0,
479  UIMSG_ClickStatsBtn, 0, 'S', localization->GetString(216), // Stats
480  {{paperdoll_dbrds[10], paperdoll_dbrds[9]}});
481  pCharacterScreen_SkillsBtn = CreateButton(
483  paperdoll_dbrds[7]->GetWidth(), paperdoll_dbrds[7]->GetHeight(), 1, 0,
484  UIMSG_ClickSkillsBtn, 0, 'K', localization->GetString(205), // Skills
485  {{paperdoll_dbrds[8], paperdoll_dbrds[7]}});
486  pCharacterScreen_InventoryBtn = CreateButton(
488  paperdoll_dbrds[5]->GetWidth(), paperdoll_dbrds[5]->GetHeight(), 1, 0,
489  UIMSG_ClickInventoryBtn, 0, 'I',
490  localization->GetString(120), // Inventory
491  {{paperdoll_dbrds[6], paperdoll_dbrds[5]}});
492  pCharacterScreen_AwardsBtn = CreateButton(
494  paperdoll_dbrds[3]->GetWidth(), paperdoll_dbrds[3]->GetHeight(), 1, 0,
495  UIMSG_ClickAwardsBtn, 0, 'A', localization->GetString(22), // Awards
496  {{paperdoll_dbrds[4], paperdoll_dbrds[3]}});
497  pCharacterScreen_ExitBtn = CreateButton(
499  paperdoll_dbrds[1]->GetWidth(), paperdoll_dbrds[1]->GetHeight(), 1, 0,
501  localization->GetString(79), // Exit
502  {{paperdoll_dbrds[2], paperdoll_dbrds[1]}});
503  CreateButton(0, 0, 476, 345, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "");
505  CreateButton(600, 300, 30, 30, 1, 0, UIMSG_ChangeDetaliz, 0, 0,
506  localization->GetString(64));
508  CreateButton(476, 0, 164, 345, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "");
509 
510  CreateButton(61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "");
511  CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "");
512  CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "");
513  CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "");
514 
515  CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "");
516  FillAwardsData();
517 
519  assets->GetImage_ColorKey("fr_skill", 0x7FF);
521  assets->GetImage_ColorKey("fr_award", 0x7FF);
523  assets->GetImage_ColorKey("fr_stats", 0x7FF);
525  assets->GetImage_ColorKey("fr_strip", 0x7FF);
526 }
527 
529  auto player = pPlayers[uActiveCharacter];
530 
531  render->ClearZBuffer(0, 479);
537  render->DrawTextureAlphaNew(
538  pCharacterScreen_StatsBtn->uX / 640.0f,
539  pCharacterScreen_StatsBtn->uY / 480.0f,
540  assets->GetImage_ColorKey("ib-cd1-d", 0x7FF));
541  break;
542  }
547  }
550  render->DrawTextureAlphaNew(
551  pCharacterScreen_SkillsBtn->uX / 640.0f,
552  pCharacterScreen_SkillsBtn->uY / 480.0f,
553  assets->GetImage_ColorKey("ib-cd2-d", 0x7FF));
554  break;
555  }
561  render->DrawTextureAlphaNew(
562  pCharacterScreen_AwardsBtn->uX / 640.0f,
563  pCharacterScreen_AwardsBtn->uY / 480.0f,
564  assets->GetImage_ColorKey("ib-cd4-d", 0x7FF));
565  break;
566  }
570  CharacterUI_InventoryTab_Draw(player, false);
571  render->DrawTextureAlphaNew(
574  assets->GetImage_ColorKey("ib-cd3-d", 0x7FF));
575  break;
576  }
577  default:
578  __debugbreak();
579  break;
580  }
581 
584  else
586 }
587 
592  new OnButtonClick3(
597 }
598 
604  new OnButtonClick3(
609 }
610 
615  new OnButtonClick3(
620 }
621 
627  new OnButtonClick3(
632  FillAwardsData();
633 }
634 
636  int v128, v125, v123, v121;
637 
644  v123 = 445;
645  v121 = 470;
646  } else {
647  v128 = 30;
648  v125 = 30;
649  v123 = 300;
650  v121 = 600;
651  }
653  v121, v123, v125, v128, 1, 0, UIMSG_ChangeDetaliz, 0, 0,
654  localization->GetString(64)); // "Detail Toggle"
656  0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "");
657  viewparams->bRedrawGameUI = true;
658 }
659 
661  pEventTimer->Pause();
662  pAudioPlayer->StopChannels(-1, -1);
666  GUIWindow *CS_inventory_window = new GUIWindow_Inventory_CastSpell(
667  0, 0, window->GetWidth(), window->GetHeight(), (int)this, "");
668  pCharacterScreen_ExitBtn = CS_inventory_window->CreateButton(
669  394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0,
670  localization->GetString(79), // Close
671  {{paperdoll_dbrds[2], paperdoll_dbrds[1]}});
672  CS_inventory_window->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122,
673  UIMSG_InventoryLeftClick, 0, 0, "");
674  pCharacterScreen_DollBtn = CS_inventory_window->CreateButton(
675  0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "");
676 
677  CS_inventory_window->CreateButton(61, 424, 31, 0, 2, 94,
678  UIMSG_SelectCharacter, 1, '1', "");
679  CS_inventory_window->CreateButton(177, 424, 31, 0, 2, 94,
680  UIMSG_SelectCharacter, 2, '2', "");
681  CS_inventory_window->CreateButton(292, 424, 31, 0, 2, 94,
682  UIMSG_SelectCharacter, 3, '3', "");
683  CS_inventory_window->CreateButton(407, 424, 31, 0, 2, 94,
684  UIMSG_SelectCharacter, 4, '4', "");
685 
686  return CS_inventory_window;
687 }
688 
690  Player *player, int x, int y, const int *skill_list, int skill_list_size,
691  int right_margin, const char *skill_group_name) {
692  int y_offset = y;
693 
694  auto str = StringPrintf("%s\r%03d%s", skill_group_name, right_margin,
695  localization->GetString(131)); // "Magic" "Level"
697  pFontArrus, x, y, ui_character_header_text_color, str, 0, 0, 0);
698 
699  int num_skills_drawn = 0;
700  for (int i = 0; i < skill_list_size; ++i) {
701  PLAYER_SKILL_TYPE skill = (PLAYER_SKILL_TYPE)skill_list[i];
702  for (size_t j = 0; j < pGUIWindow_CurrentMenu->vButtons.size(); ++j) {
704  int v9 = v8->field_1C;
705  if ((short)(v8->field_1C) >= 0)
706  continue; // skips an of the stats skills innv awards buttons
707 
708  if ((v9 & 0x7FFF) != skill)
709  continue; // skips buttons that dont match skill
710 
711  ++num_skills_drawn;
712  y_offset = v8->uY;
713 
714  // ushort skill_value = player->pActiveSkills[skill];
715  int skill_level = player->GetActualSkillLevel(skill);
716 
717  uint skill_color = 0;
718  uint skill_mastery_color = 0;
719  if (player->uSkillPoints > skill_level)
721 
723  j) { // this needs to reset??
724  if (player->uSkillPoints > skill_level)
725  skill_mastery_color = ui_character_bonus_text_color;
726  else
727  skill_mastery_color = ui_character_skill_default_color;
728  skill_color = skill_mastery_color;
729  }
730 
731  if (player->GetActualSkillMastery(skill) == 1) {
732  auto Strsk = StringPrintf("%s\r%03d%2d",
733  localization->GetSkillName(skill),
734  right_margin, skill_level);
736  skill_color, Strsk, 0, 0, 0);
737  } else {
738  const char *skill_level_str = nullptr;
739 
740  switch (player->GetActualSkillMastery(skill)) {
741  case 4:
742  skill_level_str = localization->GetString(96);
743  break; // Grand
744  case 3:
745  skill_level_str = localization->GetString(432);
746  break; // Master
747  case 2:
748  skill_level_str = localization->GetString(433);
749  break; // Expert
750  }
751 
752  if (!skill_mastery_color)
753  skill_mastery_color = ui_character_header_text_color;
754 
755  auto Strsk = StringPrintf(
756  "%s \f%05d%s\f%05d\r%03d%2d",
757  localization->GetSkillName(skill), skill_mastery_color,
758  skill_level_str, skill_color, right_margin, skill_level);
760  skill_color, Strsk, 0, 0, 0);
761  }
762  }
763  }
764 
765  if (!num_skills_drawn) {
766  y_offset += pFontLucida->GetHeight() - 3;
768  localization->GetString(153), 0, 0,
769  0); // None
770  }
771 
772  return y_offset;
773 }
774 
775 //----- (00419719) --------------------------------------------------------
777  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f,
779 
780  auto str =
781  StringPrintf("%s \f%05d%s\f00000\r177%s: \f%05d%d\f00000", // ^Pv[]
782  localization->GetString(206), // Skills for
784  localization->GetString(207), // Skill Points
787  player->uSkillPoints);
788  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, str, 0, 0, 0);
789 
790  int y = 2 * pFontLucida->GetHeight() + 13;
792  player, 24, y, pWeaponSkills, 9, 400,
793  localization->GetString(242)); // "Weapons"
794 
795  y += 2 * pFontLucida->GetHeight() - 10;
797  player, 24, y, pMagicSkills, 9, 400,
798  localization->GetString(138)); // "Magic"
799 
800  y = 2 * pFontLucida->GetHeight() + 13;
802  player, 248, y, pArmorSkills, 5, 177,
803  localization->GetString(11)); // "Armor"
804 
805  y += 2 * pFontLucida->GetHeight() - 10;
807  player, 248, y, pMiscSkills, 12, 177,
808  localization->GetString(143)); // "Misc"
809 }
810 
811 //----- (0041A000) --------------------------------------------------------
813  int items_per_page; // eax@1
814  // char Source[100]; // [sp+Ch] [bp-C4h]@1
815  GUIWindow awards_window; // [sp+70h] [bp-60h]@1
816 
817  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f,
819 
820  String str =
821  StringPrintf("%s \f%05d", localization->GetString(23),
822  ui_character_header_text_color) // Awards for
824  429, player->pName,
825  localization->GetClassName(player->classType)) // %s the %s
826  + "\f00000";
827 
828  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, str, 0, 0, 0);
829  items_per_page = books_primary_item_per_page;
830  awards_window.uFrameX = 12;
831  awards_window.uFrameY = 48;
832  awards_window.uFrameWidth = 424;
833  awards_window.uFrameHeight = 290;
834  awards_window.uFrameZ = 435;
835  awards_window.uFrameW = 337;
838  items_per_page = books_primary_item_per_page++ + 1;
839  if (BtnUp_flag && items_per_page) {
840  --items_per_page;
841  books_primary_item_per_page = items_per_page;
842  }
843 
844  if (books_page_number < 0) {
845  items_per_page += num_achieved_awards;
846  books_primary_item_per_page = items_per_page;
847  if ((signed int)(num_achieved_awards + items_per_page) >
849  items_per_page = full_num_items_in_book - num_achieved_awards;
850  books_primary_item_per_page = items_per_page;
851  }
852  } else if (books_page_number > 0) {
853  items_per_page -= num_achieved_awards;
854  books_primary_item_per_page = items_per_page;
855  if (items_per_page < 0) {
856  items_per_page = 0;
857  books_primary_item_per_page = items_per_page;
858  }
859  }
860  BtnDown_flag = 0;
861  BtnUp_flag = 0;
863  books_page_number = 0;
864 
865  for (int i = items_per_page; i < full_num_items_in_book; ++i) {
866  String str;
867  auto v6 = pAwards[achieved_awards[i]]
868  .pText; // (char *)dword_723E80_award_related[v20 / 4];
869 
870  switch (achieved_awards[i]) {
873  break;
876  break;
879  break;
882  break;
883  case Award_ArcomageWins:
885  break;
886  case Award_ArcomageLoses:
888  break;
889  case Award_Deaths:
890  str = StringPrintf(v6, pParty->uNumDeaths);
891  break;
894  break;
895  case Award_Fine:
896  str = StringPrintf(v6, pParty->uFine);
897  break;
898  case Award_PrisonTerms:
899  str = StringPrintf(v6, pParty->uNumPrisonTerms);
900  break;
901  }
902 
903  if (str.length() < 1) str = String(v6);
904 
905  awards_window.DrawText(
906  pFontArrus, 0, 0,
908  str, 0, 0, 0);
909  awards_window.uFrameY =
910  pFontArrus->CalcTextHeight(str, awards_window.uFrameWidth, 0) +
911  awards_window.uFrameY + 8;
912  if (awards_window.uFrameY > awards_window.uFrameHeight) break;
913 
915  }
916 }
917 
918 //----- (0041A2C1) --------------------------------------------------------
919 unsigned int GetSizeInInventorySlots(unsigned int uNumPixels) {
920  if ((signed int)uNumPixels < 14) uNumPixels = 14;
921  return ((signed int)(uNumPixels - 14) >> 5) + 1;
922 }
923 
924 //----- (0041A556) --------------------------------------------------------
925 void draw_leather() {
926  render->DrawTextureNew(8 / 640.0f, 8 / 480.0f, ui_leather_mm7);
927 }
928 
929 //----- (0043CC7C) --------------------------------------------------------
931  ItemGen *item; // edi@38
932  int item_X; // ebx@38
933  int index; // eax@65
934  Image *v59; // ebx@129
935  Image *v75; // ebx@170
936  Image *v94; // ebx@214
937  Image *v127; // ebx@314
938  Image *v153; // eax@370
939  char *v166; // [sp-8h] [bp-54h]@16
940  const char *container = nullptr; // [sp-8h] [bp-54h]@79
941  char *v181; // [sp-8h] [bp-54h]@337
942  int item_Y; // [sp+10h] [bp-3Ch]@38
943  int pBodyComplection; // [sp+24h] [bp-28h]@6
944  bool two_handed_left_fist; // [sp+34h] [bp-18h]@361
945  int IsDwarf; // [sp+40h] [bp-Ch]@4
946 
947  if (player->GetRace() == CHARACTER_RACE_DWARF) {
948  IsDwarf = 1;
949  pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 2 : 3;
950  } else {
951  IsDwarf = 0;
952  pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 0 : 1;
953  }
954 
955  int uPlayerID = 0;
956  for (uint i = 0; i < 4; ++i) {
957  if (pPlayers[i + 1] == player) {
958  uPlayerID = i + 1;
959  break;
960  }
961  }
962 
963  render->ResetUIClipRect();
964  render->DrawTextureAlphaNew(467 / 640.0f, 0,
966  if (IsPlayerWearingWatersuit[uPlayerID]) { // акваланг
967  render->DrawTextureAlphaNew(pPaperdoll_BodyX / 640.0f,
968  pPaperdoll_BodyY / 480.0f,
969  papredoll_dbods[uPlayerID - 1]);
971  render->ZDrawTextureAlpha(
972  pPaperdoll_BodyX / 640.0f, pPaperdoll_BodyY / 480.0f,
973  papredoll_dbods[uPlayerID - 1], player->pEquipment.uArmor);
974 
975  //Рука не занята или ...
976  if (!player->GetItem(&PlayerEquipment::uMainHand) ||
977  (player->GetMainHandItem()->GetItemEquipType() !=
978  EQUIP_TWO_HANDED) &&
979  (player->GetMainHandItem()->GetItemEquipType() !=
982  render->DrawTextureAlphaNew(
983  (pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0]) /
984  640.0f,
985  (pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1]) /
986  480.0f,
987  papredoll_dlads[uPlayerID - 1]);
988  // -----------------------------------------------------(Hand/Рука)---------------------------------------------------------------
989  if (player->GetItem(&PlayerEquipment::uMainHand)) {
990  item = player->GetMainHandItem();
991  item_X = pPaperdoll_BodyX +
992  paperdoll_Weapon[pBodyComplection][1][0] -
993  pItemsTable->pItems[item->uItemID].uEquipX;
994  item_Y = pPaperdoll_BodyY +
995  paperdoll_Weapon[pBodyComplection][1][1] -
996  pItemsTable->pItems[item->uItemID].uEquipY;
997  if (item->uItemID == ITEM_BLASTER)
998  v166 = "item64v1";
999  else
1000  v166 = item->GetIconName();
1001 
1002  auto texture = assets->GetImage_Alpha(v166);
1003 
1004  if (item->ItemEnchanted()) {
1005  if (item->AuraEffectRed())
1006  container = "sptext01";
1007  else if (item->AuraEffectBlue())
1008  container = "sp28a";
1009  else if (item->AuraEffectGreen())
1010  container = "sp30a";
1011  else if (item->AuraEffectPurple())
1012  container = "sp91a";
1014  if (_50C9A8_item_enchantment_timer <= 0) {
1016  item->ResetEnchantAnimation();
1017  ptr_50C9A4_ItemToEnchant = nullptr;
1018  }
1019  render->BlendTextures(
1020  item_X, item_Y, texture,
1021  assets->GetImage_ColorKey(container, 0x7FF),
1022  OS_GetTime() / 10, 0,
1023  255); // should this pass enchant timer?
1024 
1025  } else if (item->uAttributes & ITEM_BROKEN) {
1026  render->DrawTransparentRedShade(item_X / 640.0f,
1027  item_Y / 480.0f, texture);
1028  } else if (item->uAttributes & ITEM_IDENTIFIED) {
1029  render->DrawTextureAlphaNew(item_X / 640.0f, item_Y / 480.0f,
1030  texture);
1031  } else {
1032  render->DrawTransparentGreenShade(item_X / 640.0f,
1033  item_Y / 480.0f, texture);
1034  }
1035 
1037  render->ZDrawTextureAlpha(item_X / 640.0f, item_Y / 480.0f,
1038  texture,
1039  player->pEquipment.uMainHand);
1040  }
1041  } else { // без акваланга
1042  // ----------------(Bow/
1043  // Лук)-------------------------------------------------
1044  if (player->GetItem(&PlayerEquipment::uBow)) {
1045  item = player->GetBowItem();
1046  item_X = pPaperdoll_BodyX +
1047  paperdoll_Weapon[pBodyComplection][2][0] -
1048  pItemsTable->pItems[item->uItemID].uEquipX;
1049  item_Y = pPaperdoll_BodyY +
1050  paperdoll_Weapon[pBodyComplection][2][1] -
1051  pItemsTable->pItems[item->uItemID].uEquipY;
1052 
1053  auto texture = assets->GetImage_Alpha(item->GetIconName());
1054  if (item->ItemEnchanted()) { // применён закл
1055  if (item->AuraEffectRed())
1056  container = "sptext01";
1057  else if (item->AuraEffectBlue())
1058  container = "sp28a";
1059  else if (item->AuraEffectGreen())
1060  container = "sp30a";
1061  else if (item->AuraEffectPurple())
1062  container = "sp91a";
1064  if (_50C9A8_item_enchantment_timer <= 0) {
1066  item->ResetEnchantAnimation();
1067  ptr_50C9A4_ItemToEnchant = nullptr;
1068  }
1069  render->BlendTextures(
1070  item_X, item_Y, texture,
1071  assets->GetImage_ColorKey(container, 0x7FF),
1072  OS_GetTime() / 10, 0, 255);
1073  } else if (item->uAttributes & ITEM_BROKEN) {
1074  render->DrawTransparentRedShade(item_X / 640.0f,
1075  item_Y / 480.0f, texture);
1076  } else if (!(item->uAttributes & ITEM_IDENTIFIED)) {
1077  render->DrawTransparentGreenShade(item_X / 640.0f,
1078  item_Y / 480.0f, texture);
1079  } else { // опознанный лук
1080  render->DrawTextureAlphaNew(item_X / 640.0f, item_Y / 480.0f,
1081  texture);
1082  }
1083 
1085  render->ZDrawTextureAlpha(item_X / 640.0f, item_Y / 480.0f,
1086  texture, player->pEquipment.uBow);
1087  }
1088  // -----------------------------(Cloak/Плащ)---------------------------------------------------------
1089  if (player->GetItem(&PlayerEquipment::uCloak)) {
1090  item = player->GetCloakItem();
1091  switch (item->uItemID) {
1092  case ITEM_RELIC_TWILIGHT:
1093  index = 5;
1094  break;
1096  index = 6;
1097  break;
1098  case ITEM_RARE_SUN_CLOAK:
1099  index = 7;
1100  break;
1101  case ITEM_RARE_MOON_CLOAK:
1102  index = 8;
1103  break;
1105  index = 9;
1106  break;
1107  default:
1108  index = item->uItemID - 105;
1109  break;
1110  }
1111  if (index >= 0 && index < 10) {
1112  item_X = pPaperdoll_BodyX +
1113  paperdoll_Cloak[pBodyComplection][index][0];
1114  item_Y = pPaperdoll_BodyY +
1115  paperdoll_Cloak[pBodyComplection][index][1];
1116 
1117  if (item->ItemEnchanted()) {
1118  if (item->AuraEffectRed())
1119  container = "sptext01";
1120  else if (item->AuraEffectBlue())
1121  container = "sp28a";
1122  else if (item->AuraEffectGreen())
1123  container = "sp30a";
1124  else if (item->AuraEffectPurple())
1125  container = "sp91a";
1127  if (_50C9A8_item_enchantment_timer <= 0) {
1129  item->ResetEnchantAnimation(); // ~0x000000F0
1130  ptr_50C9A4_ItemToEnchant = nullptr;
1131  }
1132  render->BlendTextures(
1133  item_X, item_Y,
1134  paperdoll_cloak_texture[pBodyComplection][index],
1135  assets->GetImage_ColorKey(container, 0x7FF),
1136  OS_GetTime() / 10, 0, 255);
1137  } else if (item->uAttributes & ITEM_BROKEN) {
1138  render->DrawTransparentRedShade(
1139  item_X / 640.0f, item_Y / 480.0f,
1140  paperdoll_cloak_texture[pBodyComplection][index]);
1141  } else {
1142  render->DrawTextureAlphaNew(
1143  item_X / 640.0f, item_Y / 480.0f,
1144  paperdoll_cloak_texture[pBodyComplection][index]);
1145  }
1146 
1148  render->ZDrawTextureAlpha(
1149  item_X / 640.0f, item_Y / 480.0f,
1150  paperdoll_cloak_texture[pBodyComplection][index],
1151  player->pEquipment.uCloak);
1152  }
1153  }
1154  // -------------------------------(Paperdoll/Кукла)-------------------------------------------
1155  render->DrawTextureAlphaNew(pPaperdoll_BodyX / 640.0f,
1156  pPaperdoll_BodyY / 480.0f,
1157  papredoll_dbods[uPlayerID - 1]);
1158  // -------------------------------(Armor/Броня)-----------------------------------------------
1159  if (player->GetItem(&PlayerEquipment::uArmor)) {
1160  item = player->GetArmorItem();
1161  switch (item->uItemID) {
1163  index = 15;
1164  break;
1165  case ITEM_ARTIFACT_YORUBA:
1166  index = 14;
1167  break;
1169  index = 13;
1170  break;
1171  case ITEM_ELVEN_CHAINMAIL:
1172  index = 16;
1173  break;
1174  default:
1175  index = item->uItemID - 66;
1176  break;
1177  }
1178  if (index >= 0 && index < 17) {
1179  item_X = pPaperdoll_BodyX +
1180  paperdoll_Armor_Coord[pBodyComplection][index][0];
1181  item_Y = pPaperdoll_BodyY +
1182  paperdoll_Armor_Coord[pBodyComplection][index][1];
1183 
1184  if (item->ItemEnchanted()) {
1185  if (item->AuraEffectRed())
1186  container = "sptext01";
1187  else if (item->AuraEffectBlue())
1188  container = "sp28a";
1189  else if (item->AuraEffectGreen())
1190  container = "sp30a";
1191  else if (item->AuraEffectPurple())
1192  container = "sp91a";
1194  if (_50C9A8_item_enchantment_timer <= 0) {
1196  item->ResetEnchantAnimation(); // ~0x000000F0
1197  ptr_50C9A4_ItemToEnchant = nullptr;
1198  }
1199  render->BlendTextures(
1200  item_X, item_Y,
1201  paperdoll_armor_texture[pBodyComplection][index][0],
1202  assets->GetImage_ColorKey(container, 0x7FF),
1203  OS_GetTime() / 10, 0, 255);
1204  } else if (item->uAttributes & ITEM_BROKEN) {
1205  render->DrawTransparentRedShade(
1206  item_X / 640.0f, item_Y / 480.0f,
1207  paperdoll_armor_texture[pBodyComplection][index][0]);
1208  } else if (!(item->uAttributes & ITEM_IDENTIFIED)) {
1209  render->DrawTransparentGreenShade(
1210  item_X / 640.0f, item_Y / 480.0f,
1211  paperdoll_armor_texture[pBodyComplection][index][0]);
1212  } else {
1213  render->DrawTextureAlphaNew(
1214  item_X / 640.0f, item_Y / 480.0f,
1215  paperdoll_armor_texture[pBodyComplection][index][0]);
1216  }
1217 
1219  render->ZDrawTextureAlpha(
1220  item_X / 640.0f, item_Y / 480.0f,
1221  paperdoll_armor_texture[pBodyComplection][index][0],
1222  player->pEquipment.uArmor);
1223  }
1224  }
1225  // ----------------------------------(Boot/Обувь)--------------------------------------------------------
1226  if (player->GetItem(&PlayerEquipment::uBoot)) {
1227  item = player->GetBootItem();
1228  switch (item->uItemID) {
1230  index = 5;
1231  v59 = papredoll_flying_feet[player->uCurrentFace];
1232  break;
1234  index = 6;
1235  v59 = paperdoll_boots_texture[pBodyComplection][5];
1236  break;
1237  default:
1238  index = item->uItemID - 115;
1239  v59 = paperdoll_boots_texture[pBodyComplection][index];
1240  break;
1241  }
1242  if (index >= 0 && index < 7) {
1243  item_X = pPaperdoll_BodyX +
1244  paperdoll_Boot[pBodyComplection][index][0];
1245  item_Y = pPaperdoll_BodyY +
1246  paperdoll_Boot[pBodyComplection][index][1];
1247 
1248  if (item->ItemEnchanted()) {
1249  if (item->AuraEffectRed())
1250  container = "sptext01";
1251  else if (item->AuraEffectBlue())
1252  container = "sp28a";
1253  else if (item->AuraEffectGreen())
1254  container = "sp30a";
1255  else if (item->AuraEffectPurple())
1256  container = "sp91a";
1258  if (_50C9A8_item_enchantment_timer <= 0) {
1260  item->ResetEnchantAnimation(); // ~0x000000F0
1261  ptr_50C9A4_ItemToEnchant = nullptr;
1262  }
1263  render->BlendTextures(
1264  item_X, item_Y, v59,
1265  assets->GetImage_ColorKey(container, 0x7FF),
1266  OS_GetTime() * 0.1, 0, 255);
1267  } else if (item->uAttributes & ITEM_BROKEN) {
1268  render->DrawTransparentRedShade(item_X / 640.0f,
1269  item_Y / 480.0f, v59);
1270  } else if (item->uAttributes & ITEM_IDENTIFIED) {
1271  render->DrawTextureAlphaNew(item_X / 640.0f,
1272  item_Y / 480.0f, v59);
1273  } else {
1274  render->DrawTransparentGreenShade(item_X / 640.0f,
1275  item_Y / 480.0f, v59);
1276  }
1277 
1279  render->ZDrawTextureAlpha(item_X / 640.0f, item_Y / 480.0f,
1280  v59, player->pEquipment.uBoot);
1281  }
1282  }
1283  // --------------------------------------------(Hand/Рука)------------------------------------------------------
1284  if (!player->GetItem(&PlayerEquipment::uMainHand) ||
1285  (player->GetMainHandItem()->GetItemEquipType() !=
1286  EQUIP_TWO_HANDED) &&
1287  (player->GetMainHandItem()->GetPlayerSkillType() !=
1289  player->GetItem(&PlayerEquipment::uShield)))
1290  render->DrawTextureAlphaNew(
1291  (pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0]) /
1292  640.0f,
1293  (pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1]) /
1294  480.0f,
1295  papredoll_dlads[uPlayerID - 1]);
1296  // --------------------------------------------(Belt/Пояс)-------------------------------------------------------
1297  if (player->GetItem(&PlayerEquipment::uBelt)) {
1298  item = player->GetBeltItem();
1299  switch (item->uItemID) {
1301  index = 5;
1302  break;
1304  index = 6;
1305  break;
1306  default:
1307  index = item->uItemID - 100;
1308  break;
1309  }
1310  if (index >= 0 && index < 7) {
1311  item_X = pPaperdoll_BodyX +
1312  paperdoll_Belt[pBodyComplection][index][0];
1313  item_Y = pPaperdoll_BodyY +
1314  paperdoll_Belt[pBodyComplection][index][1];
1315  if (IsDwarf != 1 || index == 5)
1316  v75 = paperdoll_belt_texture[pBodyComplection][index];
1317  else
1318  v75 = paperdoll_belt_texture[pBodyComplection - 2][index];
1319 
1320  if (item->ItemEnchanted()) {
1321  if (item->AuraEffectRed())
1322  container = "sptext01";
1323  else if (item->AuraEffectBlue())
1324  container = "sp28a";
1325  else if (item->AuraEffectGreen())
1326  container = "sp30a";
1327  else if (item->AuraEffectPurple())
1328  container = "sp91a";
1330  if (_50C9A8_item_enchantment_timer <= 0) {
1332  item->ResetEnchantAnimation(); // ~0x000000F0
1333  ptr_50C9A4_ItemToEnchant = nullptr;
1334  }
1335  render->BlendTextures(
1336  item_X, item_Y, v75,
1337  assets->GetImage_ColorKey(container, 0x7FF),
1338  OS_GetTime() / 10, 0, 255);
1339  } else if (item->uAttributes & ITEM_BROKEN) {
1340  render->DrawTransparentRedShade(item_X / 640.0f,
1341  item_Y / 480.0f, v75);
1342  } else if (item->uAttributes & ITEM_IDENTIFIED) {
1343  render->DrawTextureAlphaNew(item_X / 640.0f,
1344  item_Y / 480.0f, v75);
1345  } else {
1346  render->DrawTransparentGreenShade(item_X / 640.0f,
1347  item_Y / 480.0f, v75);
1348  }
1349 
1351  render->ZDrawTextureAlpha(item_X / 640.0f, item_Y / 480.0f,
1352  v75, player->pEquipment.uBelt);
1353  }
1354  }
1355  // --------------------------------(Shoulder/Плечи)---------------------------------------------
1356  if (player->GetItem(&PlayerEquipment::uArmor)) {
1357  item = player->GetArmorItem();
1358  switch (item->uItemID) {
1360  index = 15;
1361  break;
1362  case ITEM_ARTIFACT_YORUBA:
1363  index = 14;
1364  break;
1366  index = 13;
1367  break;
1368  case ITEM_ELVEN_CHAINMAIL:
1369  index = 16;
1370  break;
1371  default:
1372  index = item->uItemID - 66;
1373  break;
1374  }
1375  if (index >= 0 && index < 17) {
1376  if (player->GetItem(&PlayerEquipment::uMainHand) &&
1377  (player->GetMainHandItem()->GetItemEquipType() ==
1378  EQUIP_TWO_HANDED ||
1379  player->GetMainHandItem()->GetPlayerSkillType() ==
1381  !player->GetItem(
1382  &PlayerEquipment::uShield))) { // без щита
1383  v94 = paperdoll_armor_texture[pBodyComplection][index][2];
1384  if (paperdoll_armor_texture[pBodyComplection][index][2]) {
1385  v94 =
1386  paperdoll_armor_texture[pBodyComplection][index][1];
1387  item_X = pPaperdoll_BodyX +
1388  paperdoll_shoulder_coord[pBodyComplection]
1389  [index][0];
1390  item_Y = pPaperdoll_BodyY +
1391  paperdoll_shoulder_coord[pBodyComplection]
1392  [index][1];
1393  } else {
1394  item_X =
1396  paperdoll_shoulder_second_coord[pBodyComplection]
1397  [index][0];
1398  item_Y =
1400  paperdoll_shoulder_second_coord[pBodyComplection]
1401  [index][1];
1402  }
1403  if (v94) {
1404  if (item->ItemEnchanted()) {
1405  if (paperdoll_armor_texture[pBodyComplection][index]
1406  [2]) {
1407  if (item->AuraEffectRed())
1408  container = "sptext01";
1409  else if (item->AuraEffectBlue())
1410  container = "sp28a";
1411  else if (item->AuraEffectGreen())
1412  container = "sp30a";
1413  else if (item->AuraEffectPurple())
1414  container = "sp91a";
1417  if (_50C9A8_item_enchantment_timer <= 0) {
1419  item->ResetEnchantAnimation(); // ~0x000000F0
1420  ptr_50C9A4_ItemToEnchant = nullptr;
1421  }
1422  render->BlendTextures(
1423  item_X, item_Y, v94,
1424  assets->GetImage_ColorKey(container, 0x7FF),
1425  OS_GetTime() / 10, 0, 255);
1426  }
1427  } else if (item->uAttributes & ITEM_BROKEN) {
1428  render->DrawTransparentRedShade(
1429  item_X / 640.0f, item_Y / 480.0f, v94);
1430  } else if (item->uAttributes & ITEM_IDENTIFIED) {
1431  render->DrawTextureAlphaNew(item_X / 640.0f,
1432  item_Y / 480.0f, v94);
1433  } else {
1434  render->DrawTransparentGreenShade(
1435  item_X / 640.0f, item_Y / 480.0f, v94);
1436  }
1437  }
1438  } else { // без ничего или с щитом
1439  // v94 =
1440  // paperdoll_armor_texture[pBodyComplection][index][1];
1441  if (paperdoll_armor_texture[pBodyComplection][index][1]) {
1442  item_X = pPaperdoll_BodyX +
1443  paperdoll_shoulder_coord[pBodyComplection]
1444  [index][0];
1445  item_Y = pPaperdoll_BodyY +
1446  paperdoll_shoulder_coord[pBodyComplection]
1447  [index][1];
1448 
1449  if (item->ItemEnchanted()) {
1450  if (item->AuraEffectRed())
1451  container = "sptext01";
1452  else if (item->AuraEffectBlue())
1453  container = "sp28a";
1454  else if (item->AuraEffectGreen())
1455  container = "sp30a";
1456  else if (item->AuraEffectPurple())
1457  container = "sp91a";
1460  if (_50C9A8_item_enchantment_timer <= 0) {
1462  item->ResetEnchantAnimation(); // ~0x000000F0
1463  ptr_50C9A4_ItemToEnchant = nullptr;
1464  }
1465  render->BlendTextures(
1466  item_X, item_Y,
1467  paperdoll_armor_texture[pBodyComplection][index]
1468  [1],
1469  assets->GetImage_ColorKey(container, 0x7FF),
1470  OS_GetTime() / 10, 0, 255);
1471  } else if (item->uAttributes & ITEM_BROKEN) {
1472  render->DrawTransparentRedShade(
1473  item_X / 640.0f, item_Y / 480.0f,
1474  paperdoll_armor_texture[pBodyComplection][index]
1475  [1]);
1476  } else if (item->uAttributes & ITEM_IDENTIFIED) {
1477  render->DrawTextureAlphaNew(
1478  item_X / 640.0f, item_Y / 480.0f,
1479  paperdoll_armor_texture[pBodyComplection][index]
1480  [1]);
1481  } else {
1482  render->DrawTransparentGreenShade(
1483  item_X / 640.0f, item_Y / 480.0f,
1484  paperdoll_armor_texture[pBodyComplection][index]
1485  [1]);
1486  }
1487  }
1488  }
1489  }
1490  }
1491  // ----------------------------------------------(Cloak collar/воротник
1492  // плаща)-------------------------------------
1493  if (player->GetItem(&PlayerEquipment::uCloak)) {
1494  item = player->GetCloakItem();
1495  switch (item->uItemID) {
1496  case ITEM_RELIC_TWILIGHT:
1497  index = 5;
1498  break;
1500  index = 6;
1501  break;
1502  case ITEM_RARE_SUN_CLOAK:
1503  index = 7;
1504  break;
1505  case ITEM_RARE_MOON_CLOAK:
1506  index = 8;
1507  break;
1509  index = 9;
1510  break;
1511  default:
1512  index = item->uItemID - 105;
1513  }
1514  if (index > 0 && index < 10) { // leather cloak has no collar
1515  item_X = pPaperdoll_BodyX +
1516  paperdoll_CloakCollar[pBodyComplection][index][0];
1517  item_Y = pPaperdoll_BodyY +
1518  paperdoll_CloakCollar[pBodyComplection][index][1];
1519  // int r = pIcons_LOD->FindTextureByName("item325v2a1");
1520 
1521  if (paperdoll_cloak_collar_texture[pBodyComplection][index]) {
1522  if (item->ItemEnchanted()) {
1523  if (item->AuraEffectRed())
1524  container = "sptext01";
1525  else if (item->AuraEffectBlue())
1526  container = "sp28a";
1527  else if (item->AuraEffectGreen())
1528  container = "sp30a";
1529  else if (item->AuraEffectPurple())
1530  container = "sp91a";
1533  if (_50C9A8_item_enchantment_timer <= 0) {
1535  item->ResetEnchantAnimation(); // ~0x000000F0
1536  ptr_50C9A4_ItemToEnchant = nullptr;
1537  }
1538  render->BlendTextures(
1539  item_X, item_Y,
1540  paperdoll_cloak_collar_texture[pBodyComplection]
1541  [index],
1542  assets->GetImage_ColorKey(container, 0x7FF),
1543  OS_GetTime() / 10, 0, 255);
1544  } else if (item->uAttributes & ITEM_BROKEN) {
1545  render->DrawTransparentRedShade(
1546  item_X / 640.0f, item_Y / 480.0f,
1547  paperdoll_cloak_collar_texture[pBodyComplection]
1548  [index]);
1549  } else {
1550  render->DrawTextureAlphaNew(
1551  item_X / 640.0f, item_Y / 480.0f,
1552  paperdoll_cloak_collar_texture[pBodyComplection]
1553  [index]);
1554  }
1555 
1557  render->ZDrawTextureAlpha(
1558  item_X / 640.0f, item_Y / 480.0f,
1559  paperdoll_cloak_collar_texture[pBodyComplection]
1560  [index],
1561  player->pEquipment.uCloak);
1562  }
1563  }
1564  }
1565  // --------------------------------------------(Beards/Борода)-------------------------------------------------------
1566  if (player->uCurrentFace == 12 || player->uCurrentFace == 13) {
1567  if (paperdoll_dbrds[player->uCurrentFace])
1568  render->DrawTextureAlphaNew(
1569  (pPaperdoll_BodyX +
1570  pPaperdoll_Beards[2 * player->uCurrentFace - 24]) /
1571  640.0f,
1572  (pPaperdoll_BodyY +
1573  pPaperdoll_Beards[2 * player->uCurrentFace - 23]) /
1574  480.0f,
1575  paperdoll_dbrds[player->uCurrentFace]);
1576  }
1577  // --------------------------------------------(Helm/Шлем)------------------------------------------------------------
1578  if (player->GetItem(&PlayerEquipment::uHelm)) {
1579  item = player->GetHelmItem();
1580  switch (item->uItemID) {
1582  index = 11;
1583  break;
1585  index = 12;
1586  break;
1588  index = 13;
1589  break;
1591  index = 14;
1592  break;
1594  index = 15;
1595  break;
1596  default:
1597  index = item->uItemID - 89;
1598  }
1599  if (index >= 0 && index < 16) {
1600  item_X = pPaperdoll_BodyX +
1601  paperdoll_Helm[pBodyComplection][index][0];
1602  item_Y = pPaperdoll_BodyY +
1603  paperdoll_Helm[pBodyComplection][index][1];
1604  if (IsDwarf != 1 || item->uItemID != ITEM_92)
1605  v127 =
1607  else
1608  v127 = paperdoll_dbrds[11];
1609 
1610  if (item->ItemEnchanted()) {
1611  if (item->AuraEffectRed())
1612  container = "sptext01";
1613  else if (item->AuraEffectBlue())
1614  container = "sp28a";
1615  else if (item->AuraEffectGreen())
1616  container = "sp30a";
1617  else if (item->AuraEffectPurple())
1618  container = "sp91a";
1620  if (_50C9A8_item_enchantment_timer <= 0) {
1622  item->ResetEnchantAnimation();
1623  ptr_50C9A4_ItemToEnchant = nullptr;
1624  }
1625  render->BlendTextures(
1626  item_X, item_Y, v127,
1627  assets->GetImage_ColorKey(container, 0x7FF),
1628  OS_GetTime() / 10, 0, 255);
1629  } else if (item->uAttributes & ITEM_BROKEN) {
1630  render->DrawTransparentRedShade(item_X / 640.0f,
1631  item_Y / 480.0f, v127);
1632  } else if (item->uAttributes & ITEM_IDENTIFIED) {
1633  render->DrawTextureAlphaNew(item_X / 640.0f,
1634  item_Y / 480.0f, v127);
1635  } else {
1636  render->DrawTransparentGreenShade(item_X / 640.0f,
1637  item_Y / 480.0f, v127);
1638  }
1639 
1641  render->ZDrawTextureAlpha(item_X / 640.0f, item_Y / 480.0f,
1642  v127, player->pEquipment.uHelm);
1643  }
1644  }
1645  // ------------------------------------------------(Hand3/Рука3)-------------------------------------------
1646  if (player->GetItem(&PlayerEquipment::uMainHand)) {
1647  item = player->GetMainHandItem();
1648  item_X = pPaperdoll_BodyX +
1649  paperdoll_Weapon[pBodyComplection][1][0] -
1650  pItemsTable->pItems[item->uItemID].uEquipX;
1651  item_Y = pPaperdoll_BodyY +
1652  paperdoll_Weapon[pBodyComplection][1][1] -
1653  pItemsTable->pItems[item->uItemID].uEquipY;
1654  if (item->uItemID == ITEM_BLASTER)
1655  v181 = "item64v1";
1656  else
1657  v181 = item->GetIconName();
1658 
1659  auto texture = assets->GetImage_Alpha(v181);
1660 
1661  if (item->ItemEnchanted()) {
1662  if (item->AuraEffectRed())
1663  container = "sptext01";
1664  else if (item->AuraEffectBlue())
1665  container = "sp28a";
1666  else if (item->AuraEffectGreen())
1667  container = "sp30a";
1668  else if (item->AuraEffectPurple())
1669  container = "sp91a";
1671  if (_50C9A8_item_enchantment_timer <= 0) {
1673  item->ResetEnchantAnimation();
1674  ptr_50C9A4_ItemToEnchant = nullptr;
1675  }
1676  render->BlendTextures(
1677  item_X, item_Y, texture,
1678  assets->GetImage_ColorKey(container, 0x7FF),
1679  OS_GetTime() / 10, 0, 255);
1680  } else if (item->uAttributes & ITEM_BROKEN) {
1681  render->DrawTransparentRedShade(item_X / 640.0f,
1682  item_Y / 480.0f, texture);
1683  } else if (item->uAttributes & ITEM_IDENTIFIED) {
1684  render->DrawTextureAlphaNew(item_X / 640.0f, item_Y / 480.0f,
1685  texture);
1686  } else {
1687  render->DrawTransparentGreenShade(item_X / 640.0f,
1688  item_Y / 480.0f, texture);
1689  }
1690 
1692  render->ZDrawTextureAlpha(item_X / 640.0f, item_Y / 480.0f,
1693  texture,
1694  player->pEquipment.uMainHand);
1695  }
1696  // --------------------------------------------------(Shield/Щит)---------------------------------------------
1697  if (player->GetItem(&PlayerEquipment::uShield)) {
1698  item = player->GetOffHandItem();
1699  if (item->GetPlayerSkillType() == PLAYER_SKILL_DAGGER ||
1701  // v151 = item->uItemID - 400;
1702  item_X = 596;
1703  two_handed_left_fist = true;
1704  switch (item->uItemID) {
1705  case 400:
1706  item_Y = 86;
1707  break;
1708  case 403:
1709  item_Y = 28;
1710  break;
1711  case 415:
1712  item_X = 595;
1713  item_Y = 33;
1714  break;
1715  default:
1716  item_X = pPaperdoll_BodyX +
1717  paperdoll_Weapon[pBodyComplection][0][0] -
1718  pItemsTable->pItems[item->uItemID].uEquipX;
1719  item_Y = pPaperdoll_BodyY +
1720  paperdoll_Weapon[pBodyComplection][0][1] -
1721  pItemsTable->pItems[item->uItemID].uEquipY;
1722  break;
1723  }
1724  } else {
1725  two_handed_left_fist = false;
1726  item_X = pPaperdoll_BodyX +
1727  paperdoll_Weapon[pBodyComplection][0][0] -
1728  pItemsTable->pItems[item->uItemID].uEquipX;
1729  item_Y = pPaperdoll_BodyY +
1730  paperdoll_Weapon[pBodyComplection][0][1] -
1731  pItemsTable->pItems[item->uItemID].uEquipY;
1732  }
1733  v153 = assets->GetImage_Alpha(item->GetIconName());
1734 
1735  if (item->ItemEnchanted()) {
1736  // if (item->AuraEffectRed())
1737  container = "sptext01";
1738  /*else*/
1739  if (item->AuraEffectBlue())
1740  container = "sp28a";
1741  else if (item->AuraEffectGreen())
1742  container = "sp30a";
1743  else if (item->AuraEffectPurple())
1744  container = "sp91a";
1745 
1747  if (_50C9A8_item_enchantment_timer <= 0) {
1749  item->ResetEnchantAnimation();
1750  ptr_50C9A4_ItemToEnchant = nullptr;
1751  }
1752  render->BlendTextures(
1753  item_X, item_Y, v153,
1754  assets->GetImage_ColorKey(container, 0x7FF),
1755  OS_GetTime() / 10, 0, 255);
1756  } else if (item->uAttributes & ITEM_BROKEN) {
1757  render->DrawTransparentRedShade(item_X / 640.0f,
1758  item_Y / 480.0f, v153);
1759  } else if (!(item->uAttributes & ITEM_IDENTIFIED)) {
1760  render->DrawTransparentGreenShade(item_X / 640.0f,
1761  item_Y / 480.0f, v153);
1762  } else {
1763  render->DrawTextureAlphaNew(item_X / 640.0f, item_Y / 480.0f,
1764  v153);
1765  }
1766 
1767  if (two_handed_left_fist) // two-handed - left fist/двуручие -
1768  // левая кисть
1769  render->DrawTextureAlphaNew(
1770  (pPaperdoll_BodyX +
1771  pPaperdollLeftEmptyHand[pBodyComplection][0]) /
1772  640.0f,
1773  (pPaperdoll_BodyY +
1774  pPaperdollLeftEmptyHand[pBodyComplection][1]) /
1775  480.0f,
1776  papredoll_dlhs[uPlayerID - 1]);
1778  render->ZDrawTextureAlpha(item_X / 640.0f, item_Y / 480.0f,
1779  v153, player->pEquipment.uShield);
1780  }
1781  }
1782  // --------------------------------------------------------(RightHand/Правая
1783  // кисть)--------------------------------------------------
1784  render->DrawTextureAlphaNew(
1785  (pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0]) / 640.0f,
1786  (pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1]) / 480.0f,
1787  papredoll_drhs[uPlayerID - 1]);
1788  // ---------------------------------------------(two-handed - hand/Двуручие -
1789  // рука)--------------------------------------------------
1790  if (player->GetItem(&PlayerEquipment::uMainHand)) {
1791  if (player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED ||
1792  player->GetMainHandItem()->GetPlayerSkillType() ==
1794  !player->GetItem(&PlayerEquipment::uShield))
1795  render->DrawTextureAlphaNew(
1796  (pPaperdoll_BodyX +
1797  pPaperdoll_SecondLeftHand[pBodyComplection][0]) /
1798  640.0f,
1799  (pPaperdoll_BodyY +
1800  pPaperdoll_SecondLeftHand[pBodyComplection][1]) /
1801  480.0f,
1802  papredoll_dlaus[uPlayerID - 1]);
1803  }
1804  // --------------------------------------------------------(two-handed -
1805  // fist/двуручие - кисть)----------------------------------------------------
1806  if (player->GetItem(&PlayerEquipment::uMainHand)) {
1807  item = player->GetMainHandItem();
1808  if (item->GetItemEquipType() == EQUIP_TWO_HANDED ||
1810  !player->GetItem(&PlayerEquipment::uShield))
1811  render->DrawTextureAlphaNew(
1812  (pPaperdoll_BodyX +
1813  pPaperdoll_SecondLeftHand[pBodyComplection][0]) /
1814  640.0f,
1815  (pPaperdoll_BodyY +
1816  pPaperdoll_SecondLeftHand[pBodyComplection][1]) /
1817  480.0f,
1818  papredoll_dlhus[uPlayerID - 1]);
1819  }
1820 
1821  if (!bRingsShownInCharScreen) //рисование лупы
1822  render->DrawTextureAlphaNew(603 / 640.0f, 299 / 480.0f,
1824 
1825  render->DrawTextureAlphaNew(468 / 640.0f, 0, game_ui_right_panel_frame);
1826 }
1827 
1828 //----- (0041A2D1) --------------------------------------------------------
1829 void CharacterUI_InventoryTab_Draw(Player *player, bool Cover_Strip) {
1830  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f,
1832  if (Cover_Strip) {
1833  if (ui_character_inventory_background_strip == nullptr) {
1834  // strip doesnt load if you havent already look at
1835  // inventorys
1837  assets->GetImage_ColorKey("fr_strip", 0x7FF);
1838  }
1839  render->DrawTextureAlphaNew(8 / 640.0f, 305 / 480.0f,
1841  }
1842 
1843  for (uint i = 0; i < 126; ++i) {
1844  if (player->pInventoryMatrix[i] <= 0) continue;
1845  if (!player->pInventoryItemList[player->pInventoryMatrix[i] - 1]
1846  .uItemID)
1847  continue;
1848  unsigned int uCellY = 32 * (i / 14) + 17;
1849  unsigned int uCellX = 32 * (i % 14) + 14;
1850 
1851  Image *pTexture = assets->GetImage_Alpha(
1852  player->pInventoryItemList[player->pInventoryMatrix[i] - 1]
1853  .GetIconName());
1854 
1855  int width = pTexture->GetWidth();
1856  int height = pTexture->GetHeight();
1857  if (width < 14) width = 14;
1858  if (height < 14) height = 14;
1859 
1860  signed int X_offset = (((signed int)((width - 14) & 0xFFFFFFE0) + 32) - width) / 2;
1861  signed int Y_offset = (((signed int)((height - 14) & 0xFFFFFFE0) + 32) - height) / 2;
1862  CharacterUI_DrawItem(uCellX + X_offset, uCellY + Y_offset,
1863  &(player->pInventoryItemList[player->pInventoryMatrix[i] - 1]), 0);
1864  }
1865 }
1866 
1867 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id) {
1868  auto item_texture = assets->GetImage_Alpha(item->GetIconName());
1869 
1870  if (item->uAttributes & ITEM_ENCHANT_ANIMATION) { // enchant animation
1871  Image *enchantment_texture = nullptr;
1872  switch (item->uAttributes & ITEM_ENCHANT_ANIMATION) {
1873  case ITEM_AURA_EFFECT_RED:
1874  enchantment_texture =
1875  assets->GetImage_ColorKey("sptext01", 0x7FF);
1876  break;
1877  case ITEM_AURA_EFFECT_BLUE:
1878  enchantment_texture = assets->GetImage_ColorKey("sp28a", 0x7FF);
1879  break;
1881  enchantment_texture = assets->GetImage_ColorKey("sp30a", 0x7FF);
1882  break;
1884  enchantment_texture = assets->GetImage_ColorKey("sp91a", 0x7FF);
1885  break;
1886  }
1887 
1889  if (_50C9A8_item_enchantment_timer <= 0) {
1891  item->uAttributes &= 0xFFFFFF0F;
1892  ptr_50C9A4_ItemToEnchant = nullptr;
1893  }
1894  render->BlendTextures(x, y, item_texture, enchantment_texture,
1895  OS_GetTime() / 10, 0, 255);
1896  } else {
1897  if (item->IsBroken())
1898  render->DrawTransparentRedShade(x / 640.0f, y / 480.0f,
1899  item_texture);
1900  else if (!item->IsIdentified())
1901  render->DrawTransparentGreenShade(x / 640.0f, y / 480.0f,
1902  item_texture);
1903  else
1904  render->DrawTextureAlphaNew(x / 640.0f, y / 480.0f, item_texture);
1905 
1906  render->ZBuffer_Fill_2(x, y, item_texture, id); // blank functions
1907  }
1908 }
1909 
1910 //----- (0043E825) --------------------------------------------------------
1912  CharacterUI_DrawPaperdoll(player);
1913 
1914  render->DrawTextureAlphaNew(
1916  render->DrawTextureAlphaNew(468 / 640.0f, 0, game_ui_right_panel_frame);
1917  render->DrawTextureAlphaNew(pCharacterScreen_DetalizBtn->uX / 640.0f,
1918  pCharacterScreen_DetalizBtn->uY / 480.0f,
1920 
1921  for (uint i = 0; i < 6; ++i) {
1922  if (!player->pEquipment.uRings[i]) continue;
1923  static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248,
1924  0x1EA, 0x21A, 0x248};
1925  static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA,
1926  0x0FA, 0x0FA, 0x0FA};
1928  pPaperdollRingsX[i], pPaperdollRingsY[i],
1929  &player->pInventoryItemList[player->pEquipment.uRings[i] - 1],
1930  player->pEquipment.uRings[i]);
1931  }
1932  if (player->pEquipment.uAmulet)
1933  CharacterUI_DrawItem(493, 91, player->GetAmuletItem(),
1934  player->pEquipment.uAmulet);
1935  if (player->pEquipment.uGlove)
1936  CharacterUI_DrawItem(586, 88, player->GetGloveItem(),
1937  player->pEquipment.uGlove);
1938 }
1939 
1940 //----- (0043BCA7) --------------------------------------------------------
1942  int v3; // ebx@10
1943  Player *pPlayer; // edi@12
1944  signed int v32; // [sp+10h] [bp-28h]@75
1945  signed int v33; // [sp+10h] [bp-28h]@77
1946  int pItemTXTNum; // [sp+14h] [bp-24h]@75
1947  signed int v38; // [sp+14h] [bp-24h]@79
1948  char pContainer[128]; // [sp+24h] [bp-14h]@12
1949 
1952  assets->GetImage_Alpha("MAGNIF-B");
1953 
1954  // if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment
1955  // == 2 )
1958  assets->GetImage_ColorKey("BACKDOLL", 0x7FF);
1959 
1961  assets->GetImage_Alpha("BACKHAND");
1962 
1965  for (uint i = 0; i < 4; ++i) {
1966  if (pPlayers[i + 1]->HasUnderwaterSuitEquipped()) {
1967  if (pPlayers[i + 1]->GetRace() == CHARACTER_RACE_DWARF)
1968  v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 3;
1969  else
1970  v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 1;
1971  sprintf(pContainer, "pc23v%dBod", v3);
1972  papredoll_dbods[i] =
1973  assets->GetImage_Alpha(pContainer); // Body texture
1974  sprintf(pContainer, "pc23v%dlad", v3);
1975  papredoll_dlads[i] =
1976  assets->GetImage_Alpha(pContainer); // Left Hand
1977  sprintf(pContainer, "pc23v%dlau", v3);
1978  papredoll_dlaus[i] =
1979  assets->GetImage_Alpha(pContainer); // Left Hand2
1980  sprintf(pContainer, "pc23v%drh", v3);
1981  papredoll_drhs[i] =
1982  assets->GetImage_Alpha(pContainer); // Right Hand
1983  sprintf(pContainer, "pc23v%dlh", v3);
1984  papredoll_dlhs[i] =
1985  assets->GetImage_Alpha(pContainer); // Left Palm
1986  sprintf(pContainer, "pc23v%dlhu", v3);
1987  papredoll_dlhus[i] =
1988  assets->GetImage_Alpha(pContainer); // Left Fist
1989  pPlayer = pPlayers[i + 1];
1990 
1991  if (pPlayer->uCurrentFace == 12 || pPlayer->uCurrentFace == 13)
1992  paperdoll_dbrds[(char)pPlayer->uCurrentFace] = nullptr;
1993  papredoll_flying_feet[pPlayer->uCurrentFace] = nullptr;
1994 
1995  IsPlayerWearingWatersuit[i + 1] = true;
1996  } else {
1998  dbod_texnames_by_face[pPlayers[i + 1]->uCurrentFace]);
2000  dlad_texnames_by_face[pPlayers[i + 1]->uCurrentFace]);
2002  dlau_texnames_by_face[pPlayers[i + 1]->uCurrentFace]);
2004  drh_texnames_by_face[pPlayers[i + 1]->uCurrentFace]);
2006  dlh_texnames_by_face[pPlayers[i + 1]->uCurrentFace]);
2008  dlhu_texnames_by_face[pPlayers[i + 1]->uCurrentFace]);
2009 
2010  if (pPlayers[i + 1]->uCurrentFace == 12 ||
2011  pPlayers[i + 1]->uCurrentFace == 13) {
2012  paperdoll_dbrds[pPlayers[i + 1]->uCurrentFace] =
2014  "pc%02dbrd", pPlayers[i + 1]->uCurrentFace + 1));
2015  }
2016 
2017  papredoll_flying_feet[pPlayers[i + 1]->uCurrentFace] =
2019  "item281pc%02d", pPlayers[i + 1]->uCurrentFace + 1));
2020  IsPlayerWearingWatersuit[i + 1] = 0;
2021  }
2022  }
2023 
2024  ui_ar_up_up = assets->GetImage_Alpha("ar_up_up");
2025  ui_ar_up_dn = assets->GetImage_Alpha("ar_up_dn");
2026  ui_ar_dn_up = assets->GetImage_Alpha("ar_dn_up");
2027  ui_ar_dn_dn = assets->GetImage_Alpha("ar_dn_dn");
2028 
2029  paperdoll_dbrds[9] = assets->GetImage_Solid("ib-cd1-d");
2030  paperdoll_dbrds[7] = assets->GetImage_Solid("ib-cd2-d");
2031  paperdoll_dbrds[5] = assets->GetImage_Solid("ib-cd3-d");
2032  paperdoll_dbrds[3] = assets->GetImage_Solid("ib-cd4-d");
2033  paperdoll_dbrds[1] = assets->GetImage_Solid("ib-cd5-d");
2034 
2035  for (uint i = 0; i < 54; ++i) { // test equipment
2036  party_has_equipment[i] = 0;
2037  if (pParty->pPickedItem.uItemID != i + 66) {
2038  for (uint j = 0; j < 4; ++j) {
2039  if (pParty->pPlayers[j].HasItem(i + 66, 0))
2040  party_has_equipment[i] = 1;
2041  }
2042  }
2043  }
2044  memset(byte_5111F6_OwnedArtifacts.data(), 0,
2045  sizeof(byte_5111F6_OwnedArtifacts));
2046  for (uint i = 0; i < 4; ++i) {
2047  Player *player = &pParty->pPlayers[i];
2048 
2049  if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1))
2051  if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1))
2053  if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1))
2055  if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1))
2057  if (player->HasItem(ITEM_RELIC_TALEDONS_HELM, 1))
2059  if (player->HasItem(ITEM_RELIC_SCHOLARS_CAP, 1))
2061  if (player->HasItem(ITEM_RELIC_PHYNAXIAN_CROWN, 1))
2063  if (player->HasItem(ITEM_ARTIFACT_MINDS_EYE, 1))
2065  if (player->HasItem(ITEM_RARE_SHADOWS_MASK, 1))
2067  if (player->HasItem(ITEM_RILIC_TITANS_BELT, 1))
2069  if (player->HasItem(ITEM_ARTIFACT_HEROS_BELT, 1))
2071  if (player->HasItem(ITEM_RELIC_TWILIGHT, 1))
2073  if (player->HasItem(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, 1))
2075  if (player->HasItem(ITEM_RARE_SUN_CLOAK, 1))
2077  if (player->HasItem(ITEM_RARE_MOON_CLOAK, 1))
2079  if (player->HasItem(ITEM_RARE_VAMPIRES_CAPE, 1))
2081  if (player->HasItem(ITEM_ELVEN_CHAINMAIL, 1))
2083  }
2084 
2085  for (uint i = 0; i < 2; ++i) {
2086  for (uint j = 0; j < 5; ++j) { // Belt
2087  GetItemTextureFilename(pContainer, j + 100, i + 1, 0);
2088  paperdoll_belt_texture[i][j] = assets->GetImage_Alpha(pContainer);
2089  }
2090  GetItemTextureFilename(pContainer, 535, i + 1, 0);
2091  paperdoll_belt_texture[i][6] = assets->GetImage_Alpha(pContainer);
2092  for (uint j = 0; j < 11; ++j) { // Helm
2093  GetItemTextureFilename(pContainer, j + 89, i + 1, 0);
2094  paperdoll_helm_texture[i][j] = assets->GetImage_Alpha(pContainer);
2095  }
2096  GetItemTextureFilename(pContainer, 521, i + 1, 0);
2097  paperdoll_helm_texture[i][11] = assets->GetImage_Alpha(pContainer);
2098  GetItemTextureFilename(pContainer, 522, i + 1, 0);
2099  paperdoll_helm_texture[i][12] = assets->GetImage_Alpha(pContainer);
2100  GetItemTextureFilename(pContainer, 523, i + 1, 0);
2101  paperdoll_helm_texture[i][13] = assets->GetImage_Alpha(pContainer);
2102  GetItemTextureFilename(pContainer, 532, i + 1, 0);
2103  paperdoll_helm_texture[i][14] = assets->GetImage_Alpha(pContainer);
2104  GetItemTextureFilename(pContainer, 544, i + 1, 0);
2105  paperdoll_helm_texture[i][15] = assets->GetImage_Alpha(pContainer);
2106 
2107  if (IsDwarfPresentInParty(true)) // the phynaxian helm uses a slightly
2108  // different graphic for dwarves
2109  paperdoll_dbrds[11] = assets->GetImage_Alpha("item092v3");
2110  }
2111  // v43 = 0;
2112  for (uint i = 0; i < 4; ++i) {
2114  GetItemTextureFilename(pContainer, 524, i + 1, 0);
2115  paperdoll_belt_texture[i][5] =
2116  assets->GetImage_Alpha(pContainer); // Titans belt
2117  pItemTXTNum = 66;
2118  for (v32 = 0; v32 < 13; ++v32) { // simple armor
2119  GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 0);
2120  paperdoll_armor_texture[i][v32][0] =
2121  assets->GetImage_Alpha(pContainer); // armor
2122  GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 1);
2123  paperdoll_armor_texture[i][v32][1] =
2124  assets->GetImage_Alpha(pContainer); // shoulder 1
2125  GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 2);
2126  paperdoll_armor_texture[i][v32][2] =
2127  assets->GetImage_Alpha(pContainer); // shoulder 2
2128  pItemTXTNum++;
2129  }
2130  GetItemTextureFilename(pContainer, 516, i + 1, 0); // artefacts
2131  paperdoll_armor_texture[i][v32][0] =
2132  assets->GetImage_Alpha(pContainer);
2133  GetItemTextureFilename(pContainer, 516, i + 1, 1);
2134  paperdoll_armor_texture[i][v32][1] =
2135  assets->GetImage_Alpha(pContainer);
2136  GetItemTextureFilename(pContainer, 516, i + 1, 2);
2137  paperdoll_armor_texture[i][v32][2] =
2138  assets->GetImage_Alpha(pContainer);
2139  GetItemTextureFilename(pContainer, 505, i + 1, 0);
2140  paperdoll_armor_texture[i][v32 + 1][0] =
2141  assets->GetImage_Alpha(pContainer);
2142  GetItemTextureFilename(pContainer, 505, i + 1, 1);
2143  paperdoll_armor_texture[i][v32 + 1][1] =
2144  assets->GetImage_Alpha(pContainer);
2145  GetItemTextureFilename(pContainer, 505, i + 1, 2);
2146  paperdoll_armor_texture[i][v32 + 1][2] =
2147  assets->GetImage_Alpha(pContainer);
2148  GetItemTextureFilename(pContainer, 504, i + 1, 0);
2149  paperdoll_armor_texture[i][v32 + 2][0] =
2150  assets->GetImage_Alpha(pContainer);
2151  GetItemTextureFilename(pContainer, 504, i + 1, 1);
2152  paperdoll_armor_texture[i][v32 + 2][1] =
2153  assets->GetImage_Alpha(pContainer);
2154  GetItemTextureFilename(pContainer, 504, i + 1, 2);
2155  paperdoll_armor_texture[i][v32 + 2][2] =
2156  assets->GetImage_Alpha(pContainer);
2157  GetItemTextureFilename(pContainer, 533, i + 1, 0);
2158  paperdoll_armor_texture[i][v32 + 3][0] =
2159  assets->GetImage_Alpha(pContainer);
2160  GetItemTextureFilename(pContainer, 533, i + 1, 1);
2161  paperdoll_armor_texture[i][v32 + 3][1] =
2162  assets->GetImage_Alpha(pContainer);
2163  GetItemTextureFilename(pContainer, 533, i + 1, 2);
2164  paperdoll_armor_texture[i][v32 + 3][2] =
2165  assets->GetImage_Alpha(pContainer);
2166  for (v33 = 0; v33 < 5; ++v33) { // boots
2167  GetItemTextureFilename(pContainer, v33 + 115, i + 1, 0);
2168  paperdoll_boots_texture[i][v33] =
2169  assets->GetImage_Alpha(pContainer);
2170  }
2171  GetItemTextureFilename(pContainer, 512, i + 1, 0);
2172  paperdoll_boots_texture[i][v33] =
2173  assets->GetImage_Alpha(pContainer);
2174  for (v38 = 0; v38 < 5; ++v38) { // Cloak
2175  GetItemTextureFilename(pContainer, v38 + 105, i + 1, 0);
2176  paperdoll_cloak_texture[i][v38] =
2177  assets->GetImage_Alpha(pContainer);
2178  GetItemTextureFilename(pContainer, v38 + 105, i + 1, 1);
2180  assets->GetImage_Alpha(pContainer);
2181  }
2182 
2183  GetItemTextureFilename(pContainer, 525, i + 1, 0);
2184  paperdoll_cloak_texture[i][5] = assets->GetImage_Alpha(pContainer);
2185  GetItemTextureFilename(pContainer, 530, i + 1, 0);
2186  paperdoll_cloak_texture[i][6] = assets->GetImage_Alpha(pContainer);
2187  GetItemTextureFilename(pContainer, 547, i + 1, 0);
2188  paperdoll_cloak_texture[i][7] = assets->GetImage_Alpha(pContainer);
2189  GetItemTextureFilename(pContainer, 548, i + 1, 0);
2190  paperdoll_cloak_texture[i][8] = assets->GetImage_Alpha(pContainer);
2191  GetItemTextureFilename(pContainer, 550, i + 1, 0);
2192  paperdoll_cloak_texture[i][9] = assets->GetImage_Alpha(pContainer);
2193  GetItemTextureFilename(pContainer, 525, i + 1, 1);
2195  assets->GetImage_Alpha(pContainer);
2196  GetItemTextureFilename(pContainer, 530, i + 1, 1);
2198  assets->GetImage_Alpha(pContainer);
2199  GetItemTextureFilename(pContainer, 547, i + 1, 1);
2201  assets->GetImage_Alpha(pContainer);
2202  GetItemTextureFilename(pContainer, 548, i + 1, 1);
2204  assets->GetImage_Alpha(pContainer);
2205  GetItemTextureFilename(pContainer, 550, i + 1, 1);
2207  assets->GetImage_Alpha(pContainer);
2208  }
2209  // else
2210  //{
2211  // v26 = v43;
2212  //}
2213  // v43 = v26 + 40;
2214  }
2215 }
2216 
2218  int skill_id; // [sp+18h] [bp-Ch]@8
2219 
2220  int buttons_count = 0;
2223  for (GUIButton *pButton : pGUIWindow_CurrentMenu->vButtons) {
2224  if (pButton->msg == UIMSG_InventoryLeftClick) {
2225  dword_50698C_uX = pButton->uX;
2226  dword_506988_uY = pButton->uY;
2227  dword_506984_uZ = pButton->uZ;
2228  dword_506980_uW = pButton->uW;
2229  pButton->uW = 0;
2230  pButton->uZ = 0;
2231  pButton->uY = 0;
2232  pButton->uX = 0;
2233  }
2234  buttons_count++;
2235  }
2236  int first_rows = 0;
2237  Player *curr_player = &pParty->pPlayers[uActiveCharacter - 1];
2238 
2239  int uCurrFontHeght = pFontLucida->GetHeight();
2240  unsigned int current_Y = 2 * uCurrFontHeght + 13;
2241  for (int i = 0; i < 9; ++i) {
2242  skill_id = pWeaponSkills[i];
2243  if (curr_player->pActiveSkills[skill_id] & 0x3F) {
2244  current_Y += uCurrFontHeght - 3;
2245  ++buttons_count;
2246  ++first_rows;
2248  24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000,
2249  UIMSG_SkillUp, skill_id, 0, "");
2250  }
2251  }
2252  if (!first_rows) current_Y += uCurrFontHeght - 3;
2253  current_Y += 2 * uCurrFontHeght - 6;
2254  for (int i = 0; i < 9; ++i) {
2255  skill_id = pMagicSkills[i];
2256  if (curr_player->pActiveSkills[skill_id] & 0x3F && buttons_count < 15) {
2257  current_Y += uCurrFontHeght - 3;
2258  ++buttons_count;
2260  24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000,
2261  UIMSG_SkillUp, skill_id, 0, "");
2262  }
2263  }
2264  first_rows = 0;
2265  current_Y = 2 * uCurrFontHeght + 13;
2266  for (int i = 0; i < 5; ++i) {
2267  skill_id = pArmorSkills[i];
2268  if (curr_player->pActiveSkills[skill_id] & 0x3F) {
2269  current_Y += uCurrFontHeght - 3;
2270  ++buttons_count;
2271  ++first_rows;
2273  246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000,
2274  UIMSG_SkillUp, skill_id, 0, "");
2275  }
2276  }
2277  if (!first_rows) current_Y += uCurrFontHeght - 3;
2278  current_Y += 2 * uCurrFontHeght - 6;
2279  for (int i = 0; i < 12; ++i) {
2280  skill_id = pMiscSkills[i];
2281  if (curr_player->pActiveSkills[skill_id] & 0x3F) {
2282  current_Y += uCurrFontHeght - 3;
2283  ++buttons_count;
2285  246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000,
2286  UIMSG_SkillUp, skill_id, 0, "");
2287  }
2288  }
2289 
2290  if (buttons_count) {
2292  buttons_count, 1, 0, buttons_count);
2293  }
2294 }
2295 
2297  int pY; // ST34_4@4
2298  const char *pText; // eax@9
2299  const char *text_format; // [sp+14h] [bp-Ch]@4
2300 
2301  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f,
2303 
2304  auto str1 =
2307  429, player->pName,
2309  player->classType)) // "^Pi[%s] %s" / "%s the %s"
2310  + StringPrintf("\f00000\r180%s: \f%05d%d\f00000\n\n\n",
2311  localization->GetString(207), // "Skill points"
2314  player->uSkillPoints);
2315  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, str1);
2316 
2317  // First column(Первая колонка)
2318  pY = 53;
2319  auto str2 = StringPrintf(
2320  "%s\f%05u\r424%d\f00000 /\t185%d\n", localization->GetString(144),
2322  player->GetBaseStrength()),
2323  player->GetActualMight(), player->GetBaseStrength()); // Might
2324  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str2);
2325 
2326  pY += pFontArrus->GetHeight() - 2;
2327  auto str3 = StringPrintf(
2328  "%s\f%05u\r424%d\f00000 /\t185%d\n", localization->GetString(116),
2330  player->GetActualIntelligence(), player->GetBaseIntelligence()),
2331  player->GetActualIntelligence(),
2332  player->GetBaseIntelligence()); // Intellect
2333  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str3);
2334 
2335  pY += pFontArrus->GetHeight() - 2;
2336  auto str4 = StringPrintf(
2337  "%s\f%05u\r424%d\f00000 /\t185%d\n", localization->GetString(163),
2339  player->GetActualWillpower(), player->GetBaseWillpower()),
2340  player->GetActualWillpower(), player->GetBaseWillpower()); // Willpower
2341  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str4);
2342 
2343  pY += pFontArrus->GetHeight() - 2;
2344  auto str5 = StringPrintf(
2345  "%s\f%05u\r424%d\f00000 /\t185%d\n", localization->GetString(75),
2347  player->GetActualEndurance(), player->GetBaseEndurance()),
2348  player->GetActualEndurance(), player->GetBaseEndurance());
2349  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str5);
2350 
2351  pY += pFontArrus->GetHeight() - 2;
2352  auto str6 = StringPrintf(
2353  "%s\f%05u\r424%d\f00000 /\t185%d\n", localization->GetString(1),
2355  player->GetActualAccuracy(), player->GetBaseAccuracy()),
2356  player->GetActualAccuracy(), player->GetBaseAccuracy());
2357  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str6);
2358 
2359  pY += pFontArrus->GetHeight() - 2;
2360  auto str7 = StringPrintf(
2361  "%s\f%05u\r424%d\f00000 /\t185%d\n", localization->GetString(211),
2363  player->GetBaseSpeed()),
2364  player->GetActualSpeed(), player->GetBaseSpeed());
2365  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str7);
2366 
2367  pY += pFontArrus->GetHeight() - 2;
2368  auto str8 = StringPrintf(
2369  "%s\f%05u\r424%d\f00000 /\t185%d\n\n", localization->GetString(136),
2371  player->GetBaseLuck()),
2372  player->GetActualLuck(), player->GetBaseLuck());
2373  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str8);
2374 
2375  text_format = "%s\f%05u\r424%d\f00000 /\t185%d\n";
2376  if (player->GetMaxHealth() >= 1000)
2377  text_format = "%s\f%05u\r388%d\f00000 / %d\n";
2378  pY += 2 * pFontArrus->GetHeight() + 5;
2379  auto str9 = StringPrintf(text_format, localization->GetString(108),
2381  player->sHealth, player->GetMaxHealth()),
2382  player->sHealth, player->GetMaxHealth());
2383  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str9);
2384 
2385  text_format = "%s\f%05u\r424%d\f00000 /\t185%d\n";
2386  if (player->GetMaxMana() >= 1000)
2387  text_format = "%s\f%05u\r388%d\f00000 / %d\n";
2388  pY += pFontArrus->GetHeight() - 2;
2389  auto str10 = StringPrintf(text_format, localization->GetString(212),
2391  player->sMana, player->GetMaxMana()),
2392  player->sMana, player->GetMaxMana());
2393  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str10);
2394 
2395  pY += pFontArrus->GetHeight() - 2;
2396  auto str11 = StringPrintf("%s\f%05u\r424%d\f00000 /\t185%d\n\n",
2397  localization->GetString(12),
2399  player->GetActualAC(), player->GetBaseAC()),
2400  player->GetActualAC(), player->GetBaseAC());
2401  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, str11);
2402 
2403  pY += 2 * pFontArrus->GetHeight() - 2;
2404  auto str12 =
2405  StringPrintf("%s: \f%05d%s\n",
2406  localization->GetString(47), // Condition / Состояние
2409  player->GetMajorConditionIdx()));
2410  pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, str12, 226,
2411  0);
2412 
2413  pY += pFontArrus->GetHeight() + -1;
2414  pText = localization->GetString(153); // Нет
2415  if (player->uQuickSpell)
2416  pText = pSpellStats->pInfos[player->uQuickSpell].pShortName;
2417  auto str13 = StringPrintf("%s: %s", localization->GetString(172),
2418  pText); // Б. применение
2419  pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, str13, 226,
2420  0);
2421 
2422  // Second column (Вторая колонка)
2423  pY = 50;
2425  if (player->GetActualAge() > 99)
2427  auto str14 = StringPrintf(text_format, localization->GetString(5),
2429  player->GetActualAge(), player->GetBaseAge()),
2430  player->GetActualAge(), player->GetBaseAge());
2431  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str14);
2432 
2434  if (player->GetBaseLevel() > 99)
2436 
2437  pY += pFontArrus->GetHeight() - 2;
2438  auto str15 =
2439  StringPrintf(text_format, localization->GetString(131), // Уров.
2441  player->GetActualLevel(), player->GetBaseLevel()),
2442  player->GetActualLevel(), player->GetBaseLevel());
2443  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str15);
2444 
2445  pY += pFontArrus->GetHeight() - 2;
2446  pText = localization->GetString(17); // Exp.
2447  if (player->uExperience <= 9999999)
2448  pText = localization->GetString(83); // Experience
2449  auto str16 =
2450  StringPrintf("%s\r180\f%05d%lu\f00000\n\n", pText,
2451  player->GetExperienceDisplayColor(), player->uExperience);
2452  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str16);
2453 
2454  pY += 2 * pFontArrus->GetHeight();
2455  auto str17 = StringPrintf("%s\t100%+d\n", localization->GetString(18),
2456  player->GetActualAttack(false));
2457  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str17);
2458 
2459  pY += pFontArrus->GetHeight() - 2;
2461  pFontArrus, 266, pY, 0,
2462  StringPrintf("%s\t100 %s\n", localization->GetString(53),
2463  player->GetMeleeDamageString().c_str()));
2464 
2465  pY += pFontArrus->GetHeight() - 2;
2467  pFontArrus, 266, pY, 0,
2468  StringPrintf("%s\t100%+d\n", localization->GetString(203),
2469  player->GetRangedAttack()));
2470 
2471  pY += pFontArrus->GetHeight() - 2;
2473  pFontArrus, 266, pY, 0,
2474  StringPrintf("%s\t100 %s\n\n", localization->GetString(53),
2475  player->GetRangedDamageString().c_str()));
2476 
2481  pY += 2 * pFontArrus->GetHeight() - 4;
2482  auto str18 = StringPrintf(
2483  text_format, localization->GetSpellSchoolName(0),
2489  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str18);
2490 
2495  pY += pFontArrus->GetHeight() - 2;
2496  auto str19 = StringPrintf(
2497  text_format, localization->GetSpellSchoolName(1),
2503  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str19);
2504 
2509  pY += pFontArrus->GetHeight() - 2;
2510  auto str20 = StringPrintf(
2511  text_format, localization->GetSpellSchoolName(2),
2517  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str20);
2518 
2522  pY += pFontArrus->GetHeight() - 2;
2523  auto str21 = StringPrintf(
2524  text_format, localization->GetSpellSchoolName(3),
2530  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str21);
2531 
2536  pY += pFontArrus->GetHeight() - 2;
2537  auto str22 = StringPrintf(
2538  text_format, localization->GetSpellSchoolName(4),
2544  if (player->classType == PLAYER_CLASS_LICH &&
2546  str22 = StringPrintf(
2550  200),
2551  localization->GetString(625));
2552  }
2553  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str22);
2554 
2559  pY += pFontArrus->GetHeight() - 2;
2561  auto str23 = StringPrintf(
2562  text_format, localization->GetSpellSchoolName(6),
2568  if (player->classType == PLAYER_CLASS_LICH &&
2570  str23 = StringPrintf(
2574  200),
2575  localization->GetString(625));
2576  }
2577  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, str23);
2578 }
2579 
2580 bool awardSort(int i, int j) {
2581  if (pAwards[i].uPriority == 0) // none
2582  return false;
2583  else if (pAwards[j].uPriority == 0)
2584  return true;
2585  else if (pAwards[i].uPriority == 1) // fines,arena stuff,etc
2586  return false;
2587  else if (pAwards[j].uPriority == 1)
2588  return true;
2589  else if (pAwards[i].uPriority == 5) // joined guilds
2590  return false;
2591  else if (pAwards[j].uPriority == 5)
2592  return true;
2593  else
2594  return (pAwards[i].uPriority < pAwards[j].uPriority);
2595 }
2596 
2597 //----- (00419100) --------------------------------------------------------
2599  Player *pPlayer = pPlayers[uActiveCharacter];
2600 
2601  memset(achieved_awards.data(), 0, 4000);
2602  num_achieved_awards = 0;
2603 
2604  BtnDown_flag = 0;
2605  BtnUp_flag = 0;
2606  books_page_number = 0;
2608  for (int i = 1; i < 105; ++i) {
2609  if (_449B57_test_bit(pPlayer->_achieved_awards_bits, i) &&
2610  pAwards[i].pText)
2612  }
2614  num_achieved_awards = 0;
2615 
2616  // sort awards index
2617 
2618  if (full_num_items_in_book > 0) {
2619  for (int i = 0; i < full_num_items_in_book; ++i)
2621  (AwardType)(rand() % 16); //случайные значения от 0 до 15
2622  for (int i = 1; i < full_num_items_in_book; ++i) {
2623  for (int j = i; j < full_num_items_in_book; ++j) {
2624  AwardType tmp;
2625  if (pAwards[achieved_awards[j]].uPriority <
2626  pAwards[achieved_awards[i]].uPriority) {
2627  tmp = achieved_awards[j];
2629  achieved_awards[i] = tmp;
2630  }
2631  }
2632  }
2633  }
2634 
2635  // if (full_num_items_in_book > 0)
2636  /* {
2637  std::stable_sort(achieved_awards.begin(), achieved_awards.end(),
2638  awardSort);
2639  }*/
2640 }
2641 
2642 //----- (0043EF2B) --------------------------------------------------------
2643 void WetsuitOn(unsigned int uPlayerID) {
2644  CHARACTER_RACE player_race; // edi@2
2645  signed int player_sex; // eax@2
2646  int texture_num; // ecx@5
2647  char pContainer[20]; // [sp+4h] [bp-1Ch]@7
2648 
2649  if (uPlayerID > 0) {
2650  player_race = pPlayers[uPlayerID]->GetRace();
2651  player_sex = pPlayers[uPlayerID]->GetSexByVoice();
2652  if (player_race == CHARACTER_RACE_DWARF)
2653  texture_num = (player_sex != 0) + 3;
2654  else
2655  texture_num = (player_sex != 0) + 1;
2656 
2657  sprintf(pContainer, "pc23v%dBod", texture_num);
2658  papredoll_dbods[uPlayerID - 1] = assets->GetImage_Alpha(pContainer);
2659  sprintf(pContainer, "pc23v%dlad", texture_num);
2660  papredoll_dlads[uPlayerID - 1] = assets->GetImage_Alpha(pContainer);
2661  sprintf(pContainer, "pc23v%dlau", texture_num);
2662  papredoll_dlaus[uPlayerID - 1] = assets->GetImage_Alpha(pContainer);
2663  sprintf(pContainer, "pc23v%drh", texture_num);
2664  papredoll_drhs[uPlayerID - 1] = assets->GetImage_Alpha(pContainer);
2665  sprintf(pContainer, "pc23v%dlh", texture_num);
2666  papredoll_dlhs[uPlayerID - 1] = assets->GetImage_Alpha(pContainer);
2667  sprintf(pContainer, "pc23v%dlhu", texture_num);
2668  papredoll_dlhus[uPlayerID - 1] = assets->GetImage_Alpha(pContainer);
2669 
2670  if (pPlayers[uPlayerID]->uCurrentFace == 12 ||
2671  pPlayers[uPlayerID]->uCurrentFace == 13)
2672  paperdoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = nullptr;
2673  papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = nullptr;
2674 
2675  IsPlayerWearingWatersuit[uPlayerID] = true;
2676  }
2677 }
2678 
2679 //----- (0043F0BD) --------------------------------------------------------
2680 void WetsuitOff(unsigned int uPlayerID) {
2681  if (uPlayerID > 0) {
2682  papredoll_dbods[uPlayerID - 1] = assets->GetImage_Alpha(
2683  dbod_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace]);
2684  papredoll_dlads[uPlayerID - 1] = assets->GetImage_Alpha(
2685  dlad_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace]);
2686  papredoll_dlaus[uPlayerID - 1] = assets->GetImage_Alpha(
2687  dlau_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace]);
2688  papredoll_drhs[uPlayerID - 1] = assets->GetImage_Alpha(
2689  drh_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace]);
2690  papredoll_dlhs[uPlayerID - 1] = assets->GetImage_Alpha(
2691  dlh_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace]);
2692  papredoll_dlhus[uPlayerID - 1] = assets->GetImage_Alpha(
2693  dlhu_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace]);
2694 
2695  // wchar_t name[1024];
2696  if (pPlayers[uPlayerID]->uCurrentFace == 12 ||
2697  pPlayers[uPlayerID]->uCurrentFace == 13) {
2698  paperdoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] =
2700  "pc%02dbrd", pPlayers[uPlayerID]->uCurrentFace + 1));
2701  }
2702 
2703  papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] =
2705  "item281pc%02d", pPlayers[uPlayerID]->uCurrentFace + 1));
2706 
2707  IsPlayerWearingWatersuit[uPlayerID] = false;
2708  }
2709 }
2710 
2711 //----- (00468F8A) --------------------------------------------------------
2713  int mousex = pMouse->uMouseClickX;
2714  int mousey = pMouse->uMouseClickY;
2715 
2716  static int RingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248};
2717  static int RingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA};
2718 
2719  static int glovex = 586;
2720  static int glovey = 88;
2721 
2722  static int amuletx = 493;
2723  static int amulety = 91;
2724 
2725  int slot = 32;
2726  int pos = -1;
2727 
2728  ItemGen *pitem = NULL; // condesnse with this??
2729  // pitem.Reset();
2730 
2731  unsigned int pSkillType; // esi@5
2732  // unsigned __int16 v5; // ax@7
2733  // int equippos; // esi@27
2734  // int v8; // eax@29
2735  int v17; // eax@44
2736 
2737  int v23; // eax@62
2738  int v26; // eax@69
2739  int v34; // esi@90
2740 
2741  // unsigned int v48; // [sp+30h] [bp-1Ch]@88
2742  unsigned int v50; // [sp+38h] [bp-14h]@50
2743  // int v51; // [sp+3Ch] [bp-10h]@1
2744  int freeslot; // [sp+40h] [bp-Ch]@5
2745  ITEM_EQUIP_TYPE pEquipType = EQUIP_NONE;
2746  CastSpellInfo *pSpellInfo;
2747 
2748  int twohandedequip = 0;
2749  ItemGen _this; // [sp+Ch] [bp-40h]@1
2750  _this.Reset();
2751  int mainhandequip = pPlayers[uActiveCharacter]->pEquipment.uMainHand;
2752  unsigned int shieldequip = pPlayers[uActiveCharacter]->pEquipment.uShield;
2753 
2754  if (mainhandequip && pPlayers[uActiveCharacter]
2755  ->pInventoryItemList[mainhandequip - 1]
2756  .GetItemEquipType() == EQUIP_TWO_HANDED)
2757  twohandedequip = mainhandequip;
2758 
2759  unsigned int pickeditem = pParty->pPickedItem.uItemID;
2760 
2761  if (pParty->pPickedItem.uItemID) { // hold item
2762  pEquipType = pParty->pPickedItem.GetItemEquipType();
2763  pSkillType = pParty->pPickedItem.GetPlayerSkillType();
2764 
2765  if (pSkillType == 4) { // PLAYER_SKILL_SPEAR
2766  if (shieldequip) {
2767  if (pPlayers[uActiveCharacter]->GetActualSkillMastery(
2769  3) { // cant use spear in one hand till master
2770  pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
2771 
2772  return;
2773  }
2774 
2775  pickeditem = pParty->pPickedItem.uItemID;
2776  }
2777  } else {
2778  if ((pSkillType == 8 || pSkillType == 1 ||
2779  pSkillType == 2) // shield sword or dagger to place
2780  && mainhandequip &&
2782  ->pInventoryItemList[mainhandequip - 1]
2783  .GetPlayerSkillType() == 4) { // spear in mainhand
2784  if (pPlayers[uActiveCharacter]->GetActualSkillMastery(
2786  3) { // cant use spear in one hand till master
2787  pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
2788  return;
2789  }
2790  }
2791  }
2792 
2793  if (!pPlayers[uActiveCharacter]->CanEquip_RaceAndAlignmentCheck(
2794  pickeditem)) { // special item checks
2795  pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
2796  return;
2797  }
2798 
2799  if (pParty->pPickedItem.uItemID ==
2800  ITEM_WETSUIT) { // wetsuit check is done above
2801  pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)3);
2803  return;
2804  }
2805 
2806  switch (pEquipType) {
2807  case EQUIP_BOW:
2808  case EQUIP_ARMOUR:
2809  case EQUIP_HELMET:
2810  case EQUIP_BELT:
2811  case EQUIP_CLOAK:
2812  case EQUIP_GAUNTLETS:
2813  case EQUIP_BOOTS:
2814  case EQUIP_AMULET:
2815 
2816  if (!pPlayers[uActiveCharacter]->HasSkill(
2817  pSkillType)) { // hasnt got the skill to use that
2818  pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
2819  return;
2820  }
2821 
2822  if (pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() &&
2823  (pEquipType != EQUIP_ARMOUR || engine->IsUnderwater())) { // cant put anything on wearing wetsuit
2824  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
2825  return;
2826  }
2827 
2828  pPlayers[uActiveCharacter]->EquipBody(
2829  pEquipType); // equips item
2830 
2831  if (pParty->pPickedItem.uItemID ==
2832  ITEM_WETSUIT) // just taken wetsuit off
2834 
2835  return;
2836 
2837  // ------------------------dress rings(одевание
2838  // колец)----------------------------------
2839  case EQUIP_RING:
2840 
2842  ->HasUnderwaterSuitEquipped()) { // cant put anything
2843  // on wearing wetsuit
2844  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
2845  return;
2846  }
2847 
2848  if (!bRingsShownInCharScreen) { // rings not displayd
2849  //слоты для колец
2850  // equippos = 0;
2851 
2852  for (int equippos = 0; equippos < 6; ++equippos) {
2854  ->pEquipment.uRings[equippos]) { // 0 to 5
2855  freeslot = pPlayers[uActiveCharacter]
2856  ->FindFreeInventoryListSlot();
2857  if (freeslot >= 0) { // drop ring into free space
2858  pParty->pPickedItem.uBodyAnchor = equippos + 11;
2859  memcpy(
2861  ->pInventoryItemList[freeslot],
2862  &pParty->pPickedItem,
2863  sizeof(pPlayers[uActiveCharacter]
2864  ->pInventoryItemList[freeslot]));
2866  ->pEquipment.uRings[equippos] =
2867  freeslot + 1;
2869  return;
2870  }
2871  }
2872  }
2873 
2874  // cant fit rings so swap out
2875  freeslot =
2876  pPlayers[uActiveCharacter]->pEquipment.uRings[5] -
2877  1; // slot of last ring
2878  memcpy(&_this, &pParty->pPickedItem,
2879  sizeof(_this)); // copy hold item to this
2881  ->pInventoryItemList[freeslot]
2882  .uBodyAnchor = 0;
2883  pParty->pPickedItem.Reset(); // drop holding item
2886  ->pInventoryItemList[freeslot]); // set holding
2887  // item to ring
2888  // to swap out
2889  _this.uBodyAnchor = 16;
2890  memcpy(&pPlayers[uActiveCharacter]
2891  ->pInventoryItemList[freeslot],
2892  &_this, 0x24u); // swap from this in
2893  pPlayers[uActiveCharacter]->pEquipment.uRings[5] =
2894  freeslot + 1; // anchor
2895  return;
2896 
2897  } else { // rings displayed
2898  // if in ring area
2899  for (int i = 0; i < 6; ++i) {
2900  if (mousex >= RingsX[i] &&
2901  mousex <= (RingsX[i] + slot) &&
2902  mousey >= RingsY[i] &&
2903  mousey <= (RingsY[i] +
2904  slot)) { // check against ring slots
2905  pos = i;
2906  }
2907  }
2908 
2909  if (pos != -1) { // we have a position to aim for
2910  pitem =
2911  pPlayers[uActiveCharacter]->GetNthEquippedIndexItem(
2912  pos + 10);
2913  if (!pitem) { // no item in slot so just drop
2914  freeslot = pPlayers[uActiveCharacter]
2915  ->FindFreeInventoryListSlot();
2916  if (freeslot >= 0) { // drop ring into free space
2917  pParty->pPickedItem.uBodyAnchor = pos + 11;
2918  memcpy(
2920  ->pInventoryItemList[freeslot],
2921  &pParty->pPickedItem,
2922  sizeof(pPlayers[uActiveCharacter]
2923  ->pInventoryItemList[freeslot]));
2925  ->pEquipment.uRings[pos] = freeslot + 1;
2927  return;
2928  }
2929  } else { // item so swap out
2930  freeslot = pPlayers[uActiveCharacter]
2931  ->pEquipment.uRings[pos] -
2932  1; // slot of ring selected
2933  memcpy(&_this, &pParty->pPickedItem,
2934  sizeof(_this)); // copy hold item to this
2936  ->pInventoryItemList[freeslot]
2937  .uBodyAnchor = 0;
2938  pParty->pPickedItem.Reset(); // drop holding item
2940  &pPlayers[uActiveCharacter]->pInventoryItemList
2941  [freeslot]); // set holding item to ring
2942  // to swap out
2943  _this.uBodyAnchor = pos + 11;
2944  memcpy(&pPlayers[uActiveCharacter]
2945  ->pInventoryItemList[freeslot],
2946  &_this, 0x24u); // swap from this in
2947  pPlayers[uActiveCharacter]->pEquipment.uRings[pos] =
2948  freeslot + 1; // anchor
2949  return;
2950  }
2951 
2952  } else { // not click on right area so exit
2953  return;
2954  }
2955 
2956  return; // shouldnt get here but in case??
2957  }
2958 
2959  // ------------------dress shield(одеть
2960  // щит)------------------------------------------------------
2961  case EQUIP_SHIELD: //Щит
2963  ->HasUnderwaterSuitEquipped()) { // в акваланге
2964  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
2965  return;
2966  }
2967  if (!pPlayers[uActiveCharacter]->HasSkill(
2968  pSkillType)) { // нет навыка
2969  pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
2970  return;
2971  }
2972  if (shieldequip) { // смена щита щитом
2973  --shieldequip;
2974  memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
2976  ->pInventoryItemList[shieldequip]
2977  .uBodyAnchor = 0;
2981  ->pInventoryItemList[shieldequip]);
2982  _this.uBodyAnchor = 1;
2983  memcpy(&pPlayers[uActiveCharacter]
2984  ->pInventoryItemList[shieldequip],
2985  &_this, 0x24u);
2986  pPlayers[uActiveCharacter]->pEquipment.uShield =
2987  shieldequip + 1;
2988  if (twohandedequip == EQUIP_SINGLE_HANDED) return;
2989  } else {
2990  freeslot =
2991  pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
2992  if (freeslot < 0) return;
2993  if (!twohandedequip) { // обычная установка щита на пустую
2994  // руку
2996  v17 = freeslot + 1;
2997  memcpy(&pPlayers[uActiveCharacter]
2998  ->pInventoryItemList[freeslot],
2999  &pParty->pPickedItem,
3000  sizeof(pPlayers[uActiveCharacter]
3001  ->pInventoryItemList[freeslot]));
3002  pPlayers[uActiveCharacter]->pEquipment.uShield = v17;
3004  return;
3005  }
3006  mainhandequip--; //ставим щит когда держит двуручный меч
3007  memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
3009  ->pInventoryItemList[mainhandequip]
3010  .uBodyAnchor = 0;
3014  ->pInventoryItemList[mainhandequip]);
3015  _this.uBodyAnchor = 1;
3016  memcpy(&pPlayers[uActiveCharacter]
3017  ->pInventoryItemList[freeslot],
3018  &_this,
3019  sizeof(pPlayers[uActiveCharacter]
3020  ->pInventoryItemList[freeslot]));
3021  pPlayers[uActiveCharacter]->pEquipment.uShield =
3022  freeslot + 1;
3023  }
3024  pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0;
3025  return;
3026  // -------------------------taken in hand(взять в
3027  // руку)-------------------------------------------
3028  case EQUIP_SINGLE_HANDED:
3029  case EQUIP_WAND:
3030  if (pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() &&
3031  pParty->pPickedItem.uItemID != 64 &&
3032  pParty->pPickedItem.uItemID != 65) {
3033  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
3034  return;
3035  }
3036  if (!pPlayers[uActiveCharacter]->HasSkill(pSkillType)) {
3037  pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
3038  return;
3039  }
3040  v50 = 0;
3041 
3042  if (pSkillType == 2 &&
3043  (pPlayers[uActiveCharacter]->GetActualSkillMastery(
3045  1) // dagger in left hand at expert
3046  || pSkillType == 1 &&
3047  (pPlayers[uActiveCharacter]->GetActualSkillMastery(
3049  2)) { // sword in left hand at master
3050  // v18 = pMouse->uMouseClickX;
3051  // v19 = pMouse->uMouseClickY;
3052  if ((signed int)pMouse->uMouseClickX >= 560) {
3053  if (!twohandedequip) {
3054  if (shieldequip) {
3055  --shieldequip;
3056  memcpy(&_this, &pParty->pPickedItem,
3057  sizeof(_this));
3059  ->pInventoryItemList[shieldequip]
3060  .uBodyAnchor = 0;
3064  ->pInventoryItemList[shieldequip]);
3065  _this.uBodyAnchor = 1;
3066  memcpy(&pPlayers[uActiveCharacter]
3067  ->pInventoryItemList[shieldequip],
3068  &_this, 0x24u);
3069  pPlayers[uActiveCharacter]->pEquipment.uShield =
3070  shieldequip + 1;
3071  if (pEquipType != EQUIP_WAND) return;
3072  v50 = _this.uItemID;
3073  break;
3074  }
3075  v23 = pPlayers[uActiveCharacter]
3076  ->FindFreeInventoryListSlot();
3077  if (v23 < 0) return;
3079  memcpy(&pPlayers[uActiveCharacter]
3080  ->pInventoryItemList[v23],
3081  &pParty->pPickedItem,
3082  sizeof(pPlayers[uActiveCharacter]
3083  ->pInventoryItemList[v23]));
3084  pPlayers[uActiveCharacter]->pEquipment.uShield =
3085  v23 + 1;
3087  if (pEquipType != EQUIP_WAND) return;
3088  v50 = pPlayers[uActiveCharacter]->pInventoryItemList[v23].uItemID;
3089  break;
3090  }
3091  }
3092  }
3093  if (!mainhandequip) {
3094  v26 =
3095  pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
3096  if (v26 < 0) return;
3098  memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26],
3099  &pParty->pPickedItem,
3100  sizeof(pPlayers[uActiveCharacter]
3101  ->pInventoryItemList[v26]));
3102  pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1;
3104  if (pEquipType != EQUIP_WAND) return;
3105  break;
3106  }
3107  --mainhandequip;
3108  memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
3110  ->pInventoryItemList[mainhandequip]
3111  .uBodyAnchor = 0;
3115  ->pInventoryItemList[mainhandequip]);
3116  _this.uBodyAnchor = 2;
3117  memcpy(&pPlayers[uActiveCharacter]
3118  ->pInventoryItemList[mainhandequip],
3119  &_this, 0x24);
3120  pPlayers[uActiveCharacter]->pEquipment.uMainHand =
3121  mainhandequip + 1;
3122  if (pEquipType == EQUIP_WAND) v50 = _this.uItemID;
3123  if (twohandedequip)
3124  pPlayers[uActiveCharacter]->pEquipment.uShield = 0;
3125  break;
3126  // ---------------------------take two hands(взять двумя
3127  // руками)---------------------------------
3128  case EQUIP_TWO_HANDED:
3129  if (pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped()) {
3130  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
3131  return;
3132  }
3133  if (!pPlayers[uActiveCharacter]->HasSkill(pSkillType)) {
3134  pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
3135  return;
3136  }
3137  if (mainhandequip) { // взять двуручный меч когда нет
3138  // щита(замещение оружия)
3139  if (shieldequip) {
3140  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
3141  return;
3142  }
3143  --mainhandequip;
3144  memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
3146  ->pInventoryItemList[mainhandequip]
3147  .uBodyAnchor = 0;
3151  ->pInventoryItemList[mainhandequip]);
3152  _this.uBodyAnchor = 2;
3153  memcpy(&pPlayers[uActiveCharacter]
3154  ->pInventoryItemList[mainhandequip],
3155  &_this, 0x24u);
3156  pPlayers[uActiveCharacter]->pEquipment.uMainHand =
3157  mainhandequip + 1;
3158  } else {
3159  freeslot =
3160  pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
3161  if (freeslot >= 0) {
3162  if (shieldequip) { // взять двуручный меч когда есть
3163  // щит(замещение щитом)
3164  shieldequip--;
3165  memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
3167  ->pInventoryItemList[shieldequip]
3168  .uBodyAnchor = 0;
3172  ->pInventoryItemList[shieldequip]);
3173  _this.uBodyAnchor = 2;
3174  memcpy(&pPlayers[uActiveCharacter]
3175  ->pInventoryItemList[freeslot],
3176  &_this,
3177  sizeof(pPlayers[uActiveCharacter]
3178  ->pInventoryItemList[freeslot]));
3179  pPlayers[uActiveCharacter]->pEquipment.uShield = 0;
3180  pPlayers[uActiveCharacter]->pEquipment.uMainHand =
3181  freeslot + 1;
3182  } else {
3184  memcpy(&pPlayers[uActiveCharacter]
3185  ->pInventoryItemList[freeslot],
3186  &pParty->pPickedItem,
3187  sizeof(pPlayers[uActiveCharacter]
3188  ->pInventoryItemList[freeslot]));
3189  pPlayers[uActiveCharacter]->pEquipment.uMainHand =
3190  freeslot + 1;
3192  }
3193  }
3194  }
3195  return;
3196  //-------------------------------------------------------------------------------
3197  default:
3198  pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(
3199  uActiveCharacter, 0); //выпить напиток и др.
3200  return;
3201  }
3202  return;
3203  }
3204 
3205  // no hold item
3206 
3207  // check if on rings screen - it doesnt use zbuffer
3209  // assume slot width 32 as per inventory
3210  if (mousex < 490 || mousex > 618) return;
3211 
3212  if (mousey < 88 || mousey > 282) return;
3213 
3214  if (mousex >= amuletx && mousex <= (amuletx + slot) &&
3215  mousey >= amulety && mousey <= (amulety + 2 * slot)) {
3216  // amulet
3217  // pitem = pPlayers[uActiveCharacter]->GetAmuletItem(); //9
3218  pos = 9;
3219  }
3220 
3221  if (mousex >= glovex && mousex <= (glovex + slot) && mousey >= glovey &&
3222  mousey <= (glovey + 2 * slot)) {
3223  // glove
3224  // pitem = pPlayers[uActiveCharacter]->GetGloveItem(); //7
3225  pos = 7;
3226  }
3227 
3228  for (int i = 0; i < 6; ++i) {
3229  if (mousex >= RingsX[i] && mousex <= (RingsX[i] + slot) &&
3230  mousey >= RingsY[i] && mousey <= (RingsY[i] + slot)) {
3231  // ring
3232  // pitem = pPlayers[uActiveCharacter]->GetNthRingItem(i); //10+i
3233  pos = 10 + i;
3234  }
3235  }
3236 
3237  if (pos != -1)
3238  pitem = pPlayers[uActiveCharacter]->GetNthEquippedIndexItem(pos);
3239 
3240  if (!pitem) return;
3241  // pPlayers[uActiveCharacter]->get
3242 
3243  // enchanting??
3244  if (_50C9A0_IsEnchantingInProgress) { // наложить закл на экипировку
3245  /* *((char *)pGUIWindow_CastTargetedSpell->ptr_1C + 8) &=
3246  *0x7Fu;//CastSpellInfo
3247  *((short *)pGUIWindow_CastTargetedSpell->ptr_1C + 2) =
3248  *uActiveCharacter - 1;
3249  *((int *)pGUIWindow_CastTargetedSpell->ptr_1C + 3) = v36;
3250  *((short *)pGUIWindow_CastTargetedSpell->ptr_1C + 3) =
3251  *pEquipType;*/
3253  pSpellInfo->uFlags &= 0x7F;
3254  pSpellInfo->uPlayerID_2 = uActiveCharacter - 1;
3255  pSpellInfo->spell_target_pid =
3256  pPlayers[uActiveCharacter]->pEquipment.pIndices[pos];
3257  pSpellInfo->field_6 = pEquipType;
3258 
3259  ptr_50C9A4_ItemToEnchant = pitem;
3262  pMouse->SetCursorImage("MICON1");
3266  } else {
3267  if (!ptr_50C9A4_ItemToEnchant) { // снять вещь
3268  pParty->SetHoldingItem(pitem);
3270  ->pEquipment.pIndices[pitem->uBodyAnchor - 1] = 0;
3271  pitem->Reset();
3272 
3273  // pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v34
3274  // - 1]);
3275  // pPlayers[uActiveCharacter]->pEquipment.pIndices[pPlayers[uActiveCharacter]->pInventoryItemList[v34
3276  // - 1].uBodyAnchor - 1] = 0;
3277  // pPlayers[uActiveCharacter]->pInventoryItemList[v34 -
3278  // 1].Reset();
3279 
3280  // return
3281  // &this->pInventoryItemList[this->pEquipment.pIndices[index] -
3282  // 1];
3283  }
3284  }
3285 
3286  // for (uint i = 0; i < 6; ++i)
3287  //{
3288  // if (!player->pEquipment.uRings[i])
3289  // continue;
3290 
3291  // CharacterUI_DrawItem(pPaperdollRingsX[i], pPaperdollRingsY[i],
3292  // &player->pInventoryItemList[player->pEquipment.uRings[i] - 1],
3293  // player->pEquipment.uRings[i]);
3294  //}
3295  // if (player->pEquipment.uAmulet)
3296  // CharacterUI_DrawItem(493, 91, player->GetAmuletItem(),
3297  // player->pEquipment.uAmulet);
3298  // if (player->pEquipment.uGlove)
3299  // CharacterUI_DrawItem(586, 88, player->GetGloveItem(),
3300  // player->pEquipment.uGlove);
3301 
3302  } else { // z picking as before
3303  v34 =
3304  render
3305  ->pActiveZBuffer[pMouse->uMouseClickX +
3307  0xFFFF;
3308  if (v34) {
3309  // v36 = v34 - 1;
3310  // v38 = &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1];
3311  pEquipType = pPlayers[uActiveCharacter]
3312  ->pInventoryItemList[v34 - 1]
3313  .GetItemEquipType();
3314  if (pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].uItemID == ITEM_WETSUIT) {
3315  if (engine->IsUnderwater()) {
3316  pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0);
3317  return;
3318  }
3320  }
3321 
3322  if (_50C9A0_IsEnchantingInProgress) { // наложить закл на экипировку
3323  /* *((char *)pGUIWindow_CastTargetedSpell->ptr_1C + 8) &=
3324  *0x7Fu;//CastSpellInfo
3325  *((short *)pGUIWindow_CastTargetedSpell->ptr_1C + 2) =
3326  *uActiveCharacter - 1;
3327  *((int *)pGUIWindow_CastTargetedSpell->ptr_1C + 3) = v36;
3328  *((short *)pGUIWindow_CastTargetedSpell->ptr_1C + 3) =
3329  *pEquipType;*/
3330  pSpellInfo =
3332  pSpellInfo->uFlags &= 0x7F;
3333  pSpellInfo->uPlayerID_2 = uActiveCharacter - 1;
3334  pSpellInfo->spell_target_pid = v34 - 1;
3335  pSpellInfo->field_6 = pEquipType;
3336 
3338  &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1];
3341  pMouse->SetCursorImage("MICON1");
3345  } else {
3346  if (!ptr_50C9A4_ItemToEnchant) { // снять вещь
3348  ->pInventoryItemList[v34 - 1]);
3350  ->pEquipment.pIndices[pPlayers[uActiveCharacter]
3351  ->pInventoryItemList[v34 - 1]
3352  .uBodyAnchor -
3353  1] = 0;
3355  ->pInventoryItemList[v34 - 1]
3356  .Reset();
3357  }
3358  }
3359  } else { // снять лук
3360  if (pPlayers[uActiveCharacter]->pEquipment.uBow) {
3361  _this = pPlayers[uActiveCharacter]->pInventoryItemList
3362  [pPlayers[uActiveCharacter]->pEquipment.uBow - 1];
3363  pParty->SetHoldingItem(&_this);
3364  _this.Reset();
3365  pPlayers[uActiveCharacter]->pEquipment.uBow = 0;
3366  }
3367  }
3368  }
3369 }
3370 
3372  if (dword_507CC0_activ_ch) {
3374  std::vector<GUIButton*> to_delete;
3375  for (GUIButton *pButton : pGUIWindow_CurrentMenu->vButtons) {
3376  if (pButton->field_1C & 0x8000) {
3377  to_delete.push_back(pButton);
3378  }
3379  }
3380  for (GUIButton *pButton : to_delete) {
3381  pButton->Release();
3382  }
3383  for (GUIButton *pButton : pGUIWindow_CurrentMenu->vButtons) {
3384  if (pButton->msg == UIMSG_InventoryLeftClick) {
3385  pButton->uX = dword_50698C_uX;
3386  pButton->uY = dword_506988_uY;
3387  pButton->uZ = dword_506984_uZ;
3388  pButton->uW = dword_506980_uW;
3390  1, 0, 0, 0);
3391  }
3392  }
3393  }
3394 }
3395 
Party::pPickedItem
ItemGen pPickedItem
Definition: Party.h:312
GUIWindow_CharacterRecord::CharacterUI_SkillsTab_CreateButtons
void CharacterUI_SkillsTab_CreateButtons()
Definition: UICharacter.cpp:2217
party_has_equipment
std::array< char, 54 > party_has_equipment
Definition: mm7_data.cpp:591
EQUIP_HELMET
@ EQUIP_HELMET
Definition: Items.h:232
ITEM_ARTIFACT_LEAGUE_BOOTS
@ ITEM_ARTIFACT_LEAGUE_BOOTS
Definition: Items.h:165
Player
Definition: Player.h:401
GetItemTextureFilename
int GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder)
Definition: Items.cpp:1538
SPEECH_39
@ SPEECH_39
Definition: Player.h:85
ui_character_bonus_text_color
unsigned int ui_character_bonus_text_color
Definition: UICharacter.cpp:46
PLAYER_SKILL_BLASTER
@ PLAYER_SKILL_BLASTER
Definition: Player.h:178
GUIWindow::DrawText
void DrawText(GUIFont *font, int x, int y, unsigned short uFontColor, const char *str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
Definition: GUIWindow.cpp:694
ITEM_AURA_EFFECT_GREEN
@ ITEM_AURA_EFFECT_GREEN
Definition: Items.h:31
Engine_::IocContainer
Definition: IocContainer.h:15
PlayerEquipment::uShield
unsigned int uShield
Definition: Player.h:319
ui_leather_mm7
Image * ui_leather_mm7
Definition: GUIWindow.cpp:106
Party::uNumBountiesCollected
unsigned int uNumBountiesCollected
Definition: Party.h:286
PLAYER_SKILL_MONSTER_ID
@ PLAYER_SKILL_MONSTER_ID
Definition: Player.h:203
PLAYER_SKILL_DAGGER
@ PLAYER_SKILL_DAGGER
Definition: Player.h:173
CHARACTER_ATTRIBUTE_RESIST_FIRE
@ CHARACTER_ATTRIBUTE_RESIST_FIRE
Definition: Engine.h:532
ITEM_RARE_SUN_CLOAK
@ ITEM_RARE_SUN_CLOAK
Definition: Items.h:200
GUIWindow::uFrameW
unsigned int uFrameW
Definition: GUIWindow.h:473
Player::GetRangedDamageString
String GetRangedDamageString()
Definition: Player.cpp:1441
OnPaperdollLeftClick
void OnPaperdollLeftClick()
Definition: UICharacter.cpp:2712
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
Localization::GetCharacterConditionName
const char * GetCharacterConditionName(unsigned int index) const
Definition: Localization.h:75
CharacterUI_DrawPaperdollWithRingOverlay
void CharacterUI_DrawPaperdollWithRingOverlay(Player *player)
Definition: UICharacter.cpp:1911
UIInventory.h
ui_book_autonotes_text_color
unsigned int ui_book_autonotes_text_color
Definition: UICharacter.cpp:80
Viewport.h
Timer::uTimeElapsed
unsigned int uTimeElapsed
Definition: Time.h:133
LOD.h
Image::GetHeight
unsigned int GetHeight()
Definition: Image.cpp:230
ui_character_stats_background
Image * ui_character_stats_background
Definition: UICharacter.cpp:456
UIMSG_CycleCharacters
@ UIMSG_CycleCharacters
Definition: GUIWindow.h:143
Player::GetBaseResistance
int GetBaseResistance(enum CHARACTER_ATTRIBUTE_TYPE a2)
Definition: Player.cpp:2479
papredoll_dlhus
Image * papredoll_dlhus[4]
Definition: UICharacter.cpp:201
ui_character_skill_default_color
unsigned int ui_character_skill_default_color
Definition: UICharacter.cpp:49
PLAYER_SKILL_STAFF
@ PLAYER_SKILL_STAFF
Definition: Player.h:171
ui_character_skill_upgradeable_color
unsigned int ui_character_skill_upgradeable_color
Definition: UICharacter.cpp:48
ITEM_RELIC_HARECS_LEATHER
@ ITEM_RELIC_HARECS_LEATHER
Definition: Items.h:169
GUIWindow
Definition: GUIWindow.h:433
EQUIP_CLOAK
@ EQUIP_CLOAK
Definition: Items.h:234
AssetsManager::GetImage_Solid
Texture * GetImage_Solid(const String &name)
Definition: AssetsManager.cpp:51
Mouse
Definition: Mouse.h:279
Player::GetActualSkillMastery
int GetActualSkillMastery(PLAYER_SKILL_TYPE uSkillType)
Definition: Player.cpp:3179
CastSpellInfo::uFlags
uint16_t uFlags
Definition: CastSpellInfo.h:28
CastSpellInfo
Definition: CastSpellInfo.h:17
EQUIP_BELT
@ EQUIP_BELT
Definition: Items.h:233
ui_exit_cancel_button_background
Image * ui_exit_cancel_button_background
Definition: GUIWindow.cpp:89
Viewport::uViewportTL_Y
int uViewportTL_Y
Definition: Viewport.h:23
Player::GetActualAttack
int GetActualAttack(bool onlyMainHandDmg)
Definition: Player.cpp:1156
Mouse::uMouseClickY
unsigned int uMouseClickY
Definition: Mouse.h:365
ITEM_RARE_VAMPIRES_CAPE
@ ITEM_RARE_VAMPIRES_CAPE
Definition: Items.h:203
paperdoll_Boot
const int paperdoll_Boot[4][7][2]
Definition: UICharacter.cpp:283
PlayerEquipment::uCloak
unsigned int uCloak
Definition: Player.h:325
CharacterUI_LoadPaperdollTextures
void CharacterUI_LoadPaperdollTextures()
Definition: UICharacter.cpp:1941
ITEM_ENCHANT_ANIMATION
@ ITEM_ENCHANT_ANIMATION
Definition: Items.h:33
pSRZBufferLineOffsets
std::array< unsigned int, 480 > pSRZBufferLineOffsets
Definition: mm7_data.cpp:511
Party::uFine
int uFine
Definition: Party.h:324
pCharacterScreen_InventoryBtn
GUIButton * pCharacterScreen_InventoryBtn
Definition: GUIButton.cpp:43
ItemGen::GetItemEquipType
ITEM_EQUIP_TYPE GetItemEquipType()
Definition: Items.cpp:1504
ui_game_minimap_actor_friendly_color
unsigned int ui_game_minimap_actor_friendly_color
Definition: UICharacter.cpp:63
ui_character_skillinfo_can_learn
unsigned int ui_character_skillinfo_can_learn
Definition: UICharacter.cpp:53
pGUIWindow_CurrentMenu
GUIWindow * pGUIWindow_CurrentMenu
Definition: GUIWindow.cpp:54
ui_character_skillinfo_can_learn_gm
unsigned int ui_character_skillinfo_can_learn_gm
Definition: UICharacter.cpp:54
_449B57_test_bit
bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2)
Definition: Party.cpp:1185
SpellStats::pInfos
SpellInfo pInfos[100]
Definition: Spells.h:192
ITEM_ARTIFACT_YORUBA
@ ITEM_ARTIFACT_YORUBA
Definition: Items.h:158
GUIWindow::CreateButton
GUIButton * CreateButton(int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
Definition: GUIWindow.cpp:717
PLAYER_SKILL_AXE
@ PLAYER_SKILL_AXE
Definition: Player.h:174
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
EQUIP_SHIELD
@ EQUIP_SHIELD
Definition: Items.h:231
GUIWindow_CharacterRecord::CharacterUI_StatsTab_Draw
void CharacterUI_StatsTab_Draw(struct Player *)
Definition: UICharacter.cpp:2296
GUIButton::uZ
unsigned int uZ
Definition: GUIButton.h:25
GUIMessageQueue::Flush
void Flush()
Definition: GUIWindow.cpp:159
Player::GetCloakItem
ItemGen * GetCloakItem()
Definition: Player.cpp:7554
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
GUIWindow_Inventory_CastSpell
Definition: UIInventory.h:14
GUIWindow_CharacterRecord::ToggleRingsOverlay
void ToggleRingsOverlay()
Definition: UICharacter.cpp:635
ui_character_condition_moderate_color
unsigned int ui_character_condition_moderate_color
Definition: UICharacter.cpp:58
CHARACTER_RACE_DWARF
@ CHARACTER_RACE_DWARF
Definition: Player.h:164
Award_Deaths
@ Award_Deaths
Definition: Awards.h:101
CURRENT_SCREEN::SCREEN_CASTING
@ SCREEN_CASTING
Player::GetBaseAge
unsigned int GetBaseAge()
Definition: Player.cpp:2468
pCharacterScreen_StatsBtn
GUIButton * pCharacterScreen_StatsBtn
Definition: GUIButton.cpp:45
ITEM_RARE_MOON_CLOAK
@ ITEM_RARE_MOON_CLOAK
Definition: Items.h:201
PLAYER_SKILL_EARTH
@ PLAYER_SKILL_EARTH
Definition: Player.h:186
SOUND_error
@ SOUND_error
Definition: AudioPlayer.h:19
PlayerEquipment::uBow
unsigned int uBow
Definition: Player.h:321
PlayerEquipment::uAmulet
unsigned int uAmulet
Definition: Player.h:328
PlayerEquipment::uGlove
unsigned int uGlove
Definition: Player.h:326
paperdoll_CloakCollar
const int paperdoll_CloakCollar[4][10][2]
Definition: UICharacter.cpp:300
Player::GetBaseLevel
int GetBaseLevel()
Definition: Player.cpp:1068
num_achieved_awards
int num_achieved_awards
Definition: mm7_data.cpp:28
UIMSG_ClickExitCharacterWindowBtn
@ UIMSG_ClickExitCharacterWindowBtn
Definition: GUIWindow.h:135
OnButtonClick3
Definition: GUIWindow.h:536
PLAYER_SKILL_MIND
@ PLAYER_SKILL_MIND
Definition: Player.h:188
dword_506984_uZ
int dword_506984_uZ
Definition: mm7_data.cpp:537
ITEM_RELIC_PHYNAXIAN_CROWN
@ ITEM_RELIC_PHYNAXIAN_CROWN
Definition: Items.h:176
localization
Localization * localization
Definition: Localization.cpp:11
UIMSG_ClickSkillsBtn
@ UIMSG_ClickSkillsBtn
Definition: GUIWindow.h:97
Player::GetAmuletItem
ItemGen * GetAmuletItem()
Definition: Player.cpp:7560
PLAYER_SKILL_LEARNING
@ PLAYER_SKILL_LEARNING
Definition: Player.h:207
BtnDown_flag
int BtnDown_flag
Definition: mm7_data.cpp:528
papredoll_drhs
Image * papredoll_drhs[4]
Definition: UICharacter.cpp:200
ShouldLoadTexturesForRaceAndGender
bool ShouldLoadTexturesForRaceAndGender(unsigned int _this)
Definition: Player.cpp:6879
ui_character_inventory_paperdoll_rings_close
Image * ui_character_inventory_paperdoll_rings_close
Definition: UICharacter.cpp:462
ui_character_condition_severe_color
unsigned int ui_character_condition_severe_color
Definition: UICharacter.cpp:59
PLAYER_SKILL_BOW
@ PLAYER_SKILL_BOW
Definition: Player.h:176
ptr_50C9A4_ItemToEnchant
ItemGen * ptr_50C9A4_ItemToEnchant
Definition: Items.cpp:35
UIMSG_SelectCharacter
@ UIMSG_SelectCharacter
Definition: GUIWindow.h:93
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
ui_character_stat_buffed_color
unsigned int ui_character_stat_buffed_color
Definition: UICharacter.cpp:51
Party::uNumArenaLordWins
char uNumArenaLordWins
Definition: Party.h:297
pPaperdoll_Beards
const int pPaperdoll_Beards[4]
Definition: UICharacter.cpp:330
Party::uNumPrisonTerms
int uNumPrisonTerms
Definition: Party.h:285
IsPlayerWearingWatersuit
std::array< unsigned __int8, 5 > IsPlayerWearingWatersuit
Definition: mm7_data.cpp:590
ITEM_EQUIP_TYPE
ITEM_EQUIP_TYPE
Definition: Items.h:226
GUIFont.h
GUIWindow_CharacterRecord::ShowSkillsTab
void ShowSkillsTab()
Definition: UICharacter.cpp:599
Party::uNumArenaSquireWins
char uNumArenaSquireWins
Definition: Party.h:295
WetsuitOff
void WetsuitOff(unsigned int uPlayerID)
Definition: UICharacter.cpp:2680
texture
GLenum GLenum GLuint texture
Definition: SDL_opengl_glext.h:1181
GUIFont::GetHeight
unsigned int GetHeight() const
Definition: GUIFont.cpp:84
IsDwarfPresentInParty
bool IsDwarfPresentInParty(bool a1)
Definition: Player.cpp:6915
Player::GetActualAC
int GetActualAC()
Definition: Player.cpp:2452
ui_character_inventory_magnification_glass
Image * ui_character_inventory_magnification_glass
Definition: UICharacter.cpp:459
dlad_texnames_by_face
const char * dlad_texnames_by_face[25]
Definition: UICharacter.cpp:405
SEX_MALE
@ SEX_MALE
Definition: Player.h:399
paperdoll_Armor_Coord
const int paperdoll_Armor_Coord[4][17][2]
Definition: UICharacter.cpp:351
ui_gamemenu_keys_key_selection_blink_color_1
unsigned int ui_gamemenu_keys_key_selection_blink_color_1
Definition: UICharacter.cpp:73
ui_mainmenu_copyright_color
unsigned int ui_mainmenu_copyright_color
Definition: UICharacter.cpp:40
ItemGen::Reset
void Reset()
Definition: Items.cpp:133
ITEM_ARTIFACT_MINDS_EYE
@ ITEM_ARTIFACT_MINDS_EYE
Definition: Items.h:185
Player::uSkillPoints
unsigned int uSkillPoints
Definition: Player.h:765
byte_5111F6_OwnedArtifacts
std::array< char, 17 > byte_5111F6_OwnedArtifacts
Definition: mm7_data.cpp:592
AssetsManager.h
Player::pActiveSkills
std::array< unsigned __int16, 37 > pActiveSkills
Definition: Player.h:711
index
GLuint index
Definition: SDL_opengl_glext.h:663
bRingsShownInCharScreen
int bRingsShownInCharScreen
Definition: UICharacter.cpp:38
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
paperdoll_shoulder_second_coord
const int paperdoll_shoulder_second_coord[4][17][2]
Definition: UICharacter.cpp:387
GUIWindow::uFrameWidth
unsigned int uFrameWidth
Definition: GUIWindow.h:470
ItemGen::ItemEnchanted
bool ItemEnchanted() const
Definition: Items.h:279
PLAYER_SKILL_ITEM_ID
@ PLAYER_SKILL_ITEM_ID
Definition: Player.h:192
Player::GetBaseAC
int GetBaseAC()
Definition: Player.cpp:2439
Localization::GetSkillName
const char * GetSkillName(unsigned int index) const
Definition: Localization.h:51
GUIButton
Definition: GUIButton.h:11
ui_book_map_title_color
unsigned int ui_book_map_title_color
Definition: UICharacter.cpp:81
PLAYER_SKILL_FIRE
@ PLAYER_SKILL_FIRE
Definition: Player.h:183
dlh_texnames_by_face
const char * dlh_texnames_by_face[25]
Definition: UICharacter.cpp:425
GUIWindow::uFrameZ
unsigned int uFrameZ
Definition: GUIWindow.h:472
Engine.h
CHARACTER_ATTRIBUTE_RESIST_WATER
@ CHARACTER_ATTRIBUTE_RESIST_WATER
Definition: Engine.h:534
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
Player::GetActualEndurance
int GetActualEndurance()
Definition: Player.cpp:1099
Player::GetActualIntelligence
int GetActualIntelligence()
Definition: Player.cpp:1086
PLAYER_SKILL_UNARMED
@ PLAYER_SKILL_UNARMED
Definition: Player.h:202
PlayerEquipment::uBelt
unsigned int uBelt
Definition: Player.h:324
Player::GetMainHandItem
ItemGen * GetMainHandItem()
Definition: Player.cpp:7542
UI_GetHealthManaAndOtherQualitiesStringColor
unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(int current_pos, int base_pos)
Definition: UIGame.cpp:2307
ui_ar_up_up
Image * ui_ar_up_up
Definition: GUIWindow.cpp:103
ui_game_minimap_projectile_color
unsigned int ui_game_minimap_projectile_color
Definition: UICharacter.cpp:67
ui_character_awards_background
Image * ui_character_awards_background
Definition: UICharacter.cpp:455
GetSizeInInventorySlots
unsigned int GetSizeInInventorySlots(unsigned int uNumPixels)
Definition: UICharacter.cpp:919
ui_game_dialogue_npc_name_color
unsigned int ui_game_dialogue_npc_name_color
Definition: UICharacter.cpp:96
GUIWindow::vButtons
std::vector< GUIButton * > vButtons
Definition: GUIWindow.h:489
UIMSG_ClickAwardsBtn
@ UIMSG_ClickAwardsBtn
Definition: GUIWindow.h:100
Player::GetBaseSpeed
int GetBaseSpeed()
Definition: Player.cpp:1058
GUIWindow::_41D08F_set_keyboard_control_group
void _41D08F_set_keyboard_control_group(int num_buttons, int a3, int a4, int a5)
Definition: GUIWindow.cpp:273
PLAYER_SKILL_LIGHT
@ PLAYER_SKILL_LIGHT
Definition: Player.h:190
Mouse::uMouseClickX
unsigned int uMouseClickX
Definition: Mouse.h:364
ui_character_stat_default_color
unsigned int ui_character_stat_default_color
Definition: UICharacter.cpp:50
pWeaponSkills
const int pWeaponSkills[9]
Definition: UICharacter.cpp:439
CURRENT_SCREEN
CURRENT_SCREEN
Definition: GUIWindow.h:604
pItemsTable
struct ItemsTable * pItemsTable
Definition: Items.cpp:37
current_character_screen_window
enum WindowType current_character_screen_window
Definition: GUIWindow.cpp:78
paperdoll_shoulder_coord
const int paperdoll_shoulder_coord[4][17][2]
Definition: UICharacter.cpp:370
pPaperdoll_LeftHand
const int pPaperdoll_LeftHand[4][2]
Definition: UICharacter.cpp:336
PLAYER_SKILL_BODYBUILDING
@ PLAYER_SKILL_BODYBUILDING
Definition: Player.h:195
Localization.h
PLAYER_SKILL_PERCEPTION
@ PLAYER_SKILL_PERCEPTION
Definition: Player.h:197
ItemGen::uAttributes
unsigned int uAttributes
Definition: Items.h:349
Player::pInventoryMatrix
std::array< int, 126 > pInventoryMatrix
Definition: Player.h:733
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
Image::GetWidth
unsigned int GetWidth()
Definition: Image.cpp:217
GUIWindow_CharacterRecord::ShowStatsTab
void ShowStatsTab()
Definition: UICharacter.cpp:588
pMagicSkills
const int pMagicSkills[9]
Definition: UICharacter.cpp:449
pMiscSkills
const int pMiscSkills[12]
Definition: UICharacter.cpp:443
GUIButton.h
ui_game_minimap_treasure_color
unsigned int ui_game_minimap_treasure_color
Definition: UICharacter.cpp:68
PlayerEquipment::uBoot
unsigned int uBoot
Definition: Player.h:327
pParty
Party * pParty
Definition: Party.cpp:30
Image
Definition: Image.h:19
ItemGen::AuraEffectRed
bool AuraEffectRed() const
Definition: Items.h:282
UIMSG_SkillUp
@ UIMSG_SkillUp
Definition: GUIWindow.h:104
ui_book_journal_title_color
unsigned int ui_book_journal_title_color
Definition: UICharacter.cpp:92
GUIWindow::DrawTextInRect
int DrawTextInRect(GUIFont *font, unsigned int x, unsigned int y, unsigned int color, const char *text, int rect_width, int reverse_text)
Definition: GUIWindow.cpp:702
Player::GetActualResistance
int GetActualResistance(enum CHARACTER_ATTRIBUTE_TYPE a2)
Definition: Player.cpp:2523
pFontArrus
GUIFont * pFontArrus
Definition: GUIFont.cpp:18
GUIWindow::pCurrentPosActiveItem
int pCurrentPosActiveItem
Definition: GUIWindow.h:482
IRender.h
PLAYER_SKILL_SPIRIT
@ PLAYER_SKILL_SPIRIT
Definition: Player.h:187
_50C9D0_AfterEnchClickEventId
int _50C9D0_AfterEnchClickEventId
Definition: mm7_data.cpp:580
dbod_texnames_by_face
const char * dbod_texnames_by_face[25]
Definition: UICharacter.cpp:415
EQUIP_ARMOUR
@ EQUIP_ARMOUR
Definition: Items.h:230
UIMSG_ChangeDetaliz
@ UIMSG_ChangeDetaliz
Definition: GUIWindow.h:70
CreateAwardsScrollBar
void CreateAwardsScrollBar()
Definition: GUIButton.cpp:144
ITEM_ARTIFACT_HERMES_SANDALS
@ ITEM_ARTIFACT_HERMES_SANDALS
Definition: Items.h:182
EQUIP_SINGLE_HANDED
@ EQUIP_SINGLE_HANDED
Definition: Items.h:227
ITEM_WETSUIT
@ ITEM_WETSUIT
Definition: Items.h:207
Award_Fine
@ Award_Fine
Definition: Awards.h:17
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
WINDOW_CharacterWindow_Inventory
@ WINDOW_CharacterWindow_Inventory
Definition: GUIWindow.h:330
ui_gamemenu_keys_key_selection_blink_color_2
unsigned int ui_gamemenu_keys_key_selection_blink_color_2
Definition: UICharacter.cpp:74
PLAYER_SKILL_DODGE
@ PLAYER_SKILL_DODGE
Definition: Player.h:201
ui_game_minimap_actor_hostile_color
unsigned int ui_game_minimap_actor_hostile_color
Definition: UICharacter.cpp:64
pCharacterScreen_SkillsBtn
GUIButton * pCharacterScreen_SkillsBtn
Definition: GUIButton.cpp:44
ui_book_calendar_year_color
unsigned int ui_book_calendar_year_color
Definition: UICharacter.cpp:88
ui_character_inventory_paperdoll_background
Image * ui_character_inventory_paperdoll_background
Definition: UICharacter.cpp:460
ui_gamemenu_keys_key_default_color
unsigned int ui_gamemenu_keys_key_default_color
Definition: UICharacter.cpp:75
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
ITEM_RELIC_TWILIGHT
@ ITEM_RELIC_TWILIGHT
Definition: Items.h:178
OS_GetTime
unsigned int OS_GetTime()
Definition: Lin.cpp:12
Player::GetBaseAccuracy
int GetBaseAccuracy()
Definition: Player.cpp:1053
PLAYER_SKILL_TYPE
PLAYER_SKILL_TYPE
Definition: Player.h:170
dword_507CC0_activ_ch
int dword_507CC0_activ_ch
Definition: mm7_data.cpp:558
paperdoll_Belt
const int paperdoll_Belt[4][7][2]
Definition: UICharacter.cpp:310
ui_game_minimap_actor_corpse_color
unsigned int ui_game_minimap_actor_corpse_color
Definition: UICharacter.cpp:65
Award_BountiesCollected
@ Award_BountiesCollected
Definition: Awards.h:102
PLAYER_SKILL_MEDITATION
@ PLAYER_SKILL_MEDITATION
Definition: Player.h:196
CastSpellInfo::uPlayerID_2
uint16_t uPlayerID_2
Definition: CastSpellInfo.h:26
ITEM_ARTIFACT_HEROS_BELT
@ ITEM_ARTIFACT_HEROS_BELT
Definition: Items.h:188
ItemGen::GetIconName
char * GetIconName()
Definition: Items.cpp:1521
ItemGen::uItemID
int uItemID
Definition: Items.h:326
Player::GetMeleeDamageString
String GetMeleeDamageString()
Definition: Player.cpp:1413
ui_gamemenu_video_gamma_title_color
unsigned int ui_gamemenu_video_gamma_title_color
Definition: UICharacter.cpp:71
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
GUIWindow::uFrameHeight
unsigned int uFrameHeight
Definition: GUIWindow.h:471
Localization::GetSpellSchoolName
const char * GetSpellSchoolName(unsigned int index) const
Definition: Localization.h:27
Player::_achieved_awards_bits
unsigned char _achieved_awards_bits[64]
Definition: Player.h:715
Player::GetBaseLuck
int GetBaseLuck()
Definition: Player.cpp:1063
EQUIP_BOW
@ EQUIP_BOW
Definition: Items.h:229
ui_game_minimap_outline_color
unsigned int ui_game_minimap_outline_color
Definition: UICharacter.cpp:62
GetConditionDrawColor
int GetConditionDrawColor(unsigned int uConditionIdx)
Definition: UIGame.cpp:2327
ui_book_journal_text_color
unsigned int ui_book_journal_text_color
Definition: UICharacter.cpp:93
ITEM_RILIC_TITANS_BELT
@ ITEM_RILIC_TITANS_BELT
Definition: Items.h:177
CHARACTER_ATTRIBUTE_RESIST_AIR
@ CHARACTER_ATTRIBUTE_RESIST_AIR
Definition: Engine.h:533
pPaperdollLeftEmptyHand
const int pPaperdollLeftEmptyHand[4][2]
Definition: UICharacter.cpp:345
PLAYER_SKILL_AIR
@ PLAYER_SKILL_AIR
Definition: Player.h:184
ItemGen::GetPlayerSkillType
unsigned char GetPlayerSkillType()
Definition: Items.cpp:1512
PLAYER_CLASS_LICH
@ PLAYER_CLASS_LICH
Definition: Player.h:251
ui_book_calendar_moon_color
unsigned int ui_book_calendar_moon_color
Definition: UICharacter.cpp:89
Player::GetRace
enum CHARACTER_RACE GetRace() const
Definition: Player.cpp:3488
BtnUp_flag
int BtnUp_flag
Definition: mm7_data.cpp:529
game_ui_right_panel_frame
Image * game_ui_right_panel_frame
Definition: GUIWindow.cpp:90
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
Engine_::IocContainer::ResolveMouse
static Mouse * ResolveMouse()
Definition: IocContainer.cpp:88
ItemGen::AuraEffectPurple
bool AuraEffectPurple() const
Definition: Items.h:291
ItemGen::uBodyAnchor
unsigned __int8 uBodyAnchor
Definition: Items.h:350
paperdoll_Cloak
const int paperdoll_Cloak[4][10][2]
Definition: UICharacter.cpp:291
GUIButton::msg
UIMessageType msg
Definition: GUIButton.h:29
ITEM_BLASTER
@ ITEM_BLASTER
Definition: Items.h:82
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
paperdoll_armor_texture
Image * paperdoll_armor_texture[4][17][3]
Definition: UICharacter.cpp:204
GUIFont::CalcTextHeight
unsigned int CalcTextHeight(const String &str, unsigned int width, int x_offset, bool return_on_carriage=false)
Definition: GUIFont.cpp:246
PLAYER_SKILL_LEATHER
@ PLAYER_SKILL_LEATHER
Definition: Player.h:180
achieved_awards
std::array< AwardType, 1000 > achieved_awards
Definition: mm7_data.cpp:27
Party.h
ui_character_award_color
std::array< unsigned int, 6 > ui_character_award_color
Definition: UICharacter.cpp:60
dlau_texnames_by_face
const char * dlau_texnames_by_face[25]
Definition: UICharacter.cpp:410
PLAYER_SKILL_MACE
@ PLAYER_SKILL_MACE
Definition: Player.h:177
Player::GetMaxMana
int GetMaxMana()
Definition: Player.cpp:2369
paperdoll_belt_texture
Image * paperdoll_belt_texture[4][7]
Definition: UICharacter.cpp:213
PLAYER_SKILL_TRAP_DISARM
@ PLAYER_SKILL_TRAP_DISARM
Definition: Player.h:200
ReleaseAwardsScrollBar
void ReleaseAwardsScrollBar()
Definition: GUIButton.cpp:123
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Player::pName
char pName[16]
Definition: Player.h:637
Player::GetBowItem
ItemGen * GetBowItem()
Definition: Player.cpp:7546
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
CharacterUI_InventoryTab_Draw
void CharacterUI_InventoryTab_Draw(Player *player, bool Cover_Strip)
Definition: UICharacter.cpp:1829
CHARACTER_ATTRIBUTE_RESIST_MIND
@ CHARACTER_ATTRIBUTE_RESIST_MIND
Definition: Engine.h:536
PLAYER_SKILL_WATER
@ PLAYER_SKILL_WATER
Definition: Player.h:185
ui_book_quests_text_color
unsigned int ui_book_quests_text_color
Definition: UICharacter.cpp:78
ui_book_journal_text_shadow
unsigned int ui_book_journal_text_shadow
Definition: UICharacter.cpp:94
UIMSG_InventoryLeftClick
@ UIMSG_InventoryLeftClick
Definition: GUIWindow.h:103
Player::sMana
int sMana
Definition: Player.h:767
ITEM_AURA_EFFECT_PURPLE
@ ITEM_AURA_EFFECT_PURPLE
Definition: Items.h:32
EQUIP_NONE
@ EQUIP_NONE
Definition: Items.h:248
ui_character_default_text_color
unsigned int ui_character_default_text_color
Definition: UICharacter.cpp:43
Timer::Pause
void Pause()
Definition: Time.cpp:19
ui_book_map_coordinates_color
unsigned int ui_book_map_coordinates_color
Definition: UICharacter.cpp:82
GUIWindow_CharacterRecord::ShowInventoryTab
void ShowInventoryTab()
Definition: UICharacter.cpp:611
GUIWindow_CharacterRecord::ShowAwardsTab
void ShowAwardsTab()
Definition: UICharacter.cpp:622
Player::HasItem
bool HasItem(unsigned int uItemID, bool checkHeldItem)
Definition: Player.cpp:6855
ui_book_calendar_location_color
unsigned int ui_book_calendar_location_color
Definition: UICharacter.cpp:90
Player::GetMaxHealth
int GetMaxHealth()
Definition: Player.cpp:2354
Player::GetHelmItem
ItemGen * GetHelmItem()
Definition: Player.cpp:7550
GUIButton::field_1C
int field_1C
Definition: GUIButton.h:28
CHARACTER_RACE
CHARACTER_RACE
Definition: Player.h:160
PlayerEquipment::uRings
std::array< unsigned int, 6 > uRings
Definition: Player.h:329
_50C9A0_IsEnchantingInProgress
bool _50C9A0_IsEnchantingInProgress
Definition: mm7_data.cpp:578
ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP
@ ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP
Definition: Items.h:183
ui_character_skills_background
Image * ui_character_skills_background
Definition: UICharacter.cpp:454
Award_ArcomageWins
@ Award_ArcomageWins
Definition: Awards.h:119
PLAYER_SKILL_SPEAR
@ PLAYER_SKILL_SPEAR
Definition: Player.h:175
ui_house_player_cant_interact_color
unsigned int ui_house_player_cant_interact_color
Definition: UICharacter.cpp:100
ui_book_autonotes_title_color
unsigned int ui_book_autonotes_title_color
Definition: UICharacter.cpp:79
GUIWindow_CharacterRecord::GUIWindow_CharacterRecord
GUIWindow_CharacterRecord(unsigned int uActiveCharacter, enum CURRENT_SCREEN screen)
Definition: UICharacter.cpp:466
CharacterUI_ReleaseButtons
void CharacterUI_ReleaseButtons()
Definition: UICharacter.cpp:3371
ItemGen::IsIdentified
bool IsIdentified()
Definition: Items.h:306
ui_game_dialogue_option_normal_color
unsigned int ui_game_dialogue_option_normal_color
Definition: UICharacter.cpp:98
CharacterUI_DrawPaperdoll
void CharacterUI_DrawPaperdoll(Player *player)
Definition: UICharacter.cpp:930
EQUIP_AMULET
@ EQUIP_AMULET
Definition: Items.h:238
ITEM_AURA_EFFECT_RED
@ ITEM_AURA_EFFECT_RED
Definition: Items.h:29
paperdoll_Weapon
const int paperdoll_Weapon[4][16][2]
Definition: UICharacter.cpp:215
Award_Arena_KnightWins
@ Award_Arena_KnightWins
Definition: Awards.h:106
Player::pInventoryItemList
ItemGen pInventoryItemList[126]
Definition: Player.h:727
PlayerEquipment::uMainHand
unsigned int uMainHand
Definition: Player.h:320
dword_506988_uY
int dword_506988_uY
Definition: mm7_data.cpp:538
Party::uNumArenaPageWins
char uNumArenaPageWins
Definition: Party.h:294
ui_ar_dn_dn
Image * ui_ar_dn_dn
Definition: GUIWindow.cpp:100
Player::uCurrentFace
unsigned __int8 uCurrentFace
Definition: Player.h:640
AwardType
AwardType
Definition: Awards.h:15
GUIWindow::uFrameY
unsigned int uFrameY
Definition: GUIWindow.h:469
PLAYER_SKILL_SHIELD
@ PLAYER_SKILL_SHIELD
Definition: Player.h:179
ringscreenactive
bool ringscreenactive()
Definition: UICharacter.cpp:3396
GUIButton::uX
unsigned int uX
Definition: GUIButton.h:21
pSpellStats
struct SpellStats * pSpellStats
Definition: Spells.cpp:32
Player::GetSexByVoice
PLAYER_SEX GetSexByVoice()
Definition: Player.cpp:3516
PLAYER_SKILL_ALCHEMY
@ PLAYER_SKILL_ALCHEMY
Definition: Player.h:206
Player::GetItem
ItemGen * GetItem(unsigned int PlayerEquipment::*itemPos)
Definition: Player.cpp:7574
Player::GetActualWillpower
int GetActualWillpower()
Definition: Player.cpp:1093
GUIButton::uW
unsigned int uW
Definition: GUIButton.h:26
Player::GetBeltItem
ItemGen * GetBeltItem()
Definition: Player.cpp:7552
ItemGen::IsBroken
bool IsBroken()
Definition: Items.h:304
ItemGen::ResetEnchantAnimation
void ResetEnchantAnimation()
Definition: Items.h:278
Player::GetBaseStrength
int GetBaseStrength()
Definition: Player.cpp:1032
EQUIP_TWO_HANDED
@ EQUIP_TWO_HANDED
Definition: Items.h:228
AudioPlayer.h
Award_Arena_SquireWins
@ Award_Arena_SquireWins
Definition: Awards.h:105
Award_ArcomageLoses
@ Award_ArcomageLoses
Definition: Awards.h:120
pViewport
struct Viewport * pViewport
Definition: mm7_data.cpp:21
UICharacter.h
PLAYER_SKILL_STEALING
@ PLAYER_SKILL_STEALING
Definition: Player.h:205
MapInfo.h
PLAYER_SKILL_CHAIN
@ PLAYER_SKILL_CHAIN
Definition: Player.h:181
ui_book_quests_title_color
unsigned int ui_book_quests_title_color
Definition: UICharacter.cpp:77
papredoll_dbods
Image * papredoll_dbods[5]
Definition: UICharacter.cpp:203
paperdoll_cloak_texture
Image * paperdoll_cloak_texture[4][10]
Definition: UICharacter.cpp:211
Player::GetOffHandItem
ItemGen * GetOffHandItem()
Definition: Player.cpp:7540
Player::GetActualMight
int GetActualMight()
Definition: Player.cpp:1080
ui_character_inventory_paperdoll_rings_background
Image * ui_character_inventory_paperdoll_rings_background
Definition: UICharacter.cpp:461
Player::classType
PLAYER_CLASS_TYPE classType
Definition: Player.h:639
FillAwardsData
void FillAwardsData()
Definition: UICharacter.cpp:2598
ITEM_AURA_EFFECT_BLUE
@ ITEM_AURA_EFFECT_BLUE
Definition: Items.h:30
ui_game_character_record_playerbuff_colors
std::array< unsigned int, 24 > ui_game_character_record_playerbuff_colors
Definition: UICharacter.cpp:69
Player::GetBaseIntelligence
int GetBaseIntelligence()
Definition: Player.cpp:1037
CastSpellInfo::spell_target_pid
int spell_target_pid
Definition: CastSpellInfo.h:30
Player::GetBaseWillpower
int GetBaseWillpower()
Definition: Player.cpp:1043
GUIWindow_CharacterRecord::Update
virtual void Update()
Definition: UICharacter.cpp:528
ItemGen::AuraEffectBlue
bool AuraEffectBlue() const
Definition: Items.h:285
papredoll_dlhs
Image * papredoll_dlhs[4]
Definition: UICharacter.cpp:202
ITEM_ELVEN_CHAINMAIL
@ ITEM_ELVEN_CHAINMAIL
Definition: Items.h:186
ITEM_RELIC_SCHOLARS_CAP
@ ITEM_RELIC_SCHOLARS_CAP
Definition: Items.h:175
Awards.h
PLAYER_SKILL_SWORD
@ PLAYER_SKILL_SWORD
Definition: Player.h:172
Player::GetMajorConditionIdx
unsigned int GetMajorConditionIdx()
Definition: Player.cpp:2614
Award_Arena_PageWins
@ Award_Arena_PageWins
Definition: Awards.h:104
ITEM_IDENTIFIED
@ ITEM_IDENTIFIED
Definition: Items.h:26
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
CastSpellInfo::field_6
__int16 field_6
Definition: CastSpellInfo.h:27
uint
unsigned int uint
Definition: MM7.h:4
ITEM_RARE_SHADOWS_MASK
@ ITEM_RARE_SHADOWS_MASK
Definition: Items.h:197
books_primary_item_per_page
int books_primary_item_per_page
Definition: mm7_data.cpp:521
ITEM_BROKEN
@ ITEM_BROKEN
Definition: Items.h:27
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
GUIButton::uY
unsigned int uY
Definition: GUIButton.h:22
__debugbreak
void __cdecl __debugbreak(void)
EQUIP_WAND
@ EQUIP_WAND
Definition: Items.h:239
pPaperdoll_BodyY
int pPaperdoll_BodyY
Definition: UICharacter.cpp:350
GUIButton::Release
void Release()
Definition: GUIButton.cpp:95
PlayerEquipment::uHelm
unsigned int uHelm
Definition: Player.h:323
CharacterUI_DrawItem
static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id)
Definition: UICharacter.cpp:1867
PlayerEquipment::uArmor
unsigned int uArmor
Definition: Player.h:322
dlhu_texnames_by_face
const char * dlhu_texnames_by_face[25]
Definition: UICharacter.cpp:430
draw_leather
void draw_leather()
Definition: UICharacter.cpp:925
ui_character_stat_debuffed_color
unsigned int ui_character_stat_debuffed_color
Definition: UICharacter.cpp:52
ItemGen::AuraEffectGreen
bool AuraEffectGreen() const
Definition: Items.h:288
PLAYER_SKILL_REPAIR
@ PLAYER_SKILL_REPAIR
Definition: Player.h:194
CastSpellInfo::GetCastSpellInInventoryWindow
GUIWindow * GetCastSpellInInventoryWindow()
Definition: UICharacter.cpp:660
books_page_number
int books_page_number
Definition: mm7_data.cpp:520
UIMSG_ClickInventoryBtn
@ UIMSG_ClickInventoryBtn
Definition: GUIWindow.h:99
Party::SetHoldingItem
void SetHoldingItem(ItemGen *pItem)
Definition: Party.cpp:150
ui_character_skillinfo_cant_learn
unsigned int ui_character_skillinfo_cant_learn
Definition: UICharacter.cpp:55
Player::sHealth
int sHealth
Definition: Player.h:766
Player::GetExperienceDisplayColor
unsigned int GetExperienceDisplayColor()
Definition: Player.cpp:1481
pCharacterScreen_ExitBtn
GUIButton * pCharacterScreen_ExitBtn
Definition: GUIButton.cpp:41
WINDOW_CharacterWindow_Stats
@ WINDOW_CharacterWindow_Stats
Definition: GUIWindow.h:327
Stat_string_format_2_column_less_100
const char * Stat_string_format_2_column_less_100
Definition: mm7_data.cpp:244
Player::GetActualLevel
int GetActualLevel()
Definition: Player.cpp:1073
ui_character_header_text_color
unsigned int ui_character_header_text_color
Definition: UICharacter.cpp:45
SpellInfo::pShortName
char * pShortName
Definition: Spells.h:177
GUIWindow::ptr_1C
void * ptr_1C
Definition: GUIWindow.h:476
EQUIP_GAUNTLETS
@ EQUIP_GAUNTLETS
Definition: Items.h:235
drh_texnames_by_face
const char * drh_texnames_by_face[25]
Definition: UICharacter.cpp:420
EQUIP_RING
@ EQUIP_RING
Definition: Items.h:237
Award_PrisonTerms
@ Award_PrisonTerms
Definition: Awards.h:103
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
Party::uNumArcomageWins
int uNumArcomageWins
Definition: Party.h:303
pCharacterScreen_DetalizBtn
GUIButton * pCharacterScreen_DetalizBtn
Definition: GUIButton.cpp:47
dword_50698C_uX
int dword_50698C_uX
Definition: mm7_data.cpp:539
AssetsManager::GetImage_Alpha
Texture * GetImage_Alpha(const String &name)
Definition: AssetsManager.cpp:66
pPaperdoll_SecondLeftHand
const int pPaperdoll_SecondLeftHand[4][2]
Definition: UICharacter.cpp:339
Player::GetActualSpeed
int GetActualSpeed()
Definition: Player.cpp:1111
pCharacterScreen_AwardsBtn
GUIButton * pCharacterScreen_AwardsBtn
Definition: GUIButton.cpp:42
dword_506980_uW
int dword_506980_uW
Definition: mm7_data.cpp:536
GUIWindow_CharacterRecord::CharacterUI_SkillsTab_Draw
void CharacterUI_SkillsTab_Draw(struct Player *)
Definition: UICharacter.cpp:776
Player::GetArmorItem
ItemGen * GetArmorItem()
Definition: Player.cpp:7548
Player::GetActualAccuracy
int GetActualAccuracy()
Definition: Player.cpp:1105
Mouse::SetCursorImage
void SetCursorImage(const String &name)
Definition: Mouse.cpp:38
ui_character_condition_light_color
unsigned int ui_character_condition_light_color
Definition: UICharacter.cpp:57
ui_character_tooltip_header_default_color
unsigned int ui_character_tooltip_header_default_color
Definition: UICharacter.cpp:42
ui_book_calendar_title_color
unsigned int ui_book_calendar_title_color
Definition: UICharacter.cpp:84
ui_character_skill_highlight_color
unsigned int ui_character_skill_highlight_color
Definition: UICharacter.cpp:44
Player::GetActualLuck
int GetActualLuck()
Definition: Player.cpp:1117
ui_gamemenu_keys_action_name_color
unsigned int ui_gamemenu_keys_action_name_color
Definition: UICharacter.cpp:72
Stat_string_format_2_column_text
const char * Stat_string_format_2_column_text
Definition: mm7_data.cpp:243
GUIWindow::GetControl
GUIButton * GetControl(unsigned int uID)
Definition: GUIWindow.cpp:311
ui_ar_up_dn
Image * ui_ar_up_dn
Definition: GUIWindow.cpp:102
Party::uNumDeaths
unsigned int uNumDeaths
Definition: Party.h:283
PLAYER_SKILL_DARK
@ PLAYER_SKILL_DARK
Definition: Player.h:191
pCharacterScreen_DollBtn
GUIButton * pCharacterScreen_DollBtn
Definition: GUIButton.cpp:46
_50C9D8_AfterEnchClickEventTimeout
int _50C9D8_AfterEnchClickEventTimeout
Definition: mm7_data.cpp:582
PLAYER_SKILL_BODY
@ PLAYER_SKILL_BODY
Definition: Player.h:189
ui_game_minimap_decoration_color_1
unsigned int ui_game_minimap_decoration_color_1
Definition: UICharacter.cpp:66
PLAYER_SKILL_MERCHANT
@ PLAYER_SKILL_MERCHANT
Definition: Player.h:193
pArmorSkills
const int pArmorSkills[5]
Definition: UICharacter.cpp:436
WINDOW_CharacterWindow_Awards
@ WINDOW_CharacterWindow_Awards
Definition: GUIWindow.h:329
WetsuitOn
void WetsuitOn(unsigned int uPlayerID)
Definition: UICharacter.cpp:2643
Party::uNumArcomageLoses
int uNumArcomageLoses
Definition: Party.h:304
papredoll_flying_feet
Image * papredoll_flying_feet[22]
Definition: UICharacter.cpp:208
GUIWindow::uFrameX
unsigned int uFrameX
Definition: GUIWindow.h:468
Player::uExperience
unsigned __int64 uExperience
Definition: Player.h:636
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
paperdoll_boots_texture
Image * paperdoll_boots_texture[4][6]
Definition: UICharacter.cpp:209
Localization::GetClassName
const char * GetClassName(unsigned int index) const
Definition: Localization.h:35
Player::GetActualSkillLevel
int GetActualSkillLevel(PLAYER_SKILL_TYPE uSkillType)
Definition: Player.cpp:3017
_50C9D4_AfterEnchClickEventSecondParam
int _50C9D4_AfterEnchClickEventSecondParam
Definition: mm7_data.cpp:581
GUIWindow.h
ItemGen
Definition: Items.h:263
paperdoll_cloak_collar_texture
Image * paperdoll_cloak_collar_texture[4][10]
Definition: UICharacter.cpp:210
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
CharacterUI_SkillsTab_Draw__DrawSkillTable
static int CharacterUI_SkillsTab_Draw__DrawSkillTable(Player *player, int x, int y, const int *skill_list, int skill_list_size, int right_margin, const char *skill_group_name)
Definition: UICharacter.cpp:689
PLAYER_SKILL_ARMSMASTER
@ PLAYER_SKILL_ARMSMASTER
Definition: Player.h:204
pAwards
std::array< Award, 105 > pAwards
Definition: mm7_data.cpp:26
full_num_items_in_book
int full_num_items_in_book
Definition: mm7_data.cpp:29
Color16
uint16_t Color16(uint32_t r, uint32_t g, uint32_t b)
Definition: Engine.cpp:148
paperdoll_helm_texture
Image * paperdoll_helm_texture[2][16]
Definition: UICharacter.cpp:212
GUIWindow_CharacterRecord::CharacterUI_AwardsTab_Draw
void CharacterUI_AwardsTab_Draw(struct Player *)
Definition: UICharacter.cpp:812
pFontLucida
GUIFont * pFontLucida
Definition: GUIFont.cpp:19
_50C9A8_item_enchantment_timer
int _50C9A8_item_enchantment_timer
Definition: mm7_data.cpp:579
ui_game_dialogue_option_highlight_color
unsigned int ui_game_dialogue_option_highlight_color
Definition: UICharacter.cpp:97
ITEM_RELIC_TALEDONS_HELM
@ ITEM_RELIC_TALEDONS_HELM
Definition: Items.h:174
ui_book_calendar_month_color
unsigned int ui_book_calendar_month_color
Definition: UICharacter.cpp:87
papredoll_dlads
Image * papredoll_dlads[4]
Definition: UICharacter.cpp:207
Player::uQuickSpell
unsigned __int8 uQuickSpell
Definition: Player.h:774
ui_ar_dn_up
Image * ui_ar_dn_up
Definition: GUIWindow.cpp:101
pGUIWindow_CastTargetedSpell
GUIWindow * pGUIWindow_CastTargetedSpell
Definition: GUIWindow.cpp:56
Award_Arena_LordWins
@ Award_Arena_LordWins
Definition: Awards.h:107
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
GUIProgressBar.h
Viewport::uViewportTL_X
int uViewportTL_X
Definition: Viewport.h:22
Stat_string_format_2_column_over_100
const char * Stat_string_format_2_column_over_100
Definition: mm7_data.cpp:245
Player::pEquipment
PlayerEquipment pEquipment
Definition: Player.h:769
ui_book_calendar_time_color
unsigned int ui_book_calendar_time_color
Definition: UICharacter.cpp:85
pPaperdoll_BodyX
int pPaperdoll_BodyX
Definition: UICharacter.cpp:349
ui_character_inventory_background_strip
Image * ui_character_inventory_background_strip
Definition: UICharacter.cpp:458
papredoll_dlaus
Image * papredoll_dlaus[5]
Definition: UICharacter.cpp:206
EQUIP_BOOTS
@ EQUIP_BOOTS
Definition: Items.h:236
String
std::string String
Definition: Strings.h:10
set_default_ui_skin
void set_default_ui_skin()
Definition: UICharacter.cpp:102
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
ITEM_ARTIFACT_GOVERNORS_ARMOR
@ ITEM_ARTIFACT_GOVERNORS_ARMOR
Definition: Items.h:157
Player::GetBaseEndurance
int GetBaseEndurance()
Definition: Player.cpp:1048
CHARACTER_ATTRIBUTE_RESIST_BODY
@ CHARACTER_ATTRIBUTE_RESIST_BODY
Definition: Engine.h:537
ITEM_92
@ ITEM_92
Definition: Items.h:88
Player::GetActualAge
unsigned int GetActualAge()
Definition: Player.cpp:2474
WINDOW_CharacterWindow_Skills
@ WINDOW_CharacterWindow_Skills
Definition: GUIWindow.h:328
paperdoll_dbrds
std::array< Image *, 16 > paperdoll_dbrds
Definition: UICharacter.cpp:464
UIMSG_ClickStatsBtn
@ UIMSG_ClickStatsBtn
Definition: GUIWindow.h:98
UIMSG_ClickPaperdoll
@ UIMSG_ClickPaperdoll
Definition: GUIWindow.h:115
Player::GetBootItem
ItemGen * GetBootItem()
Definition: Player.cpp:7558
Player::GetGloveItem
ItemGen * GetGloveItem()
Definition: Player.cpp:7556
ui_book_calendar_day_color
unsigned int ui_book_calendar_day_color
Definition: UICharacter.cpp:86
Mouse::RemoveHoldingItem
void RemoveHoldingItem()
Definition: Mouse.cpp:25
ui_character_condition_normal_color
unsigned int ui_character_condition_normal_color
Definition: UICharacter.cpp:56
Party::uNumArenaKnightWins
char uNumArenaKnightWins
Definition: Party.h:296
WINDOW_CharacterRecord
@ WINDOW_CharacterRecord
Definition: GUIWindow.h:294
ui_character_bonus_text_color_neg
unsigned int ui_character_bonus_text_color_neg
Definition: UICharacter.cpp:47
awardSort
bool awardSort(int i, int j)
Definition: UICharacter.cpp:2580
ItemsTable::pItems
NZIArray< ItemDesc, 800 > pItems
Definition: Items.h:460
Mouse.h
pMouse
static Mouse * pMouse
Definition: UICharacter.cpp:32
CastSpellInfo.h
paperdoll_Helm
const int paperdoll_Helm[4][16][2]
Definition: UICharacter.cpp:317
Time.h
ui_character_inventory_background
Image * ui_character_inventory_background
Definition: UICharacter.cpp:457
PLAYER_SKILL_PLATE
@ PLAYER_SKILL_PLATE
Definition: Player.h:182
Player::GetRangedAttack
int GetRangedAttack()
Definition: Player.cpp:1311
CHARACTER_ATTRIBUTE_RESIST_EARTH
@ CHARACTER_ATTRIBUTE_RESIST_EARTH
Definition: Engine.h:535
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52
pPaperdoll_RightHand
const int pPaperdoll_RightHand[4][2]
Definition: UICharacter.cpp:342