comparison GUI/UI/UICharacter.cpp @ 2547:fed97f15d1e1

* SaveLoad * QuickReference * Modal * Character
author a.parshin
date Tue, 12 May 2015 01:45:31 +0200
parents c674d547cc7c
children f2a8ed07e921
comparison
equal deleted inserted replaced
2546:4087cbc62706 2547:fed97f15d1e1
22 #include "..\../Engine/Spells/CastSpellInfo.h" 22 #include "..\../Engine/Spells/CastSpellInfo.h"
23 #include "..\../Engine/texts.h" 23 #include "..\../Engine/texts.h"
24 #include "..\../IO/Mouse.h" 24 #include "..\../IO/Mouse.h"
25 25
26 26
27 void CharacterUI_LoadPaperdollTextures();
28 void WetsuitOn(unsigned int uPlayerID);
29 void WetsuitOff(unsigned int uPlayerID);
27 30
28 int bRingsShownInCharScreen; // 5118E0 31 int bRingsShownInCharScreen; // 5118E0
29 32
30 unsigned int ui_mainmenu_copyright_color; 33 unsigned int ui_mainmenu_copyright_color;
31 34
401 PLAYER_SKILL_LEARNING, PLAYER_SKILL_TRAP_DISARM, PLAYER_SKILL_MEDITATION, PLAYER_SKILL_MERCHANT, PLAYER_SKILL_PERCEPTION, 404 PLAYER_SKILL_LEARNING, PLAYER_SKILL_TRAP_DISARM, PLAYER_SKILL_MEDITATION, PLAYER_SKILL_MERCHANT, PLAYER_SKILL_PERCEPTION,
402 PLAYER_SKILL_REPAIR, PLAYER_SKILL_STEALING}; 405 PLAYER_SKILL_REPAIR, PLAYER_SKILL_STEALING};
403 const int pMagicSkills[9] = {PLAYER_SKILL_FIRE, PLAYER_SKILL_AIR, PLAYER_SKILL_WATER, PLAYER_SKILL_EARTH, PLAYER_SKILL_SPIRIT, 406 const int pMagicSkills[9] = {PLAYER_SKILL_FIRE, PLAYER_SKILL_AIR, PLAYER_SKILL_WATER, PLAYER_SKILL_EARTH, PLAYER_SKILL_SPIRIT,
404 PLAYER_SKILL_MIND, PLAYER_SKILL_BODY, PLAYER_SKILL_LIGHT, PLAYER_SKILL_DARK}; 407 PLAYER_SKILL_MIND, PLAYER_SKILL_BODY, PLAYER_SKILL_LIGHT, PLAYER_SKILL_DARK};
405 408
409
410 GUIWindow_CharacterRecord::GUIWindow_CharacterRecord(unsigned int uActiveCharacter, enum CURRENT_SCREEN screen) :
411 GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), uActiveCharacter, nullptr)
412 {
406 //----- (00421626) -------------------------------------------------------- 413 //----- (00421626) --------------------------------------------------------
407 GUIWindow *CharacterUI_Initialize(enum CURRENT_SCREEN screen) 414 // 00421626 CharacterUI_Initialize --- part
408 { 415 //GUIWindow *CharacterUI_Initialize(enum CURRENT_SCREEN screen)
416
409 ++pIcons_LOD->uTexturePacksCount; 417 ++pIcons_LOD->uTexturePacksCount;
410 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 418 if ( !pIcons_LOD->uNumPrevLoadedFiles )
411 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 419 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
412 420
413 pEventTimer->Pause(); 421 pEventTimer->Pause();
414 pAudioPlayer->StopChannels(-1, -1); 422 pAudioPlayer->StopChannels(-1, -1);
415 bRingsShownInCharScreen = false; 423 bRingsShownInCharScreen = false;
416 CharacterUI_LoadPaperdollTextures(); 424 CharacterUI_LoadPaperdollTextures();
417 current_screen_type = screen; 425 current_screen_type = screen;
418 426
419 auto wnd = new GUIWindow_CharacterRecord(0, 0, window->GetWidth(), window->GetHeight(), uActiveCharacter, 0); 427 //auto wnd = new GUIWindow_CharacterRecord(0, 0, window->GetWidth(), window->GetHeight(), uActiveCharacter, 0);
420 pCharacterScreen_StatsBtn = wnd->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308, 428 pCharacterScreen_StatsBtn = CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308,
421 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth, 429 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth,
422 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight, 430 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight,
423 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats 431 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats
424 pIcons_LOD->GetTexture(papredoll_dbrds[10]), 432 pIcons_LOD->GetTexture(papredoll_dbrds[10]),
425 pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0); 433 pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0);
426 pCharacterScreen_SkillsBtn = wnd->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308, 434 pCharacterScreen_SkillsBtn = CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308,
427 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth, 435 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth,
428 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight, 436 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight,
429 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills 437 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills
430 pIcons_LOD->GetTexture(papredoll_dbrds[8]), 438 pIcons_LOD->GetTexture(papredoll_dbrds[8]),
431 pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0); 439 pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0);
432 pCharacterScreen_InventoryBtn = wnd->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308, 440 pCharacterScreen_InventoryBtn = CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308,
433 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth, 441 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth,
434 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight, 442 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight,
435 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory 443 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory
436 pIcons_LOD->GetTexture(papredoll_dbrds[6]), 444 pIcons_LOD->GetTexture(papredoll_dbrds[6]),
437 pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0); 445 pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0);
438 pCharacterScreen_AwardsBtn = wnd->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308, 446 pCharacterScreen_AwardsBtn = CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308,
439 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth, 447 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth,
440 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight, 448 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight,
441 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards 449 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards
442 pIcons_LOD->GetTexture(papredoll_dbrds[4]), 450 pIcons_LOD->GetTexture(papredoll_dbrds[4]),
443 pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0); 451 pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0);
444 pCharacterScreen_ExitBtn = wnd->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308, 452 pCharacterScreen_ExitBtn = CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308,
445 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth, 453 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth,
446 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight, 454 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight,
447 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit 455 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit
448 pIcons_LOD->GetTexture(papredoll_dbrds[2]), 456 pIcons_LOD->GetTexture(papredoll_dbrds[2]),
449 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); 457 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0);
450 wnd->CreateButton(0, 0, 476, 345, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); 458 CreateButton(0, 0, 476, 345, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
451 pCharacterScreen_DetalizBtn = wnd->CreateButton(600, 300, 30, 30, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0); 459 pCharacterScreen_DetalizBtn = CreateButton(600, 300, 30, 30, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0);
452 pCharacterScreen_DollBtn = wnd->CreateButton(476, 0, 164, 345, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); 460 pCharacterScreen_DollBtn = CreateButton(476, 0, 164, 345, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
453 461
454 wnd->CreateButton(61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); 462 CreateButton(61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
455 wnd->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); 463 CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
456 wnd->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); 464 CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
457 wnd->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); 465 CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
458 466
459 wnd->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); 467 CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0);
460 FillAwardsData(); 468 FillAwardsData();
461
462 return wnd;
463 } 469 }
470
471 //----- (0041ABFD) --------------------------------------------------------
472 void GUIWindow_CharacterRecord::Update()
473 {
474 // -----------------------------------
475 // 004156F0 GUI_UpdateWindows --- part
476 // {
477 // 0041ABFD CharacterUI_CharacterScreen_Draw(pPlayers[uActiveCharacter]);
478 // }
479
480 auto player = pPlayers[uActiveCharacter];
481
482 pRenderer->ClearZBuffer(0, 479);
483 switch (current_character_screen_window)
484 {
485 case WINDOW_CharacterWindow_Stats:
486 {
487 CharacterUI_ReleaseButtons();
488 ReleaseAwardsScrollBar();
489 CharacterUI_StatsTab_Draw(player);
490 pRenderer->DrawTextureIndexed(
491 pCharacterScreen_StatsBtn->uX,
492 pCharacterScreen_StatsBtn->uY,
493 pIcons_LOD->LoadTexturePtr("ib-cd1-d", TEXTURE_16BIT_PALETTE)
494 );
495 }
496 break;
497
498 case WINDOW_CharacterWindow_Skills:
499 {
500 if (dword_507CC0_activ_ch != uActiveCharacter)
501 {
502 CharacterUI_ReleaseButtons();
503 CharacterUI_SkillsTab_CreateButtons();
504 }
505 ReleaseAwardsScrollBar();
506 CharacterUI_SkillsTab_Draw(player);
507 pRenderer->DrawTextureIndexed(
508 pCharacterScreen_SkillsBtn->uX,
509 pCharacterScreen_SkillsBtn->uY,
510 pIcons_LOD->LoadTexturePtr("ib-cd2-d", TEXTURE_16BIT_PALETTE)
511 );
512 }
513 break;
514
515 case WINDOW_CharacterWindow_Awards:
516 {
517 CharacterUI_ReleaseButtons();
518 ReleaseAwardsScrollBar();
519 CreateAwardsScrollBar();
520 CharacterUI_AwardsTab_Draw(player);
521 pRenderer->DrawTextureIndexed(
522 pCharacterScreen_AwardsBtn->uX,
523 pCharacterScreen_AwardsBtn->uY,
524 pIcons_LOD->LoadTexturePtr("ib-cd4-d", TEXTURE_16BIT_PALETTE)
525 );
526 }
527 break;
528
529 case WINDOW_CharacterWindow_Inventory:
530 {
531 CharacterUI_ReleaseButtons();
532 ReleaseAwardsScrollBar();
533 CharacterUI_InventoryTab_Draw(player, false);
534 pRenderer->DrawTextureIndexed(
535 pCharacterScreen_InventoryBtn->uX,
536 pCharacterScreen_InventoryBtn->uY,
537 pIcons_LOD->LoadTexturePtr("ib-cd3-d", TEXTURE_16BIT_PALETTE)
538 );
539 }
540 break;
541
542 default: __debugbreak(); break;
543 }
544
545 if (bRingsShownInCharScreen)
546 CharacterUI_DrawPaperdollWithRingOverlay(player);
547 else
548 CharacterUI_DrawPaperdoll(player);
549 }
550
551
552
553 void GUIWindow_CharacterRecord::ShowStatsTab()
554 {
555 // 004304E7 Game_EventLoop --- part
556 current_character_screen_window = WINDOW_CharacterWindow_Stats;
557 CharacterUI_ReleaseButtons();
558 ReleaseAwardsScrollBar();
559 new OnButtonClick3(pCharacterScreen_StatsBtn->uX, pCharacterScreen_StatsBtn->uY, 0, 0, (int)pCharacterScreen_StatsBtn, 0);
560 }
561
562 void GUIWindow_CharacterRecord::ShowSkillsTab()
563 {
564 // 004304E7 Game_EventLoop --- part
565 current_character_screen_window = WINDOW_CharacterWindow_Skills;
566 CharacterUI_ReleaseButtons();
567 ReleaseAwardsScrollBar();
568 CharacterUI_SkillsTab_CreateButtons();
569 new OnButtonClick3(pCharacterScreen_SkillsBtn->uX, pCharacterScreen_SkillsBtn->uY, 0, 0, (int)pCharacterScreen_SkillsBtn, 0);
570 }
571
572 void GUIWindow_CharacterRecord::ShowInventoryTab()
573 {
574 // 004304E7 Game_EventLoop --- part
575 current_character_screen_window = WINDOW_CharacterWindow_Inventory;
576 ReleaseAwardsScrollBar();
577 CharacterUI_ReleaseButtons();
578 new OnButtonClick3(pCharacterScreen_InventoryBtn->uX, pCharacterScreen_InventoryBtn->uY, 0, 0, (int)pCharacterScreen_InventoryBtn, 0);
579 }
580
581 void GUIWindow_CharacterRecord::ShowAwardsTab()
582 {
583 // 004304E7 Game_EventLoop --- part
584 ReleaseAwardsScrollBar();
585 CharacterUI_ReleaseButtons();
586 CreateAwardsScrollBar();
587 current_character_screen_window = WINDOW_CharacterWindow_Awards;
588 new OnButtonClick3(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (int)pCharacterScreen_AwardsBtn, 0);
589 FillAwardsData();
590 }
591
592 void GUIWindow_CharacterRecord::ToggleRingsOverlay()
593 {
594 int v128, v125, v123, v121;
595
596 bRingsShownInCharScreen ^= 1;
597 pCharacterScreen_DetalizBtn->Release();
598 pCharacterScreen_DollBtn->Release();
599 if (bRingsShownInCharScreen)
600 {
601 v128 = pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)->uTextureHeight;
602 v125 = pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)->uTextureWidth;
603 v123 = 445;
604 v121 = 470;
605 }
606 else
607 {
608 v128 = 30;
609 v125 = 30;
610 v123 = 300;
611 v121 = 600;
612 }
613 pCharacterScreen_DetalizBtn = pGUIWindow_CurrentMenu->CreateButton(
614 v121, v123, v125, v128, 1, 0, UIMSG_ChangeDetaliz, 0, 0,
615 pGlobalTXT_LocalizationStrings[64],// "Detail Toggle"
616 0
617 );
618 pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
619 viewparams->bRedrawGameUI = true;
620 }
621
622
464 623
465 //----- (004219BE) -------------------------------------------------------- 624 //----- (004219BE) --------------------------------------------------------
466 GUIWindow *CastSpellInfo::GetCastSpellInInventoryWindow() 625 GUIWindow *CastSpellInfo::GetCastSpellInInventoryWindow()
467 { 626 {
468 GUIWindow *CS_inventory_window; // ebx@1 627 GUIWindow *CS_inventory_window; // ebx@1
564 723
565 return y_offset; 724 return y_offset;
566 } 725 }
567 726
568 //----- (00419719) -------------------------------------------------------- 727 //----- (00419719) --------------------------------------------------------
569 void CharacterUI_SkillsTab_Draw(Player *player) 728 void GUIWindow_CharacterRecord::CharacterUI_SkillsTab_Draw(Player *player)
570 { 729 {
571 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_skill", TEXTURE_16BIT_PALETTE)); 730 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_skill", TEXTURE_16BIT_PALETTE));
572 731
573 sprintfex(pTmpBuf.data(), "%s \f%05d^Pv[%s]\f00000\r177%s: \f%05d%d\f00000", 732 sprintfex(pTmpBuf.data(), "%s \f%05d^Pv[%s]\f00000\r177%s: \f%05d%d\f00000",
574 pGlobalTXT_LocalizationStrings[206], // Skills for 733 pGlobalTXT_LocalizationStrings[206], // Skills for
591 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10; 750 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10;
592 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pMiscSkills, 12, 177, pGlobalTXT_LocalizationStrings[143]); //"Misc" 751 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pMiscSkills, 12, 177, pGlobalTXT_LocalizationStrings[143]); //"Misc"
593 } 752 }
594 753
595 //----- (0041A000) -------------------------------------------------------- 754 //----- (0041A000) --------------------------------------------------------
596 void CharacterUI_AwardsTab_Draw(Player *player) 755 void GUIWindow_CharacterRecord::CharacterUI_AwardsTab_Draw(Player *player)
597 { 756 {
598 int items_per_page; // eax@1 757 int items_per_page; // eax@1
599 char *v6; // ebx@15 758 char *v6; // ebx@15
600 char Source[100]; // [sp+Ch] [bp-C4h]@1 759 char Source[100]; // [sp+Ch] [bp-C4h]@1
601 GUIWindow awards_window; // [sp+70h] [bp-60h]@1 760 GUIWindow awards_window; // [sp+70h] [bp-60h]@1
689 void draw_leather() 848 void draw_leather()
690 { 849 {
691 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather)); 850 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather));
692 } 851 }
693 852
694 //----- (0041ABFD) --------------------------------------------------------
695 void CharacterUI_CharacterScreen_Draw(Player *player)
696 {
697 pRenderer->ClearZBuffer(0, 479);
698 switch (current_character_screen_window)
699 {
700 case WINDOW_CharacterWindow_Stats: // stats
701 CharacterUI_ReleaseButtons();
702 ReleaseAwardsScrollBar();
703 CharacterUI_StatsTab_Draw(player);
704 pRenderer->DrawTextureIndexed(pCharacterScreen_StatsBtn->uX,
705 pCharacterScreen_StatsBtn->uY,
706 pIcons_LOD->LoadTexturePtr("ib-cd1-d", TEXTURE_16BIT_PALETTE));
707 break;
708
709 case WINDOW_CharacterWindow_Skills: // skills
710 if (dword_507CC0_activ_ch != uActiveCharacter)
711 {
712 CharacterUI_ReleaseButtons();
713 CharacterUI_SkillsTab_CreateButtons();
714 }
715 ReleaseAwardsScrollBar();
716 CharacterUI_SkillsTab_Draw(player);
717 pRenderer->DrawTextureIndexed(pCharacterScreen_SkillsBtn->uX,
718 pCharacterScreen_SkillsBtn->uY,
719 pIcons_LOD->LoadTexturePtr("ib-cd2-d", TEXTURE_16BIT_PALETTE));
720 break;
721
722 case WINDOW_CharacterWindow_Awards: // awards
723 CharacterUI_ReleaseButtons();
724 ReleaseAwardsScrollBar();
725 CreateAwardsScrollBar();
726 CharacterUI_AwardsTab_Draw(player);
727 pRenderer->DrawTextureIndexed(pCharacterScreen_AwardsBtn->uX,
728 pCharacterScreen_AwardsBtn->uY,
729 pIcons_LOD->LoadTexturePtr("ib-cd4-d", TEXTURE_16BIT_PALETTE));
730 break;
731
732 case WINDOW_CharacterWindow_Inventory: // inventory and other
733 CharacterUI_ReleaseButtons();
734 ReleaseAwardsScrollBar();
735 CharacterUI_InventoryTab_Draw(player, false);
736 pRenderer->DrawTextureIndexed(pCharacterScreen_InventoryBtn->uX,
737 pCharacterScreen_InventoryBtn->uY,
738 pIcons_LOD->LoadTexturePtr("ib-cd3-d", TEXTURE_16BIT_PALETTE));
739 break;
740
741 default: break;
742 }
743
744 if (bRingsShownInCharScreen)
745 CharacterUI_DrawPaperdollWithRingOverlay(player);
746 else
747 CharacterUI_DrawPaperdoll(player);
748 }
749 853
750 //----- (0043CC7C) -------------------------------------------------------- 854 //----- (0043CC7C) --------------------------------------------------------
751 void CharacterUI_DrawPaperdoll(Player *player) 855 void CharacterUI_DrawPaperdoll(Player *player)
752 { 856 {
753 ItemGen *item; // edi@38 857 ItemGen *item; // edi@38
1856 //v43 = v26 + 40; 1960 //v43 = v26 + 40;
1857 } 1961 }
1858 } 1962 }
1859 1963
1860 //----- (00419401) -------------------------------------------------------- 1964 //----- (00419401) --------------------------------------------------------
1861 void CharacterUI_SkillsTab_CreateButtons() 1965 void GUIWindow_CharacterRecord::CharacterUI_SkillsTab_CreateButtons()
1862 { 1966 {
1863 GUIButton *pButton; // eax@3 1967 GUIButton *pButton; // eax@3
1864 unsigned int current_Y; // esi@8 1968 unsigned int current_Y; // esi@8
1865 int buttons_count; // [sp+10h] [bp-14h]@1 1969 int buttons_count; // [sp+10h] [bp-14h]@1
1866 int first_rows; // [sp+14h] [bp-10h]@19 1970 int first_rows; // [sp+14h] [bp-10h]@19
1947 if ( buttons_count ) 2051 if ( buttons_count )
1948 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, a5); 2052 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, a5);
1949 } 2053 }
1950 2054
1951 //----- (00418511) -------------------------------------------------------- 2055 //----- (00418511) --------------------------------------------------------
1952 void CharacterUI_StatsTab_Draw( Player *player ) 2056 void GUIWindow_CharacterRecord::CharacterUI_StatsTab_Draw(Player *player)
1953 { 2057 {
1954 int pY; // ST34_4@4 2058 int pY; // ST34_4@4
1955 const char *pText; // eax@9 2059 const char *pText; // eax@9
1956 const char *text_format; // [sp+14h] [bp-Ch]@4 2060 const char *text_format; // [sp+14h] [bp-Ch]@4
1957 2061