comparison GUI/GUIWindow.cpp @ 2574:dd36326a9994

More texture refactoring GetLeather -> DrawTextureCustomHeight
author a.parshin
date Mon, 07 Mar 2016 03:48:40 +0200
parents 0c67be4ec900
children a76d408c5132
comparison
equal deleted inserted replaced
2573:0c67be4ec900 2574:dd36326a9994
74 struct GUIMessageQueue *pMessageQueue_50C9E8 = new GUIMessageQueue; 74 struct GUIMessageQueue *pMessageQueue_50C9E8 = new GUIMessageQueue;
75 75
76 76
77 Image *ui_exit_cancel_button_background = nullptr; 77 Image *ui_exit_cancel_button_background = nullptr;
78 Image *game_ui_right_panel_frame = nullptr; 78 Image *game_ui_right_panel_frame = nullptr;
79 unsigned int uExitCancelTextureId; 79 Image *dialogue_ui_x_ok_u = nullptr;
80 80 Image *dialogue_ui_x_x_u = nullptr;
81 81
82 Image *ui_buttdesc2 = nullptr;
83 Image *ui_buttyes2 = nullptr;
84
85 Image *ui_btn_npc_right = nullptr;
86 Image *ui_btn_npc_left = nullptr;
87
88 Image *ui_ar_dn_dn = nullptr;
89 Image *ui_ar_dn_up = nullptr;
90 Image *ui_ar_up_dn = nullptr;
91 Image *ui_ar_up_up = nullptr;
92
93
94
95 Image *ui_leather_mm6 = nullptr;
96 Image *ui_leather_mm7 = nullptr;
82 97
83 98
84 GUIWindow_Inventory_CastSpell::GUIWindow_Inventory_CastSpell(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) : 99 GUIWindow_Inventory_CastSpell::GUIWindow_Inventory_CastSpell(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) :
85 GUIWindow(x, y, width, height, button, hint) 100 GUIWindow(x, y, width, height, button, hint)
86 { 101 {
87 pMouse->SetCursorBitmap("MICON2"); 102 pMouse->SetCursorBitmap("MICON2");
88 pBtn_ExitCancel = CreateButton(392, 318, 75, 33, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34],//Отмена 103 pBtn_ExitCancel = CreateButton(392, 318, 75, 33, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34],//Отмена
89 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); 104 ui_buttdesc2, nullptr);
90 ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2); // Choose target / Выбрать цель 105 ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2); // Choose target / Выбрать цель
91 ++pIcons_LOD->uTexturePacksCount; 106 ++pIcons_LOD->uTexturePacksCount;
92 current_character_screen_window = WINDOW_CharacterWindow_Inventory; 107 current_character_screen_window = WINDOW_CharacterWindow_Inventory;
93 current_screen_type = SCREEN_CASTING; 108 current_screen_type = SCREEN_CASTING;
94 if (!pIcons_LOD->uNumPrevLoadedFiles) 109 if (!pIcons_LOD->uNumPrevLoadedFiles)
98 GUIWindow_House::GUIWindow_House(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) : 113 GUIWindow_House::GUIWindow_House(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) :
99 GUIWindow(x, y, width, height, button, hint) 114 GUIWindow(x, y, width, height, button, hint)
100 { 115 {
101 current_screen_type = SCREEN_HOUSE; 116 current_screen_type = SCREEN_HOUSE;
102 pBtn_ExitCancel = CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[80], // Quit building / Выйти из здания 117 pBtn_ExitCancel = CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[80], // Quit building / Выйти из здания
103 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); 118 ui_exit_cancel_button_background, 0);
104 for (int v26 = 0; v26 < uNumDialogueNPCPortraits; ++v26) 119 for (int v26 = 0; v26 < uNumDialogueNPCPortraits; ++v26)
105 { 120 {
106 char *v29, *v30; 121 char *v29, *v30;
107 if (v26 + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic) 122 if (v26 + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic)
108 { 123 {
133 GUIWindow(x, y, width, height, button, hint) 148 GUIWindow(x, y, width, height, button, hint)
134 { 149 {
135 prev_screen_type = current_screen_type; 150 prev_screen_type = current_screen_type;
136 current_screen_type = SCREEN_NPC_DIALOGUE; 151 current_screen_type = SCREEN_NPC_DIALOGUE;
137 pBtn_ExitCancel = CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], //"Exit" 152 pBtn_ExitCancel = CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], //"Exit"
138 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); 153 ui_exit_cancel_button_background, 0);
139 if (par1C != 1) 154 if (par1C != 1)
140 { 155 {
141 int num_menu_buttons = 0; 156 int num_menu_buttons = 0;
142 int v11 = LOBYTE(pFontArrus->uFontHeight) - 3; 157 int v11 = LOBYTE(pFontArrus->uFontHeight) - 3;
143 NPCData *speakingNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID); 158 NPCData *speakingNPC = GetNPCData(sDialogue_SpeakingActorNPC_ID);
404 // ----------------------------------------- 419 // -----------------------------------------
405 // 0041C26A void GUIWindow::Release --- part 420 // 0041C26A void GUIWindow::Release --- part
406 if (!dword_591084) 421 if (!dword_591084)
407 pDialogueNPCPortraits[0]->Release(); 422 pDialogueNPCPortraits[0]->Release();
408 uNumDialogueNPCPortraits = 0; 423 uNumDialogueNPCPortraits = 0;
409 pTexture_Dialogue_Background->Release(); 424
410 425 if (game_ui_dialogue_background)
411 pIcons_LOD->SyncLoadedFilesCount(); 426 {
427 game_ui_dialogue_background->Release();
428 game_ui_dialogue_background = nullptr;
429 }
430
412 current_screen_type = prev_screen_type; 431 current_screen_type = prev_screen_type;
413 432
414 GUIWindow::Release(); 433 GUIWindow::Release();
415 } 434 }
416 435
430 // ----------------------------------------- 449 // -----------------------------------------
431 // 0041C26A void GUIWindow::Release --- part 450 // 0041C26A void GUIWindow::Release --- part
432 for (int i = 0; i < uNumDialogueNPCPortraits; ++i) 451 for (int i = 0; i < uNumDialogueNPCPortraits; ++i)
433 pDialogueNPCPortraits[i]->Release(); 452 pDialogueNPCPortraits[i]->Release();
434 uNumDialogueNPCPortraits = 0; 453 uNumDialogueNPCPortraits = 0;
435 pTexture_Dialogue_Background->Release(); 454
436 455 if (game_ui_dialogue_background)
437 pIcons_LOD->SyncLoadedFilesCount(); 456 {
438 pIcons_LOD->RemoveTexturesPackFromTextureList(); 457 game_ui_dialogue_background->Release();
458 game_ui_dialogue_background = nullptr;
459 }
460
439 dword_5C35D4 = 0; 461 dword_5C35D4 = 0;
440 if (bFlipOnExit) 462 if (bFlipOnExit)
441 { 463 {
442 pParty->sRotationY = (stru_5C6E00->uIntegerDoublePi - 1) & (stru_5C6E00->uIntegerPi + pParty->sRotationY); 464 pParty->sRotationY = (stru_5C6E00->uIntegerDoublePi - 1) & (stru_5C6E00->uIntegerPi + pParty->sRotationY);
443 pIndoorCameraD3D->sRotationY = pParty->sRotationY; 465 pIndoorCameraD3D->sRotationY = pParty->sRotationY;
570 DrawPopupWindow(this->uFrameX, this->uFrameY, this->uFrameWidth, v16); 592 DrawPopupWindow(this->uFrameX, this->uFrameY, this->uFrameWidth, v16);
571 if ( this->Hint ) 593 if ( this->Hint )
572 current_window.DrawTitleText(pFontLucida, 0, (signed int)(v16 - pFontLucida->CalcTextHeight(this->Hint, &current_window, 0, 0)) / 2 - 14, 0, this->Hint, 3); 594 current_window.DrawTitleText(pFontLucida, 0, (signed int)(v16 - pFontLucida->CalcTextHeight(this->Hint, &current_window, 0, 0)) / 2 - 14, 0, this->Hint, 3);
573 } 595 }
574 596
575 //----- (00411B59) -------------------------------------------------------- 597
576 void LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer)
577 {
578 //unsigned int v2; // esi@1
579 //unsigned int v3; // edi@1
580 FILE *v4; // ebx@1
581 FILE *v5; // eax@2
582 //char pContainerName[64]; // [sp+Ch] [bp-44h]@1
583 //unsigned int v7; // [sp+4Ch] [bp-4h]@1
584
585 if (pSavegameThumbnails[uSlot])
586 {
587 pSavegameThumbnails[uSlot]->Release();
588 pSavegameThumbnails[uSlot] = nullptr;
589 }
590
591
592 wchar_t filename[1024];
593 swprintf(filename, L"data\\lloyd%d%d.pcx", uPlayer, uSlot + 1);
594 pSavegameThumbnails[uSlot] = assets->GetImage_PCXFromFile(filename);
595
596 if (!pSavegameThumbnails[uSlot])
597 {
598 swprintf(filename, L"lloyd%d%d.pcx", uPlayer, uSlot + 1);
599 pSavegameThumbnails[uSlot] = assets->GetImage_PCXFromNewLOD(filename);
600 }
601 /*sprintf(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1);
602 v4 = fopen(pContainerName, "rb");
603 if ( v4 )
604 {
605 pSavegameThumbnails[uSlot].LoadFromFILE(v4, 0, 1);
606 fclose(v4);
607 }
608 else
609 {
610 sprintf(pContainerName, "lloyd%d%d.pcx", uPlayer, uSlot + 1);
611 v5 = pNew_LOD->FindContainer(pContainerName, 1);
612 if ( v5 )
613 pSavegameThumbnails[uSlot].LoadFromFILE(v5, 0, 0);
614 else
615 *((int *)&pSavegameThumbnails.data()->pPixels + 10 * uSlot) = 0;
616 }*/
617 }
618 598
619 599
620 //----- (004B3157) -------------------------------------------------------- 600 //----- (004B3157) --------------------------------------------------------
621 void GUIWindow::HouseDialogManager() 601 void GUIWindow::HouseDialogManager()
622 { 602 {
640 memcpy(&pWindow, this, sizeof(pWindow)); 620 memcpy(&pWindow, this, sizeof(pWindow));
641 pWindow.uFrameWidth -= 18; 621 pWindow.uFrameWidth -= 18;
642 pWindow.uFrameZ -= 18; 622 pWindow.uFrameZ -= 18;
643 pWhiteColor = Color16(0xFFu, 0xFFu, 0xFFu); 623 pWhiteColor = Color16(0xFFu, 0xFFu, 0xFFu);
644 pColor2 = Color16(0x15u, 0x99u, 0xE9u); 624 pColor2 = Color16(0x15u, 0x99u, 0xE9u);
645 pRenderer->DrawTextureTransparentColorKey(0x1DDu, 0, pTexture_Dialogue_Background); 625 pRenderer->DrawTextureNew(477/640.0f, 0, game_ui_dialogue_background);
646 pRenderer->DrawTextureAlphaNew(468, 0, game_ui_right_panel_frame); 626 pRenderer->DrawTextureAlphaNew(468/640.0f, 0, game_ui_right_panel_frame);
647 if ( pDialogueNPCCount != uNumDialogueNPCPortraits || !uHouse_ExitPic ) 627 if ( pDialogueNPCCount != uNumDialogueNPCPortraits || !uHouse_ExitPic )
648 { 628 {
649 pDialogWindow.uFrameWidth = 130; 629 pDialogWindow.uFrameWidth = 130;
650 pDialogWindow.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight); 630 pDialogWindow.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight);
651 pHouseName = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName; 631 pHouseName = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName;
666 if ( in_current_building_type == BuildingType_Jail ) 646 if ( in_current_building_type == BuildingType_Jail )
667 { 647 {
668 JailDialog(); 648 JailDialog();
669 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 649 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
670 { 650 {
671 pRenderer->DrawTextureTransparentColorKey(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 651 pRenderer->DrawTextureAlphaNew(556/640.0f, 451/480.0f, dialogue_ui_x_x_u);
672 pRenderer->DrawTextureTransparentColorKey(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 652 pRenderer->DrawTextureAlphaNew(476/640.0f, 451/480.0f, dialogue_ui_x_ok_u);
673 } 653 }
674 else 654 else
675 pRenderer->DrawTextureAlphaNew(471/640.0f, 445/480.0f, ui_exit_cancel_button_background); 655 pRenderer->DrawTextureAlphaNew(471/640.0f, 445/480.0f, ui_exit_cancel_button_background);
676 return; 656 return;
677 } 657 }
679 { 659 {
680 pDialogWindow.uFrameWidth = 458; 660 pDialogWindow.uFrameWidth = 458;
681 pDialogWindow.uFrameZ = 457; 661 pDialogWindow.uFrameZ = 457;
682 pTextHeight = pFontArrus->CalcTextHeight(current_npc_text, &pDialogWindow, 13, 0); 662 pTextHeight = pFontArrus->CalcTextHeight(current_npc_text, &pDialogWindow, 13, 0);
683 v6 = pTextHeight + 7; 663 v6 = pTextHeight + 7;
684 pRenderer->GetLeather(8, 352 - (pTextHeight + 7), &pIcons_LOD->pTextures[uTextureID_Leather], 664 pRenderer->DrawTextureCustomHeight(
685 pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight - (pTextHeight + 7)); 665 8/640.0f,
666 (352 - (pTextHeight + 7))/480.0f,
667 ui_leather_mm7,
668 pTextHeight + 7);
686 pRenderer->DrawTextureAlphaNew(8/640.0f, (347 - v6)/480.0f, _591428_endcap); 669 pRenderer->DrawTextureAlphaNew(8/640.0f, (347 - v6)/480.0f, _591428_endcap);
687 v7 = FitTextInAWindow(current_npc_text, pFontArrus, &pDialogWindow, 0xDu, 0); 670 v7 = FitTextInAWindow(current_npc_text, pFontArrus, &pDialogWindow, 0xDu, 0);
688 window_SpeakInHouse->DrawText(pFontArrus, 13, 354 - v6, 0, v7, 0, 0, 0); 671 window_SpeakInHouse->DrawText(pFontArrus, 13, 354 - v6, 0, v7, 0, 0, 0);
689 } 672 }
690 if ( uNumDialogueNPCPortraits <= 0 ) 673 if ( uNumDialogueNPCPortraits <= 0 )
691 { 674 {
692 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 675 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
693 { 676 {
694 pRenderer->DrawTextureTransparentColorKey(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 677 pRenderer->DrawTextureAlphaNew(556/640.0f, 451/480.0f, dialogue_ui_x_x_u);
695 pRenderer->DrawTextureTransparentColorKey(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 678 pRenderer->DrawTextureAlphaNew(476/640.0f, 451/480.0f, dialogue_ui_x_ok_u);
696 } 679 }
697 else 680 else
698 pRenderer->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f, ui_exit_cancel_button_background); 681 pRenderer->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f, ui_exit_cancel_button_background);
699 return; 682 return;
700 } 683 }
701 for ( v8 = 0; v8 < uNumDialogueNPCPortraits; ++v8 ) 684 for ( v8 = 0; v8 < uNumDialogueNPCPortraits; ++v8 )
702 { 685 {
703 pRenderer->DrawTextureTransparentColorKey(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8] - 4, 686 pRenderer->DrawTextureAlphaNew((pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8] - 4)/640.0f,
704 pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v8] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); 687 (pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v8] - 4)/480.0f, game_ui_evtnpc);
705 pRenderer->DrawTextureTransparentColorKey(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8], 688 pRenderer->DrawTextureTransparentColorKey(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8],
706 pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v8], pDialogueNPCPortraits[v8]); 689 pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v8], pDialogueNPCPortraits[v8]);
707 if ( uNumDialogueNPCPortraits < 4 ) 690 if ( uNumDialogueNPCPortraits < 4 )
708 { 691 {
709 if ( v8 + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) 692 if ( v8 + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic )
726 pWindow.DrawTitleText(pFontCreate, 483, v10, pColor2, pTitleText, 3); 709 pWindow.DrawTitleText(pFontCreate, 483, v10, pColor2, pTitleText, 3);
727 } 710 }
728 } 711 }
729 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 712 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
730 { 713 {
731 pRenderer->DrawTextureTransparentColorKey(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 714 pRenderer->DrawTextureAlphaNew(556/640.0f, 451/480.0f, dialogue_ui_x_x_u);
732 pRenderer->DrawTextureTransparentColorKey(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 715 pRenderer->DrawTextureAlphaNew(476/640.0f, 451/480.0f, dialogue_ui_x_ok_u);
733 } 716 }
734 else 717 else
735 pRenderer->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f, ui_exit_cancel_button_background); 718 pRenderer->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f, ui_exit_cancel_button_background);
736 return; 719 return;
737 } 720 }
738 v4 = (char *)pDialogueNPCCount - 1; 721 v4 = (char *)pDialogueNPCCount - 1;
739 pRenderer->DrawTextureTransparentColorKey(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); 722 pRenderer->DrawTextureAlphaNew((pNPCPortraits_x[0][0] - 4)/640.0f, (pNPCPortraits_y[0][0] - 4)/480.0f, game_ui_evtnpc);
740 pRenderer->DrawTextureTransparentColorKey(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[(signed int)v4]); 723 pRenderer->DrawTextureTransparentColorKey(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[(signed int)v4]);
741 if ( current_screen_type == SCREEN_E ) 724 if ( current_screen_type == SCREEN_E )
742 { 725 {
743 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true); 726 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
744 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 727 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
745 { 728 {
746 pRenderer->DrawTextureTransparentColorKey(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 729 pRenderer->DrawTextureAlphaNew(556/640.0f, 451/480.0f, dialogue_ui_x_x_u);
747 pRenderer->DrawTextureTransparentColorKey(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 730 pRenderer->DrawTextureAlphaNew(476/640.0f, 451/480.0f, dialogue_ui_x_ok_u);
748 } 731 }
749 else 732 else
750 pRenderer->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f, ui_exit_cancel_button_background); 733 pRenderer->DrawTextureAlphaNew(471/640.0f, 445/480.0f, ui_exit_cancel_button_background);
751 return; 734 return;
752 } 735 }
753 if ( v4 || !dword_591080 )//на изумрудном острове заходит на корабле пока не выполнены квесты 736 if ( v4 || !dword_591080 )//на изумрудном острове заходит на корабле пока не выполнены квесты
754 SimpleHouseDialog(); 737 SimpleHouseDialog();
755 else 738 else
814 break; 797 break;
815 } 798 }
816 } 799 }
817 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 800 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
818 { 801 {
819 pRenderer->DrawTextureTransparentColorKey(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 802 pRenderer->DrawTextureAlphaNew(556/640.0f, 451/480.0f, dialogue_ui_x_x_u);
820 pRenderer->DrawTextureTransparentColorKey(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 803 pRenderer->DrawTextureAlphaNew(476/640.0f, 451/480.0f, dialogue_ui_x_ok_u);
821 } 804 }
822 else 805 else
823 pRenderer->DrawTextureAlphaNew(471 / 640.0f, 445 / 480.0f, ui_exit_cancel_button_background); 806 pRenderer->DrawTextureAlphaNew(471/640.0f, 445/480.0f, ui_exit_cancel_button_background);
824 } 807 }
825 808
826 //----- (004B1854) -------------------------------------------------------- 809 //----- (004B1854) --------------------------------------------------------
827 void GUIWindow::DrawShops_next_generation_time_string( __int64 next_generation_time ) 810 void GUIWindow::DrawShops_next_generation_time_string( __int64 next_generation_time )
828 { 811 {
1161 return v28; 1144 return v28;
1162 } 1145 }
1163 1146
1164 //----- (0041D12F) -------------------------------------------------------- 1147 //----- (0041D12F) --------------------------------------------------------
1165 GUIButton *GUIWindow::CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, 1148 GUIButton *GUIWindow::CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight,
1166 int a6, int a7, UIMessageType msg, unsigned int msg_param, unsigned __int8 uHotkey, const char *pName, Texture *pTextures, ...) 1149 int a6, int a7, UIMessageType msg, unsigned int msg_param, unsigned __int8 uHotkey, const char *pName, Image *pTextures, ...)
1167 { 1150 {
1168 GUIButton *pButton; // esi@1 1151 GUIButton *pButton; // esi@1
1169 // unsigned int v13; // eax@1 1152 // unsigned int v13; // eax@1
1170 // unsigned int v14; // ebx@4 1153 // unsigned int v14; // ebx@4
1171 // unsigned int v15; // eax@4 1154 // unsigned int v15; // eax@4
1172 unsigned int TextureNum=0; // ebx@4 1155 unsigned int TextureNum=0; // ebx@4
1173 // unsigned int v17; // eax@4 1156 // unsigned int v17; // eax@4
1174 // Texture *v18; // eax@4 1157 // Texture_MM7 *v18; // eax@4
1175 // Texture **v19; // ecx@5 1158 // Texture_MM7 **v19; // ecx@5
1176 // Texture **v20; // edx@5 1159 // Texture_MM7 **v20; // edx@5
1177 // GUIButton *v21; // eax@7 1160 // GUIButton *v21; // eax@7
1178 va_list texturs_ptr; 1161 va_list texturs_ptr;
1179 1162
1180 pButton = (GUIButton *)malloc(0xBC); 1163 pButton = (GUIButton *)malloc(0xBC);
1164
1165 for (unsigned int i = 0; i < 5; ++i)
1166 pButton->pTextures[i] = nullptr;
1167
1181 pButton->pParent = this; 1168 pButton->pParent = this;
1182 pButton->uWidth = uWidth; 1169 pButton->uWidth = uWidth;
1183 pButton->uHeight = uHeight; 1170 pButton->uHeight = uHeight;
1184 1171
1185 if ( a6 == 2 && !uHeight ) 1172 if ( a6 == 2 && !uHeight )
1195 pButton->msg = msg; 1182 pButton->msg = msg;
1196 pButton->msg_param = msg_param; 1183 pButton->msg_param = msg_param;
1197 pButton->uHotkey = uHotkey; 1184 pButton->uHotkey = uHotkey;
1198 //strlen(pName); 1185 //strlen(pName);
1199 strcpy(pButton->pButtonName, pName); 1186 strcpy(pButton->pButtonName, pName);
1187
1188
1189
1200 va_start(texturs_ptr, pName); 1190 va_start(texturs_ptr, pName);
1201 while (NULL!=(pTextures=va_arg(texturs_ptr, Texture *))) 1191 do
1202 { 1192 {
1203 pButton->pTextures[TextureNum]=pTextures; 1193 pTextures = va_arg(texturs_ptr, Image *);
1204 ++TextureNum; 1194 pButton->pTextures[TextureNum] = pTextures;
1205 } 1195 ++TextureNum;
1196 } while (pTextures);
1206 va_end(texturs_ptr); 1197 va_end(texturs_ptr);
1198
1199
1200
1207 pButton->uNumTextures = TextureNum; 1201 pButton->uNumTextures = TextureNum;
1208 if ( this->pControlsTail ) 1202 if ( this->pControlsTail )
1209 this->pControlsTail->pNext = pButton; 1203 this->pControlsTail->pNext = pButton;
1210 else 1204 else
1211 this->pControlsHead = pButton; 1205 this->pControlsHead = pButton;
1304 uDialogueType = 81;//enum JoinGuildDialog 1298 uDialogueType = 81;//enum JoinGuildDialog
1305 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText; 1299 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText;
1306 ContractSelectText(pEventCode); 1300 ContractSelectText(pEventCode);
1307 pDialogueWindow->Release(); 1301 pDialogueWindow->Release();
1308 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 350, pEventCode, 0); 1302 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 350, pEventCode, 0);
1309 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); // Cancel 1303 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], ui_exit_cancel_button_background, 0); // Cancel
1310 pDialogueWindow->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); 1304 pDialogueWindow->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0);
1311 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_ClickNPCTopic, 82, 0, pGlobalTXT_LocalizationStrings[122], 0); 1305 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_ClickNPCTopic, 82, 0, pGlobalTXT_LocalizationStrings[122], 0);
1312 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2); 1306 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2);
1313 dialog_menu_id = HOUSE_DIALOGUE_OTHER; 1307 dialog_menu_id = HOUSE_DIALOGUE_OTHER;
1314 } 1308 }
1326 void GUIWindow_BooksButtonOverlay::Update() 1320 void GUIWindow_BooksButtonOverlay::Update()
1327 { 1321 {
1328 // ----------------------------------- 1322 // -----------------------------------
1329 // 004156F0 GUI_UpdateWindows --- part 1323 // 004156F0 GUI_UpdateWindows --- part
1330 auto pButton = (GUIButton *)ptr_1C; 1324 auto pButton = (GUIButton *)ptr_1C;
1331 pRenderer->DrawTextureTransparentColorKey(uFrameY, uFrameX, pButton->pTextures[0]); 1325 pRenderer->DrawTextureAlphaNew(uFrameY/640.0f, uFrameX/480.0f, pButton->pTextures[0]);
1332 viewparams->bRedrawGameUI = true; 1326 viewparams->bRedrawGameUI = true;
1333 } 1327 }
1334 1328
1335 void GUIWindow_Dialogue::Update() 1329 void GUIWindow_Dialogue::Update()
1336 { 1330 {
1398 // 004156F0 GUI_UpdateWindows --- part 1392 // 004156F0 GUI_UpdateWindows --- part
1399 pRenderer->ClearZBuffer(0, 479); 1393 pRenderer->ClearZBuffer(0, 479);
1400 draw_leather(); 1394 draw_leather();
1401 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true); 1395 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
1402 CharacterUI_DrawPaperdoll(pPlayers[uActiveCharacter]); 1396 CharacterUI_DrawPaperdoll(pPlayers[uActiveCharacter]);
1403 pRenderer->DrawTextureIndexedAlpha(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uTextureID_x_x_u)); 1397 pRenderer->DrawTextureAlphaNew(pBtn_ExitCancel->uX/640.0f, pBtn_ExitCancel->uY/480.0f, dialogue_ui_x_x_u);
1404 } 1398 }
1405 1399
1406 void OnButtonClick::Update() 1400 void OnButtonClick::Update()
1407 { 1401 {
1408 // ----------------------------------- 1402 // -----------------------------------
1409 // 004156F0 GUI_UpdateWindows --- part 1403 // 004156F0 GUI_UpdateWindows --- part
1410 if (Hint != (char *)1) 1404 if (Hint != (char *)1)
1411 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1405 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1412 GUIButton *pButton = (GUIButton *)ptr_1C; 1406 GUIButton *pButton = (GUIButton *)ptr_1C;
1413 pRenderer->DrawTextureIndexedAlpha(uFrameX, uFrameY, pButton->pTextures[0]); 1407 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pButton->pTextures[0]);
1414 viewparams->bRedrawGameUI = true; 1408 viewparams->bRedrawGameUI = true;
1415 if (Hint && Hint != (char *)1) 1409 if (Hint && Hint != (char *)1)
1416 pButton->DrawLabel(Hint, pFontCreate, 0, 0); 1410 pButton->DrawLabel(Hint, pFontCreate, 0, 0);
1417 Release(); 1411 Release();
1418 } 1412 }
1426 GUIButton *pButton = (GUIButton *)ptr_1C; 1420 GUIButton *pButton = (GUIButton *)ptr_1C;
1427 if (pButton->uX >= 0 && pButton->uX <= window->GetWidth()) 1421 if (pButton->uX >= 0 && pButton->uX <= window->GetWidth())
1428 { 1422 {
1429 if (pButton->uY >= 0 && pButton->uY <= window->GetHeight()) 1423 if (pButton->uY >= 0 && pButton->uY <= window->GetHeight())
1430 { 1424 {
1431 pRenderer->DrawTextureTransparentColorKey(uFrameX, uFrameY, pButton->pTextures[0]); 1425 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pButton->pTextures[0]);
1432 viewparams->bRedrawGameUI = true; 1426 viewparams->bRedrawGameUI = true;
1433 if (Hint && Hint != (char *)1) 1427 if (Hint && Hint != (char *)1)
1434 pButton->DrawLabel(Hint, pFontCreate, 0, 0); 1428 pButton->DrawLabel(Hint, pFontCreate, 0, 0);
1435 Release(); 1429 Release();
1436 return; 1430 return;
1447 // ----------------------------------- 1441 // -----------------------------------
1448 // 004156F0 GUI_UpdateWindows --- part 1442 // 004156F0 GUI_UpdateWindows --- part
1449 if (Hint != (char *)1) 1443 if (Hint != (char *)1)
1450 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1444 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1451 auto pButton = (GUIButton *)ptr_1C; 1445 auto pButton = (GUIButton *)ptr_1C;
1452 pRenderer->DrawTextureTransparentColorKey(uFrameX, uFrameY, pButton->pTextures[1]); 1446 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pButton->pTextures[1]);
1453 viewparams->bRedrawGameUI = 1; 1447 viewparams->bRedrawGameUI = 1;
1454 if (Hint && Hint != (char *)1) 1448 if (Hint && Hint != (char *)1)
1455 pButton->DrawLabel(Hint, pFontCreate, 0, 0); 1449 pButton->DrawLabel(Hint, pFontCreate, 0, 0);
1456 Release(); 1450 Release();
1457 } 1451 }
1461 // ----------------------------------- 1455 // -----------------------------------
1462 // 004156F0 GUI_UpdateWindows --- part 1456 // 004156F0 GUI_UpdateWindows --- part
1463 if (Hint != (char *)1) 1457 if (Hint != (char *)1)
1464 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1458 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1465 auto pButton = (GUIButton *)ptr_1C; 1459 auto pButton = (GUIButton *)ptr_1C;
1466 pRenderer->DrawTextureIndexedAlpha(uFrameX, uFrameY, pButton->pTextures[1]); 1460 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pButton->pTextures[1]);
1467 viewparams->bRedrawGameUI = true; 1461 viewparams->bRedrawGameUI = true;
1468 1462
1469 Release(); 1463 Release();
1470 } 1464 }
1471 1465
1474 // ----------------------------------- 1468 // -----------------------------------
1475 // 004156F0 GUI_UpdateWindows --- part 1469 // 004156F0 GUI_UpdateWindows --- part
1476 if (Hint != (char *)1) 1470 if (Hint != (char *)1)
1477 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1471 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1478 auto pButton = (GUIButton *)ptr_1C; 1472 auto pButton = (GUIButton *)ptr_1C;
1479 pRenderer->DrawTextureTransparentColorKey(uFrameX, uFrameY, pButton->pTextures[0]); 1473 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pButton->pTextures[0]);
1480 viewparams->bRedrawGameUI = true; 1474 viewparams->bRedrawGameUI = true;
1481 if (Hint && Hint != (char *)1) 1475 if (Hint && Hint != (char *)1)
1482 pButton->DrawLabel(Hint, pFontCreate, 0, 0); 1476 pButton->DrawLabel(Hint, pFontCreate, 0, 0);
1483 Release(); 1477 Release();
1484 1478
1493 // ----------------------------------- 1487 // -----------------------------------
1494 // 004156F0 GUI_UpdateWindows --- part 1488 // 004156F0 GUI_UpdateWindows --- part
1495 if (Hint != (char *)1) 1489 if (Hint != (char *)1)
1496 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1490 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1497 auto pGUIButton = (GUIButton *)ptr_1C; 1491 auto pGUIButton = (GUIButton *)ptr_1C;
1498 pRenderer->DrawTextureTransparentColorKey(uFrameX, uFrameY, pGUIButton->pTextures[0]); 1492 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pGUIButton->pTextures[0]);
1499 viewparams->bRedrawGameUI = true; 1493 viewparams->bRedrawGameUI = true;
1500 if (Hint && Hint != (char *)1) 1494 if (Hint && Hint != (char *)1)
1501 pGUIButton->DrawLabel(Hint, pFontCreate, 0, 0); 1495 pGUIButton->DrawLabel(Hint, pFontCreate, 0, 0);
1502 Release(); 1496 Release();
1503 1497
1509 // ----------------------------------- 1503 // -----------------------------------
1510 // 004156F0 GUI_UpdateWindows --- part 1504 // 004156F0 GUI_UpdateWindows --- part
1511 if (Hint != (char *)1) 1505 if (Hint != (char *)1)
1512 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1506 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1513 auto pButton = (GUIButton *)ptr_1C; 1507 auto pButton = (GUIButton *)ptr_1C;
1514 pRenderer->DrawTextureTransparentColorKey(uFrameX, uFrameY, pButton->pTextures[1]); 1508 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pButton->pTextures[1]);
1515 viewparams->bRedrawGameUI = true; 1509 viewparams->bRedrawGameUI = true;
1516 if (Hint && Hint != (char *)1) 1510 if (Hint && Hint != (char *)1)
1517 pButton->DrawLabel(Hint, pFontCreate, 0, 0); 1511 pButton->DrawLabel(Hint, pFontCreate, 0, 0);
1518 Release(); 1512 Release();
1519 1513
1525 // ----------------------------------- 1519 // -----------------------------------
1526 // 004156F0 GUI_UpdateWindows --- part 1520 // 004156F0 GUI_UpdateWindows --- part
1527 if (Hint != (char *)1) 1521 if (Hint != (char *)1)
1528 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1522 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1529 auto pButton = (GUIButton *)ptr_1C; 1523 auto pButton = (GUIButton *)ptr_1C;
1530 pRenderer->DrawTextureIndexedAlpha(uFrameX, uFrameY, pButton->pTextures[0]); 1524 pRenderer->DrawTextureAlphaNew(uFrameX/640.0f, uFrameY/480.0f, pButton->pTextures[0]);
1531 viewparams->bRedrawGameUI = true; 1525 viewparams->bRedrawGameUI = true;
1532 if (Hint && Hint != (char *)1) 1526 if (Hint && Hint != (char *)1)
1533 pButton->DrawLabel(Hint, pFontCreate, 0, 0); 1527 pButton->DrawLabel(Hint, pFontCreate, 0, 0);
1534 Release(); 1528 Release();
1535 1529
1552 GUIButton *pButton; // ebp@118 1546 GUIButton *pButton; // ebp@118
1553 int v39; // eax@129 1547 int v39; // eax@129
1554 GUIButton *pGUIButton; // ebp@146 1548 GUIButton *pGUIButton; // ebp@146
1555 //unsigned int pX; // [sp-1Ch] [bp-124h]@17 1549 //unsigned int pX; // [sp-1Ch] [bp-124h]@17
1556 //unsigned int pY; // [sp-18h] [bp-120h]@17 1550 //unsigned int pY; // [sp-18h] [bp-120h]@17
1557 //Texture *pTexture; // [sp-14h] [bp-11Ch]@17 1551 //Texture_MM7 *pTexture; // [sp-14h] [bp-11Ch]@17
1558 //Texture *pTexture2; // [sp-14h] [bp-11Ch]@86 1552 //Texture_MM7 *pTexture2; // [sp-14h] [bp-11Ch]@86
1559 int i; // [sp+0h] [bp-108h]@3 1553 int i; // [sp+0h] [bp-108h]@3
1560 // ItemGen pItemGen; // [sp+4h] [bp-104h]@98 1554 // ItemGen pItemGen; // [sp+4h] [bp-104h]@98
1561 GUIButton GUIButton2; // [sp+28h] [bp-E0h]@133 1555 GUIButton GUIButton2; // [sp+28h] [bp-E0h]@133
1562 ItemGen ItemGen2; // [sp+E4h] [bp-24h]@129 1556 ItemGen ItemGen2; // [sp+E4h] [bp-24h]@129
1563 1557
1730 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-C.pcx"); 1724 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-C.pcx");
1731 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-C.pcx"); 1725 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-C.pcx");
1732 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-c.pcx"); 1726 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-c.pcx");
1733 1727
1734 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-C"); 1728 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-C");
1735 minimap_loop = assets->GetTexture("ib-autmask-c"); 1729
1736 _5079B4_compass = assets->GetTexture("IB-COMP-C"); 1730 game_ui_minimap_frame = assets->GetImage_16BitAlpha(L"ib-autmask-c");
1737 _5079D0_init_g = assets->GetTexture("IB-InitG-c"); 1731 game_ui_minimap_compass = assets->GetImage_16BitColorKey(L"IB-COMP-C", 0x7FF);
1738 _5079C8_init_y = assets->GetTexture("IB-InitY-c"); 1732
1739 _5079CC_init_r = assets->GetTexture("IB-InitR-c"); 1733 game_ui_player_alert_green = assets->GetImage_16BitAlpha(L"IB-InitG-c");
1740 1734 game_ui_player_alert_yellow = assets->GetImage_16BitAlpha(L"IB-InitY-c");
1741 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2); 1735 game_ui_player_alert_red = assets->GetImage_16BitAlpha(L"IB-InitR-c");
1742 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-C", 2); 1736
1743 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-C", 2); 1737 ui_btn_npc_left = assets->GetImage_16BitAlpha(L"IB-NPCLD-C");
1744 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-C", 2); 1738 ui_btn_npc_right = assets->GetImage_16BitAlpha(L"IB-NPCRD-C");
1739 game_ui_btn_zoomin = assets->GetImage_16BitAlpha("ib-autout-C");
1740 game_ui_btn_zoomout = assets->GetImage_16BitAlpha("ib-autin-C");
1745 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-C", 2); 1741 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-C", 2);
1746 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-c", 2); 1742 game_ui_btn_cast = assets->GetImage_16BitAlpha("ib-m1d-c");
1747 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-c", 2); 1743 game_ui_btn_rest = assets->GetImage_16BitAlpha("ib-m2d-c");
1748 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-c", 2); 1744 game_ui_btn_quickref = assets->GetImage_16BitAlpha("ib-m3d-c");
1749 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-c", 2); 1745 game_ui_btn_settings = assets->GetImage_16BitAlpha("ib-m4d-c");
1750 1746
1751 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-c", 2); 1747 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-c", 2);
1752 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-c", 2); 1748 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-c", 2);
1753 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-c", 2); 1749 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-c", 2);
1754 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-c", 2); 1750 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-c", 2);
1757 pIconsFrameTable->InitializeAnimation(pUIAnim_WizardEye->uIconID); 1753 pIconsFrameTable->InitializeAnimation(pUIAnim_WizardEye->uIconID);
1758 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); 1754 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC");
1759 pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID); 1755 pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID);
1760 1756
1761 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-c", 0x7FF); 1757 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-c", 0x7FF);
1762 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-c", TEXTURE_16BIT_PALETTE); 1758
1763 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-c", 2); 1759 game_ui_evtnpc = assets->GetImage_16BitColorKey(L"evtnpc-c", 0x7FF);
1764 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven-c", 0x7FF); 1760 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven-c", 0x7FF);
1765 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll-c"); 1761 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll-c");
1766 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr-c"); 1762 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr-c");
1767 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul-c"); 1763 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul-c");
1768 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur-c"); 1764 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur-c");
1779 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-C.pcx"); 1775 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-C.pcx");
1780 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-C.pcx"); 1776 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-C.pcx");
1781 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-c.pcx"); 1777 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-c.pcx");
1782 1778
1783 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-C"); 1779 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-C");
1784 minimap_loop = assets->GetTexture("ib-autmask-c"); 1780 game_ui_minimap_frame = assets->GetImage_16BitAlpha(L"ib-autmask-c");
1785 _5079B4_compass = assets->GetTexture("IB-COMP-C"); 1781 game_ui_minimap_compass = assets->GetImage_16BitColorKey(L"IB-COMP-C", 0x7FF);
1786 _5079D0_init_g = assets->GetTexture("IB-InitG-c"); 1782 game_ui_player_alert_green = assets->GetImage_16BitAlpha(L"IB-InitG-c");
1787 _5079C8_init_y = assets->GetTexture("IB-InitY-c"); 1783 game_ui_player_alert_yellow = assets->GetImage_16BitAlpha(L"IB-InitY-c");
1788 _5079CC_init_r = assets->GetTexture("IB-InitR-c"); 1784 game_ui_player_alert_red = assets->GetImage_16BitAlpha(L"IB-InitR-c");
1789 1785
1790 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE); 1786 ui_btn_npc_left = assets->GetImage_16BitAlpha(L"IB-NPCLD-C");
1791 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE); 1787 ui_btn_npc_right = assets->GetImage_16BitAlpha(L"IB-NPCRD-C");
1792 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE); 1788 game_ui_btn_zoomin = assets->GetImage_16BitAlpha(L"ib-autout-C");
1793 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE); 1789 game_ui_btn_zoomout = assets->GetImage_16BitAlpha(L"ib-autin-C");
1794 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE); 1790 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE);
1795 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-c", TEXTURE_16BIT_PALETTE); 1791 game_ui_btn_cast = assets->GetImage_16BitAlpha(L"ib-m1d-c");
1796 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-c", TEXTURE_16BIT_PALETTE); 1792 game_ui_btn_rest = assets->GetImage_16BitAlpha("ib-m2d-c");
1797 uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-c", TEXTURE_16BIT_PALETTE); 1793 game_ui_btn_quickref = assets->GetImage_16BitAlpha("ib-m3d-c");
1798 uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-c", TEXTURE_16BIT_PALETTE); 1794 game_ui_btn_settings = assets->GetImage_16BitAlpha("ib-m4d-c");
1799 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-c", 0x7FF); 1795 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-c", 0x7FF);
1800 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-c", TEXTURE_16BIT_PALETTE); 1796
1801 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-c", TEXTURE_16BIT_PALETTE); 1797 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-c", TEXTURE_16BIT_PALETTE);
1802 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-c", TEXTURE_16BIT_PALETTE); 1798 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-c", TEXTURE_16BIT_PALETTE);
1803 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-c", TEXTURE_16BIT_PALETTE); 1799 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-c", TEXTURE_16BIT_PALETTE);
1804 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-c", TEXTURE_16BIT_PALETTE); 1800 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-c", TEXTURE_16BIT_PALETTE);
1805 uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc-c", TEXTURE_16BIT_PALETTE); 1801 game_ui_evtnpc = assets->GetImage_16BitColorKey(L"evtnpc-c", 0x7FF);
1806 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven", 0x7FF); 1802 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven", 0x7FF);
1807 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC"); 1803 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeC");
1808 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); 1804 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
1809 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC"); 1805 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchC");
1810 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); 1806 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
1821 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-a.pcx"); 1817 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-a.pcx");
1822 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-a.pcx"); 1818 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-a.pcx");
1823 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-a.pcx"); 1819 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-a.pcx");
1824 1820
1825 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-a"); 1821 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-a");
1826 minimap_loop = assets->GetTexture("ib-autmask-a"); 1822 game_ui_minimap_frame = assets->GetImage_16BitAlpha(L"ib-autmask-a");
1827 _5079B4_compass = assets->GetTexture("IB-COMP-a"); 1823 game_ui_minimap_compass = assets->GetImage_16BitColorKey(L"IB-COMP-a", 0x7FF);
1828 _5079D0_init_g = assets->GetTexture("IB-InitG-a"); 1824 game_ui_player_alert_green = assets->GetImage_16BitAlpha(L"IB-InitG-a");
1829 _5079C8_init_y = assets->GetTexture("IB-InitY-a"); 1825 game_ui_player_alert_yellow = assets->GetImage_16BitAlpha(L"IB-InitY-a");
1830 _5079CC_init_r = assets->GetTexture("IB-InitR-a"); 1826 game_ui_player_alert_red = assets->GetImage_16BitAlpha(L"IB-InitR-a");
1831 1827
1832 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2); 1828 ui_btn_npc_left = assets->GetImage_16BitAlpha(L"IB-NPCLD-a");
1833 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-a", 2); 1829 ui_btn_npc_right = assets->GetImage_16BitAlpha(L"IB-NPCRD-a");
1834 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-a", 2); 1830 game_ui_btn_zoomin = assets->GetImage_16BitAlpha("ib-autout-a");
1835 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-a", 2); 1831 game_ui_btn_zoomout = assets->GetImage_16BitAlpha("ib-autin-a");
1836 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-a", 2); 1832 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-a", 2);
1837 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-a", 2); 1833 game_ui_btn_cast = assets->GetImage_16BitAlpha("ib-m1d-a");
1838 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-a", 2); 1834 game_ui_btn_rest = assets->GetImage_16BitAlpha("ib-m2d-a");
1839 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-a", 2); 1835 game_ui_btn_quickref = assets->GetImage_16BitAlpha("ib-m3d-a");
1840 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-a", 2); 1836 game_ui_btn_settings = assets->GetImage_16BitAlpha("ib-m4d-a");
1841 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-a", 2); 1837 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-a", 2);
1842 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-a", 2); 1838 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-a", 2);
1843 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-a", 2); 1839 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-a", 2);
1844 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-a", 2); 1840 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-a", 2);
1845 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); 1841 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA");
1846 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); 1842 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
1847 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); 1843 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA");
1848 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); 1844 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
1845
1849 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-a", 0x7FF); 1846 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-a", 0x7FF);
1850 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-a", TEXTURE_16BIT_PALETTE); 1847
1851 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc", 2); 1848 game_ui_evtnpc = assets->GetImage_16BitColorKey(L"evtnpc", 0x7FF);
1852 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven", 0x7FF); 1849 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven", 0x7FF);
1853 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll"); 1850 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll");
1854 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr"); 1851 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr");
1855 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul"); 1852 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul");
1856 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur"); 1853 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur");
1867 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-A.pcx"); 1864 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-A.pcx");
1868 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-A.pcx"); 1865 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-A.pcx");
1869 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-a.pcx"); 1866 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-a.pcx");
1870 1867
1871 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-A"); 1868 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-A");
1872 minimap_loop = assets->GetTexture("ib-autmask-a"); 1869 game_ui_minimap_frame = assets->GetImage_16BitAlpha(L"ib-autmask-a");
1873 _5079B4_compass = assets->GetTexture("IB-COMP-A"); 1870 game_ui_minimap_compass = assets->GetImage_16BitColorKey(L"IB-COMP-A", 0x7FF);
1874 _5079D0_init_g = assets->GetTexture("IB-InitG-a"); 1871 game_ui_player_alert_green = assets->GetImage_16BitAlpha(L"IB-InitG-a");
1875 _5079C8_init_y = assets->GetTexture("IB-InitY-a"); 1872 game_ui_player_alert_yellow = assets->GetImage_16BitAlpha(L"IB-InitY-a");
1876 _5079CC_init_r = assets->GetTexture("IB-InitR-a"); 1873 game_ui_player_alert_red = assets->GetImage_16BitAlpha(L"IB-InitR-a");
1877 1874
1878 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE); 1875 ui_btn_npc_left = assets->GetImage_16BitAlpha(L"IB-NPCLD-A");
1879 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE); 1876 ui_btn_npc_right = assets->GetImage_16BitAlpha(L"IB-NPCRD-A");
1880 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE); 1877 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE);
1881 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE); 1878 game_ui_btn_cast = assets->GetImage_16BitAlpha("ib-m1d-a");
1882 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE); 1879 game_ui_btn_rest = assets->GetImage_16BitAlpha("ib-m2d-a");
1883 uTextureID_Btn_QuickReference = pIcons_LOD->LoadTexture("ib-m3d-a", TEXTURE_16BIT_PALETTE); 1880 game_ui_btn_quickref = assets->GetImage_16BitAlpha("ib-m3d-a");
1884 uTextureID_Btn_GameSettings = pIcons_LOD->LoadTexture("ib-m4d-a", TEXTURE_16BIT_PALETTE); 1881 game_ui_btn_settings = assets->GetImage_16BitAlpha("ib-m4d-a");
1885 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-a", TEXTURE_16BIT_PALETTE); 1882 game_ui_btn_zoomin = assets->GetImage_16BitAlpha("ib-autout-a");
1886 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-a", TEXTURE_16BIT_PALETTE); 1883 game_ui_btn_zoomout = assets->GetImage_16BitAlpha("ib-autin-a");
1887 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-a", 0x7FF); 1884 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-a", 0x7FF);
1888 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-a", TEXTURE_16BIT_PALETTE); 1885
1889 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-a", TEXTURE_16BIT_PALETTE); 1886 uTextureID_PlayerBuff_Bless = pIcons_LOD->LoadTexture("isg-01-a", TEXTURE_16BIT_PALETTE);
1890 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-a", TEXTURE_16BIT_PALETTE); 1887 uTextureID_PlayerBuff_Preservation = pIcons_LOD->LoadTexture("isg-02-a", TEXTURE_16BIT_PALETTE);
1891 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-a", TEXTURE_16BIT_PALETTE); 1888 uTextureID_PlayerBuff_Hammerhands = pIcons_LOD->LoadTexture("isg-03-a", TEXTURE_16BIT_PALETTE);
1892 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-a", TEXTURE_16BIT_PALETTE); 1889 uTextureID_PlayerBuff_PainReflection = pIcons_LOD->LoadTexture("isg-04-a", TEXTURE_16BIT_PALETTE);
1893 uTextureID_50795C = pIcons_LOD->LoadTexture("evtnpc", TEXTURE_16BIT_PALETTE); 1890 game_ui_evtnpc = assets->GetImage_16BitColorKey(L"evtnpc", 0x7FF);
1894 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven", 0x7FF); 1891 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven", 0x7FF);
1895 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); 1892 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA");
1896 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); 1893 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
1897 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); 1894 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA");
1898 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); 1895 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
1918 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-B.pcx"); 1915 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-B.pcx");
1919 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-B.pcx"); 1916 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-B.pcx");
1920 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-b.pcx"); 1917 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-b.pcx");
1921 1918
1922 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-B"); 1919 game_ui_right_panel_frame = assets->GetImage_16BitAlpha(L"ib-mb-B");
1923 minimap_loop = assets->GetTexture("ib-autmask-b"); 1920 game_ui_minimap_frame = assets->GetImage_16BitAlpha(L"ib-autmask-b");
1924 _5079B4_compass = assets->GetTexture("IB-COMP-B"); 1921 game_ui_minimap_compass = assets->GetImage_16BitColorKey(L"IB-COMP-B", 0x7FF);
1925 _5079D0_init_g = assets->GetTexture("IB-InitG-b"); 1922 game_ui_player_alert_green = assets->GetImage_16BitAlpha(L"IB-InitG-b");
1926 _5079C8_init_y = assets->GetTexture("IB-InitY-b"); 1923 game_ui_player_alert_yellow = assets->GetImage_16BitAlpha(L"IB-InitY-b");
1927 _5079CC_init_r = assets->GetTexture("IB-InitR-b"); 1924 game_ui_player_alert_red = assets->GetImage_16BitAlpha(L"IB-InitR-b");
1928 1925
1929 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-B", 2); 1926 ui_btn_npc_left = assets->GetImage_16BitAlpha(L"IB-NPCLD-B");
1930 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-B", 2); 1927 ui_btn_npc_right = assets->GetImage_16BitAlpha(L"IB-NPCRD-B");
1931 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-B", 2); 1928 game_ui_btn_zoomin = assets->GetImage_16BitAlpha("ib-autout-B");
1932 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-B", 2); 1929 game_ui_btn_zoomout = assets->GetImage_16BitAlpha("ib-autin-B");
1933 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-B", 2); 1930 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-B", 2);
1934 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_CastSpell], "ib-m1d-b", 2); 1931 game_ui_btn_cast = assets->GetImage_16BitAlpha("ib-m1d-b");
1935 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_Rest], "ib-m2d-b", 2); 1932 game_ui_btn_rest = assets->GetImage_16BitAlpha("ib-m2d-b");
1936 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_QuickReference], "ib-m3d-b", 2); 1933 game_ui_btn_quickref = assets->GetImage_16BitAlpha("ib-m3d-b");
1937 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_GameSettings], "ib-m4d-b", 2); 1934 game_ui_btn_settings = assets->GetImage_16BitAlpha("ib-m4d-b");
1938 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-b", 2); 1935 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Bless], "isg-01-b", 2);
1939 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-b", 2); 1936 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Preservation], "isg-02-b", 2);
1940 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-b", 2); 1937 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_Hammerhands], "isg-03-b", 2);
1941 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-b", 2); 1938 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_PlayerBuff_PainReflection], "isg-04-b", 2);
1942 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeB"); 1939 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeB");
1943 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); 1940 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
1944 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchB"); 1941 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchB");
1945 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); 1942 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
1946 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-b", 0x7FF); 1943 ui_exit_cancel_button_background = assets->GetImage_16BitColorKey(L"ib-bcu-b", 0x7FF);
1947 uExitCancelTextureId = pIcons_LOD->LoadTexture("ib-bcu-b", TEXTURE_16BIT_PALETTE); 1944
1948 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-b", 2); 1945 game_ui_evtnpc = assets->GetImage_16BitColorKey(L"evtnpc-b", 0x7FF);
1949 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven-b", 0x7FF); 1946 ui_character_inventory_background = assets->GetImage_16BitColorKey(L"fr_inven-b", 0x7FF);
1950 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll-b"); 1947 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll-b");
1951 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr-b"); 1948 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr-b");
1952 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul-b"); 1949 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul-b");
1953 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur-b"); 1950 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur-b");
2082 } 2079 }
2083 Error("Invalid player class: %u", uPlayerClass); 2080 Error("Invalid player class: %u", uPlayerClass);
2084 } 2081 }
2085 2082
2086 //----- (0040F92A) -------------------------------------------------------- 2083 //----- (0040F92A) --------------------------------------------------------
2087 void __fastcall ZBuffer_DoFill2(int *pZBuffer, Texture *a2, int a3) 2084 void __fastcall ZBuffer_DoFill2(int *pZBuffer, Texture_MM7 *a2, int a3)
2088 {//срабатывает в покупке в магазине 2085 {//срабатывает в покупке в магазине
2089 void *v4; // eax@3 2086 void *v4; // eax@3
2090 //int *v5; // edi@5 2087 //int *v5; // edi@5
2091 // int v6; // ecx@6 2088 // int v6; // ecx@6
2092 // int v9; // [sp+18h] [bp-4h]@1 2089 // int v9; // [sp+18h] [bp-4h]@1
2121 assert(uTextureId != -1); 2118 assert(uTextureId != -1);
2122 ZBuffer_DoFill(pZBuffer, pIcons_LOD->GetTexture(uTextureId), iZValue); 2119 ZBuffer_DoFill(pZBuffer, pIcons_LOD->GetTexture(uTextureId), iZValue);
2123 } 2120 }
2124 2121
2125 //----- (0040F89C) -------------------------------------------------------- 2122 //----- (0040F89C) --------------------------------------------------------
2126 void __fastcall ZBuffer_DoFill(int *pZBuffer, Texture *pTex, int uZValue) 2123 void __fastcall ZBuffer_DoFill(int *pZBuffer, Texture_MM7 *pTex, int uZValue)
2127 {//срабатывает при продаже в магазине 2124 {//срабатывает при продаже в магазине
2128 void *v3; // eax@3 2125 void *v3; // eax@3
2129 //void *v4; // esi@5 2126 //void *v4; // esi@5
2130 //int *v5; // edi@5 2127 //int *v5; // edi@5
2131 //int v6; // eax@5 2128 //int v6; // eax@5
2649 current_npc_text = (char *)pNPCTopics[a4 + 168].pText; 2646 current_npc_text = (char *)pNPCTopics[a4 + 168].pText;
2650 _4B254D_SkillMasteryTeacher(a4); //might be needed because of contract_approved ? 2647 _4B254D_SkillMasteryTeacher(a4); //might be needed because of contract_approved ?
2651 pDialogueWindow->Release(); 2648 pDialogueWindow->Release();
2652 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 350, a4, 0); 2649 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 350, a4, 0);
2653 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, 2650 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0,
2654 pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); 2651 pGlobalTXT_LocalizationStrings[34], ui_exit_cancel_button_background, 0);
2655 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); 2652 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0);
2656 v2 = ""; 2653 v2 = "";
2657 if (contract_approved) 2654 if (contract_approved)
2658 v2 = pGlobalTXT_LocalizationStrings[535]; 2655 v2 = pGlobalTXT_LocalizationStrings[535];
2659 pDialogueWindow->CreateButton(480, 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Fu, 0, v2, 0); 2656 pDialogueWindow->CreateButton(480, 160, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x4Fu, 0, v2, 0);
2761 2758
2762 uDialogueType = 83; 2759 uDialogueType = 83;
2763 pDialogueWindow->Release(); 2760 pDialogueWindow->Release();
2764 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 350, 0, 0); 2761 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 350, 0, 0);
2765 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel" 2762 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel"
2766 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); 2763 ui_exit_cancel_button_background, 0);
2767 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); 2764 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0);
2768 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_0, 83, 0, "", 0); 2765 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_0, 83, 0, "", 0);
2769 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2); 2766 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2);
2770 dialog_menu_id = HOUSE_DIALOGUE_OTHER; 2767 dialog_menu_id = HOUSE_DIALOGUE_OTHER;
2771 //get new monster for hunting 2768 //get new monster for hunting