comparison GUI/GUIWindow.cpp @ 2572:d87bfbd3bb3b

Step towards unification of Texture and RGBTexture (class Image)
author a.parshin
date Sat, 05 Mar 2016 01:51:54 +0200
parents 5d6fb8eb023c
children 0c67be4ec900
comparison
equal deleted inserted replaced
2571:cf29f444ddd7 2572:d87bfbd3bb3b
23 #include "Engine/Awards.h" 23 #include "Engine/Awards.h"
24 #include "Engine/Objects/Chest.h" 24 #include "Engine/Objects/Chest.h"
25 #include "Engine/Graphics/Outdoor.h" 25 #include "Engine/Graphics/Outdoor.h"
26 #include "Engine/Tables/IconFrameTable.h" 26 #include "Engine/Tables/IconFrameTable.h"
27 #include "Engine/Objects/Actor.h" 27 #include "Engine/Objects/Actor.h"
28 #include "Engine/AssetsManager.h"
28 29
29 #include "GUI\UI\UIArena.h" 30 #include "GUI\UI\UIArena.h"
31 #include "GUI/UI/UIPopup.h"
32 #include "GUI/UI/UIGame.h"
30 #include "Engine/Events.h" 33 #include "Engine/Events.h"
31 #include "Engine/Graphics/Level\Decoration.h" 34 #include "Engine/Graphics/Level\Decoration.h"
32 35
33 typedef struct _RGBColor 36 typedef struct _RGBColor
34 { 37 {
492 return result; 495 return result;
493 } 496 }
494 497
495 498
496 //----- (00415551) -------------------------------------------------------- 499 //----- (00415551) --------------------------------------------------------
497 void GUIWindow::DrawMessageBox(int arg0) 500 void GUIWindow::DrawMessageBox(bool inside_game_viewport)
498 { 501 {
499 unsigned int v2; // edi@1
500 signed int v4; // esi@2
501 unsigned int v5; // eax@2
502 unsigned int v16; // esi@19 502 unsigned int v16; // esi@19
503 GUIWindow current_window; // [sp+Ch] [bp-60h]@18 503 GUIWindow current_window; // [sp+Ch] [bp-60h]@18
504 POINT cursor; // [sp+60h] [bp-Ch]@8 504 POINT cursor; // [sp+60h] [bp-Ch]@8
505 unsigned int v22; // [sp+74h] [bp+8h]@2 505 unsigned int v22; // [sp+74h] [bp+8h]@2
506 506
507 v2 = 0; 507 int x = 0;
508 if ( arg0 ) 508 int y = 0;
509 { 509 int z, w;
510 v4 = pViewport->uViewportTL_X; 510 if (inside_game_viewport)
511 v5 = pViewport->uViewportBR_X; 511 {
512 v2 = pViewport->uViewportTL_Y; 512 x = pViewport->uViewportTL_X;
513 v22 = pViewport->uViewportBR_Y; 513 z = pViewport->uViewportBR_X;
514 y = pViewport->uViewportTL_Y;
515 w = pViewport->uViewportBR_Y;
514 } 516 }
515 else 517 else
516 { 518 {
517 v4 = 0; 519 z = window->GetWidth();
518 v5 = window->GetWidth(); 520 w = window->GetHeight();
519 v22 = window->GetHeight(); 521 }
520 } 522
521 pMouse->GetCursorPos(&cursor); 523 pMouse->GetCursorPos(&cursor);
522 if ( (signed int)this->uFrameX >= v4 ) 524 if ( (signed int)this->uFrameX >= x )
523 { 525 {
524 if ( (signed int)(this->uFrameWidth + this->uFrameX) > (signed int)v5 ) 526 if ( (signed int)(this->uFrameWidth + this->uFrameX) > z )
525 { 527 {
526 this->uFrameX = v5 - this->uFrameWidth; 528 this->uFrameX = z - this->uFrameWidth;
527 this->uFrameY = cursor.y + 30; 529 this->uFrameY = cursor.y + 30;
528 } 530 }
529 } 531 }
530 else 532 else
531 { 533 {
532 this->uFrameX = v4; 534 this->uFrameX = x;
533 this->uFrameY = cursor.y + 30; 535 this->uFrameY = cursor.y + 30;
534 } 536 }
535 537
536 if ( (signed int)this->uFrameY >= (signed int)v2 ) 538 if ( (signed int)this->uFrameY >= y )
537 { 539 {
538 if ( (signed int)(this->uFrameY + this->uFrameHeight) > (signed int)v22 ) 540 if ( (signed int)(this->uFrameY + this->uFrameHeight) > w)
539 this->uFrameY = cursor.y - this->uFrameHeight - 30; 541 this->uFrameY = cursor.y - this->uFrameHeight - 30;
540 } 542 }
541 else 543 else
542 this->uFrameY = cursor.y + 30; 544 this->uFrameY = cursor.y + 30;
543 if ( (signed int)this->uFrameY < (signed int)v2 ) 545 if ( (signed int)this->uFrameY < y )
544 this->uFrameY = v2; 546 this->uFrameY = y;
545 if ( (signed int)this->uFrameX < v4 ) 547 if ( (signed int)this->uFrameX < x )
546 this->uFrameX = v4; 548 this->uFrameX = x;
547 this->uFrameZ = this->uFrameWidth + this->uFrameX - 1; 549 this->uFrameZ = this->uFrameWidth + this->uFrameX - 1;
548 this->uFrameW = this->uFrameHeight + this->uFrameY - 1; 550 this->uFrameW = this->uFrameHeight + this->uFrameY - 1;
549 memcpy(&current_window, this, sizeof(current_window)); 551 memcpy(&current_window, this, sizeof(current_window));
550 current_window.uFrameX += 12; 552 current_window.uFrameX += 12;
551 current_window.uFrameWidth -= 24; 553 current_window.uFrameWidth -= 24;
565 if ( this->Hint ) 567 if ( this->Hint )
566 current_window.DrawTitleText(pFontLucida, 0, (signed int)(v16 - pFontLucida->CalcTextHeight(this->Hint, &current_window, 0, 0)) / 2 - 14, 0, this->Hint, 3); 568 current_window.DrawTitleText(pFontLucida, 0, (signed int)(v16 - pFontLucida->CalcTextHeight(this->Hint, &current_window, 0, 0)) / 2 - 14, 0, this->Hint, 3);
567 } 569 }
568 570
569 //----- (00411B59) -------------------------------------------------------- 571 //----- (00411B59) --------------------------------------------------------
570 void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer) 572 void LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer)
571 { 573 {
572 //unsigned int v2; // esi@1 574 //unsigned int v2; // esi@1
573 //unsigned int v3; // edi@1 575 //unsigned int v3; // edi@1
574 FILE *v4; // ebx@1 576 FILE *v4; // ebx@1
575 FILE *v5; // eax@2 577 FILE *v5; // eax@2
576 char pContainerName[64]; // [sp+Ch] [bp-44h]@1 578 //char pContainerName[64]; // [sp+Ch] [bp-44h]@1
577 //unsigned int v7; // [sp+4Ch] [bp-4h]@1 579 //unsigned int v7; // [sp+4Ch] [bp-4h]@1
578 580
579 //v2 = uSlot; 581 if (pSavegameThumbnails[uSlot])
580 //v7 = uPlayer; 582 {
581 //v3 = uSlot + 1; 583 pSavegameThumbnails[uSlot]->Release();
582 sprintf(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1); 584 pSavegameThumbnails[uSlot] = nullptr;
585 }
586
587
588 wchar_t filename[1024];
589 swprintf(filename, L"data\\lloyd%d%d.pcx", uPlayer, uSlot + 1);
590 pSavegameThumbnails[uSlot] = assets->GetImage_PCXFromFile(filename);
591
592 if (!pSavegameThumbnails[uSlot])
593 {
594 swprintf(filename, L"lloyd%d%d.pcx", uPlayer, uSlot + 1);
595 pSavegameThumbnails[uSlot] = assets->GetImage_PCXFromNewLOD(filename);
596 }
597 /*sprintf(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1);
583 v4 = fopen(pContainerName, "rb"); 598 v4 = fopen(pContainerName, "rb");
584 if ( v4 ) 599 if ( v4 )
585 { 600 {
586 pSavegameThumbnails[uSlot].LoadFromFILE(v4, 0, 1); 601 pSavegameThumbnails[uSlot].LoadFromFILE(v4, 0, 1);
587 fclose(v4); 602 fclose(v4);
592 v5 = pNew_LOD->FindContainer(pContainerName, 1); 607 v5 = pNew_LOD->FindContainer(pContainerName, 1);
593 if ( v5 ) 608 if ( v5 )
594 pSavegameThumbnails[uSlot].LoadFromFILE(v5, 0, 0); 609 pSavegameThumbnails[uSlot].LoadFromFILE(v5, 0, 0);
595 else 610 else
596 *((int *)&pSavegameThumbnails.data()->pPixels + 10 * uSlot) = 0; 611 *((int *)&pSavegameThumbnails.data()->pPixels + 10 * uSlot) = 0;
597 } 612 }*/
598 } 613 }
599 614
600 615
601 //----- (004B3157) -------------------------------------------------------- 616 //----- (004B3157) --------------------------------------------------------
602 void GUIWindow::HouseDialogManager() 617 void GUIWindow::HouseDialogManager()
622 pWindow.uFrameWidth -= 18; 637 pWindow.uFrameWidth -= 18;
623 pWindow.uFrameZ -= 18; 638 pWindow.uFrameZ -= 18;
624 pWhiteColor = Color16(0xFFu, 0xFFu, 0xFFu); 639 pWhiteColor = Color16(0xFFu, 0xFFu, 0xFFu);
625 pColor2 = Color16(0x15u, 0x99u, 0xE9u); 640 pColor2 = Color16(0x15u, 0x99u, 0xE9u);
626 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); 641 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background);
627 pRenderer->DrawTextureIndexedAlpha(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_right_panel_loop]); 642 pRenderer->DrawTextureIndexedAlpha(0x1D4u, 0, right_panel_loop);
628 if ( pDialogueNPCCount != uNumDialogueNPCPortraits || !uHouse_ExitPic ) 643 if ( pDialogueNPCCount != uNumDialogueNPCPortraits || !uHouse_ExitPic )
629 { 644 {
630 pDialogWindow.uFrameWidth = 130; 645 pDialogWindow.uFrameWidth = 130;
631 pDialogWindow.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight); 646 pDialogWindow.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight);
632 pHouseName = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName; 647 pHouseName = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName;
889 pFont->DrawTextLine(uDefaultColor, v11 + v13, v12, Stra, window->GetWidth()); 904 pFont->DrawTextLine(uDefaultColor, v11 + v13, v12, Stra, window->GetWidth());
890 v12 += pFont->uFontHeight - uLineSpacing; 905 v12 += pFont->uFontHeight - uLineSpacing;
891 Stra = strtok(0, "\n"); 906 Stra = strtok(0, "\n");
892 } 907 }
893 } 908 }
894 // 5C6DB4: using guessed type int ui_current_text_color; 909
895 910
896 //----- (0044CE08) -------------------------------------------------------- 911 //----- (0044CE08) --------------------------------------------------------
897 void GUIWindow::DrawText(GUIFont *font, signed int uX, int uY, unsigned short uFontColor, const char *Str, bool present_time_transparency, int max_text_height, signed int uFontShadowColor ) 912 void GUIWindow::DrawText(GUIFont *font, signed int uX, int uY, unsigned short uFontColor, const char *Str, bool present_time_transparency, int max_text_height, signed int uFontShadowColor )
898 { 913 {
899 int v14; // edx@9 914 int v14; // edx@9
1195 pButton->pNext = 0; 1210 pButton->pNext = 0;
1196 ++this->uNumControls; 1211 ++this->uNumControls;
1197 return pButton; 1212 return pButton;
1198 } 1213 }
1199 1214
1215
1216 void GUIWindow::InitializeGUI()
1217 {
1218 SetUserInterface(PartyAlignment_Neutral, false);
1219
1220 for (uint i = 0; i < 20; ++i)
1221 pWindowList[i] = nullptr;
1222 uNumVisibleWindows = -1;
1223 memset(pVisibleWindowsIdxs.data(), 0, sizeof(pVisibleWindowsIdxs));
1224
1225 MainMenuUI_LoadFontsAndSomeStuff();
1226 }
1227
1200 //----- (00459C2B) -------------------------------------------------------- 1228 //----- (00459C2B) --------------------------------------------------------
1201 void GUIWindow::DrawFlashingInputCursor( signed int uX, int uY, struct GUIFont *a2 ) 1229 void GUIWindow::DrawFlashingInputCursor( signed int uX, int uY, struct GUIFont *a2 )
1202 { 1230 {
1203 if ( GetTickCount() % 1000 > 500 ) 1231 if ( GetTickCount() % 1000 > 500 )
1204 DrawText(a2, uX, uY, 0, "_", 0, 0, 0); 1232 DrawText(a2, uX, uY, 0, "_", 0, 0, 0);
1535 for ( i = 1; i <= uNumVisibleWindows; ++i ) 1563 for ( i = 1; i <= uNumVisibleWindows; ++i )
1536 { 1564 {
1537 pWindow = pWindowList[pVisibleWindowsIdxs[i] - 1]; 1565 pWindow = pWindowList[pVisibleWindowsIdxs[i] - 1];
1538 1566
1539 pWindow->Update(); 1567 pWindow->Update();
1540 switch (pWindow->eWindowType) 1568 /*switch (pWindow->eWindowType)
1541 { 1569 {
1542 case WINDOW_50: 1570 case WINDOW_50:
1543 { 1571 {
1544 __debugbreak(); // looks like debugging tools 1572 __debugbreak(); // looks like debugging tools
1545 v27 = Color16(255, 255, 255); 1573 v27 = Color16(255, 255, 255);
1612 case WINDOW_null: 1640 case WINDOW_null:
1613 continue; 1641 continue;
1614 default: 1642 default:
1615 __debugbreak(); 1643 __debugbreak();
1616 continue; 1644 continue;
1617 } 1645 }*/
1618 } 1646 }
1619 if ( GetCurrentMenuID() == -1 ) 1647 if ( GetCurrentMenuID() == -1 )
1620 GameUI_DrawFoodAndGold(); 1648 GameUI_DrawFoodAndGold();
1621 if ( sub_4637E0_is_there_popup_onscreen() ) 1649 if ( sub_4637E0_is_there_popup_onscreen() )
1622 UI_OnMouseRightClick(0); 1650 UI_OnMouseRightClick(0);
1623 }
1624
1625 //----- (00415485) --------------------------------------------------------
1626 void DrawMM7CopyrightWindow()
1627 {
1628 GUIWindow Dst; // [sp+8h] [bp-54h]@1
1629
1630 memset(&Dst, 0, sizeof(Dst));
1631 Dst.uFrameWidth = 624;
1632 Dst.uFrameHeight = 256;
1633 Dst.uFrameX = 8;
1634 Dst.uFrameY = 30; // c 1999 The 3DO Company.
1635 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(pGlobalTXT_LocalizationStrings[157], &Dst, 24, 0)
1636 + 2 * LOBYTE(pFontSmallnum->uFontHeight)
1637 + 24;
1638 Dst.uFrameY = 470 - Dst.uFrameHeight;
1639 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
1640 Dst.uFrameW = 469;
1641 //Dst.Hint = "abcagfdsgsg ljsrengvlkjesnfkjwnef";
1642 Dst.DrawMessageBox(0);
1643
1644 Dst.uFrameWidth -= 24;
1645 Dst.uFrameX += 12;
1646 Dst.uFrameY += 12;
1647 Dst.uFrameHeight -= 12;
1648 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
1649 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
1650 Dst.DrawTitleText(pFontSmallnum, 0, 0xCu, ui_mainmenu_copyright_color, pGlobalTXT_LocalizationStrings[157], 3);
1651 } 1651 }
1652 1652
1653 1653
1654 //----- (00467FB6) -------------------------------------------------------- 1654 //----- (00467FB6) --------------------------------------------------------
1655 void CreateScrollWindow() 1655 void CreateScrollWindow()
1711 void SetUserInterface(PartyAlignment align, bool bReplace) 1711 void SetUserInterface(PartyAlignment align, bool bReplace)
1712 { 1712 {
1713 extern void set_default_ui_skin(); 1713 extern void set_default_ui_skin();
1714 set_default_ui_skin(); 1714 set_default_ui_skin();
1715 1715
1716
1717 if (!parchment)
1718 parchment = assets->GetImage_16BitColorKey(L"parchment", 0x7FF);
1719
1716 if (align == PartyAlignment_Evil) 1720 if (align == PartyAlignment_Evil)
1717 { 1721 {
1718 if ( bReplace ) 1722 if ( bReplace )
1719 { 1723 {
1720 pTexture_RightFrame->Reload("ib-r-C.pcx"); 1724 game_ui_rightframe = assets->GetImage_PCXFromIconsLOD(L"ib-r-C.pcx");
1721 pTexture_BottomFrame->Reload("ib-b-C.pcx"); 1725 game_ui_bottomframe = assets->GetImage_PCXFromIconsLOD(L"ib-b-C.pcx");
1722 pTexture_TopFrame->Reload("ib-t-C.pcx"); 1726 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-C.pcx");
1723 pTexture_LeftFrame->Reload("ib-l-C.pcx"); 1727 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-C.pcx");
1724 pTexture_StatusBar->Reload("IB-Foot-c.pcx"); 1728 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-c.pcx");
1725 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-C", 2); 1729
1726 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-c", 2); 1730 right_panel = assets->GetTexture("ib-mb-C");
1727 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-C", 2); 1731 minimap_loop = assets->GetTexture("ib-autmask-c");
1728 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-c", 2); 1732 _5079B4_compass = assets->GetTexture("IB-COMP-C");
1729 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-c", 2); 1733 _5079D0_init_g = assets->GetTexture("IB-InitG-c");
1730 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-c", 2); 1734 _5079C8_init_y = assets->GetTexture("IB-InitY-c");
1735 _5079CC_init_r = assets->GetTexture("IB-InitR-c");
1736
1731 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2); 1737 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-C", 2);
1732 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-C", 2); 1738 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-C", 2);
1733 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-C", 2); 1739 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-C", 2);
1734 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-C", 2); 1740 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-C", 2);
1735 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);
1749 pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID); 1755 pIconsFrameTable->InitializeAnimation(pUIAnum_Torchlight->uIconID);
1750 1756
1751 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-c", 2); 1757 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-c", 2);
1752 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-c", 2); 1758 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-c", 2);
1753 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-c", 2); 1759 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-c", 2);
1754 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); 1760 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll-c");
1755 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-c", 2); 1761 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr-c");
1756 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-c", 2); 1762 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul-c");
1757 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-c", 2); 1763 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur-c");
1758 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-c", 2); 1764 messagebox_border_bottom = assets->GetImage_16BitAlpha(L"edge_btm-c");
1759 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-c", 2); 1765 messagebox_border_left = assets->GetImage_16BitAlpha(L"edge_lf-c");
1760 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-c", 2); 1766 messagebox_border_right = assets->GetImage_16BitAlpha(L"edge_rt-c");
1761 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-c", 2); 1767 messagebox_border_top = assets->GetImage_16BitAlpha(L"edge_top-c");
1762 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-c", 2);
1763 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-c", 2); 1768 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-c", 2);
1764 } 1769 }
1765 else 1770 else
1766 { 1771 {
1767 pTexture_RightFrame->Load("ib-r-C.pcx", 0); 1772 game_ui_rightframe = assets->GetImage_PCXFromIconsLOD(L"ib-r-C.pcx");
1768 pTexture_BottomFrame->Load("ib-b-c.pcx", 0); 1773 game_ui_bottomframe = assets->GetImage_PCXFromIconsLOD(L"ib-b-c.pcx");
1769 pTexture_TopFrame->Load("ib-t-C.pcx", 0); 1774 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-C.pcx");
1770 pTexture_LeftFrame->Load("ib-l-C.pcx", 0); 1775 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-C.pcx");
1771 pTexture_StatusBar->Load("IB-Foot-c.pcx", 0); 1776 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-c.pcx");
1772 uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-C", TEXTURE_16BIT_PALETTE); 1777
1773 uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-c", TEXTURE_16BIT_PALETTE); 1778 right_panel = assets->GetTexture("ib-mb-C");
1774 uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-C", TEXTURE_16BIT_PALETTE); 1779 minimap_loop = assets->GetTexture("ib-autmask-c");
1775 dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-c", TEXTURE_16BIT_PALETTE); 1780 _5079B4_compass = assets->GetTexture("IB-COMP-C");
1776 dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-c", TEXTURE_16BIT_PALETTE); 1781 _5079D0_init_g = assets->GetTexture("IB-InitG-c");
1777 dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-c", TEXTURE_16BIT_PALETTE); 1782 _5079C8_init_y = assets->GetTexture("IB-InitY-c");
1783 _5079CC_init_r = assets->GetTexture("IB-InitR-c");
1784
1778 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE); 1785 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-C", TEXTURE_16BIT_PALETTE);
1779 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE); 1786 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-C", TEXTURE_16BIT_PALETTE);
1780 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE); 1787 uTextureID_Btn_ZoomIn = pIcons_LOD->LoadTexture("ib-autout-C", TEXTURE_16BIT_PALETTE);
1781 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE); 1788 uTextureID_Btn_ZoomOut = pIcons_LOD->LoadTexture("ib-autin-C", TEXTURE_16BIT_PALETTE);
1782 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE); 1789 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-C", TEXTURE_16BIT_PALETTE);
1801 } 1808 }
1802 else if (align == PartyAlignment_Neutral) 1809 else if (align == PartyAlignment_Neutral)
1803 { 1810 {
1804 if ( bReplace ) 1811 if ( bReplace )
1805 { 1812 {
1806 pTexture_RightFrame->Reload("ib-r-a.pcx"); 1813 game_ui_rightframe = assets->GetImage_PCXFromIconsLOD(L"ib-r-a.pcx");
1807 pTexture_BottomFrame->Reload("ib-b-a.pcx"); 1814 game_ui_bottomframe = assets->GetImage_PCXFromIconsLOD(L"ib-b-a.pcx");
1808 pTexture_TopFrame->Reload("ib-t-a.pcx"); 1815 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-a.pcx");
1809 pTexture_LeftFrame->Reload("ib-l-a.pcx"); 1816 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-a.pcx");
1810 pTexture_StatusBar->Reload("IB-Foot-a.pcx"); 1817 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-a.pcx");
1811 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-a", 2); 1818
1812 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-a", 2); 1819 right_panel = assets->GetTexture("ib-mb-a");
1813 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-a", 2); 1820 minimap_loop = assets->GetTexture("ib-autmask-a");
1814 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-a", 2); 1821 _5079B4_compass = assets->GetTexture("IB-COMP-a");
1815 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-a", 2); 1822 _5079D0_init_g = assets->GetTexture("IB-InitG-a");
1816 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-a", 2); 1823 _5079C8_init_y = assets->GetTexture("IB-InitY-a");
1824 _5079CC_init_r = assets->GetTexture("IB-InitR-a");
1825
1817 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2); 1826 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-a", 2);
1818 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-a", 2); 1827 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-a", 2);
1819 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-a", 2); 1828 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-a", 2);
1820 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-a", 2); 1829 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-a", 2);
1821 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-a", 2); 1830 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-a", 2);
1832 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); 1841 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA");
1833 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); 1842 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
1834 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-a", 2); 1843 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-a", 2);
1835 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc", 2); 1844 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc", 2);
1836 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven", 2); 1845 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven", 2);
1837 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); 1846 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll");
1838 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll", 2); 1847 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr");
1839 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr", 2); 1848 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul");
1840 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul", 2); 1849 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur");
1841 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur", 2); 1850 messagebox_border_bottom = assets->GetImage_16BitAlpha(L"edge_btm");
1842 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm", 2); 1851 messagebox_border_left = assets->GetImage_16BitAlpha(L"edge_lf");
1843 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf", 2); 1852 messagebox_border_right = assets->GetImage_16BitAlpha(L"edge_rt");
1844 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt", 2); 1853 messagebox_border_top = assets->GetImage_16BitAlpha(L"edge_top");
1845 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top", 2);
1846 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap", 2); 1854 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap", 2);
1847 } 1855 }
1848 else 1856 else
1849 { 1857 {
1850 pTexture_RightFrame->Load("ib-r-A.pcx", 0); 1858 game_ui_rightframe = assets->GetImage_PCXFromIconsLOD(L"ib-r-A.pcx");
1851 pTexture_BottomFrame->Load("ib-b-A.pcx", 0); 1859 game_ui_bottomframe = assets->GetImage_PCXFromIconsLOD(L"ib-b-A.pcx");
1852 pTexture_TopFrame->Load("ib-t-A.pcx", 0); 1860 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-A.pcx");
1853 pTexture_LeftFrame->Load("ib-l-A.pcx", 0); 1861 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-A.pcx");
1854 pTexture_StatusBar->Load("IB-Foot-a.pcx", 0); 1862 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-a.pcx");
1855 uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-A", TEXTURE_16BIT_PALETTE); 1863
1856 uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-a", TEXTURE_16BIT_PALETTE); 1864 right_panel = assets->GetTexture("ib-mb-A");
1857 uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-A", TEXTURE_16BIT_PALETTE); 1865 minimap_loop = assets->GetTexture("ib-autmask-a");
1858 dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-a", TEXTURE_16BIT_PALETTE); 1866 _5079B4_compass = assets->GetTexture("IB-COMP-A");
1859 dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-a", TEXTURE_16BIT_PALETTE); 1867 _5079D0_init_g = assets->GetTexture("IB-InitG-a");
1860 dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-a", TEXTURE_16BIT_PALETTE); 1868 _5079C8_init_y = assets->GetTexture("IB-InitY-a");
1869 _5079CC_init_r = assets->GetTexture("IB-InitR-a");
1870
1861 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE); 1871 uTextureID_Btn_NPCLeft = pIcons_LOD->LoadTexture("IB-NPCLD-A", TEXTURE_16BIT_PALETTE);
1862 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE); 1872 uTextureID_Btn_NPCRight = pIcons_LOD->LoadTexture("IB-NPCRD-A", TEXTURE_16BIT_PALETTE);
1863 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE); 1873 uTextureID_GameUI_CharSelectionFrame = pIcons_LOD->LoadTexture("IB-selec-A", TEXTURE_16BIT_PALETTE);
1864 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE); 1874 uTextureID_Btn_CastSpell = pIcons_LOD->LoadTexture("ib-m1d-a", TEXTURE_16BIT_PALETTE);
1865 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE); 1875 uTextureID_Btn_Rest = pIcons_LOD->LoadTexture("ib-m2d-a", TEXTURE_16BIT_PALETTE);
1876 uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE); 1886 uTextureID_CharacterUI_InventoryBackground = pIcons_LOD->LoadTexture("fr_inven", TEXTURE_16BIT_PALETTE);
1877 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA"); 1887 pUIAnim_WizardEye->uIconID = pIconsFrameTable->FindIcon("wizeyeA");
1878 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID); 1888 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnim_WizardEye->uIconID);
1879 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA"); 1889 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchA");
1880 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); 1890 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
1881 uTextureID_Parchment = pIcons_LOD->LoadTexture("parchment", TEXTURE_16BIT_PALETTE); 1891 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll");
1882 uTextureID_5076B4 = pIcons_LOD->LoadTexture("cornr_ll", TEXTURE_16BIT_PALETTE); 1892 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr");
1883 uTextureID_5076B0 = pIcons_LOD->LoadTexture("cornr_lr", TEXTURE_16BIT_PALETTE); 1893 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul");
1884 uTextureID_5076AC = pIcons_LOD->LoadTexture("cornr_ul", TEXTURE_16BIT_PALETTE); 1894 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur");
1885 uTextureID_5076A8 = pIcons_LOD->LoadTexture("cornr_ur", TEXTURE_16BIT_PALETTE); 1895 messagebox_border_bottom = assets->GetImage_16BitAlpha(L"edge_btm");
1886 uTextureID_5076A4 = pIcons_LOD->LoadTexture("edge_btm", TEXTURE_16BIT_PALETTE); 1896 messagebox_border_left = assets->GetImage_16BitAlpha(L"edge_lf");
1887 uTextureID_5076A0 = pIcons_LOD->LoadTexture("edge_lf", TEXTURE_16BIT_PALETTE); 1897 messagebox_border_right = assets->GetImage_16BitAlpha(L"edge_rt");
1888 uTextureID_50769C = pIcons_LOD->LoadTexture("edge_rt", TEXTURE_16BIT_PALETTE); 1898 messagebox_border_top = assets->GetImage_16BitAlpha(L"edge_top");
1889 uTextureID_507698 = pIcons_LOD->LoadTexture("edge_top", TEXTURE_16BIT_PALETTE);
1890 pTexture_591428 = pIcons_LOD->LoadTexturePtr("endcap", TEXTURE_16BIT_PALETTE); 1899 pTexture_591428 = pIcons_LOD->LoadTexturePtr("endcap", TEXTURE_16BIT_PALETTE);
1891 } 1900 }
1892 uGameUIFontMain = Color16(0xAu, 0, 0); 1901 uGameUIFontMain = Color16(0xAu, 0, 0);
1893 uGameUIFontShadow = Color16(230, 214, 193); 1902 uGameUIFontShadow = Color16(230, 214, 193);
1894 } 1903 }
1895 else if (align == PartyAlignment_Good) 1904 else if (align == PartyAlignment_Good)
1896 { 1905 {
1897 if ( bReplace ) 1906 if ( bReplace )
1898 { 1907 {
1899 pTexture_RightFrame->Reload("ib-r-B.pcx"); 1908 game_ui_rightframe = assets->GetImage_PCXFromIconsLOD(L"ib-r-B.pcx");
1900 pTexture_BottomFrame->Reload("ib-b-B.pcx"); 1909 game_ui_bottomframe = assets->GetImage_PCXFromIconsLOD(L"ib-b-B.pcx");
1901 pTexture_TopFrame->Reload("ib-t-B.pcx"); 1910 game_ui_topframe = assets->GetImage_PCXFromIconsLOD(L"ib-t-B.pcx");
1902 pTexture_LeftFrame->Reload("ib-l-B.pcx"); 1911 game_ui_leftframe = assets->GetImage_PCXFromIconsLOD(L"ib-l-B.pcx");
1903 pTexture_StatusBar->Reload("IB-Foot-b.pcx"); 1912 game_ui_statusbar = assets->GetImage_PCXFromIconsLOD(L"IB-Foot-b.pcx");
1904 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-B", 2); 1913
1905 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-b", 2); 1914 right_panel = assets->GetTexture("ib-mb-B");
1906 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-B", 2); 1915 minimap_loop = assets->GetTexture("ib-autmask-b");
1907 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-b", 2); 1916 _5079B4_compass = assets->GetTexture("IB-COMP-B");
1908 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-b", 2); 1917 _5079D0_init_g = assets->GetTexture("IB-InitG-b");
1909 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-b", 2); 1918 _5079C8_init_y = assets->GetTexture("IB-InitY-b");
1919 _5079CC_init_r = assets->GetTexture("IB-InitR-b");
1920
1910 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-B", 2); 1921 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft], "IB-NPCLD-B", 2);
1911 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-B", 2); 1922 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_NPCRight], "IB-NPCRD-B", 2);
1912 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-B", 2); 1923 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomIn], "ib-autout-B", 2);
1913 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-B", 2); 1924 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Btn_ZoomOut], "ib-autin-B", 2);
1914 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-B", 2); 1925 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_GameUI_CharSelectionFrame], "IB-selec-B", 2);
1925 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchB"); 1936 pUIAnum_Torchlight->uIconID = pIconsFrameTable->FindIcon("torchB");
1926 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID); 1937 pIconsFrameTable->InitializeAnimation((signed __int16)pUIAnum_Torchlight->uIconID);
1927 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-b", 2); 1938 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uExitCancelTextureId], "ib-bcu-b", 2);
1928 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-b", 2); 1939 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50795C], "evtnpc-b", 2);
1929 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-b", 2); 1940 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_CharacterUI_InventoryBackground], "fr_inven-b", 2);
1930 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Parchment], "parchment", 2); 1941 messagebox_corner_y = assets->GetImage_16BitAlpha(L"cornr_ll-b");
1931 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B4], "cornr_ll-b", 2); 1942 messagebox_corner_w = assets->GetImage_16BitAlpha(L"cornr_lr-b");
1932 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076B0], "cornr_lr-b", 2); 1943 messagebox_corner_x = assets->GetImage_16BitAlpha(L"cornr_ul-b");
1933 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076AC], "cornr_ul-b", 2); 1944 messagebox_corner_z = assets->GetImage_16BitAlpha(L"cornr_ur-b");
1934 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A8], "cornr_ur-b", 2); 1945 messagebox_border_bottom = assets->GetImage_16BitAlpha(L"edge_btm-b");
1935 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A4], "edge_btm-b", 2); 1946 messagebox_border_left = assets->GetImage_16BitAlpha(L"edge_lf-b");
1936 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_5076A0], "edge_lf-b", 2); 1947 messagebox_border_right = assets->GetImage_16BitAlpha(L"edge_rt-b");
1937 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_50769C], "edge_rt-b", 2); 1948 messagebox_border_top = assets->GetImage_16BitAlpha(L"edge_top-b");
1938 pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_507698], "edge_top-b", 2);
1939 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-b", 2); 1949 pIcons_LOD->ReloadTexture(pTexture_591428, "endcap-b", 2);
1940 } 1950 }
1941 uGameUIFontMain = Color16(0, 0, 0xC8u); 1951 uGameUIFontMain = Color16(0, 0, 0xC8u);
1942 uGameUIFontShadow = Color16(255, 255, 255); 1952 uGameUIFontShadow = Color16(255, 255, 255);
1943 } 1953 }
2070 void *v4; // eax@3 2080 void *v4; // eax@3
2071 //int *v5; // edi@5 2081 //int *v5; // edi@5
2072 // int v6; // ecx@6 2082 // int v6; // ecx@6
2073 // int v9; // [sp+18h] [bp-4h]@1 2083 // int v9; // [sp+18h] [bp-4h]@1
2074 2084
2075 if (pIcons_LOD->dword_011BA4 && a2->uDecompressedSize) 2085 if (pIcons_LOD->_011BA4_debug_paletted_pixels_uncompressed && a2->uDecompressedSize)
2076 v4 = a2->UnzipPalette(); 2086 v4 = a2->UnzipPalette();
2077 else 2087 else
2078 v4 = a2->pLevelOfDetail0_prolly_alpha_mask; 2088 v4 = a2->paletted_pixels;
2079 //v5 = pZBuffer; 2089 //v5 = pZBuffer;
2080 for (uint i = 0; i < a2->uTextureHeight; i++) 2090 for (uint i = 0; i < a2->uTextureHeight; i++)
2081 { 2091 {
2082 for (uint j = 0; j < a2->uTextureWidth; j++) 2092 for (uint j = 0; j < a2->uTextureWidth; j++)
2083 { 2093 {
2084 *pZBuffer = a3; 2094 *pZBuffer = a3;
2085 ++pZBuffer; 2095 ++pZBuffer;
2086 } 2096 }
2087 pZBuffer += window->GetWidth() - a2->uTextureWidth; 2097 pZBuffer += window->GetWidth() - a2->uTextureWidth;
2088 } 2098 }
2089 if (pIcons_LOD->dword_011BA4) 2099 if (pIcons_LOD->_011BA4_debug_paletted_pixels_uncompressed)
2090 { 2100 {
2091 if (a2->uDecompressedSize) 2101 if (a2->uDecompressedSize)
2092 free(v4); 2102 free(v4);
2093 } 2103 }
2094 } 2104 }
2112 //int v6; // eax@5 2122 //int v6; // eax@5
2113 // int v7; // ecx@6 2123 // int v7; // ecx@6
2114 // int v11; // [sp+18h] [bp-8h]@1 2124 // int v11; // [sp+18h] [bp-8h]@1
2115 //void *v12; // [sp+1Ch] [bp-4h]@5 2125 //void *v12; // [sp+1Ch] [bp-4h]@5
2116 2126
2117 if (pIcons_LOD->dword_011BA4 && pTex->uDecompressedSize) 2127 if (pIcons_LOD->_011BA4_debug_paletted_pixels_uncompressed && pTex->uDecompressedSize)
2118 v3 = pTex->UnzipPalette(); 2128 v3 = pTex->UnzipPalette();
2119 else 2129 else
2120 v3 = pTex->pLevelOfDetail0_prolly_alpha_mask; 2130 v3 = pTex->paletted_pixels;
2121 //v12 = v3; 2131 //v12 = v3;
2122 //v4 = v3; 2132 //v4 = v3;
2123 //v5 = pZBuffer; 2133 //v5 = pZBuffer;
2124 //v6 = 0; 2134 //v6 = 0;
2125 for (uint i = 0; i < pTex->uTextureHeight; i++) 2135 for (uint i = 0; i < pTex->uTextureHeight; i++)
2132 *pZBuffer = uZValue; 2142 *pZBuffer = uZValue;
2133 ++pZBuffer; 2143 ++pZBuffer;
2134 } 2144 }
2135 pZBuffer += window->GetWidth() - pTex->uTextureWidth; 2145 pZBuffer += window->GetWidth() - pTex->uTextureWidth;
2136 } 2146 }
2137 if (pIcons_LOD->dword_011BA4) 2147 if (pIcons_LOD->_011BA4_debug_paletted_pixels_uncompressed)
2138 { 2148 {
2139 if (pTex->uDecompressedSize) 2149 if (pTex->uDecompressedSize)
2140 free(v3); 2150 free(v3);
2141 } 2151 }
2142 } 2152 }
2728 } 2738 }
2729 2739
2730 //----- (004B46A5) -------------------------------------------------------- 2740 //----- (004B46A5) --------------------------------------------------------
2731 void __fastcall DrawTextAtStatusBar(const char *Str, int a5) 2741 void __fastcall DrawTextAtStatusBar(const char *Str, int a5)
2732 { 2742 {
2733 pRenderer->DrawTextureRGB(0, 352, pTexture_StatusBar); 2743 pRenderer->DrawTextureNew(0, 352/480.0f, game_ui_statusbar);
2734 pPrimaryWindow->DrawText(pFontLucida, pFontLucida->AlignText_Center(450, Str) + 11, 357, a5, Str, 0, 0, 0); 2744 pPrimaryWindow->DrawText(pFontLucida, pFontLucida->AlignText_Center(450, Str) + 11, 357, a5, Str, 0, 0, 0);
2735 } 2745 }
2736 2746
2737 //----- (004BBA85) -------------------------------------------------------- 2747 //----- (004BBA85) --------------------------------------------------------
2738 void CheckBountyRespawnAndAward() 2748 void CheckBountyRespawnAndAward()