Mercurial > mm7
changeset 948:5a2dbb00c399
Code cleaning.
author | Nomad |
---|---|
date | Wed, 01 May 2013 17:31:10 +0200 |
parents | 99aa9c8464cf |
children | c0d0656aa662 |
files | Actor.cpp Chest.cpp Events.cpp GUIWindow.cpp GUIWindow.h Texture.cpp Texture.h UIBooks.cpp UICharacter.cpp UIHouses.cpp UIMainMenu.cpp UIOptions.cpp UIPartyCreation.cpp UIPopup.cpp UIRest.cpp UISaveLoad.cpp UiGame.cpp mm7_1.cpp mm7_2.cpp mm7_3.cpp mm7_4.cpp mm7_5.cpp mm7_data.cpp mm7_data.h |
diffstat | 24 files changed, 783 insertions(+), 1063 deletions(-) [+] |
line wrap: on
line diff
--- a/Actor.cpp Wed May 01 14:30:02 2013 +0200 +++ b/Actor.cpp Wed May 01 17:31:10 2013 +0200 @@ -173,7 +173,7 @@ NPCData *v5; // ebp@1 unsigned int v6; // eax@1 //signed int v7; // eax@3 - unsigned int v8; // eax@8 + //unsigned int v8; // eax@8 int v9; // esi@8 int v10; // eax@11 GUIWindow *v11; // ecx@19 @@ -202,18 +202,6 @@ v6 = v4->uFlags; if ( (v6 & 3) != 2 ) v5->uFlags = v6 + 1; - /*v7 = const_2(); - sprintf(pContainer, "evt%02d", v7); - if (pParty->alignment == PartyAlignment_Good) - { - v14 = "-b"; - strcat(pContainer, v14); - } - else if ( pParty->uAlignment == 2 ) - { - v14 = "-c"; - strcat(pContainer, v14); - }*/ switch (pParty->alignment) { @@ -222,13 +210,12 @@ case PartyAlignment_Evil: sprintf(pContainer, "evt%02d-c", const_2()); break; } - v8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); pDialogueNPCCount = 0; uNumDialogueNPCPortraits = 1; - pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v8]; + pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); sprintf(pContainer, "npc%03u", v5->uPortraitID); v9 = 0; - pDialogueNPCPortraits[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; + pDialogueNPCPortraits[0] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); dword_591084 = areWeLoadingTexture; uTextureID_right_panel_loop = uTextureID_right_panel; if ( !v5->Hired() && v5->Location2D >= 0 ) @@ -270,7 +257,7 @@ } if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) != 0 ) v9 = 4; - v11 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)10, v9, 0); + v11 = GUIWindow::Create(0, 0, 640, 480, WINDOW_Rest, v9, 0); pDialogueWindow = v11; if (v5->Hired()) { @@ -281,15 +268,11 @@ { if ( v12 <= 12 || v12 > 32 && (v12 <= 34 || v12 > 38 && (v12 <= 43 || v12 == 52)) ) { - v11->CreateButton( - 0x1E0u, - 0xFAu, - 0x8Cu, - LOBYTE(pFontArrus->uFontHeight) - 3, + v11->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, - 9u, + 9, 0, "", 0); @@ -298,10 +281,12 @@ } } } - pDialogueWindow->CreateButton(61u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); - pDialogueWindow->CreateButton(177u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); - pDialogueWindow->CreateButton(292u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); - pDialogueWindow->CreateButton(407u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); + + pDialogueWindow->CreateButton( 61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + pDialogueWindow->CreateButton(177, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + pDialogueWindow->CreateButton(292, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + pDialogueWindow->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); + if (v17 && uActiveCharacter && !v5->Hired()) { if (pParty->uCurrentHour < 5 || pParty->uCurrentHour > 21)
--- a/Chest.cpp Wed May 01 14:30:02 2013 +0200 +++ b/Chest.cpp Wed May 01 17:31:10 2013 +0200 @@ -239,11 +239,11 @@ } dword_507CD8 = 0; - pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Chest, uChestID, 0); - pChestWindow = pGUIWindow_CurrentMenu; - pBtn_ExitCancel = pChestWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79],// Exit - pIcons_LOD->GetTexture(uExitCancelTextureId), 0); - pChestWindow->CreateButton(7u, 8u, 460u, 343u, 1, 0, UIMSG_C, 0, 0, "", 0); + pChestWindow = pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Chest, uChestID, 0); + + pBtn_ExitCancel = pChestWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], pIcons_LOD->GetTexture(uExitCancelTextureId), 0);// Exit + pChestWindow->CreateButton( 7, 8, 460, 343, 1, 0, UIMSG_C, 0, 0, "", 0); + pCurrentScreen = SCREEN_CHEST; pEventTimer->Pause(); return 1;
--- a/Events.cpp Wed May 01 14:30:02 2013 +0200 +++ b/Events.cpp Wed May 01 17:31:10 2013 +0200 @@ -600,11 +600,11 @@ { pAudioPlayer->StopChannels(-1, -1); window_SpeakInHouse = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, 170, 0); - window_SpeakInHouse->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); - window_SpeakInHouse->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); - window_SpeakInHouse->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); - window_SpeakInHouse->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); - window_SpeakInHouse->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9u, "", 0); + window_SpeakInHouse->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + window_SpeakInHouse->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + window_SpeakInHouse->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + window_SpeakInHouse->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); + window_SpeakInHouse->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); current_npc_text = pNPCTopics[90].pText; } } @@ -1384,11 +1384,11 @@ if ( uCurrentHouse_Animation != 167 ) v104 = EVT_DWORD(_evt->v5); window_SpeakInHouse = GUIWindow::Create(0, 0, 640, 480, WINDOW_HouseInterior, v104, 0); - window_SpeakInHouse->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, 49, "", 0); - window_SpeakInHouse->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, 50, "", 0); - window_SpeakInHouse->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, 51, "", 0); - window_SpeakInHouse->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, 52, "", 0); - window_SpeakInHouse->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9u, "", 0); + window_SpeakInHouse->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + window_SpeakInHouse->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + window_SpeakInHouse->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + window_SpeakInHouse->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); + window_SpeakInHouse->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); } ++curr_seq_num; v4 = v124;
--- a/GUIWindow.cpp Wed May 01 14:30:02 2013 +0200 +++ b/GUIWindow.cpp Wed May 01 17:31:10 2013 +0200 @@ -478,13 +478,15 @@ { case WINDOW_Lloyd:{ byte_506360 = 0; - pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)]; - pTexture_LloydBeacons[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; - pTexture_50635C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton(415, 13, 39, 36, 1, 0, UIMSG_B2, 0, 0, pGlobalTXT_LocalizationStrings[375], 0); - pBtn_Book_2 = v1->CreateButton(415, 48, 39, 36, 1, 0, UIMSG_B2, 1, 0, pGlobalTXT_LocalizationStrings[523], 0); + pTexture_CurrentBook = pIcons_LOD->LoadTexturePtr("lb_bordr", TEXTURE_16BIT_PALETTE); + pTexture_LloydBeacons[0] = pIcons_LOD->LoadTexturePtr("sbmap", TEXTURE_16BIT_PALETTE); + pTexture_50635C = pIcons_LOD->LoadTexturePtr("sbmap", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6b__zoom_on = pIcons_LOD->LoadTexturePtr("tab-an-6b", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6a__zoom_off = pIcons_LOD->LoadTexturePtr("tab-an-6a", TEXTURE_16BIT_PALETTE); + + pBtn_Book_1 = v1->CreateButton(415, 13, 39, 36, 1, 0, UIMSG_B2, 0, 0, pGlobalTXT_LocalizationStrings[375], 0); // Set Beacon + pBtn_Book_2 = v1->CreateButton(415, 48, 39, 36, 1, 0, UIMSG_B2, 1, 0, pGlobalTXT_LocalizationStrings[523], 0); // Recall Beacon + v17 = &pParty->pPlayers[_506348_current_lloyd_playerid]; v23 = 1; v18 = v17->pActiveSkills[14]; @@ -524,8 +526,7 @@ case WINDOW_TownPortal: { - pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("townport", TEXTURE_16BIT_PALETTE)]; - + pTexture_CurrentBook = pIcons_LOD->LoadTexturePtr("townport", TEXTURE_16BIT_PALETTE); pTexture_TownPortalIcons[0] = pIcons_LOD->LoadTexturePtr("tpharmndy", TEXTURE_16BIT_PALETTE); pTexture_TownPortalIcons[1] = pIcons_LOD->LoadTexturePtr("tpelf", TEXTURE_16BIT_PALETTE); pTexture_TownPortalIcons[2] = pIcons_LOD->LoadTexturePtr("tpwarlock", TEXTURE_16BIT_PALETTE); @@ -546,19 +547,21 @@ break; case WINDOW_QuestBook: - { - pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "sbquiknot", TEXTURE_16BIT_PALETTE)]; - pSpellBookPagesTextr_10 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "divbar", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_tab_an_6b__zoom_on->uTextureWidth, - pTex_tab_an_6b__zoom_on->uTextureHeight, 1, 0, UIMSG_AutonotesBook, 0xBu, 0, pGlobalTXT_LocalizationStrings[192],// "Scroll Up" - pTex_tab_an_6b__zoom_on, 0); - pBtn_Book_2 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_tab_an_7b__zoot_on->uTextureHeight, - pTex_tab_an_7b__zoot_on->uTextureHeight, 1, 0, UIMSG_AutonotesBook, 0xAu, 0, pGlobalTXT_LocalizationStrings[193],// "Scroll Down" - pTex_tab_an_7b__zoot_on, 0); + { + pTexture_CurrentBook = pIcons_LOD->LoadTexturePtr("sbquiknot", TEXTURE_16BIT_PALETTE); + pSpellBookPagesTextr_10 = pIcons_LOD->LoadTexturePtr( "divbar", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6b__zoom_on = pIcons_LOD->LoadTexturePtr("tab-an-6b", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7b__zoot_on = pIcons_LOD->LoadTexturePtr("tab-an-7b", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6a__zoom_off = pIcons_LOD->LoadTexturePtr("tab-an-6a", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7a__zoot_off = pIcons_LOD->LoadTexturePtr("tab-an-7a", TEXTURE_16BIT_PALETTE); + pBtn_Book_1 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, + pTex_tab_an_6b__zoom_on->uTextureWidth, pTex_tab_an_6b__zoom_on->uTextureHeight, + 1, 0, UIMSG_AutonotesBook, 0xBu, 0, pGlobalTXT_LocalizationStrings[192],// "Scroll Up" + pTex_tab_an_6b__zoom_on, 0); + pBtn_Book_2 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, + pTex_tab_an_7b__zoot_on->uTextureHeight, pTex_tab_an_7b__zoot_on->uTextureHeight, + 1, 0, UIMSG_AutonotesBook, 0xAu, 0, pGlobalTXT_LocalizationStrings[193],// "Scroll Down" + pTex_tab_an_7b__zoot_on, 0); awards_count = 0; memset(&achievedAwardsIndex, 0, 4000); for ( i = dword_506528; i < 512; ++i ) @@ -577,42 +580,36 @@ break; case WINDOW_AutonotesBook: { - pTexture_AutonotesBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbautnot", TEXTURE_16BIT_PALETTE)]; - pSpellBookPagesTextr_10 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("divbar", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; - pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1b", TEXTURE_16BIT_PALETTE)]; - pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1a", TEXTURE_16BIT_PALETTE)]; - pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2b", TEXTURE_16BIT_PALETTE)]; - pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2a", TEXTURE_16BIT_PALETTE)]; - pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3b", TEXTURE_16BIT_PALETTE)]; - pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3a", TEXTURE_16BIT_PALETTE)]; - pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5b", TEXTURE_16BIT_PALETTE)]; - pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5a", TEXTURE_16BIT_PALETTE)]; - pTexture_506374 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4b", TEXTURE_16BIT_PALETTE)]; - pTexture_506370 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4a", TEXTURE_16BIT_PALETTE)]; - pTexture_50636C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8b", TEXTURE_16BIT_PALETTE)]; - pTexture_506368 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8a", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 0xBu, 0, - pGlobalTXT_LocalizationStrings[193], pTex_tab_an_6b__zoom_on, 0); - pBtn_Book_2 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 0xAu, 0, - pGlobalTXT_LocalizationStrings[192], pTex_tab_an_7b__zoot_on, 0); - pBtn_Book_3 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 2u, 0, - pGlobalTXT_LocalizationStrings[85], pTexture_506394, 0);// "Potion Notes" - pBtn_Book_4 = v1->CreateButton(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 3u, 0, - pGlobalTXT_LocalizationStrings[137], pTexture_50638C, 0);// "Fountain Notes" - pBtn_Book_5 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 4u, 0, - pGlobalTXT_LocalizationStrings[8], pTexture_506384, 0);// "Obelisk Notes" - pBtn_Book_6 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 5u, 0, - pGlobalTXT_LocalizationStrings[141], pTexture_50637C, 0);// "Seer Notes" - pBtn_Autonotes_Misc = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 6u, 0, - pGlobalTXT_LocalizationStrings[123], pTexture_506374, 0);// "Miscellaneous Notes" - v9 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 7u, 0, - pGlobalTXT_LocalizationStrings[662], pTexture_50636C, 0);// "Instructors" + pTexture_AutonotesBook = pIcons_LOD->LoadTexturePtr("sbautnot", TEXTURE_16BIT_PALETTE); + pSpellBookPagesTextr_10 = pIcons_LOD->LoadTexturePtr("divbar", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6b__zoom_on = pIcons_LOD->LoadTexturePtr("tab-an-6b", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7b__zoot_on = pIcons_LOD->LoadTexturePtr("tab-an-7b", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6a__zoom_off = pIcons_LOD->LoadTexturePtr("tab-an-6a", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7a__zoot_off = pIcons_LOD->LoadTexturePtr("tab-an-7a", TEXTURE_16BIT_PALETTE); + pTexture_506394 = pIcons_LOD->LoadTexturePtr("tab-an-1b", TEXTURE_16BIT_PALETTE); + pTexture_506390 = pIcons_LOD->LoadTexturePtr("tab-an-1a", TEXTURE_16BIT_PALETTE); + pTexture_50638C = pIcons_LOD->LoadTexturePtr("tab-an-2b", TEXTURE_16BIT_PALETTE); + pTexture_506388 = pIcons_LOD->LoadTexturePtr("tab-an-2a", TEXTURE_16BIT_PALETTE); + pTexture_506384 = pIcons_LOD->LoadTexturePtr("tab-an-3b", TEXTURE_16BIT_PALETTE); + pTexture_506380 = pIcons_LOD->LoadTexturePtr("tab-an-3a", TEXTURE_16BIT_PALETTE); + pTexture_50637C = pIcons_LOD->LoadTexturePtr("tab-an-5b", TEXTURE_16BIT_PALETTE); + pTexture_506378 = pIcons_LOD->LoadTexturePtr("tab-an-5a", TEXTURE_16BIT_PALETTE); + pTexture_506374 = pIcons_LOD->LoadTexturePtr("tab-an-4b", TEXTURE_16BIT_PALETTE); + pTexture_506370 = pIcons_LOD->LoadTexturePtr("tab-an-4a", TEXTURE_16BIT_PALETTE); + pTexture_50636C = pIcons_LOD->LoadTexturePtr("tab-an-8b", TEXTURE_16BIT_PALETTE); + pTexture_506368 = pIcons_LOD->LoadTexturePtr("tab-an-8a", TEXTURE_16BIT_PALETTE); + + pBtn_Book_1 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, 50, 34, 1, 0, UIMSG_AutonotesBook, 11, 0, pGlobalTXT_LocalizationStrings[193], pTex_tab_an_6b__zoom_on, 0); + pBtn_Book_2 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, 50, 34, 1, 0, UIMSG_AutonotesBook, 10, 0, pGlobalTXT_LocalizationStrings[192], pTex_tab_an_7b__zoot_on, 0); + pBtn_Book_3 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, 50, 34, 1, 0, UIMSG_AutonotesBook, 2, 0, pGlobalTXT_LocalizationStrings[85], pTexture_506394, 0); // "Potion Notes" + pBtn_Book_4 = v1->CreateButton(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, 50, 34, 1, 0, UIMSG_AutonotesBook, 3, 0, pGlobalTXT_LocalizationStrings[137], pTexture_50638C, 0); // "Fountain Notes" + pBtn_Book_5 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, 50, 34, 1, 0, UIMSG_AutonotesBook, 4, 0, pGlobalTXT_LocalizationStrings[8], pTexture_506384, 0); // "Obelisk Notes" + pBtn_Book_6 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, 50, 34, 1, 0, UIMSG_AutonotesBook, 5, 0, pGlobalTXT_LocalizationStrings[141], pTexture_50637C, 0); // "Seer Notes" + pBtn_Autonotes_Misc = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 264, 50, 34, 1, 0, UIMSG_AutonotesBook, 6, 0, pGlobalTXT_LocalizationStrings[123], pTexture_506374, 0); // "Miscellaneous Notes" + pBtn_Autonotes_Instructors = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 302, 50, 34, 1, 0, UIMSG_AutonotesBook, 7, 0, pGlobalTXT_LocalizationStrings[662], pTexture_50636C, 0); // "Instructors" + + v9 = pBtn_Autonotes_Instructors; v10 = dword_506528; - pBtn_Autonotes_Instructors = v9; awards_count = 0; while ( v10 < 196 ) { @@ -633,78 +630,55 @@ } } break; + case WINDOW_MapsBook: - { + { dword_506364 = 1; - pSpellBookPagesTextr_12 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-on", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-on", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-off", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-off", TEXTURE_16BIT_PALETTE)]; - pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNon", TEXTURE_16BIT_PALETTE)]; - pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNoff", TEXTURE_16BIT_PALETTE)]; - pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSon", TEXTURE_16BIT_PALETTE)]; - pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSoff", TEXTURE_16BIT_PALETTE)]; - pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEon", TEXTURE_16BIT_PALETTE)]; - pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEoff", TEXTURE_16BIT_PALETTE)]; - pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWon", TEXTURE_16BIT_PALETTE)]; - pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWoff", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 0, 0, - pGlobalTXT_LocalizationStrings[251], pTex_tab_an_6b__zoom_on, 0);// "Zoom In" - pBtn_Book_2 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 1, 0, - pGlobalTXT_LocalizationStrings[252], pTex_tab_an_7b__zoot_on, 0);// "Zoom Out" - pBtn_Book_3 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 113, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 2, 0, - pGlobalTXT_LocalizationStrings[192], (Texture *)"", 0);// Scroll Up - pBtn_Book_4 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 150, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 3, 0, - pGlobalTXT_LocalizationStrings[193], (Texture *)"", 0);// Scroll Down - pBtn_Book_5 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 4, 0, - pGlobalTXT_LocalizationStrings[573], (Texture *)"", 0);// "Scroll Right" - pBtn_Book_6 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, 0x32u, 0x22u, 1, 0, UIMSG_AutonotesBook, 5, 0, - pGlobalTXT_LocalizationStrings[572], (Texture *)"", 0);// "Scroll Left" + pSpellBookPagesTextr_12 = pIcons_LOD->LoadTexturePtr("sbmap", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6b__zoom_on = pIcons_LOD->LoadTexturePtr("zoom-on", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7b__zoot_on = pIcons_LOD->LoadTexturePtr("zoot-on", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6a__zoom_off = pIcons_LOD->LoadTexturePtr("zoom-off", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7a__zoot_off = pIcons_LOD->LoadTexturePtr("zoot-off", TEXTURE_16BIT_PALETTE); + pTexture_506394 = pIcons_LOD->LoadTexturePtr("tabNon", TEXTURE_16BIT_PALETTE); + pTexture_506390 = pIcons_LOD->LoadTexturePtr("tabNoff", TEXTURE_16BIT_PALETTE); + pTexture_50638C = pIcons_LOD->LoadTexturePtr("tabSon", TEXTURE_16BIT_PALETTE); + pTexture_506388 = pIcons_LOD->LoadTexturePtr("tabSoff", TEXTURE_16BIT_PALETTE); + pTexture_506384 = pIcons_LOD->LoadTexturePtr("tabEon", TEXTURE_16BIT_PALETTE); + pTexture_506380 = pIcons_LOD->LoadTexturePtr("tabEoff", TEXTURE_16BIT_PALETTE); + pTexture_50637C = pIcons_LOD->LoadTexturePtr("tabWon", TEXTURE_16BIT_PALETTE); + pTexture_506378 = pIcons_LOD->LoadTexturePtr("tabWoff", TEXTURE_16BIT_PALETTE); + + pBtn_Book_1 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, 50, 34, 1, 0, UIMSG_AutonotesBook, 0, 0, pGlobalTXT_LocalizationStrings[251], pTex_tab_an_6b__zoom_on, 0);// "Zoom In" + pBtn_Book_2 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, 50, 34, 1, 0, UIMSG_AutonotesBook, 1, 0, pGlobalTXT_LocalizationStrings[252], pTex_tab_an_7b__zoot_on, 0);// "Zoom Out" + pBtn_Book_3 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 113, 50, 34, 1, 0, UIMSG_AutonotesBook, 2, 0, pGlobalTXT_LocalizationStrings[192], (Texture *)"", 0);// Scroll Up + pBtn_Book_4 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 150, 50, 34, 1, 0, UIMSG_AutonotesBook, 3, 0, pGlobalTXT_LocalizationStrings[193], (Texture *)"", 0);// Scroll Down + pBtn_Book_5 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, 50, 34, 1, 0, UIMSG_AutonotesBook, 4, 0, pGlobalTXT_LocalizationStrings[573], (Texture *)"", 0);// "Scroll Right" + pBtn_Book_6 = v1->CreateButton(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, 50, 34, 1, 0, UIMSG_AutonotesBook, 5, 0, pGlobalTXT_LocalizationStrings[572], (Texture *)"", 0);// "Scroll Left" } break; - case WINDOW_CalendarBook: { - pSpellBookPagesTextr_13 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbdate-time", TEXTURE_16BIT_PALETTE)]; - pTex_moon_new = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_new", TEXTURE_16BIT_PALETTE)]; - pTex_moon_4 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_4", TEXTURE_16BIT_PALETTE)]; - pTex_moon_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; - pTex_moon_2_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; - pTex_moon_ful = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_ful", TEXTURE_16BIT_PALETTE)]; + + case WINDOW_CalendarBook: + { + pSpellBookPagesTextr_13 = pIcons_LOD->LoadTexturePtr("sbdate-time", TEXTURE_16BIT_PALETTE); + pTex_moon_new = pIcons_LOD->LoadTexturePtr("moon_new", TEXTURE_16BIT_PALETTE); + pTex_moon_4 = pIcons_LOD->LoadTexturePtr("moon_4", TEXTURE_16BIT_PALETTE); + pTex_moon_2 = pIcons_LOD->LoadTexturePtr("moon_2", TEXTURE_16BIT_PALETTE); + pTex_moon_2_2 = pIcons_LOD->LoadTexturePtr("moon_2", TEXTURE_16BIT_PALETTE); + pTex_moon_ful = pIcons_LOD->LoadTexturePtr("moon_ful", TEXTURE_16BIT_PALETTE); } break; + case WINDOW_HistoryBook: - { - pSpellBookPagesTextr_11 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbplayrnot", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; - pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; - pBtn_Book_1 = v1->CreateButton( - pViewport->uViewportTL_X + 398, - pViewport->uViewportTL_Y + 1, - pTex_tab_an_6b__zoom_on->uTextureWidth, - pTex_tab_an_6b__zoom_on->uTextureHeight, - 1, - 0, - UIMSG_AutonotesBook, - 0xBu, - 0, - pGlobalTXT_LocalizationStrings[192], - pTex_tab_an_6b__zoom_on, - 0); - pBtn_Book_2 = v1->CreateButton( - pViewport->uViewportTL_X + 398, - pViewport->uViewportTL_Y + 38, - pTex_tab_an_7b__zoot_on->uTextureHeight, - pTex_tab_an_7b__zoot_on->uTextureHeight, - 1, - 0, - UIMSG_AutonotesBook, - 0xAu, - 0, - pGlobalTXT_LocalizationStrings[193], - pTex_tab_an_7b__zoot_on, - 0); + { + pSpellBookPagesTextr_11 = pIcons_LOD->LoadTexturePtr("sbplayrnot", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6b__zoom_on = pIcons_LOD->LoadTexturePtr("tab-an-6b", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7b__zoot_on = pIcons_LOD->LoadTexturePtr("tab-an-7b", TEXTURE_16BIT_PALETTE); + pTex_tab_an_6a__zoom_off = pIcons_LOD->LoadTexturePtr("tab-an-6a", TEXTURE_16BIT_PALETTE); + pTex_tab_an_7a__zoot_off = pIcons_LOD->LoadTexturePtr("tab-an-7a", TEXTURE_16BIT_PALETTE); + + pBtn_Book_1 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_tab_an_6b__zoom_on->uTextureWidth, pTex_tab_an_6b__zoom_on->uTextureHeight, 1, 0, UIMSG_AutonotesBook, 11, 0, pGlobalTXT_LocalizationStrings[192], pTex_tab_an_6b__zoom_on, 0); + pBtn_Book_2 = v1->CreateButton(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_tab_an_7b__zoot_on->uTextureHeight, pTex_tab_an_7b__zoot_on->uTextureHeight, 1, 0, UIMSG_AutonotesBook, 10, 0, pGlobalTXT_LocalizationStrings[193], pTex_tab_an_7b__zoot_on, 0); + awards_count = 0; v26.uFrameX = 48; v26.uFrameY = 70; @@ -881,11 +855,11 @@ if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - pSpellBookPagesTextr_9 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("book", TEXTURE_16BIT_PALETTE)]; - pTexture_pagemask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("pagemask", TEXTURE_16BIT_PALETTE)]; - pTexture_506448 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-u", TEXTURE_16BIT_PALETTE)]; - ptr_506440 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-d", TEXTURE_16BIT_PALETTE)]; - pTexture_50643C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m6-u",TEXTURE_16BIT_PALETTE)]; + pSpellBookPagesTextr_9 = pIcons_LOD->LoadTexturePtr("book", TEXTURE_16BIT_PALETTE); + pTexture_pagemask = pIcons_LOD->LoadTexturePtr("pagemask", TEXTURE_16BIT_PALETTE); + pTexture_506448 = pIcons_LOD->LoadTexturePtr("ib-m5-u", TEXTURE_16BIT_PALETTE); + ptr_506440 = pIcons_LOD->LoadTexturePtr("ib-m5-d", TEXTURE_16BIT_PALETTE); + pTexture_50643C = pIcons_LOD->LoadTexturePtr("ib-m6-u",TEXTURE_16BIT_PALETTE); //v0 = 1; static const char *texNames[9] = @@ -914,7 +888,7 @@ if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); - pTexture_mapbordr = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("mapbordr", TEXTURE_16BIT_PALETTE)]; + pTexture_mapbordr = pIcons_LOD->LoadTexturePtr("mapbordr", TEXTURE_16BIT_PALETTE); pBookFont = LoadFont("book.fnt", "FONTPAL", NULL); pBook2Font = LoadFont("book2.fnt", "FONTPAL", NULL); pAutonoteFont = LoadFont("autonote.fnt", "FONTPAL", NULL); @@ -987,31 +961,24 @@ } //while ( (signed int)v3 < 11 ); - CreateButton(0, 0, 0, 0, 1, 0, UIMSG_33, 0, 9u, "", 0); + CreateButton(0, 0, 0, 0, 1, 0, UIMSG_33, 0, '\t', "", 0); if ( a2 ) _41D08F(a2, 0, 0, 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_FIRE]) - CreateButton(0x18Fu, 0xAu, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 0, 0, aSpellSchoolNames[0], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_AIR]) - CreateButton(0x18Fu, 0x2Eu, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 1u, 0, aSpellSchoolNames[1], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) - CreateButton(0x18Fu, 0x53u, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 2u, 0, aSpellSchoolNames[2], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_EARTH]) - CreateButton(0x18Fu, 0x79u, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 3u, 0, aSpellSchoolNames[3], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_SPIRIT]) - CreateButton(0x18Fu, 0x9Eu, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 4u, 0, aSpellSchoolNames[4], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_MIND]) - CreateButton(0x190u, 0xC4u, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 5u, 0, aSpellSchoolNames[5], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_BODY]) - CreateButton(0x190u, 0xEAu, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 6u, 0, aSpellSchoolNames[6], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_LIGHT]) - CreateButton(0x190u, 0x10Fu, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 7u, 0, aSpellSchoolNames[7], 0); - if (pPlayer->pActiveSkills[PLAYER_SKILL_DARK]) - CreateButton(0x190u, 0x133u, 0x32u, 0x24u, 1, 0, UIMSG_OpenSpellbookPage, 8u, 0, aSpellSchoolNames[8], 0); - CreateButton(0x1DCu, 0x1C2u, pTexture_506444->uTextureWidth, pTexture_506444->uTextureHeight, 1, 78, UIMSG_58, 0, 0, "", 0); - pBtn_InstallRemoveSpell = CreateButton(0x1DCu, 0x1C2u, 0x30u, 0x20u, 1, 78, UIMSG_58, 0, 0, "", pTexture_506444, 0); - CreateButton(0x231u, 0x1C2u, ptr_506440->uTextureWidth, ptr_506440->uTextureHeight, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); - pBtn_CloseBook = CreateButton(0x231u, 0x1C2u, 0x30u, 0x20u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], ptr_506440, 0); + + if (pPlayer->pActiveSkills[PLAYER_SKILL_FIRE]) CreateButton(399, 10, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 0, 0, aSpellSchoolNames[0], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_AIR]) CreateButton(399, 46, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 1, 0, aSpellSchoolNames[1], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) CreateButton(399, 83, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 2, 0, aSpellSchoolNames[2], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_EARTH]) CreateButton(399, 121, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 3, 0, aSpellSchoolNames[3], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_SPIRIT]) CreateButton(399, 158, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 4, 0, aSpellSchoolNames[4], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_MIND]) CreateButton(400, 196, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 5, 0, aSpellSchoolNames[5], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_BODY]) CreateButton(400, 234, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 6, 0, aSpellSchoolNames[6], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_LIGHT]) CreateButton(400, 271, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 7, 0, aSpellSchoolNames[7], 0); + if (pPlayer->pActiveSkills[PLAYER_SKILL_DARK]) CreateButton(400, 307, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 8, 0, aSpellSchoolNames[8], 0); + + CreateButton(476, 450, pTexture_506444->uTextureWidth, pTexture_506444->uTextureHeight, 1, 78, UIMSG_58, 0, 0, "", 0); + pBtn_InstallRemoveSpell = CreateButton(476, 450, 48, 32, 1, 78, UIMSG_58, 0, 0, "", pTexture_506444, 0); + CreateButton(561, 450, ptr_506440->uTextureWidth, ptr_506440->uTextureHeight, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); + pBtn_CloseBook = CreateButton(561, 450, 48, 32, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], ptr_506440, 0); } // 50640C: using guessed type int dword_50640C[]; @@ -1894,16 +1861,16 @@ pWindow->_41D08F(num_menu_buttons, 1, 0, 1); } break; + case WINDOW_ChangeLocation: pMainScreenNum = pCurrentScreen; pCurrentScreen = SCREEN_CHANGE_LOCATION; - pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_5B, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[156],//Îñòàòüñÿ â ýòîé îáëàñòè - pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); - pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_OnTravelByFoot, 0, 0x59u, pWindow->Hint, - pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); - pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 0x3Fu, 0x49u, 1, 0, UIMSG_OnTravelByFoot, 1u, 0x20u, pWindow->Hint, 0, 0, 0); - pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, UIMSG_OnTravelByFoot, 1u, 0, pWindow->Hint, 0); + pBtn_ExitCancel = pWindow->CreateButton( 566, 445, 75, 33, 1, 0, UIMSG_5B, 0, 'N', pGlobalTXT_LocalizationStrings[156], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);//Îñòàòüñÿ â ýòîé îáëàñòè + pBtn_YES = pWindow->CreateButton( 486, 445, 75, 33, 1, 0, UIMSG_OnTravelByFoot, 0, 'Y', pWindow->Hint, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); + pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63, 73, 1, 0, UIMSG_OnTravelByFoot, 1, ' ', pWindow->Hint, 0, 0, 0); + pWindow->CreateButton( 8, 8, 460, 344, 1, 0, UIMSG_OnTravelByFoot, 1, 0, pWindow->Hint, 0); break; + case WINDOW_SpellBook: // îêíî êíèãè çàêëîâ InitializeBookTextures(); pWindow->OpenSpellBook(); @@ -1917,10 +1884,10 @@ return pWindow; } //LABEL_62: - pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); - pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); - pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); - pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); + pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, '1', "", 0); + pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, '2', "", 0); + pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, '3', "", 0); + pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, '4', "", 0); pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9u, "", 0); return pWindow; } @@ -1969,12 +1936,10 @@ { pMainScreenNum = pCurrentScreen; pCurrentScreen = SCREEN_INPUT_BLV; - pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_19C, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[34],//Îòìåíà - pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); - pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_TransitionUI_Confirm, 0, 0x59u, pWindow->Hint, - pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); - pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 0x3Fu, 0x49u, 1, 0, UIMSG_TransitionUI_Confirm, 1, 0x20u, pWindow->Hint, 0); - pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, UIMSG_TransitionUI_Confirm, 1u, 0, pWindow->Hint, 0); + pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_19C, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);//Îòìåíà + pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_TransitionUI_Confirm, 0, 'Y', pWindow->Hint, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); + pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 0x3Fu, 0x49u, 1, 0, UIMSG_TransitionUI_Confirm, 1, 0x20u, pWindow->Hint, 0); + pWindow->CreateButton(8, 8, 0x1CCu, 0x158u, 1, 0, UIMSG_TransitionUI_Confirm, 1u, 0, pWindow->Hint, 0); return pWindow; } if (eWindowType == WINDOW_1B) @@ -1988,11 +1953,11 @@ if (eWindowType == WINDOW_Scroll) //goto LABEL_62; { - pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); - pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); - pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); - pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); - pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9u, "", 0); + pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, '1', "", 0); + pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, '2', "", 0); + pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, '3', "", 0); + pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, '4', "", 0); + pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); return pWindow; } if (eWindowType == WINDOW_CastSpell_InInventory)
--- a/GUIWindow.h Wed May 01 14:30:02 2013 +0200 +++ b/GUIWindow.h Wed May 01 17:31:10 2013 +0200 @@ -262,7 +262,7 @@ WINDOW_Book = 0x9, WINDOW_Dialogue = 0xA, WINDOW_QuickReference = 12, - WINDOW_Rest = 0x10, + WINDOW_Rest = 16, WINDOW_ChangeLocation = 17, WINDOW_SpellBook = 0x12, WINDOW_GreetingNPC = 19,
--- a/Texture.cpp Wed May 01 14:30:02 2013 +0200 +++ b/Texture.cpp Wed May 01 17:31:10 2013 +0200 @@ -43,11 +43,6 @@ Texture *pTex_tab_an_7b__zoot_on; Texture *pTex_tab_an_6b__zoom_on; Texture *pTexture_TownPortalIcons[6]; // [0]Harmonale, [1]Pierpont, [2]Nighon, [3]Evenmorn Island, [4]Celestia, [5]The Pit -//Texture *pTexture_TownPortalElf; -//Texture *pTexture_TownPortalWarlock; -//Texture *pTexture_TownPortalIsland; -//Texture *pTexture_TownPortalHeaven; -//Texture *pTexture_TownPortalHell; Texture *dword_5063D8[12]; Texture *dword_506408[12]; Texture *pTexture_50643C; // idb @@ -186,15 +181,6 @@ unsigned int uTextureID_507C50; // weak unsigned int uTextureID_507C54; // weak unsigned int uTextureID_507C58; // weak -unsigned int uTextureID_ControlBG[23]; -//unsigned int uTextureID_Con_Smoo[3]; // weak -//unsigned int uTextureID_Con_ArrL; // weak -//unsigned int uTextureID_Con_ArrR; // weak -//unsigned int uTextureID_Option04; // weak -//unsigned int pTextureIDs_SoundLevels[10]; -//unsigned int uTextureID_Option03; // weak -//unsigned int uTextureID_Option01; -//unsigned int uTextureID_Option02; // weak unsigned int uTextureID_detaliz_close_button; // weak
--- a/Texture.h Wed May 01 14:30:02 2013 +0200 +++ b/Texture.h Wed May 01 17:31:10 2013 +0200 @@ -145,11 +145,7 @@ extern Texture *pTex_tab_an_7b__zoot_on; extern Texture *pTex_tab_an_6b__zoom_on; extern Texture *pTexture_TownPortalIcons[]; // [0]Harmonale, [1]Pierpont, [2]Nighon, [3]Evenmorn Island, [4]Celestia, [5]The Pit -//extern Texture *pTexture_TownPortalElf; -//extern Texture *pTexture_TownPortalWarlock; -//extern Texture *pTexture_TownPortalIsland; -//extern Texture *pTexture_TownPortalHeaven; -//extern Texture *pTexture_TownPortalHell; + extern Texture *dword_5063D8[]; extern Texture *dword_506408[]; extern Texture *pTexture_50643C; // idb @@ -288,15 +284,27 @@ extern unsigned int uTextureID_507C50; // weak extern unsigned int uTextureID_507C54; // weak extern unsigned int uTextureID_507C58; // weak -extern unsigned int uTextureID_ControlBG[23]; // weak -//extern unsigned int uTextureID_Con_Smoo[3]; // weak -//extern unsigned int uTextureID_Con_ArrL; // weak -//extern unsigned int uTextureID_Con_ArrR; // weak -//extern unsigned int uTextureID_Option04; // weak -//extern unsigned int pTextureIDs_SoundLevels[10]; -//extern unsigned int uTextureID_Option03; // weak -//extern unsigned int uTextureID_Option01; -//extern unsigned int uTextureID_Option02; // weak + + +struct OptionsMenuSkin +{ + OptionsMenuSkin(); + void Relaease(); + + unsigned int uTextureID_Background; // 507C60 + unsigned int uTextureID_TurnSpeed[3]; // 507C64 + unsigned int uTextureID_ArrowLeft; // 507C70 + unsigned int uTextureID_ArrowRight; // 507C74 + unsigned int uTextureID_unused_0; // 507C78 + unsigned int uTextureID_unused_1; // 507C7C + unsigned int uTextureID_unused_2; // 507C80 + unsigned int uTextureID_FlipOnExit; // 507C84 + unsigned int uTextureID_SoundLevels[10]; // 507C88 + unsigned int uTextureID_AlwaysRun; // 507CB0 + unsigned int uTextureID_WalkSound; // 507CB4 + unsigned int uTextureID_ShowDamage; // 507CB8 +}; +extern OptionsMenuSkin options_menu_skin; // 507C60 extern unsigned int uTextureID_detaliz_close_button; // weak
--- a/UIBooks.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIBooks.cpp Wed May 01 17:31:10 2013 +0200 @@ -1520,34 +1520,17 @@ //----- (00413CC6) -------------------------------------------------------- -void __thiscall SellectDrawBook(unsigned int uBook) +void DrawCurrentBook(unsigned int uBook) { - enum WindowType pWindowType; // esi@1 - - pWindowType = (enum WindowType)uBook; - pRenderer->DrawTextureIndexed(471u, 445u, (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0)); - switch ( pWindowType ) + pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); + switch ((enum WindowType)uBook) { - case WINDOW_Lloyd: // 177 - DrawLloydBeaconsScreen(); - break; - case WINDOW_TownPortal: //195 - DrawTownPortalScreen(); - break; - case WINDOW_QuestBook: //200 - DrawBook_Quests(); - break; - case WINDOW_AutonotesBook: //201 - DrawBook_Autonotes(); - break; - case WINDOW_MapsBook://202 - DrawBook_Maps(); - break; - case WINDOW_CalendarBook://203 - DrawBook_Calendar(); - break; - case WINDOW_HistoryBook://224 - DrawBook_History(); - break; + case WINDOW_Lloyd: DrawLloydBeaconsScreen(); break; + case WINDOW_TownPortal: DrawTownPortalScreen(); break; + case WINDOW_QuestBook: DrawBook_Quests(); break; + case WINDOW_AutonotesBook: DrawBook_Autonotes(); break; + case WINDOW_MapsBook: DrawBook_Maps(); break; + case WINDOW_CalendarBook: DrawBook_Calendar(); break; + case WINDOW_HistoryBook: DrawBook_History(); break; } }
--- a/UICharacter.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UICharacter.cpp Wed May 01 17:31:10 2013 +0200 @@ -150,7 +150,7 @@ v79 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0); pPlayer = &pParty->pPlayers[v1-1]; v3 = pIcons_LOD->LoadTexture("fr_skill", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(v3)); v4 = v79; if ( !pPlayer->uSkillPoints ) v4 = 65535; @@ -579,7 +579,7 @@ //v1 = uPlayerID; v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); award_texture_id = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(award_texture_id != -1 ? &pIcons_LOD->pTextures[award_texture_id] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(award_texture_id)); sprintfex(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], v2); sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); strcat(pTmpBuf, Source); @@ -771,11 +771,11 @@ pPlayer = pPlayers[uPlayerID]; v3 = a2; pPlayer2 = pPlayers[uPlayerID]; - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_507958 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507958] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_507958)); if ( v3 ) { v4 = pIcons_LOD->LoadTexture("fr_strip", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(8u, 0x131u, (Texture *)(v4 != -1 ? (int)&pIcons_LOD->pTextures[v4] : 0)); + pRenderer->DrawTextureIndexed(8u, 0x131u, pIcons_LOD->GetTexture(v4)); } uCellID = 0; v26 = (int)pPlayer->pInventoryIndices; @@ -792,8 +792,8 @@ { v6 = pIcons_LOD->LoadTexture(pItemsTable->pItems[pItem->uItemID].pIconName, TEXTURE_16BIT_PALETTE); uTextureId = v6; - v7 = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); - v8 = (v6 != -1 ? pIcons_LOD->pTextures[v6].uTextureWidth : 24); + v7 = pIcons_LOD->GetTexture(v6); + v8 = v7->uTextureWidth; v9 = v7->uTextureHeight; v10 = v7->uTextureWidth; v11 = v7->uTextureWidth; @@ -837,7 +837,7 @@ if ( (unsigned __int8)(v16 & 0xF0) == 32 ) { v20 = "sp28a"; - pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; + pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -857,7 +857,7 @@ if ( (unsigned __int8)(v16 & 0xF0) == 64 ) { v20 = "sp30a"; - pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; + pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -877,7 +877,7 @@ if ( (unsigned __int8)(v16 & 0xF0) == 128 ) { v20 = "sp91a"; - pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; + pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -896,7 +896,7 @@ } } v20 = "sptext01"; - pTexture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v20, TEXTURE_16BIT_PALETTE)]; + pTexture = pIcons_LOD->LoadTexturePtr(v20, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1132,7 +1132,7 @@ sub_419379(); CharacterUI_StatsTab_Draw(uPlayerIdx); v7 = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); - pTexture = (Texture *)(v7 != -1 ? (int)&pIcons_LOD->pTextures[v7] : 0); + pTexture = pIcons_LOD->GetTexture(v7); pButton = pCharacterScreen_StatsBtn; pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); break; @@ -1145,7 +1145,7 @@ sub_419379(); CharacterUI_SkillsTab_Draw(uPlayerIdx); v6 = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); - pTexture = (Texture *)(v6 != -1 ? (int)&pIcons_LOD->pTextures[v6] : 0); + pTexture = pIcons_LOD->GetTexture(v6); pButton = pCharacterScreen_SkillsBtn; pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); break; @@ -1155,7 +1155,7 @@ sub_419220(); CharacterUI_AwardsTab_Draw(uPlayerIdx); v5 = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); - pTexture = (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0); + pTexture = pIcons_LOD->GetTexture(v5); pButton = pCharacterScreen_AwardsBtn; pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); break; @@ -1164,7 +1164,7 @@ sub_419379(); CharacterUI_InventoryTab_Draw(uPlayerIdx, 0); v2 = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); - pTexture = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0); + pTexture = pIcons_LOD->GetTexture(v2); pButton = pCharacterScreen_InventoryBtn; pRenderer->DrawTextureIndexed(pButton->uX, pButton->uY, pTexture); break; @@ -1347,17 +1347,14 @@ pRenderer->DrawTextureIndexed(0x1D3u, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Ïîäëîæêà if ( IsPlayerWearingWatersuit[uPlayerID] )//àêâàëàíã { - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, - (Texture *)(papredoll_dbods[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbods[uPlayerID - 1]] : 0)); + pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, - (Texture *)(papredoll_dbods[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbods[uPlayerID - 1]] : 0), - pPlayers[uPlayerID]->pEquipment.uArmor); + pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), pPlayers[uPlayerID]->pEquipment.uArmor); v6 = pPlayers[uPlayerID]->pEquipment.uMainHand; if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1) && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], - (Texture *)(papredoll_dlads[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlads[uPlayerID - 1]] : 0)); + pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand; if ( pMainHandNum4 ) { @@ -1372,15 +1369,15 @@ if ( !( item_MainHand4->uAttributes & 0xF0 ) ) { v18 = v14 + 1; - v19 = (char *)&pIcons_LOD->pTextures[v14]; + v19 = (char *)pIcons_LOD->GetTexture(v14); if ( item_MainHand4->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0)); + pRenderer->DrawTransparentRedShade(pX_MainHand4, pY_MainHand4, (Texture *)v19); else { if ( item_MainHand4->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0)); + pRenderer->DrawTextureTransparent(pX_MainHand4, pY_MainHand4, (Texture *)v19); else - pRenderer->DrawTransparentGreenShade(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0)); + pRenderer->DrawTransparentGreenShade(pX_MainHand4, pY_MainHand4, (Texture *)v19); } } if ( item_MainHand4->uAttributes & 0xF0 ) @@ -1393,7 +1390,7 @@ v167 = "sp30a"; if ( (item_MainHand4->uAttributes & 0xF0) == 128 ) v167 = "sp91a"; - v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)]; + v16 = pIcons_LOD->LoadTexturePtr(v167, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1402,10 +1399,10 @@ ptr_50C9A4 = 0; } v17 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_MainHand4, pY_MainHand4, (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0), v16, (signed __int64)v17, 0, 255); + pRenderer->_4A63E6(pX_MainHand4, pY_MainHand4, pIcons_LOD->GetTexture(v14), v16, (signed __int64)v17, 0, 255); } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_MainHand4, pY_MainHand4, (Texture *)(v18 != 0 ? (int)v19 : 0), pMainHandNum4); + pRenderer->DrawMaskToZBuffer(pX_MainHand4, pY_MainHand4, (Texture *)v19, pMainHandNum4); } } else// áåç àêâàëàíãà @@ -1420,14 +1417,14 @@ if ( !(itemBow->uAttributes & 0xF0) )// åñëè íå ïðèìåí¸í çàêë { if ( itemBow->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pBowTextureNum] : 0)); + pRenderer->DrawTransparentRedShade(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum)); else { - v30 = (char *)&pIcons_LOD->pTextures[pBowTextureNum]; + v30 = (char *)pIcons_LOD->GetTexture(pBowTextureNum); if ( !(itemBow->uAttributes & 1) )//íå îïîçíàííûé ëóê çåë¸íûé - pRenderer->DrawTransparentGreenShade(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)v30 : 0)); + pRenderer->DrawTransparentGreenShade(pX_Bow, pY_Bow, (Texture *)v30); else // îïîçíàííûé ëóê - pRenderer->DrawTextureTransparent(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)v30 : 0)); + pRenderer->DrawTextureTransparent(pX_Bow, pY_Bow, (Texture *)v30); } } else @@ -1440,7 +1437,7 @@ v168 = "sp30a"; if ( (itemBow->uAttributes & 0xF0) == 128 ) v168 = "sp91a"; - a2b = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v168, TEXTURE_16BIT_PALETTE)]; + a2b = pIcons_LOD->LoadTexturePtr(v168, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1449,10 +1446,10 @@ ptr_50C9A4 = 0; } v28 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pBowTextureNum] : 0), a2b, (signed __int64)v28, 0, 255); + pRenderer->_4A63E6(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), a2b, (signed __int64)v28, 0, 255); } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, (Texture *)(pBowTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pBowTextureNum] : 0), pBowNum); + pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), pBowNum); } pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// ïîòîì ïëàù if ( pCloakNum ) @@ -1488,9 +1485,9 @@ { v41 = v35 + 1; if ( item_Cloak->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Cloak, pY_Cloak, (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0)); + pRenderer->DrawTransparentRedShade(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35)); else - pRenderer->DrawTextureTransparent(pX_Cloak, pY_Cloak, (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0)); + pRenderer->DrawTextureTransparent(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35)); } else { @@ -1502,7 +1499,7 @@ v169 = "sp30a"; if ( (item_Cloak->uAttributes & 0xF0) == 128 ) v169 = "sp91a"; - v39 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v169, TEXTURE_16BIT_PALETTE)]; + v39 = pIcons_LOD->LoadTexturePtr(v169, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1511,14 +1508,14 @@ ptr_50C9A4 = 0; } v40 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_Cloak, pY_Cloak, (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0), v39, (signed __int64)v40, 0, 255); + pRenderer->_4A63E6(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), v39, (signed __int64)v40, 0, 255); } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_Cloak, pY_Cloak, (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0), pCloakNum); + pRenderer->DrawMaskToZBuffer(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), pCloakNum); } } pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,//ðèñóåòñÿ êóêëà - (Texture *)(papredoll_dbods[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbods[uPlayerID - 1]] : 0)); + pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// ïîòîì áðîíÿ if ( pArmorNum ) { @@ -1550,14 +1547,14 @@ { v53 = v48 + 1; if ( item_Armor->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0)); + pRenderer->DrawTransparentRedShade(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48)); else { v55 = (char *)&pIcons_LOD->pTextures[v48]; if ( !(item_Armor->uAttributes & 1) ) - pRenderer->DrawTransparentGreenShade(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)v55 : 0)); + pRenderer->DrawTransparentGreenShade(pX_Armor, pY_Armor, (Texture *)v55); else - pRenderer->DrawTextureTransparent(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)v55 : 0)); + pRenderer->DrawTextureTransparent(pX_Armor, pY_Armor, (Texture *)v55); } } else @@ -1570,7 +1567,7 @@ v170 = "sp30a"; if ( (item_Armor->uAttributes & 0xF0) == 128 ) v170 = "sp91a"; - v51 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v170, TEXTURE_16BIT_PALETTE)]; + v51 = pIcons_LOD->LoadTexturePtr(v170, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1579,7 +1576,7 @@ ptr_50C9A4 = 0; } v52 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_Armor, pY_Armor, (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0), v51, (signed __int64)v52, 0, 255); + pRenderer->_4A63E6(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48), v51, (signed __int64)v52, 0, 255); } if ( pPlayers[uPlayerID]->pEquipment.uMainHand //äàëåå ïëå÷è áðîíè && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND || @@ -1601,15 +1598,15 @@ if ( !(item_Armor->uAttributes & 0xF0) ) { v98 = v94 + 1; - v99 = (char *)&pIcons_LOD->pTextures[v94]; + v99 = (char *)pIcons_LOD->GetTexture(v94); if ( item_Armor->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_shoulder, pY_shoulder, (Texture *)(v98 != 0 ? (int)v99 : 0)); + pRenderer->DrawTransparentRedShade(pX_shoulder, pY_shoulder, (Texture *)v99); else { if ( item_Armor->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(pX_shoulder, pY_shoulder, (Texture *)(v98 != 0 ? (int)v99 : 0)); + pRenderer->DrawTextureTransparent(pX_shoulder, pY_shoulder, (Texture *)v99); else - pRenderer->DrawTransparentGreenShade(pX_shoulder, pY_shoulder, (Texture *)(v98 != 0 ? (int)v99 : 0)); + pRenderer->DrawTransparentGreenShade(pX_shoulder, pY_shoulder, (Texture *)v99); } } else @@ -1626,7 +1623,7 @@ v173 = "sp30a"; if ( (item_Armor->uAttributes & 0xF0) == 128 ) v173 = "sp91a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)]; + v96 = (char *)pIcons_LOD->LoadTexturePtr(v173, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1635,7 +1632,7 @@ ptr_50C9A4 = 0; } v97 = (double)GetTickCount(); - pRenderer->_4A63E6(pX_shoulder, pY_shoulder, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); + pRenderer->_4A63E6(pX_shoulder, pY_shoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); } } } @@ -1650,15 +1647,15 @@ if ( !(item_Armor->uAttributes & 0xF0) ) { v109 = v94 + 1; - v110 = (char *)&pIcons_LOD->pTextures[v94]; + v110 = (char *)pIcons_LOD->GetTexture(v94); if ( item_Armor->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v109 != 0 ? (int)v110 : 0)); + pRenderer->DrawTransparentRedShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); else { if ( item_Armor->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v109 != 0 ? (int)v110 : 0)); + pRenderer->DrawTextureTransparent(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); else - pRenderer->DrawTransparentGreenShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v109 != 0 ? (int)v110 : 0)); + pRenderer->DrawTransparentGreenShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); } } else @@ -1671,7 +1668,7 @@ v178 = "sp30a"; if ( (item_Armor->uAttributes & 0xF0) == 128 ) v178 = "sp91a"; - v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)]; + v96 = (char *)pIcons_LOD->LoadTexturePtr(v178, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1680,12 +1677,12 @@ ptr_50C9A4 = 0; } v97 = (double)GetTickCount(); - pRenderer->_4A63E6(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); + pRenderer->_4A63E6(pX_ArmorShoulder, pY_ArmorShoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); } } } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_Armor, pY_Armor, (Texture *)(v53 != 0 ? (int)v55 : 0), pArmorNum); + pRenderer->DrawMaskToZBuffer(pX_Armor, pY_Armor, (Texture *)v55, pArmorNum); } } pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;//äàëåå îáóâü @@ -1714,15 +1711,15 @@ if ( !(item_Boot->uAttributes & 0xF0) ) { v65 = v59 + 1; - v66 = (char *)&pIcons_LOD->pTextures[v59]; + v66 = (char *)pIcons_LOD->GetTexture(v59); if ( item_Boot->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0)); + pRenderer->DrawTransparentRedShade(pX_Boot, pY_Boot, (Texture *)v66); else { if ( item_Boot->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0)); + pRenderer->DrawTextureTransparent(pX_Boot, pY_Boot, (Texture *)v66); else - pRenderer->DrawTransparentGreenShade(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0)); + pRenderer->DrawTransparentGreenShade(pX_Boot, pY_Boot, (Texture *)v66); } } else @@ -1735,7 +1732,7 @@ v171 = "sp30a"; if ( (item_Boot->uAttributes & 0xF0) == 128 ) v171 = "sp91a"; - v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)]; + v63 = pIcons_LOD->LoadTexturePtr(v171, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1744,10 +1741,10 @@ ptr_50C9A4 = 0; } v64 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_Boot, pY_Boot, (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0), v63, (signed __int64)v64, 0, 255); + pRenderer->_4A63E6(pX_Boot, pY_Boot, pIcons_LOD->GetTexture(v59), v63, (signed __int64)v64, 0, 255); } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)(v65 != 0 ? (int)v66 : 0), pBootNum); + pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)v66, pBootNum); } } pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand; @@ -1755,7 +1752,7 @@ && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], - (Texture *)(papredoll_dlads[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlads[uPlayerID - 1]] : 0)); + pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// äàëåå ïîÿñ if ( pBeltNum ) { @@ -1783,18 +1780,18 @@ if ( !(item_Belt->uAttributes & 0xF0) ) { v79 = v75 + 1; - v80 = (char *)&pIcons_LOD->pTextures[v75]; + v80 = (char *)pIcons_LOD->GetTexture(v75); if ( item_Belt->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0)); + pRenderer->DrawTransparentRedShade(pX_Belt, pY_Belt, (Texture *)v80); else { if ( item_Belt->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0)); + pRenderer->DrawTextureTransparent(pX_Belt, pY_Belt, (Texture *)v80); else - pRenderer->DrawTransparentGreenShade(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0)); + pRenderer->DrawTransparentGreenShade(pX_Belt, pY_Belt, (Texture *)v80); } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_Belt, pY_Belt, (Texture *)(v79 != 0 ? (int)v80 : 0), pBeltNum); + pRenderer->DrawMaskToZBuffer(pX_Belt, pY_Belt, (Texture *)v80, pBeltNum); } else { @@ -1806,7 +1803,7 @@ v172 = "sp30a"; if ( (item_Belt->uAttributes & 0xF0) == 128 ) v172 = "sp91a"; - v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)]; + v77 = pIcons_LOD->LoadTexturePtr(v172, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1815,7 +1812,7 @@ ptr_50C9A4 = 0; } v78 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_Belt, pY_Belt, (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0), v77, (signed __int64)v78, 0, 255); + pRenderer->_4A63E6(pX_Belt, pY_Belt, pIcons_LOD->GetTexture(v75), v77, (signed __int64)v78, 0, 255); } } } @@ -1827,7 +1824,7 @@ || pItemsTable->pItems[v83].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield ) pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], - (Texture *)(papredoll_dlaus[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlaus[uPlayerID - 1]] : 0)); + pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); } pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;//äàëåå âîðîòíèê ïëàùà if ( pCloakCollarNum ) @@ -1863,13 +1860,13 @@ if ( !(item_CloakCollar->uAttributes & 0xF0) ) { v119 = v116 + 1; - v120 = (char *)&pIcons_LOD->pTextures[v116]; + v120 = (char *)pIcons_LOD->GetTexture(v116); if ( item_CloakCollar->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_CloakCollar, pY_CloakCollar, (Texture *)(v119 != 0 ? (int)v120 : 0)); + pRenderer->DrawTransparentRedShade(pX_CloakCollar, pY_CloakCollar, (Texture *)v120); else - pRenderer->DrawTextureTransparent(pX_CloakCollar, pY_CloakCollar, (Texture *)(v119 != 0 ? (int)v120 : 0)); + pRenderer->DrawTextureTransparent(pX_CloakCollar, pY_CloakCollar, (Texture *)v120); if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_CloakCollar, pY_CloakCollar, (Texture *)(v119 != 0 ? (int)v120 : 0), pCloakCollarNum); + pRenderer->DrawMaskToZBuffer(pX_CloakCollar, pY_CloakCollar, (Texture *)v120, pCloakCollarNum); } else { @@ -1881,7 +1878,7 @@ v179 = "sp30a"; if ( (item_CloakCollar->uAttributes & 0xF0) == 128 ) v179 = "sp91a"; - a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)]; + a2i = pIcons_LOD->LoadTexturePtr(v179, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1890,7 +1887,7 @@ ptr_50C9A4 = 0; } v118 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_CloakCollar, pY_CloakCollar, (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0), a2i, (signed __int64)v118, 0, 255); + pRenderer->_4A63E6(pX_CloakCollar, pY_CloakCollar, pIcons_LOD->GetTexture(v116), a2i, (signed __int64)v118, 0, 255); } } } @@ -1901,7 +1898,7 @@ if ( v122 != pIcons_LOD->FindTextureByName("Pending") ) pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 24], pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uFace - 23], - (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0)); + pIcons_LOD->GetTexture(v122)); } pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;//äàëåå øëåì if ( pHelmNum ) @@ -1945,7 +1942,7 @@ v180 = "sp30a"; if ( (item_Helm->uAttributes & 0xF0) == 128 ) v180 = "sp91a"; - v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)]; + v129 = pIcons_LOD->LoadTexturePtr(v180, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -1954,24 +1951,24 @@ ptr_50C9A4 = 0; } v130 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_Helm, pY_Helm, (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0), v129, (signed __int64)v130, 0, 255); + pRenderer->_4A63E6(pX_Helm, pY_Helm, pIcons_LOD->GetTexture(v127), v129, (signed __int64)v130, 0, 255); } else { v131 = v127 + 1; - v132 = (char *)&pIcons_LOD->pTextures[v127]; + v132 = (char *)pIcons_LOD->GetTexture(v127); if ( item_Helm->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0)); + pRenderer->DrawTransparentRedShade(pX_Helm, pY_Helm, (Texture *)v132); else { if ( item_Helm->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0)); + pRenderer->DrawTextureTransparent(pX_Helm, pY_Helm, (Texture *)v132); else - pRenderer->DrawTransparentGreenShade(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0)); + pRenderer->DrawTransparentGreenShade(pX_Helm, pY_Helm, (Texture *)v132); } } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_Helm, pY_Helm, (Texture *)(v131 != 0 ? (int)v132 : 0), pHelmNum); + pRenderer->DrawMaskToZBuffer(pX_Helm, pY_Helm, (Texture *)v132, pHelmNum); } } pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand @@ -1988,15 +1985,15 @@ if ( !(item_MainHand3->uAttributes & 0xF0) ) { v142 = v138 + 1; - v143 = (char *)&pIcons_LOD->pTextures[v138]; + v143 = (char *)pIcons_LOD->GetTexture(v138); if ( item_MainHand3->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0)); + pRenderer->DrawTransparentRedShade(pX_MainHand3, pY_MainHand3, (Texture *)v143); else { if ( item_MainHand3->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0)); + pRenderer->DrawTextureTransparent(pX_MainHand3, pY_MainHand3, (Texture *)v143); else - pRenderer->DrawTransparentGreenShade(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0)); + pRenderer->DrawTransparentGreenShade(pX_MainHand3, pY_MainHand3, (Texture *)v143); } } else @@ -2009,7 +2006,7 @@ v182 = "sp30a"; if ( (item_MainHand3->uAttributes & 0xF0) == 128 ) v182 = "sp91a"; - v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)]; + v140 = pIcons_LOD->LoadTexturePtr(v182, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -2018,10 +2015,10 @@ ptr_50C9A4 = 0; } v141 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_MainHand3, pY_MainHand3, (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0), v140, (signed __int64)v141, 0, 255); + pRenderer->_4A63E6(pX_MainHand3, pY_MainHand3, pIcons_LOD->GetTexture(v138), v140, (signed __int64)v141, 0, 255); } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)(v142 != 0 ? (int)v143 : 0), pMainHandNum3); + pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)v143, pMainHandNum3); } pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// äàëåå ùèò if ( pShieldNum ) @@ -2061,14 +2058,14 @@ if ( !(item_Shield->uAttributes & 0xF0) ) { if ( item_Shield->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)&pIcons_LOD->pTextures[v153] : 0)); + pRenderer->DrawTransparentRedShade(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153)); else { - v160 = (char *)&pIcons_LOD->pTextures[v153]; + v160 = (char *)pIcons_LOD->GetTexture(v153); if ( !(item_Shield->uAttributes & 1) ) - pRenderer->DrawTransparentGreenShade(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)v160 : 0)); + pRenderer->DrawTransparentGreenShade(pX_Shield, pY_Shield, (Texture *)v160); else - pRenderer->DrawTextureTransparent(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)v160 : 0)); + pRenderer->DrawTextureTransparent(pX_Shield, pY_Shield, (Texture *)v160); } } else @@ -2081,7 +2078,7 @@ v183 = "sp30a"; if ( (item_Shield->uAttributes & 0xF0) == 128 ) v183 = "sp91a"; - v157 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v183, TEXTURE_16BIT_PALETTE)]; + v157 = pIcons_LOD->LoadTexturePtr(v183, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -2090,29 +2087,26 @@ ptr_50C9A4 = 0; } v158 = (double)GetTickCount() * 0.1; - pRenderer->_4A63E6(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)&pIcons_LOD->pTextures[v153] : 0), v157, (signed __int64)v158, 0, 255); + pRenderer->_4A63E6(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), v157, (signed __int64)v158, 0, 255); if ( v245 ) pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], - pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], - (Texture *)(papredoll_dlhs[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlhs[uPlayerID - 1]] : 0)); + pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1])); } if ( !bRingsShownInCharScreen ) - pRenderer->DrawMaskToZBuffer(pX_Shield, pY_Shield, (Texture *)(v153 != -1 ? (int)&pIcons_LOD->pTextures[v153] : 0), pShieldNum); + pRenderer->DrawMaskToZBuffer(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), pShieldNum); } } - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], - (Texture *)(papredoll_drhs[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_drhs[uPlayerID - 1]] : 0)); + pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand; if ( pMainHandNum5 ) { item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum5 - 1]; if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == 4 && !pPlayers[uPlayerID]->pEquipment.uShield ) - pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], - (Texture *)(papredoll_dlhus[uPlayerID - 1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dlhus[uPlayerID - 1]] : 0)); + pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1])); } if ( !bRingsShownInCharScreen )//ðèñîâàíèå ëóïû - pRenderer->DrawTextureTransparent(603, 299, (Texture *)(uTextureID_MAGNIF_B != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_MAGNIF_B] : 0)); - pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0));//îáðàìëåíèå + pRenderer->DrawTextureTransparent(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B)); + pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//îáðàìëåíèå } //----- (0043E825) -------------------------------------------------------- @@ -2120,13 +2114,13 @@ { int v3; // ecx@1 unsigned int pItemTextureNum; // ebx@3 - int v9; // edi@17 + //int v9; // edi@17 char v13; // sf@24 unsigned __int8 v14; // of@24 unsigned int pItemNum; // eax@25 - int v20; // edi@40 - int v21; // eax@41 - int v33; // esi@61 + //int v20; // edi@40 + //int v21; // eax@41 + //int v33; // esi@61 const char *spell_texture_name; // [sp-8h] [bp-38h]@8 Texture *spell_texture; // [sp+10h] [bp-20h]@14 int v41; // [sp+10h] [bp-20h]@26 @@ -2137,10 +2131,9 @@ pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); CharacterUI_DrawPaperdoll(uPlayerID); - pRenderer->DrawTextureTransparent(0x1D9u, 0, (Texture *)(uTextureID_BACKHAND != -1 ? &pIcons_LOD->pTextures[uTextureID_BACKHAND] : 0)); - pRenderer->DrawTextureTransparent(0x1D4u, 0, (Texture *)(uTextureID_right_panel_loop != -1 ? &pIcons_LOD->pTextures[uTextureID_right_panel_loop] : 0)); - pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, - (Texture *)(uTextureID_detaliz_close_button != -1 ? &pIcons_LOD->pTextures[uTextureID_detaliz_close_button] : 0)); + pRenderer->DrawTextureTransparent(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND)); + pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop)); + pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)); v3 = 0; v48 = 0; do @@ -2162,7 +2155,7 @@ spell_texture_name = "sp30a"; if ( (item->uAttributes & 0xF0) == 128 ) spell_texture_name = "sp91a"; - spell_texture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(spell_texture_name, TEXTURE_16BIT_PALETTE)]; + spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -2170,21 +2163,18 @@ item->uAttributes &= 0xFu; ptr_50C9A4 = 0; } - pRenderer->_4A63E6(pX_Ring, pY_Ring, (Texture *)(pItemTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), spell_texture, GetTickCount() * 0.1, 0, 255); + pRenderer->_4A63E6(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum), spell_texture, GetTickCount() * 0.1, 0, 255); } else { - v9 = pItemTextureNum + 1; - if ( item->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); + if (item->Broken()) + pRenderer->DrawTransparentRedShade(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum)); + else if (!item->Identified()) + pRenderer->DrawTransparentGreenShade(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum)); else - { - if ( (item->uAttributes & 1) == 0 ) - pRenderer->DrawTransparentGreenShade(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); - else - pRenderer->DrawTextureTransparent(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); - } - pRenderer->_4A601E(pX_Ring, pY_Ring, (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), pItemNum); + pRenderer->DrawTextureTransparent(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum)); + + pRenderer->_4A601E(pX_Ring, pY_Ring, pIcons_LOD->GetTexture(pItemTextureNum), pItemNum); } } v3++; @@ -2210,7 +2200,7 @@ spell_texture_name = "sp30a"; if ( (item->uAttributes & 0xF0) == 128 ) spell_texture_name = "sp91a"; - spell_texture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(spell_texture_name, TEXTURE_16BIT_PALETTE)]; + spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -2218,25 +2208,18 @@ item->uAttributes &= 0xFu; ptr_50C9A4 = 0; } - pRenderer->_4A63E6(493, 91, (Texture *)(pItemTextureNum != -1 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), spell_texture, GetTickCount() * 0.1, 0, 255); + pRenderer->_4A63E6(493, 91, pIcons_LOD->GetTexture(pItemTextureNum), spell_texture, GetTickCount() * 0.1, 0, 255); } else { - v20 = pItemTextureNum + 1; - if ( item->uAttributes & 2 ) - { - v21 = 9 * pItemTextureNum; - pRenderer->DrawTransparentRedShade(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0)); - } + if (item->Broken()) + pRenderer->DrawTransparentRedShade(493, 91, pIcons_LOD->GetTexture(pItemTextureNum)); + else if (!item->Identified()) + pRenderer->DrawTransparentGreenShade(493, 91, pIcons_LOD->GetTexture(pItemTextureNum)); else - { - v21 = 9 * pItemTextureNum; - if ( !(item->uAttributes & 1) ) - pRenderer->DrawTransparentGreenShade(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0)); - else - pRenderer->DrawTextureTransparent(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0)); - } - pRenderer->_4A601E(493, 91, (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0), v41); + pRenderer->DrawTextureTransparent(493, 91, pIcons_LOD->GetTexture(pItemTextureNum)); + + pRenderer->_4A601E(493, 91, pIcons_LOD->GetTexture(pItemTextureNum), v41); } } pItemNum = pPlayers[uPlayerID]->pEquipment.uGlove; @@ -2246,17 +2229,14 @@ pItemTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE); if ( !(item->uAttributes & 0xF0) ) { - v33 = pItemTextureNum + 1; - if ( item->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); + if (item->Broken()) + pRenderer->DrawTransparentRedShade(586, 88, pIcons_LOD->GetTexture(pItemTextureNum)); + else if (!item->Identified()) + pRenderer->DrawTransparentGreenShade(586, 88, pIcons_LOD->GetTexture(pItemTextureNum)); else - { - if ( !(item->uAttributes & 1) ) - pRenderer->DrawTransparentGreenShade(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); - else - pRenderer->DrawTextureTransparent(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0)); - } - pRenderer->_4A601E(586, 88, (Texture *)(v33 != 0 ? (int)&pIcons_LOD->pTextures[pItemTextureNum] : 0), pItemNum); + pRenderer->DrawTextureTransparent(586, 88, pIcons_LOD->GetTexture(pItemTextureNum)); + + pRenderer->_4A601E(586, 88,pIcons_LOD->GetTexture(pItemTextureNum), pItemNum); } else { @@ -2268,7 +2248,7 @@ spell_texture_name = "sp30a"; if ( (item->uAttributes & 0xF0) == 128 ) spell_texture_name = "sp91a"; - spell_texture = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(spell_texture_name, TEXTURE_16BIT_PALETTE)]; + spell_texture = pIcons_LOD->LoadTexturePtr(spell_texture_name, TEXTURE_16BIT_PALETTE); dword_50C9A8 -= pEventTimer->uTimeElapsed; if ( dword_50C9A8 <= 0 ) { @@ -2797,7 +2777,7 @@ pPlayer = &pParty->pPlayers[uPlayerID-1]; v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(v2)); v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); sprintf(pTmpBuf, "\f%05d", v3); sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]);//^Pi[%s] %s
--- a/UIHouses.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIHouses.cpp Wed May 01 17:31:10 2013 +0200 @@ -2109,8 +2109,8 @@ v9 = pFontCreate->CalcTextHeight(current_npc_text, &w, 13, 0) + 7; } - auto pTex = (uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0); - pRenderer->_4A6A68(8u, 352 - v9, pTex, (pTex ? pTex->uTextureHeight : 26) - v9); + auto pTex = pIcons_LOD->GetTexture(uTextureID_Leather); + pRenderer->_4A6A68(8u, 352 - v9, pTex, pTex->uTextureHeight - v9); pRenderer->DrawTextureIndexed(8u, 347 - v9, pTexture_591428); v10 = FitTextInAWindow(current_npc_text, pOutString, &w, 0xDu, 0); a1.DrawText(pOutString, 13, 354 - v9, 0, v10, 0, 0, 0); @@ -2550,8 +2550,8 @@ pOutString = pFontCreate; pTextHeight = pFontCreate->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0) + 7; } - auto pTex = (uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0); - pRenderer->_4A6A68(8, 352 - pTextHeight, pTex, (pTex ? pTex->uTextureHeight : 26) - pTextHeight); + auto pTex = pIcons_LOD->GetTexture(uTextureID_Leather); + pRenderer->_4A6A68(8, 352 - pTextHeight, pTex, pTex->uTextureHeight - pTextHeight); pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); v63 = FitTextInAWindow(pTmpBuf, pOutString, &dialog_window, 0xCu, 0); window_SpeakInHouse->DrawText(pOutString, 12, 354 - pTextHeight, 0, v63, 0, 0, 0); @@ -2564,8 +2564,8 @@ dialog_window.uFrameZ = 452; v61 = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0); pTextHeight = v61 + 7; - auto pTex = (uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : nullptr); - pRenderer->_4A6A68(8, 352 - (v61 + 7), pTex, (pTex ? pTex->uTextureHeight : 26) - (v61 + 7)); + auto pTex = pIcons_LOD->GetTexture(uTextureID_Leather); + pRenderer->_4A6A68(8, 352 - (v61 + 7), pTex, pTex->uTextureHeight - (v61 + 7)); pRenderer->DrawTextureIndexed(8, 347 - pTextHeight, pTexture_591428); v63 = FitTextInAWindow(pTmpBuf, pFontArrus, &dialog_window, 0xCu, 0); window_SpeakInHouse->DrawText(pFontArrus, 12, 354 - pTextHeight, 0, v63, 0, 0, 0);
--- a/UIMainMenu.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIMainMenu.cpp Wed May 01 17:31:10 2013 +0200 @@ -142,7 +142,7 @@ uTextureID_mhp_red = pIcons_LOD->LoadTexture("mhp_red", TEXTURE_16BIT_PALETTE); uTextureID_mhp_yel = pIcons_LOD->LoadTexture("mhp_yel", TEXTURE_16BIT_PALETTE); uTextureID_Leather = pIcons_LOD->LoadTexture("LEATHER", TEXTURE_16BIT_PALETTE); - pTexture_Leather = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ibground", TEXTURE_16BIT_PALETTE)]; + pTexture_Leather = pIcons_LOD->LoadTexturePtr("ibground", TEXTURE_16BIT_PALETTE); uTextureID_x_x_u = pIcons_LOD->LoadTexture("x_x_u", TEXTURE_16BIT_PALETTE); uTextureID_BUTTDESC2 = pIcons_LOD->LoadTexture("BUTTESC2", TEXTURE_16BIT_PALETTE); uTextureID_x_ok_u = pIcons_LOD->LoadTexture("x_ok_u", TEXTURE_16BIT_PALETTE); @@ -152,10 +152,10 @@ pPrimaryWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); pPrimaryWindow->CreateButton(7u, 8u, 0x1CCu, 0x157u, 1, 0, UIMSG_A, 0, 0, "", 0); - pPrimaryWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 1, 0x31u, "", 0); - pPrimaryWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 2, 0x32u, "", 0); - pPrimaryWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 3, 0x33u, "", 0); - pPrimaryWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 4, 0x34u, "", 0); + pPrimaryWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + pPrimaryWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + pPrimaryWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + pPrimaryWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); pPrimaryWindow->CreateButton(0x18u, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 1u, 0, "", 0); pPrimaryWindow->CreateButton(0x8Bu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 2u, 0, "", 0); pPrimaryWindow->CreateButton(0xFFu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 3u, 0, "", 0); @@ -166,22 +166,22 @@ pPrimaryWindow->CreateButton(0x1BBu, 0x194u, 5u, 0x31u, 1, 93, UIMSG_0, 4u, 0, "", 0); uTextureID_ib_td1_A = pIcons_LOD->LoadTexture("ib-td1-A", TEXTURE_16BIT_PALETTE); - v6 = (Texture *)(uTextureID_ib_td1_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0); + v6 = pIcons_LOD->GetTexture(uTextureID_ib_td1_A); v8 = pKeyActionMap->GetActionVKey(INPUT_Quest); pBtn_Quests = pPrimaryWindow->CreateButton(0x1EBu, 0x161u, v6->uTextureWidth, v6->uTextureHeight, 1, 0, UIMSG_OpenQuestBook, 0, v8, pGlobalTXT_LocalizationStrings[174], v6, 0); //Quests uTextureID_ib_td2_A = pIcons_LOD->LoadTexture("ib-td2-A", TEXTURE_16BIT_PALETTE); - v10 = (Texture *)(uTextureID_ib_td2_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td2_A] : 0); + v10 = pIcons_LOD->GetTexture(uTextureID_ib_td2_A); v12 = pKeyActionMap->GetActionVKey(INPUT_Autonotes); pBtn_Autonotes = pPrimaryWindow->CreateButton(0x20Fu, 0x161u, v10->uTextureWidth, v10->uTextureHeight, 1, 0, UIMSG_OpenAutonotes, 0, v12, pGlobalTXT_LocalizationStrings[154], v10, 0);//Autonotes v14 = pIcons_LOD->LoadTexture("ib-td3-A", TEXTURE_16BIT_PALETTE); - v15 = (Texture *)(v14 != -1 ? &pIcons_LOD->pTextures[v14] : 0); + v15 = pIcons_LOD->GetTexture(v14); v17 = pKeyActionMap->GetActionVKey(INPUT_Mapbook); pBtn_Maps = pPrimaryWindow->CreateButton(0x222u, 0x161u, v15->uTextureWidth, v15->uTextureHeight, 1, 0, UIMSG_OpenMapBook, 0, v17, pGlobalTXT_LocalizationStrings[139], v15, 0); //Maps uTextureID_ib_td4_A = pIcons_LOD->LoadTexture("ib-td4-A", TEXTURE_16BIT_PALETTE); - v20 = (Texture *)(uTextureID_ib_td4_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td4_A] : 0); + v20 = pIcons_LOD->GetTexture(uTextureID_ib_td4_A); v22 = pKeyActionMap->GetActionVKey(INPUT_TimeCal); pBtn_Calendar = pPrimaryWindow->CreateButton(0x23Au, 0x161u, v20->uTextureWidth, v20->uTextureHeight, 1, 0, UIMSG_OpenCalendar, 0, v22, pGlobalTXT_LocalizationStrings[78],//Calendar @@ -189,10 +189,10 @@ uTextureID_ib_td5_A = pIcons_LOD->LoadTexture("ib-td5-A", TEXTURE_16BIT_PALETTE); pBtn_History = pPrimaryWindow->CreateButton(0x258u, 0x169u, - (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureWidth : 24), - (uTextureID_ib_td5_A != -1 ? pIcons_LOD->pTextures[uTextureID_ib_td5_A].uTextureHeight : 26), + pIcons_LOD->GetTexture(uTextureID_ib_td5_A)->uTextureWidth, + pIcons_LOD->GetTexture(uTextureID_ib_td5_A)->uTextureHeight, 1, 0, UIMSG_OpenHistoryBook, 0, 0x48u, pGlobalTXT_LocalizationStrings[602],//History - (Texture *)(uTextureID_ib_td5_A != -1 ? &pIcons_LOD->pTextures[uTextureID_ib_td5_A] : 0), 0); + pIcons_LOD->GetTexture(uTextureID_ib_td5_A), 0); bFlashAutonotesBook = 0; bFlashQuestBook = 0; @@ -207,41 +207,35 @@ pBtn_ZoomOut = pPrimaryWindow->CreateButton(519, 136, v29->uTextureWidth, v29->uTextureHeight, 2, 0, UIMSG_16F, 0, v33, pGlobalTXT_LocalizationStrings[251], // Zoom Out v29, 0); pPrimaryWindow->CreateButton(0x1E1u, 0, 0x99u, 0x43u, 1, 92, UIMSG_0, 0, 0, "", 0); - pPrimaryWindow->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, UIMSG_StartHireling1Dialogue, 0, 0x35u, "", 0); - pPrimaryWindow->CreateButton(0x231u, 0x95u, 0x40u, 0x4Au, 1, 0, UIMSG_StartHireling2Dialogue, 0, 0x36u, "", 0); + pPrimaryWindow->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, UIMSG_StartHireling1Dialogue, 0, '5', "", 0); + pPrimaryWindow->CreateButton(0x231u, 0x95u, 0x40u, 0x4Au, 1, 0, UIMSG_StartHireling2Dialogue, 0, '6', "", 0); pPrimaryWindow->CreateButton(0x1DCu, 0x142u, 0x4Du, 0x11u, 1, 100, UIMSG_0, 0, 0, "", 0); pPrimaryWindow->CreateButton(0x22Bu, 0x142u, 0x4Du, 0x11u, 1, 101, UIMSG_0, 0, 0, "", 0); pBtn_CastSpell = pPrimaryWindow->CreateButton(0x1DCu, 0x1C2u, - (uTextureID_Btn_CastSpell != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_CastSpell].uTextureWidth : 24), - (uTextureID_Btn_CastSpell != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_CastSpell].uTextureHeight : 26), - 1, 0, UIMSG_SpellBookWindow, 0, 0x43u, pGlobalTXT_LocalizationStrings[38], - (Texture *)(uTextureID_Btn_CastSpell != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_CastSpell] : 0), + pIcons_LOD->GetTexture(uTextureID_Btn_CastSpell)->uTextureWidth, + pIcons_LOD->GetTexture(uTextureID_Btn_CastSpell)->uTextureHeight, + 1, 0, UIMSG_SpellBookWindow, 0, 0x43u, pGlobalTXT_LocalizationStrings[38], pIcons_LOD->GetTexture(uTextureID_Btn_CastSpell), 0); pBtn_Rest = pPrimaryWindow->CreateButton(0x206u, 0x1C2u, - (uTextureID_Btn_Rest != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_Rest].uTextureWidth : 24), - (uTextureID_Btn_Rest != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_Rest].uTextureHeight : 26), - 1, 0, UIMSG_RestWindow, 0, 0x52u, pGlobalTXT_LocalizationStrings[182], - (Texture *)(uTextureID_Btn_Rest != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_Rest] : 0), 0); + pIcons_LOD->GetTexture(uTextureID_Btn_Rest)->uTextureWidth, + pIcons_LOD->GetTexture(uTextureID_Btn_Rest)->uTextureHeight, + 1, 0, UIMSG_RestWindow, 0, 0x52u, pGlobalTXT_LocalizationStrings[182], pIcons_LOD->GetTexture(uTextureID_Btn_Rest), 0); pBtn_QuickReference = pPrimaryWindow->CreateButton(0x230u, 0x1C2u, - (uTextureID_Btn_QuickReference != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_QuickReference].uTextureWidth : 24), - (uTextureID_Btn_QuickReference != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_QuickReference].uTextureHeight : 26), - 1, 0, UIMSG_QuickReference, 0, 0x5Au, pGlobalTXT_LocalizationStrings[173], - (Texture *)(uTextureID_Btn_QuickReference != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_QuickReference] : 0), 0); + pIcons_LOD->GetTexture(uTextureID_Btn_QuickReference)->uTextureWidth, + pIcons_LOD->GetTexture(uTextureID_Btn_QuickReference)->uTextureHeight, + 1, 0, UIMSG_QuickReference, 0, 0x5Au, pGlobalTXT_LocalizationStrings[173], pIcons_LOD->GetTexture(uTextureID_Btn_QuickReference), 0); pBtn_GameSettings = pPrimaryWindow->CreateButton(0x25Au, 0x1C2u, - (uTextureID_Btn_GameSettings != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_GameSettings].uTextureWidth : 24), - (uTextureID_Btn_GameSettings != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_GameSettings].uTextureHeight : 26), - 1, 0, UIMSG_GameMenuButton, 0, 0, pGlobalTXT_LocalizationStrings[93], - (Texture *)(uTextureID_Btn_GameSettings != -1 ? &pIcons_LOD->pTextures[uTextureID_Btn_GameSettings] : 0), 0); + pIcons_LOD->GetTexture(uTextureID_Btn_GameSettings)->uTextureWidth, + pIcons_LOD->GetTexture(uTextureID_Btn_GameSettings)->uTextureHeight, + 1, 0, UIMSG_GameMenuButton, 0, 0, pGlobalTXT_LocalizationStrings[93], pIcons_LOD->GetTexture(uTextureID_Btn_GameSettings), 0); pBtn_NPCLeft = pPrimaryWindow->CreateButton(0x1D5u, 0xB2u, - (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureWidth : 24), - (uTextureID_Btn_NPCLeft != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCLeft].uTextureHeight : 26), - 1, 0, UIMSG_ScrollNPCPanel, 0, 0, "", - pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft), 0); + pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft)->uTextureWidth, + pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft)->uTextureHeight, + 1, 0, UIMSG_ScrollNPCPanel, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_Btn_NPCLeft), 0); pBtn_NPCRight = pPrimaryWindow->CreateButton(0x272u, 0xB2u, - (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureWidth : 24), - (uTextureID_Btn_NPCRight != -1 ? pIcons_LOD->pTextures[uTextureID_Btn_NPCRight].uTextureHeight : 26), - 1, 0, UIMSG_ScrollNPCPanel, 1u, 0, "", - pIcons_LOD->GetTexture(uTextureID_Btn_NPCRight), 0); + pIcons_LOD->GetTexture(uTextureID_Btn_NPCRight)->uTextureWidth, + pIcons_LOD->GetTexture(uTextureID_Btn_NPCRight)->uTextureHeight, + 1, 0, UIMSG_ScrollNPCPanel, 1u, 0, "", pIcons_LOD->GetTexture(uTextureID_Btn_NPCRight), 0); LoadPartyBuffIcons(); }
--- a/UIOptions.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIOptions.cpp Wed May 01 17:31:10 2013 +0200 @@ -45,6 +45,12 @@ + +OptionsMenuSkin options_menu_skin; // 507C60 + + + + //----- (004142D3) -------------------------------------------------------- char __cdecl GameMenuUI_DrawKeyBindings() { @@ -108,11 +114,8 @@ const char *v57; // ST0C_4@17 unsigned int v58; // eax@17 unsigned int v59; // eax@18 - int v61; // [sp-14h] [bp-28h]@16 + //int v61; // [sp-14h] [bp-28h]@16 const char *v62; // [sp-10h] [bp-24h]@16 - int v63; // [sp-Ch] [bp-20h]@16 - int v64; // [sp-8h] [bp-1Ch]@16 - unsigned int v65; // [sp-4h] [bp-18h]@16 unsigned int a5; // [sp+10h] [bp-4h]@1 v0 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); @@ -158,135 +161,130 @@ dword_506E68 = -1; v3->field_40 = 0; } - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Optkb[0] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[0]] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Optkb[0])); if ( KeyboardPageNum == 1 ) - { - pRenderer->DrawTextureIndexed(0x13, 0x12E, (Texture *)(uTextureID_Optkb[3] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[3]] : 0)); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2D5C, 0, 0, 0); + { + pRenderer->DrawTextureIndexed(0x13, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[3])); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, "ÂÏÅШÄ", 0, 0, 0); v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]); v7 = sub_414D24(0); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v7, v6, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2D50, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, "ÍÀÇÀÄ", 0, 0, 0); v8 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]); v9 = sub_414D24(1); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v9, v8, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2D48, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, "ÂËÅÂÎ", 0, 0, 0); v10 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]); v11 = sub_414D24(2); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v11, v10, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2D40, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, "ÂÏÐÀÂÎ", 0, 0, 0); v12 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]); v13 = sub_414D24(3); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v13, v12, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2D38, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, "ÊÐÈÊ", 0, 0, 0); v14 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]); v15 = sub_414D24(4); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v15, v14, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2D30, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, "ÏÐÛÆÎÊ", 0, 0, 0); v16 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]); v17 = sub_414D24(5); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v17, v16, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2D28, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, "Ï.ÐÅÆÈÌ", 0, 0, 0); v18 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]); v19 = sub_414D24(6); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v19, v18, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2D1C, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, "ÏÐÈÌ. ÇÀÊË.", 0, 0, 0); v20 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]); v21 = sub_414D24(7); v22 = 350; pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v21, v20, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2D14, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, "ÀÒÀÊÀ", 0, 0, 0); v23 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]); v24 = sub_414D24(8); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v24, v23, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2D0C, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, "ÄÅÉÑÒÂ.", 0, 0, 0); v25 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]); v26 = sub_414D24(9); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v26, v25, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2D04, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, "ÇÀÊËÈÍ.", 0, 0, 0); v27 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]); v28 = sub_414D24(10); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v28, v27, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2CFC, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, "ÈÃÐÎÊ", 0, 0, 0); v29 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]); v30 = sub_414D24(11); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v30, v29, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2CF0, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, "ÑËÅÄ. ÈÃÐÎÊ", 0, 0, 0); v31 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]); v32 = sub_414D24(12); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v32, v31, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2CE8, 0, 0, 0); - v65 = 0; - v64 = 0; - v63 = 0; + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, "ÇÀÄÀÍÈß", 0, 0, 0); + v62 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]); - v61 = 13; + v59 = sub_414D24(13); } else { - pRenderer->DrawTextureIndexed(0x7F, 0x12E, (Texture *)(uTextureID_Optkb[4] != -1 ? &pIcons_LOD->pTextures[uTextureID_Optkb[4]] : 0)); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2CDC, 0, 0, 0); + pRenderer->DrawTextureIndexed(0x7F, 0x12E, pIcons_LOD->GetTexture(uTextureID_Optkb[4])); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, "Á. ÑÏÐÀÂÊÀ", 0, 0, 0); v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]); v34 = sub_414D24(14); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v34, v33, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2CD4, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, "ÎÒÄÛÕ", 0, 0, 0); v35 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]); v36 = sub_414D24(15); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v36, v35, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2CC8, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, "ÒÅÊ. ÂÐÅÌß", 0, 0, 0); v37 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]); v38 = sub_414D24(16); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v38, v37, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2CBC, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, "ÀÂÒÎÇÀÌÅÒÊÈ", 0, 0, 0); v39 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]); v40 = sub_414D24(17); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v40, v39, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2CB0, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, "ÊÀÐÒÀ", 0, 0, 0); v41 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]); v42 = sub_414D24(18); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v42, v41, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2CA4, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, "ÁÅÆÀÒÜ", 0, 0, 0); v43 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]); v44 = sub_414D24(19); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v44, v43, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2C9C, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, "ÑÌ. ÂÂÅÐÕ", 0, 0, 0); v45 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]); v46 = sub_414D24(20); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v46, v45, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2C90, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, "ÑÌ. ÂÍÈÇ", 0, 0, 0); v47 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]); v48 = sub_414D24(21); v22 = 350; pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v48, v47, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2C84, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, "ÑÌ. ÂÏÅШÄ", 0, 0, 0); v49 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]); v50 = sub_414D24(22); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v50, v49, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2C7C, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, "ÏÐÈÁËÈÇ", 0, 0, 0); v51 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]); v52 = sub_414D24(23); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v52, v51, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2C70, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, "ÎÒÄÀËÈÒÜ", 0, 0, 0); v53 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]); v54 = sub_414D24(24); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v54, v53, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2C68, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, "Ï. ÂÂÅÐÕ", 0, 0, 0); v55 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]); v56 = sub_414D24(25); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v56, v55, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2C5C, 0, 0, 0); + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, "Ï. ÂÍÈÇ", 0, 0, 0); v57 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]); v58 = sub_414D24(26); pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v58, v57, 0, 0, 0); - pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2C54, 0, 0, 0); - v65 = 0; - v64 = 0; - v63 = 0; + pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, "ÏÐÈÇÅÌË", 0, 0, 0); + v62 = pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]); - v61 = 27; + v59 = sub_414D24(27); } - v59 = sub_414D24(v61); - return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, v63, v64, v65); + return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, 0, 0, 0); } @@ -316,31 +314,25 @@ } return result; } -// 506E68: using guessed type int dword_506E68; -// 506E6C: using guessed type __int16 word_506E6C[18]; -// 507C08: using guessed type int dword_507C08; //----- (00414D9A) -------------------------------------------------------- -void __cdecl GameMenuUI_DrawVideoOptions() - { +void GameMenuUI_DrawVideoOptions() +{ const char *v0; // ST0C_4@3 unsigned __int16 v1; // ax@3 - int v2; // eax@10 + //int v2; // eax@10 GUIWindow v3; // [sp+8h] [bp-54h]@3 - pRenderer->DrawTextureIndexed( - 8u, - 8u, - (Texture *)(uTextureID_507C10 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C10] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_507C10)); if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() ) { pRenderer->DrawTextureIndexed( 17 * uGammaPos + 42, - 162u, - (Texture *)(pTextureIDs_GammaPositions[uGammaPos] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_GammaPositions[uGammaPos]] : 0)); + 162, + pIcons_LOD->GetTexture(pTextureIDs_GammaPositions[uGammaPos])); pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40); v3.uFrameX = 22; - v0 = pGlobalTXT_LocalizationStrings[226]; + v0 = pGlobalTXT_LocalizationStrings[226]; // "Gamma controls the relative ""brightness"" of the game. May vary depending on your monitor." v3.uFrameY = 190; v3.uFrameWidth = 211; v3.uFrameHeight = 79; @@ -349,69 +341,92 @@ v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); v3.DrawTitleText(pFontSmallnum, 0, 0, v1, v0, 3u); } - if ( !pRenderer->pRenderD3D ) - { - pRenderer->DrawTextureIndexed( - 0x14u, - 0x119u, - (Texture *)(uTextureID_507C50 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C50] : 0)); - pRenderer->DrawTextureIndexed( - 0x14u, - 0x12Fu, - (Texture *)(uTextureID_507C54 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C54] : 0)); - v2 = uTextureID_507C58; - goto LABEL_12; - } - if ( pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS ) - pRenderer->DrawTextureIndexed( - 0x14u, - 0x119u, - (Texture *)(uTextureID_507C14 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C14] : 0)); - if ( pRenderer->bUseColoredLights ) - pRenderer->DrawTextureIndexed( - 0x14u, - 0x12Fu, - (Texture *)(uTextureID_507C18 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C18] : 0)); - if ( pRenderer->bTinting ) - { - v2 = uTextureID_507C1C; -LABEL_12: - pRenderer->DrawTextureIndexed(0x14u, 0x145u, (Texture *)(v2 != -1 ? &pIcons_LOD->pTextures[v2] : 0)); - } + + if (!pRenderer->pRenderD3D) + { + pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C50)); + pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C54)); + pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C58)); } + else + { + if (pGame->uFlags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS) + pRenderer->DrawTextureIndexed(20, 281, pIcons_LOD->GetTexture(uTextureID_507C14)); + if (pRenderer->bUseColoredLights) + pRenderer->DrawTextureIndexed(20, 303, pIcons_LOD->GetTexture(uTextureID_507C18)); + if (pRenderer->bTinting) + pRenderer->DrawTextureIndexed(20, 325, pIcons_LOD->GetTexture(uTextureID_507C1C)); + } +} //----- (00414F82) -------------------------------------------------------- -void __cdecl DrawGameOptions() - { - signed int v0; // eax@1 +void DrawGameOptions() +{ + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Options)); + pRenderer->DrawTextureIndexed(8, 132, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_Background)); + + switch (uTurnSpeed) + { + default: pRenderer->DrawTextureIndexed(BtnTurnCoord[0], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])); + case 64: pRenderer->DrawTextureIndexed(BtnTurnCoord[1], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])); + case 128: pRenderer->DrawTextureIndexed(BtnTurnCoord[2], 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])); + } + + if (bWalkSound) pRenderer->DrawTextureIndexed( 20, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound)); + if (bShowDamage) pRenderer->DrawTextureIndexed(128, 303, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage)); + if (bFlipOnExit) pRenderer->DrawTextureIndexed(128, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit)); + if (bAlwaysRun) pRenderer->DrawTextureIndexed( 20, 325, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun)); + + pRenderer->DrawTextureIndexed(265 + 17 * uSoundVolumeMultiplier, 162, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uSoundVolumeMultiplier])); + pRenderer->DrawTextureIndexed(265 + 17 * uMusicVolimeMultiplier, 216, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uMusicVolimeMultiplier])); + pRenderer->DrawTextureIndexed(265 + 17 * uVoicesVolumeMultiplier, 270, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_SoundLevels[uVoicesVolumeMultiplier])); +} + + + + + + + + + - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_Options != -1 ? &pIcons_LOD->pTextures[uTextureID_Options] : 0)); - pRenderer->DrawTextureIndexed(8, 132, (Texture *)(uTextureID_ControlBG[0] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[0]] : 0)); - v0 = 0; - if ( uTurnSpeed == 128 ) - { - v0 = 2; - } - else - { - if ( uTurnSpeed == 64 ) - v0 = 1; - } - pRenderer->DrawTextureIndexed(BtnTurnCoord[v0], 270, (Texture *)(uTextureID_ControlBG[v0 + 1] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[v0 + 1]] : 0)); - if ( bWalkSound ) - pRenderer->DrawTextureIndexed(20, 303, (Texture *)(uTextureID_ControlBG[21] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[21]] : 0)); - if ( bShowDamage ) - pRenderer->DrawTextureIndexed(128, 303, (Texture *)(uTextureID_ControlBG[22] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[22]] : 0)); - if ( bFlipOnExit ) - pRenderer->DrawTextureIndexed(128, 325, (Texture *)(uTextureID_ControlBG[9] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[9]] : 0)); - if ( bAlwaysRun ) - pRenderer->DrawTextureIndexed(20, 325, (Texture *)(uTextureID_ControlBG[20] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[20]] : 0)); - pRenderer->DrawTextureIndexed(17 * (char)uSoundVolumeMultiplier + 265, 162, - (Texture *)(uTextureID_ControlBG[(char)uSoundVolumeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uSoundVolumeMultiplier + 10]] : 0)); - pRenderer->DrawTextureIndexed(17 * (char)uMusicVolimeMultiplier + 265, 216, - (Texture *)(uTextureID_ControlBG[(char)uMusicVolimeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uMusicVolimeMultiplier + 10]] : 0)); - pRenderer->DrawTextureIndexed(17 * (char)uVoicesVolumeMultiplier + 265, 270, - (Texture *)(uTextureID_ControlBG[(char)uVoicesVolumeMultiplier + 10] != -1 ? &pIcons_LOD->pTextures[uTextureID_ControlBG[(char)uVoicesVolumeMultiplier + 10]] : 0)); - } \ No newline at end of file +OptionsMenuSkin::OptionsMenuSkin(): + uTextureID_Background(0), + uTextureID_ArrowLeft(0), + uTextureID_ArrowRight(0), + uTextureID_unused_0(0), uTextureID_unused_1(0), uTextureID_unused_2(0), + uTextureID_FlipOnExit(0), + uTextureID_AlwaysRun(0), + uTextureID_WalkSound(0), + uTextureID_ShowDamage(0) +{ + for (uint i = 0; i < 3; ++i) uTextureID_TurnSpeed[i] = 0; + for (uint i = 0; i < 10; ++i) uTextureID_SoundLevels[i] = 0; +} + +void OptionsMenuSkin::Relaease() +{ + #define RELEASE(id) \ + {\ + if (id)\ + pIcons_LOD->GetTexture(id)->Release();\ + id = 0;\ + } + + RELEASE(uTextureID_Background); + for (uint i = 0; i < 3; ++i) + RELEASE(uTextureID_TurnSpeed[i]); + RELEASE(uTextureID_ArrowLeft); + RELEASE(uTextureID_ArrowRight); + RELEASE(uTextureID_FlipOnExit); + for (uint i = 0; i < 10; ++i) + RELEASE(uTextureID_SoundLevels[i]); + RELEASE(uTextureID_AlwaysRun); + RELEASE(uTextureID_WalkSound); + RELEASE(uTextureID_ShowDamage); + + #undef RELEASE +}
--- a/UIPartyCreation.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIPartyCreation.cpp Wed May 01 17:31:10 2013 +0200 @@ -563,8 +563,8 @@ unsigned int v0; // ebx@5 unsigned int v1; // eax@6 int v2; // ecx@6 - unsigned int v3; // eax@8 - signed int v4; // ecx@8 + //unsigned int v3; // eax@8 + //signed int v4; // ecx@8 signed int uControlParam; // [sp+10h] [bp-Ch]@7 unsigned int uControlParama; // [sp+10h] [bp-Ch]@9 unsigned int uControlParamb; // [sp+10h] [bp-Ch]@11 @@ -605,70 +605,73 @@ pPlayerPortraits[uX] = &pIcons_LOD->pTextures[v1]; } - pTexture_PlayerFaceMask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("FACEMASK", TEXTURE_16BIT_PALETTE)]; - pTexture_buttminu = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttminu", TEXTURE_16BIT_PALETTE)]; - pTexture_buttplus = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttplus", TEXTURE_16BIT_PALETTE)]; - pTexture_pressrigh = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presrigh", TEXTURE_16BIT_PALETTE)]; - pTexture_presleft = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presleft", TEXTURE_16BIT_PALETTE)]; + pTexture_PlayerFaceMask = pIcons_LOD->LoadTexturePtr("FACEMASK", TEXTURE_16BIT_PALETTE); + pTexture_buttminu = pIcons_LOD->LoadTexturePtr("buttminu", TEXTURE_16BIT_PALETTE); + pTexture_buttplus = pIcons_LOD->LoadTexturePtr("buttplus", TEXTURE_16BIT_PALETTE); + pTexture_pressrigh = pIcons_LOD->LoadTexturePtr("presrigh", TEXTURE_16BIT_PALETTE); + pTexture_presleft = pIcons_LOD->LoadTexturePtr("presleft", TEXTURE_16BIT_PALETTE); uControlParam = 1; do { sprintf(pTmpBuf, "arrowl%d", uControlParam); - pTextures_arrowl[uControlParam] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)]; + pTextures_arrowl[uControlParam] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); + sprintf(pTmpBuf, "arrowr%d", uControlParam); - v3 = pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE); - v4 = uControlParam++; - pTextures_arrowr[v4] = &pIcons_LOD->pTextures[v3]; + pTextures_arrowr[uControlParam] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); } - while ( uControlParam < 20 ); + while ( ++uControlParam < 20 ); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); uControlParama = 0; uXa = 8; do { - pGUIWindow_CurrentMenu->CreateButton(uXa, 120u, 145u, 25u, 1, 0, UIMSG_PlayerCreationChangeName, uControlParama, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uXa, 120, 145, 25, 1, 0, UIMSG_PlayerCreationChangeName, uControlParama, 0, "", 0); uXa += 158; ++uControlParama; } while ( (signed int)uXa < 640 ); - pCreationUI_BtnPressLeft[0] = pGUIWindow_CurrentMenu->CreateButton(10, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 0, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressLeft[1] = pGUIWindow_CurrentMenu->CreateButton(169, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 1, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressLeft[2] = pGUIWindow_CurrentMenu->CreateButton(327, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 2, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressLeft[3] = pGUIWindow_CurrentMenu->CreateButton(486, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 3, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressRight[0] = pGUIWindow_CurrentMenu->CreateButton(74, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 0, 0, "", pTexture_pressrigh, 0); - pCreationUI_BtnPressRight[1] = pGUIWindow_CurrentMenu->CreateButton(233, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 1, 0, "", pTexture_pressrigh, 0); - pCreationUI_BtnPressRight[2] = pGUIWindow_CurrentMenu->CreateButton(391, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 2, 0, "", pTexture_pressrigh, 0); - pCreationUI_BtnPressRight[3] = pGUIWindow_CurrentMenu->CreateButton(549, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 3, 0, "", pTexture_pressrigh, 0); - pCreationUI_BtnPressLeft2[0] = pGUIWindow_CurrentMenu->CreateButton(10, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 0, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressLeft2[1] = pGUIWindow_CurrentMenu->CreateButton(169, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 1, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressLeft2[2] = pGUIWindow_CurrentMenu->CreateButton(327, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 2, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressLeft2[3] = pGUIWindow_CurrentMenu->CreateButton(486, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 3, 0, "", pTexture_presleft, 0); - pCreationUI_BtnPressRight2[0] = pGUIWindow_CurrentMenu->CreateButton(74, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoiceNext, 0, 0, "", pTexture_pressrigh, 0); + + pCreationUI_BtnPressLeft[0] = pGUIWindow_CurrentMenu->CreateButton( 10, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 0, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressLeft[1] = pGUIWindow_CurrentMenu->CreateButton(169, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 1, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressLeft[2] = pGUIWindow_CurrentMenu->CreateButton(327, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 2, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressLeft[3] = pGUIWindow_CurrentMenu->CreateButton(486, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FacePrev, 3, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressRight[0] = pGUIWindow_CurrentMenu->CreateButton( 74, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 0, 0, "", pTexture_pressrigh, 0); + pCreationUI_BtnPressRight[1] = pGUIWindow_CurrentMenu->CreateButton(233, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 1, 0, "", pTexture_pressrigh, 0); + pCreationUI_BtnPressRight[2] = pGUIWindow_CurrentMenu->CreateButton(391, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 2, 0, "", pTexture_pressrigh, 0); + pCreationUI_BtnPressRight[3] = pGUIWindow_CurrentMenu->CreateButton(549, 32, 11, 13, 1, 0, UIMSG_PlayerCreation_FaceNext, 3, 0, "", pTexture_pressrigh, 0); + pCreationUI_BtnPressLeft2[0] = pGUIWindow_CurrentMenu->CreateButton( 10, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 0, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressLeft2[1] = pGUIWindow_CurrentMenu->CreateButton(169, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 1, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressLeft2[2] = pGUIWindow_CurrentMenu->CreateButton(327, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 2, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressLeft2[3] = pGUIWindow_CurrentMenu->CreateButton(486, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoicePrev, 3, 0, "", pTexture_presleft, 0); + pCreationUI_BtnPressRight2[0] = pGUIWindow_CurrentMenu->CreateButton( 74, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoiceNext, 0, 0, "", pTexture_pressrigh, 0); pCreationUI_BtnPressRight2[1] = pGUIWindow_CurrentMenu->CreateButton(233, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoiceNext, 1, 0, "", pTexture_pressrigh, 0); pCreationUI_BtnPressRight2[2] = pGUIWindow_CurrentMenu->CreateButton(391, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoiceNext, 2, 0, "", pTexture_pressrigh, 0); pCreationUI_BtnPressRight2[3] = pGUIWindow_CurrentMenu->CreateButton(549, 103, 11, 13, 1, 0, UIMSG_PlayerCreation_VoiceNext, 3, 0, "", pTexture_pressrigh, 0); + uControlParamb = 0; uXb = 8; do { - pGUIWindow_CurrentMenu->CreateButton(uXb, 308, 150, v0, 1, 0, UIMSG_48, uControlParamb, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXb, v0 + 308, 150, v0, 1, 0, UIMSG_49, uControlParamb, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXb, 2 * v0 + 308, 150u, v0, 1, 0, UIMSG_PlayerCreationRemoveUpSkill, uControlParamb, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXb, 3 * v0 + 308, 150u, v0, 1, 0, UIMSG_PlayerCreationRemoveDownSkill, uControlParamb, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uXb, 308, 150, v0, 1, 0, UIMSG_48, uControlParamb, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uXb, v0 + 308, 150, v0, 1, 0, UIMSG_49, uControlParamb, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uXb, 2 * v0 + 308, 150, v0, 1, 0, UIMSG_PlayerCreationRemoveUpSkill, uControlParamb, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uXb, 3 * v0 + 308, 150, v0, 1, 0, UIMSG_PlayerCreationRemoveDownSkill, uControlParamb, 0, "", 0); uXb += 158; ++uControlParamb; } while ( (signed int)uXb < 640 ); - pGUIWindow_CurrentMenu->CreateButton(5u, 21u, 0x99u, 0x16Du, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 0, 0x31u, "", 0); - pGUIWindow_CurrentMenu->CreateButton(163u, 21u, 0x99u, 0x16Du, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 1u, 0x32u, "", 0); - pGUIWindow_CurrentMenu->CreateButton(321u, 21u, 0x99u, 0x16Du, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 2u, 0x33u, "", 0); - pGUIWindow_CurrentMenu->CreateButton(479u, 21u, 0x99u, 0x16Du, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 3u, 0x34u, "", 0); + + pGUIWindow_CurrentMenu->CreateButton( 5, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 0, 0x31u, "", 0); + pGUIWindow_CurrentMenu->CreateButton(163, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 1, 0x32u, "", 0); + pGUIWindow_CurrentMenu->CreateButton(321, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 2, 0x33u, "", 0); + pGUIWindow_CurrentMenu->CreateButton(479, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 3, 0x34u, "", 0); + uXc = 23; uControlParamc = 2; do { - pGUIWindow_CurrentMenu->CreateButton(uXc, 169, 120, 20, 1, 0, UIMSG_0, uControlParamc - 2, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(uXc, v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc - 1, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uXc, 169, 120, 20, 1, 0, UIMSG_0, uControlParamc - 2, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(uXc, v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc - 1, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(uXc, 2 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(uXc, 3 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 1, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(uXc, 4 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 2, 0, "", 0); @@ -679,15 +682,15 @@ } while ( (signed int)uControlParamc < 30 ); pGUIWindow_CurrentMenu->_41D08F(28, 0, 7, 40); - pGUIWindow_CurrentMenu->CreateButton(323, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(323, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0xC, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(323, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(323, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0xC, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(323, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x14, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(388, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x18, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(388, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x1C, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(388, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x18, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(388, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x1C, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(388, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x20, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(453, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x10, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(453, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 8, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(453, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 4, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(453, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x10, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(453, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 8, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(453, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 4, 0, "", 0); uControlParamd = 0; do { @@ -699,12 +702,11 @@ ++uControlParamd; } while ( uControlParamd < 9 ); - pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickOK, 0, 0xD, "", - (Texture *)(uTextureID_BUTTMAKE != -1 ? &pIcons_LOD->pTextures[uTextureID_BUTTMAKE] : 0), 0); - pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickReset, 0, 0x43, "", - (Texture *)(uTextureID_BUTTMAKE2 != -1 ? &pIcons_LOD->pTextures[uTextureID_BUTTMAKE2] : 0), 0); + pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickOK, 0, 0xD, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE), 0); + pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickReset, 0, 0x43, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE2), 0); pPlayerCreationUI_BtnMinus = pGUIWindow_CurrentMenu->CreateButton(523, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickMinus, 0, 0x2D, "", pTexture_buttminu, 0); - pPlayerCreationUI_BtnPlus = pGUIWindow_CurrentMenu->CreateButton(613, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickPlus, 1, 0x2B, "", pTexture_buttplus, 0); + pPlayerCreationUI_BtnPlus = pGUIWindow_CurrentMenu->CreateButton(613, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickPlus, 1, 0x2B, "", pTexture_buttplus, 0); + pFontCChar = LoadFont("cchar.fnt", "FONTPAL", NULL); } // 4E28F8: using guessed type int pCurrentScreen;
--- a/UIPopup.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIPopup.cpp Wed May 01 17:31:10 2013 +0200 @@ -72,13 +72,12 @@ a2a = uX; a4 = uX + uWidth; pRenderer->SetTextureClipRect(uX, v4, uX + uWidth, v4 + uHeight); - v5 = (Texture *)(uTextureID_Parchment != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Parchment] : 0); - uTileWidth = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24); - v13 = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24); - uTileHeight = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26); - if ( (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24) - && (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26) ) - { + v5 = pIcons_LOD->GetTexture(uTextureID_Parchment); + uTileWidth = v5->uTextureWidth; + v13 = v5->uTextureWidth; + uTileHeight = v5->uTextureHeight; + if ( v5->uTextureWidth && v5->uTextureHeight) + { uNumXTiles = (signed int)uWidth / uTileWidth; if ( (signed int)uWidth % uTileWidth ) ++uNumXTiles; @@ -106,59 +105,29 @@ } while ( v8 < (signed int)uHeight / uTileHeight ); a5a = v4 + uHeight - 32; - pRenderer->DrawTextureTransparent( - a2a, - v4, - (Texture *)(uTextureID_5076AC != -1 ? &pIcons_LOD->pTextures[uTextureID_5076AC] : 0)); - pRenderer->DrawTextureTransparent( - a2a, - a5a, - (Texture *)(uTextureID_5076B4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076B4] : 0)); - pRenderer->DrawTextureTransparent( - a4 - 32, - v4, - (Texture *)(uTextureID_5076A8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A8] : 0)); - pRenderer->DrawTextureTransparent( - a4 - 32, - a5a, - (Texture *)(uTextureID_5076B0 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_5076B0] : 0)); + pRenderer->DrawTextureTransparent(a2a, v4, pIcons_LOD->GetTexture(uTextureID_5076AC)); + pRenderer->DrawTextureTransparent(a2a, a5a, pIcons_LOD->GetTexture(uTextureID_5076B4)); + pRenderer->DrawTextureTransparent(a4 - 32, v4, pIcons_LOD->GetTexture(uTextureID_5076A8)); + pRenderer->DrawTextureTransparent(a4 - 32, a5a, pIcons_LOD->GetTexture(uTextureID_5076B0)); uNumXTilesb = a2a + 32; v22 = v4 + uHeight - 10; if ( (signed int)uWidth > 64 ) { pRenderer->SetTextureClipRect(a2a + 32, v4, a4 - 32, v4 + uHeight); - pRenderer->DrawTextureTransparent( - uNumXTilesb, - v4, - (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0)); - pRenderer->DrawTextureTransparent( - uNumXTilesb, - v22, - (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0)); + pRenderer->DrawTextureTransparent(uNumXTilesb, v4, pIcons_LOD->GetTexture(uTextureID_507698)); + pRenderer->DrawTextureTransparent(uNumXTilesb, v22, pIcons_LOD->GetTexture(uTextureID_5076A4)); if ( (signed int)uWidth > 512 ) { - pRenderer->DrawTextureTransparent( - a2a + 544, - v4, - (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0)); - pRenderer->DrawTextureTransparent( - a2a + 544, - v22, - (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0)); + pRenderer->DrawTextureTransparent(a2a + 544, v4, pIcons_LOD->GetTexture(uTextureID_507698)); + pRenderer->DrawTextureTransparent(a2a + 544, v22, pIcons_LOD->GetTexture(uTextureID_5076A4)); } } v9 = v4 + 32; if ( (signed int)uHeight > 64 ) { pRenderer->SetTextureClipRect(a2a, v9, a4, a5a); - pRenderer->DrawTextureTransparent( - a2a, - v9, - (Texture *)(uTextureID_5076A0 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A0] : 0)); - pRenderer->DrawTextureTransparent( - a4 - 10, - v9, - (Texture *)(uTextureID_50769C != -1 ? &pIcons_LOD->pTextures[uTextureID_50769C] : 0)); + pRenderer->DrawTextureTransparent(a2a, v9, pIcons_LOD->GetTexture(uTextureID_5076A0)); + pRenderer->DrawTextureTransparent(a4 - 10, v9, pIcons_LOD->GetTexture(uTextureID_50769C)); } pRenderer->ResetTextureClipRect(); }
--- a/UIRest.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UIRest.cpp Wed May 01 17:31:10 2013 +0200 @@ -102,74 +102,16 @@ uTextureID_RestUI_restb3 = pIcons_LOD->LoadTexture("restb3", TEXTURE_16BIT_PALETTE); uTextureID_RestUI_restb4 = pIcons_LOD->LoadTexture("restb4", TEXTURE_16BIT_PALETTE); uTextureID_RestUI_restexit = pIcons_LOD->LoadTexture("restexit", TEXTURE_16BIT_PALETTE); + LoadActualSkyFrame(); - pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, (enum WindowType)16, 0, 0); - pButton_RestUI_Exit = pGUIWindow_CurrentMenu->CreateButton( - 280u, - 297u, - 154u, - 37u, - 1, - 0, - UIMSG_ExitRest, - 0, - 0, - "", - (Texture *)(uTextureID_RestUI_restexit != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restexit] : 0), - 0); - pButton_RestUI_Main = pGUIWindow_CurrentMenu->CreateButton( - 24u, - 154u, - 225u, - 37u, - 1, - 0, - UIMSG_Rest8Hour, - 0, - 0x52u, - "", - (Texture *)(uTextureID_RestUI_restb4 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb4] : 0), - 0); - pButton_RestUI_WaitUntilDawn = pGUIWindow_CurrentMenu->CreateButton( - 61u, - 232u, - 154u, - 33u, - 1, - 0, - UIMSG_AlreadyResting, - 0, - 0x44u, - "", - (Texture *)(uTextureID_RestUI_restb1 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb1] : 0), - 0); - pButton_RestUI_Wait1Hour = pGUIWindow_CurrentMenu->CreateButton( - 61u, - 264u, - 154u, - 33u, - 1, - 0, - UIMSG_Wait1Hour, - 0, - 0x48u, - "", - (Texture *)(uTextureID_RestUI_restb2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb2] : 0), - 0); - pButton_RestUI_Wait5Minutes = pGUIWindow_CurrentMenu->CreateButton( - 61u, - 296u, - 154u, - 33u, - 1, - 0, - UIMSG_Wait5Minutes, - 0, - 0x4Du, - "", - (Texture *)(uTextureID_RestUI_restb3 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restb3] : 0), - 0); - } + + pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Rest, 0, 0); + pButton_RestUI_Exit = pGUIWindow_CurrentMenu->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0); + pButton_RestUI_Main = pGUIWindow_CurrentMenu->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 0x52u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0); + pButton_RestUI_WaitUntilDawn = pGUIWindow_CurrentMenu->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 0x44u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0); + pButton_RestUI_Wait1Hour = pGUIWindow_CurrentMenu->CreateButton( 61, 264, 154, 33, 1, 0, UIMSG_Wait1Hour, 0, 0x48u, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb2), 0); + pButton_RestUI_Wait5Minutes = pGUIWindow_CurrentMenu->CreateButton( 61, 296, 154, 33, 1, 0, UIMSG_Wait5Minutes, 0, 0x4Du, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb3), 0); +} //----- (0041FA01) -------------------------------------------------------- void __cdecl RestUI_Draw() @@ -202,10 +144,7 @@ while ( (signed int)ppPlayers <= (signed int)&pPlayers[4] ); if ( v0 ) { - pRenderer->DrawTextureIndexed( - 8u, - 8u, - (Texture *)(uTextureID_RestUI_restmain != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restmain] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_RestUI_restmain)); v10 = pParty->uCurrentHour; dword_506F1C = pGUIWindow_CurrentMenu->pCurrentPosActiveItem; if ( (signed int)pParty->uCurrentHour <= 12 )
--- a/UISaveLoad.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UISaveLoad.cpp Wed May 01 17:31:10 2013 +0200 @@ -94,7 +94,7 @@ pRenderer->BeginScene(); if ( GetCurrentMenuID() != MENU_SAVELOAD && GetCurrentMenuID() != MENU_LOADINGPROC ) { - pRenderer->DrawTextureIndexed(8, 8, uTextureID_loadsave != -1 ? &pIcons_LOD->pTextures[uTextureID_loadsave] : 0); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); if ( a4 ) { v2 = uTextureID_save_up; @@ -105,9 +105,9 @@ v2 = uTextureID_load_up; v3 = uTextureID_LS_loadU; } - pRenderer->DrawTextureIndexed(241, 302, (Texture *)(v3 != -1 ? &pIcons_LOD->pTextures[v3] : 0)); - pRenderer->DrawTextureIndexed(18, 139, (Texture *)(v2 != -1 ? &pIcons_LOD->pTextures[v2] : 0)); - pRenderer->DrawTextureIndexed(351, 302, (Texture *)(uTextureID_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_u] : 0)); + pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(v3)); + pRenderer->DrawTextureIndexed (18, 139, pIcons_LOD->GetTexture(v2)); + pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); v1 = 255; } if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] ) @@ -264,7 +264,7 @@ //----- (0045E361) -------------------------------------------------------- void __fastcall GameUI_DrawLoadMenu(unsigned int uDialogueType) - { +{ unsigned int v1; // ebp@5 unsigned int v2; // eax@5 //signed int v3; // ebp@11 @@ -296,7 +296,7 @@ uTextureID_x_u = pIcons_LOD->LoadTexture("x_u", TEXTURE_16BIT_PALETTE); if ( uDialogueType_ ) { - pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_loadsave != -1 ? &pIcons_LOD->pTextures[uTextureID_loadsave] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); if ( pCurrentScreen == SCREEN_SAVEGAME ) { v1 = uTextureID_save_up; @@ -307,9 +307,9 @@ v1 = uTextureID_load_up; v2 = uTextureID_LS_loadU; } - pRenderer->DrawTextureIndexed(241, 302, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0)); - pRenderer->DrawTextureIndexed(18, 141, (Texture *)(v1 != -1 ? (int)&pIcons_LOD->pTextures[v1] : 0)); - pRenderer->DrawTextureIndexed(351, 302, (Texture *)(uTextureID_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_u] : 0)); + pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(v2)); + pRenderer->DrawTextureIndexed( 18, 141, pIcons_LOD->GetTexture(v1)); + pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); } else { @@ -379,20 +379,15 @@ pGUIWindow_CurrentMenu->CreateButton(21, 282, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 4, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(21, 303, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 5, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(21, 324, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 6, 0, "", 0); - pBtnLoadSlot = pGUIWindow_CurrentMenu->CreateButton(241, 302, 105, 40, 1, 0, UIMSG_LoadSlot, 0, 0, "", - pIcons_LOD->GetTexture(uTextureID_LS_), 0); - pBtnCancel = pGUIWindow_CurrentMenu->CreateButton(350, 302, 105, 40, 1, 0, UIMSG_Cancel, 0, 0, "", - pIcons_LOD->GetTexture(uTextureID_x_d), 0); - pBtnArrowUp = pGUIWindow_CurrentMenu->CreateButton(215, 199, 17, 17, 1, 0, UIMSG_ArrowUp, 0, 0, "", - pIcons_LOD->GetTexture(uTextureID_AR_UP_DN), 0); - pBtnDownArrow = pGUIWindow_CurrentMenu->CreateButton(215, 0x143, 0x11, 0x11, 1, 0, UIMSG_DownArrow, uNumSavegameFiles, 0, "", - pIcons_LOD->GetTexture(uTextureID_AR_DN_DN), 0); - - } + pBtnLoadSlot = pGUIWindow_CurrentMenu->CreateButton(241, 302, 105, 40, 1, 0, UIMSG_LoadSlot, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_LS_), 0); + pBtnCancel = pGUIWindow_CurrentMenu->CreateButton(350, 302, 105, 40, 1, 0, UIMSG_Cancel, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_x_d), 0); + pBtnArrowUp = pGUIWindow_CurrentMenu->CreateButton(215, 199, 17, 17, 1, 0, UIMSG_ArrowUp, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_UP_DN), 0); + pBtnDownArrow = pGUIWindow_CurrentMenu->CreateButton(215, 323, 17, 17, 1, 0, UIMSG_DownArrow, uNumSavegameFiles, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_DN_DN), 0); +} //----- (0045E93E) -------------------------------------------------------- void GameUI_DrawSaveMenu() - { +{ unsigned int v0; // ebp@4 unsigned int v1; // eax@4 char *v3; // eax@7 @@ -411,22 +406,20 @@ uTextureID_LS_loadU = pIcons_LOD->LoadTexture("LS_loadU", TEXTURE_16BIT_PALETTE); uTextureID_LS_saveU = pIcons_LOD->LoadTexture("LS_saveU", TEXTURE_16BIT_PALETTE); uTextureID_x_u = pIcons_LOD->LoadTexture("x_u", TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed( 8u, 8u, - (Texture *)(uTextureID_loadsave != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_loadsave] : 0)); + pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); if ( pCurrentScreen == SCREEN_SAVEGAME ) - { + { v0 = uTextureID_save_up; v1 = uTextureID_LS_saveU; } else - { + { v0 = uTextureID_load_up; v1 = uTextureID_LS_loadU; } - pRenderer->DrawTextureIndexed(0xF1u, 0x12Eu, (Texture *)(v1 != -1 ? (int)&pIcons_LOD->pTextures[v1] : 0)); - pRenderer->DrawTextureIndexed(0x15Fu, 0x12Eu, - (Texture *)(uTextureID_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_u] : 0)); - pRenderer->DrawTextureIndexed(0x12u, 0x8Du, (Texture *)(v0 != -1 ? (int)&pIcons_LOD->pTextures[v0] : 0)); + pRenderer->DrawTextureIndexed(0xF1u, 0x12Eu, pIcons_LOD->GetTexture(v1)); + pRenderer->DrawTextureIndexed(0x15Fu, 0x12Eu, pIcons_LOD->GetTexture(uTextureID_x_u)); + pRenderer->DrawTextureIndexed(0x12u, 0x8Du, pIcons_LOD->GetTexture(v0)); pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, 25, 199, 0, pGlobalTXT_LocalizationStrings[505], 0, 0, 0); pRenderer->Present(); pSavegameList->Initialize(1u); @@ -472,19 +465,15 @@ uTextureID_AR_UP_DN = pIcons_LOD->LoadTexture("AR_UP_DN", TEXTURE_16BIT_PALETTE); uTextureID_AR_DN_DN = pIcons_LOD->LoadTexture("AR_DN_DN", TEXTURE_16BIT_PALETTE); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_17, 0, 0); - pGUIWindow_CurrentMenu->CreateButton(21u, 198u, 0xBFu, 0x12u, 1, 0, UIMSG_SelectLoadSlot, 0, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(21u, 218u, 0xBFu, 0x12u, 1, 0, UIMSG_SelectLoadSlot, 1u, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(21u, 238u, 0xBFu, 0x12u, 1, 0, UIMSG_SelectLoadSlot, 2u, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(21u, 258u, 0xBFu, 0x12u, 1, 0, UIMSG_SelectLoadSlot, 3u, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(21u, 278u, 0xBFu, 0x12u, 1, 0, UIMSG_SelectLoadSlot, 4u, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(21u, 298u, 0xBFu, 0x12u, 1, 0, UIMSG_SelectLoadSlot, 5u, 0, "", 0); - pGUIWindow_CurrentMenu->CreateButton(21u, 318u, 0xBFu, 0x12u, 1, 0, UIMSG_SelectLoadSlot, 6u, 0, "", 0); - pBtnLoadSlot = pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0x69u, 0x28u, 1, 0, UIMSG_LoadSlot, 0, 0, "", - (Texture *)(uTextureID_LS_ != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_LS_] : 0), 0); - pBtnCancel = pGUIWindow_CurrentMenu->CreateButton(0x15Eu, 0x12Eu, 0x69u, 0x28u, 1, 0, UIMSG_Cancel, 0, 0, "", - (Texture *)(uTextureID_x_d != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_d] : 0), 0); - pBtnArrowUp = pGUIWindow_CurrentMenu->CreateButton( 0xD7u, 0xC7u, 0x11u, 0x11u, 1, 0, UIMSG_ArrowUp, 0, 0, "", - (Texture *)(uTextureID_AR_UP_DN != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_AR_UP_DN] : 0), 0); - pBtnDownArrow = pGUIWindow_CurrentMenu->CreateButton( 0xD7u, 0x143u, 0x11u, 0x11u, 1, 0, UIMSG_DownArrow, 0x22u, 0, "", - (Texture *)(uTextureID_AR_DN_DN != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_AR_DN_DN] : 0), 0); - } + pGUIWindow_CurrentMenu->CreateButton(21, 198, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 0, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(21, 218, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 1, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(21, 238, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 2, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(21, 258, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 3, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(21, 278, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 4, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(21, 298, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 5, 0, "", 0); + pGUIWindow_CurrentMenu->CreateButton(21, 318, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 6, 0, "", 0); + pBtnLoadSlot = pGUIWindow_CurrentMenu->CreateButton(241, 302, 105, 40, 1, 0, UIMSG_LoadSlot, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_LS_), 0); + pBtnCancel = pGUIWindow_CurrentMenu->CreateButton(350, 302, 105, 40, 1, 0, UIMSG_Cancel, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_x_d), 0); + pBtnArrowUp = pGUIWindow_CurrentMenu->CreateButton(215, 199, 17, 17, 1, 0, UIMSG_ArrowUp, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_UP_DN), 0); + pBtnDownArrow = pGUIWindow_CurrentMenu->CreateButton(215, 323, 17, 17, 1, 0, UIMSG_DownArrow, 34, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_DN_DN), 0); +}
--- a/UiGame.cpp Wed May 01 14:30:02 2013 +0200 +++ b/UiGame.cpp Wed May 01 17:31:10 2013 +0200 @@ -131,26 +131,15 @@ } } v8 = a2->uFrameX + (signed int)(a2->uFrameWidth - v4) / 2; + pRenderer->SetTextureClipRect(v8, a2->uFrameY + 32, v8 + v4, a2->uFrameY + 52); - pRenderer->DrawTextureIndexed( - v8, - v3->uFrameY + 32, - (Texture *)(uTextureID_mhp_bd != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_mhp_bd] : 0)); + pRenderer->DrawTextureIndexed(v8, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_bd)); pRenderer->SetTextureClipRect(v8, v3->uFrameY + 32, v8 + v10, v3->uFrameY + 52); - pRenderer->DrawTextureIndexed( - v8, - v3->uFrameY + 34, - (Texture *)(v9 != -1 ? (int)&pIcons_LOD->pTextures[v9] : 0)); - pRenderer->ResetTextureClipRect(); + pRenderer->DrawTextureIndexed(v8, v3->uFrameY + 34, pIcons_LOD->GetTexture(v9)); - pRenderer->DrawTextureIndexed( - v8 - 5, - v3->uFrameY + 32, - (Texture *)(uTextureID_mhp_capl != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_mhp_capl] : 0)); - pRenderer->DrawTextureIndexed( - v8 + v4, - v3->uFrameY + 32, - (Texture *)(uTextureID_mhp_capr != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_mhp_capr] : 0)); + pRenderer->ResetTextureClipRect(); + pRenderer->DrawTextureIndexed(v8 - 5, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capl)); + pRenderer->DrawTextureIndexed(v8 + v4, v3->uFrameY + 32, pIcons_LOD->GetTexture(uTextureID_mhp_capr)); } //----- (0041B0C9) -------------------------------------------------------- @@ -175,12 +164,12 @@ signed int v16; // [sp+24h] [bp-8h]@1 signed int v17; // [sp+28h] [bp-4h]@8 - v0 = (Texture *)(uTextureID_BarGreen != -1 ? &pIcons_LOD->pTextures[uTextureID_BarGreen] : 0); - v14 = (Texture *)(uTextureID_BarYellow != -1 ? &pIcons_LOD->pTextures[uTextureID_BarYellow] : 0); - v13 = (Texture *)(uTextureID_BarRed != -1 ? &pIcons_LOD->pTextures[uTextureID_BarRed] : 0); + v0 = pIcons_LOD->GetTexture(uTextureID_BarGreen); + v14 = pIcons_LOD->GetTexture(uTextureID_BarYellow); + v13 = pIcons_LOD->GetTexture(uTextureID_BarRed); v16 = 0; - v10 = (Texture *)(uTextureID_BarBlue != -1 ? &pIcons_LOD->pTextures[uTextureID_BarBlue] : 0); - v15 = (double)(uTextureID_BarGreen != -1 ? pIcons_LOD->pTextures[uTextureID_BarGreen].uTextureHeight : 26); + v10 = pIcons_LOD->GetTexture(uTextureID_BarBlue); + v15 = v0->uTextureHeight; do { v1 = &pParty->pPlayers[v16]; @@ -263,8 +252,7 @@ //----- (0041B3B6) -------------------------------------------------------- void __cdecl draw_right_panel() { - pRenderer->DrawTextureTransparent(pViewport->uViewportBR_X, 0, - (Texture *)(uTextureID_right_panel != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel] : 0)); + pRenderer->DrawTextureTransparent(pViewport->uViewportBR_X, 0, pIcons_LOD->GetTexture(uTextureID_right_panel)); } //----- (0041B3E2) -------------------------------------------------------- @@ -1238,45 +1226,46 @@ bRingsShownInCharScreen = 0; CharacterUI_LoadPaperdollTextures(); pCurrentScreen = v1; + pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0); pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308, - (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureWidth : 24), - (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureHeight : 26), - 1, 0, UIMSG_73, 0, 0x53u, pGlobalTXT_LocalizationStrings[216],// Stats - (Texture *)(papredoll_dbrds[10] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[10]] : 0), - papredoll_dbrds[9] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[9]] : 0, 0); + pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight, + 1, 0, UIMSG_73, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats + pIcons_LOD->GetTexture(papredoll_dbrds[10]), + pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0); pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308, - (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureWidth : 24), - (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureHeight : 26), - 1, 0, UIMSG_72, 0, 0x4Bu, pGlobalTXT_LocalizationStrings[205],//Skills - (Texture *)(papredoll_dbrds[8] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[8]] : 0), - papredoll_dbrds[7] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[7]] : 0, 0); + pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight, + 1, 0, UIMSG_72, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills + pIcons_LOD->GetTexture(papredoll_dbrds[8]), + pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0); pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308, - (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureWidth : 24), - (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureHeight : 26), - 1, 0, UIMSG_74, 0, 0x49u, pGlobalTXT_LocalizationStrings[120], //Inventory - (Texture *)(papredoll_dbrds[6] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[6]] : 0), - papredoll_dbrds[5] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[5]] : 0, 0); + pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight, + 1, 0, UIMSG_74, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory + pIcons_LOD->GetTexture(papredoll_dbrds[6]), + pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0); pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308, - (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureWidth : 24), - (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureHeight : 26), - 1, 0, UIMSG_75, 0, 0x41u, pGlobalTXT_LocalizationStrings[22], //Awards - (Texture *)(papredoll_dbrds[4] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[4]] : 0), - papredoll_dbrds[3] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[3]] : 0, 0); + pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight, + 1, 0, UIMSG_75, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards + pIcons_LOD->GetTexture(papredoll_dbrds[4]), + pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0); pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308, - (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureWidth : 24), - (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureHeight : 26), + pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth, + pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight, 1, 0, UIMSG_A8, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit - (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0), - papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0, 0); + pIcons_LOD->GetTexture(papredoll_dbrds[2]), + pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 0x1Eu, 0x1Eu, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0); pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); - pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); - pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); - pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); - pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); - pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, 9u, "", 0); + pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); + pWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); FillAwardsData(); return pWindow; } @@ -1415,8 +1404,7 @@ if ( pParty->uFlags & 0x20 ) v16 = dword_5079C8; } - pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[PID_ID(pElem->uPackedID)] - 4, - 0x181u, (Texture *)(v16 != -1 ? &pIcons_LOD->pTextures[v16] : 0)); + pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[PID_ID(pElem->uPackedID)] - 4, 0x181u, pIcons_LOD->GetTexture(v16)); } } } @@ -1439,8 +1427,7 @@ if ( pParty->uFlags & 0x20 ) v19 = dword_5079C8; } - pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] - 4, - 0x181u, (Texture *)(v19 != -1 ? &pIcons_LOD->pTextures[v19] : 0)); + pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] - 4, 0x181u, pIcons_LOD->GetTexture(v19)); } } } @@ -1865,11 +1852,11 @@ } while ( uZg < (signed int)uNumLevelDecorations ); } - pRenderer->DrawTextureTransparent(0x1D4u, 0, (Texture *)(dword_5079D8 != -1 ? &pIcons_LOD->pTextures[dword_5079D8] : 0)); + pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(dword_5079D8)); uZooma = (double)pParty->sRotationY * 0.1171875; //v50 = uZooma + 6.7553994e15; pRenderer->SetTextureClipRect(541, 0, 567, 480); - pRenderer->DrawTextureIndexed(floorf(uZooma + 0.5f) + 285, 136, (Texture *)(dword_5079B4 != -1 ? &pIcons_LOD->pTextures[dword_5079B4] : 0)); + pRenderer->DrawTextureIndexed(floorf(uZooma + 0.5f) + 285, 136, pIcons_LOD->GetTexture(dword_5079B4)); pRenderer->ResetTextureClipRect(); } @@ -1959,14 +1946,14 @@ { sprintf(pContainer, "NPC%03d", pNPCStats->pNPCData[(unsigned __int8)v7 + 499].uPortraitID); v15 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], (Texture *)(v15 != -1 ? &pIcons_LOD->pTextures[v15] : 0)); + pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v23], pHiredNPCsIconsOffsetsY[v23], pIcons_LOD->GetTexture(v15)); } else { sprintf(pContainer, "NPC%03d", pParty->pHirelings[(unsigned __int8)v7].uPortraitID); v8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); v9 = v23; - pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v9], pHiredNPCsIconsOffsetsY[v9], (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0)); + pRenderer->DrawTextureIndexed(pHiredNPCsIconsOffsetsX[v9], pHiredNPCsIconsOffsetsY[v9], pIcons_LOD->GetTexture(v8)); v10 = (unsigned __int8)pTmpBuf[i]; if ( pParty->pHirelings[v10].evt_A == 1 ) {
--- a/mm7_1.cpp Wed May 01 14:30:02 2013 +0200 +++ b/mm7_1.cpp Wed May 01 17:31:10 2013 +0200 @@ -446,7 +446,7 @@ pTexture_RestUI_CurrentHourglassFrame->Release(); pIcons_LOD->_40F9C5(); sprintf(pTmpBuf, "TERRA%03d", pParty->uCurrentMinute / 6 + 10 * pParty->uCurrentHour); - pTexture_RestUI_CurrentSkyFrame = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)]; + pTexture_RestUI_CurrentSkyFrame = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); } //----- (0041F5BE) -------------------------------------------------------- @@ -698,10 +698,10 @@ pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); - v2->CreateButton(61u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); - v2->CreateButton(177u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); - v2->CreateButton(292u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); - v2->CreateButton(407u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); + v2->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + v2->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + v2->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + v2->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); return v2; } @@ -1503,7 +1503,7 @@ uTextureID_5076A0 = pIcons_LOD->LoadTexture("edge_lf", TEXTURE_16BIT_PALETTE); uTextureID_50769C = pIcons_LOD->LoadTexture("edge_rt", TEXTURE_16BIT_PALETTE); uTextureID_507698 = pIcons_LOD->LoadTexture("edge_top", TEXTURE_16BIT_PALETTE); - pTexture_591428 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("endcap", TEXTURE_16BIT_PALETTE)]; + pTexture_591428 = pIcons_LOD->LoadTexturePtr("endcap", TEXTURE_16BIT_PALETTE); } v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xAu, 0, 0);
--- a/mm7_2.cpp Wed May 01 14:30:02 2013 +0200 +++ b/mm7_2.cpp Wed May 01 17:31:10 2013 +0200 @@ -766,7 +766,7 @@ item_spellbook->Reset(); pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i].uItemID = pItemNum; pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][i].Identified(); - ItemsInShopTexture[i] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pItemsTable->pItems[pItemNum].pIconName, TEXTURE_16BIT_PALETTE)]; + ItemsInShopTexture[i] = pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[pItemNum].pIconName, TEXTURE_16BIT_PALETTE); } return; } @@ -6646,17 +6646,15 @@ pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); auto pNew = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE); - pMainMenu_BtnNew = pWindow_MainMenu->CreateButton(495, 172, pNew->uTextureWidth, pNew->uTextureHeight, 1, 0, - UIMSG_MainMenu_ShowPartyCreationWnd, 0, 78, "", pNew, 0); auto pLoad = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE); - pMainMenu_BtnLoad = pWindow_MainMenu->CreateButton(495, 227, pLoad->uTextureWidth, pLoad->uTextureHeight, 1, 0, - UIMSG_MainMenu_ShowLoadWindow, 1, 76, "", pLoad, 0); auto pCredits = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE); - pMainMenu_BtnCredits = pWindow_MainMenu->CreateButton(495, 282, pCredits->uTextureWidth, pCredits->uTextureHeight, 1, 0, - UIMSG_ShowCredits, 2, 67, "", pCredits, 0); auto pExit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE); - pMainMenu_BtnExit = pWindow_MainMenu->CreateButton(495, 337, pExit->uTextureWidth, pExit->uTextureHeight, 1, 0, - UIMSG_ExitToWindows, 3, 0, "", pExit, 0); + + pMainMenu_BtnNew = pWindow_MainMenu->CreateButton(495, 172, pNew->uTextureWidth, pNew->uTextureHeight, 1, 0, UIMSG_MainMenu_ShowPartyCreationWnd, 0, 'N', "", pNew, 0); + pMainMenu_BtnLoad = pWindow_MainMenu->CreateButton(495, 227, pLoad->uTextureWidth, pLoad->uTextureHeight, 1, 0, UIMSG_MainMenu_ShowLoadWindow, 1, 'L', "", pLoad, 0); + pMainMenu_BtnCredits = pWindow_MainMenu->CreateButton(495, 282, pCredits->uTextureWidth, pCredits->uTextureHeight, 1, 0, UIMSG_ShowCredits, 2, 'C', "", pCredits, 0); + pMainMenu_BtnExit = pWindow_MainMenu->CreateButton(495, 337, pExit->uTextureWidth, pExit->uTextureHeight, 1, 0, UIMSG_ExitToWindows, 3, 0, "", pExit, 0); + pTexture_PCX.Release(); pTexture_PCX.Load("title.pcx", 0); SetCurrentMenuID(MENU_MAIN);
--- a/mm7_3.cpp Wed May 01 14:30:02 2013 +0200 +++ b/mm7_3.cpp Wed May 01 17:31:10 2013 +0200 @@ -12316,8 +12316,8 @@ default: assert(false); } - pTexture_Dialogue_Background = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; - pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("outside", TEXTURE_16BIT_PALETTE)]; + pTexture_Dialogue_Background = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE); + pTexture_outside = pIcons_LOD->LoadTexturePtr("outside", TEXTURE_16BIT_PALETTE); v1 = pMapStats->GetMapInfo(pCurrentMapName); if ( v1 ) sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v1].pName);// "Leave %s" @@ -12482,11 +12482,11 @@ dword_5C3418 = v4; dword_5C341C = v3; _591094_decoration = activeLevelDecoration; - pGUIWindow2 = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_GreetingNPC, a4, 0); - pGUIWindow2->CreateButton(61u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); - pGUIWindow2->CreateButton(177u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); - pGUIWindow2->CreateButton(292u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); - pGUIWindow2->CreateButton(407u, 424u, 0x1Fu, 0x28u, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); + pGUIWindow2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_GreetingNPC, a4, 0); + pGUIWindow2->CreateButton( 61, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); + pGUIWindow2->CreateButton(177, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); + pGUIWindow2->CreateButton(292, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); + pGUIWindow2->CreateButton(407, 424, 31, 40, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); } }
--- a/mm7_4.cpp Wed May 01 14:30:02 2013 +0200 +++ b/mm7_4.cpp Wed May 01 17:31:10 2013 +0200 @@ -7802,10 +7802,9 @@ ContractSelectText(pEventCode); pDialogueWindow->Release(); pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15E, WINDOW_MainMenu, pEventCode, 0); - pBtn_ExitCancel = pDialogueWindow->CreateButton(0x1D7, 0x1BD, 0xA9, 0x23, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], // Cancel - pIcons_LOD->GetTexture(uExitCancelTextureId), 0); - pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); - pDialogueWindow->CreateButton(0x1E0u, 0xA0u, 0x8Cu, 0x1Eu, 1, 0, UIMSG_ClickNPCTopic, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); + pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); // Cancel + pDialogueWindow->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); + pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_ClickNPCTopic, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); pDialogueWindow->_41D08F(1, 1, 0, 2); dialog_menu_id = HOUSE_DIALOGUE_OTHER; } @@ -7825,9 +7824,7 @@ pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, v1, 0); v2 = ""; pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, - pGlobalTXT_LocalizationStrings[34], - (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), - 0); + pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); if ( contract_approved ) v2 = pGlobalTXT_LocalizationStrings[535]; @@ -7850,7 +7847,7 @@ pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15Eu, WINDOW_MainMenu, 0, 0); pBtn_ExitCancel = pDialogueWindow->CreateButton( 0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], //"Cancel" - (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), + pIcons_LOD->GetTexture(uExitCancelTextureId), 0); pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); if ( pNPCStats->pProfessions[v1->uProfession].pBenefits)//*(&pNPCStats->field_13A5C + 5 * v1->uProfession) ) @@ -7886,14 +7883,10 @@ pDialogueWindow->Release(); pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); - pBtn_ExitCancel = pDialogueWindow->CreateButton( 566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 0x4Eu, - pGlobalTXT_LocalizationStrings[34],// "Cancel" - (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),0); - pBtn_YES = pDialogueWindow->CreateButton( 486u, 445u, 75u, 33u, 1, 0, UIMSG_BF, 1u, 0x59u, - sHouseName, - (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); + pBtn_ExitCancel = pDialogueWindow->CreateButton(566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// "Cancel" + pBtn_YES = pDialogueWindow->CreateButton(486, 445, 75, 33, 1, 0, UIMSG_BF, 1, 'Y', sHouseName, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName, 0); - pDialogueWindow->CreateButton(8u, 8u, 460u, 344u, 1, 0, UIMSG_BF, 1u, 0x59u, sHouseName, 0); + pDialogueWindow->CreateButton(8, 8, 460, 344, 1, 0, UIMSG_BF, 1, 0x59u, sHouseName, 0); } else { @@ -7910,7 +7903,7 @@ pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" - (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); + pIcons_LOD->GetTexture(uExitCancelTextureId), 0); pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); if ( pDialogueNPCCount == 1 && dword_591080 ) { @@ -9109,7 +9102,7 @@ v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); v13 = pHouse_ExitPictures[v10]; pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v12]; - pTexture_outside = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v13, TEXTURE_16BIT_PALETTE)]; + pTexture_outside = pIcons_LOD->LoadTexturePtr(v13, TEXTURE_16BIT_PALETTE); if ( v9 ) { if ( !v23 )
--- a/mm7_5.cpp Wed May 01 14:30:02 2013 +0200 +++ b/mm7_5.cpp Wed May 01 17:31:10 2013 +0200 @@ -529,78 +529,76 @@ pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = v0; pCurrentScreen = SCREEN_OPTIONS; - uTextureID_ControlBG[0] = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[3] = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[2] = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[4] = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[5] = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[1] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[19] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[10] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[11] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[12] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[13] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[14] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[15] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[16] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[17] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[18] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[9] = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[20] = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[22] = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE); - uTextureID_ControlBG[21] = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE); + + options_menu_skin.uTextureID_Background = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_TurnSpeed[2] = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_TurnSpeed[1] = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_TurnSpeed[0] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_ArrowLeft = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_ArrowRight = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_SoundLevels[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_FlipOnExit = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_AlwaysRun = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_ShowDamage = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE); + options_menu_skin.uTextureID_WalkSound = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE); + pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Options, 0, 0); pGUIWindow_CurrentMenu->CreateButton(22, 270, - pIcons_LOD->GetTexture(uTextureID_ControlBG[3])->uTextureWidth, - pIcons_LOD->GetTexture(uTextureID_ControlBG[3])->uTextureHeight, - v0, 0, - UIMSG_SetTurnSpeed, 0x80, - 0, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(0x5Du, 270, - pIcons_LOD->GetTexture(uTextureID_ControlBG[2])->uTextureWidth, - pIcons_LOD->GetTexture(uTextureID_ControlBG[2])->uTextureHeight, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureWidth, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureHeight, + v0, 0, UIMSG_SetTurnSpeed, 0x80, 0, v1, 0); + pGUIWindow_CurrentMenu->CreateButton(93, 270, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])->uTextureWidth, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[1])->uTextureHeight, v0, 0, UIMSG_SetTurnSpeed, 0x40u, 0, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(0xA4u, 270, - pIcons_LOD->GetTexture(uTextureID_ControlBG[1])->uTextureWidth, - pIcons_LOD->GetTexture(uTextureID_ControlBG[1])->uTextureHeight, + pGUIWindow_CurrentMenu->CreateButton(164, 270, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])->uTextureWidth, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[0])->uTextureHeight, v0, 0, UIMSG_SetTurnSpeed, 0, 0, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(0x14u, 0x12Fu, - pIcons_LOD->GetTexture(uTextureID_ControlBG[21])->uTextureWidth, - pIcons_LOD->GetTexture(uTextureID_ControlBG[21])->uTextureHeight, + + pGUIWindow_CurrentMenu->CreateButton(20, 303, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound)->uTextureWidth, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_WalkSound)->uTextureHeight, v0, 0, UIMSG_ToggleWalkSound, 0, 0, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(0x80u, 0x12Fu, - (uTextureID_ControlBG[22] != -1 ? pIcons_LOD->pTextures[uTextureID_ControlBG[22]].uTextureWidth : 24), - (uTextureID_ControlBG[22] != -1 ? pIcons_LOD->pTextures[uTextureID_ControlBG[22]].uTextureHeight : 26), - v0, 0, UIMSG_ToggleShowDamage, 0, 0, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(0x14u, 0x145u, - (uTextureID_ControlBG[20] != -1 ? pIcons_LOD->pTextures[uTextureID_ControlBG[20]].uTextureWidth : 24), - (uTextureID_ControlBG[20] != -1 ? pIcons_LOD->pTextures[uTextureID_ControlBG[20]].uTextureHeight : 26), - v0, 0, UIMSG_ToggleAlwaysRun, 0, 0, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(0x80u, 0x145u, - (uTextureID_ControlBG[9] != -1 ? pIcons_LOD->pTextures[uTextureID_ControlBG[9]].uTextureWidth : 24), - (uTextureID_ControlBG[9] != -1 ? pIcons_LOD->pTextures[uTextureID_ControlBG[9]].uTextureHeight : 26), - v0, 0, UIMSG_ToggleFlipOnExit, 0, 0, v1, 0); - pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(243, 162, 16, 16, v0, 0, UIMSG_ChangeSoundVolume, 4, 0, v1, - &pIcons_LOD->pTextures[uTextureID_ControlBG[4]], 0); - pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0x1B3u, 0xA2u, 0x10u, 0x10u, v0, 0, UIMSG_ChangeSoundVolume, 5, 0, v1, - &pIcons_LOD->pTextures[uTextureID_ControlBG[5]], 0); - pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xA2u, 0xACu, 0x11u, v0, 0, UIMSG_ChangeSoundVolume, 0, 0, v1, 0); - pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(0xF3u, 0xD8u, 0x10u, 0x10u, v0, 0, UIMSG_ChangeMusicVolume, 4, 0, v1, - &pIcons_LOD->pTextures[uTextureID_ControlBG[4]], 0); - pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0x1B3u, 0xD8u, 0x10u, 0x10u, v0, 0, UIMSG_ChangeMusicVolume, 5, 0, v1, - &pIcons_LOD->pTextures[uTextureID_ControlBG[5]], 0); - pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xD8u, 0xACu, 0x11u, v0, 0, UIMSG_ChangeMusicVolume, 0, 0, v1, 0); - pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(0xF3u, 0x10Eu, 0x10u, 0x10u, v0, 0, UIMSG_ChangeVoiceVolume, 4, 0, v1, - &pIcons_LOD->pTextures[uTextureID_ControlBG[4]], 0); - pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(0x1B3u, 0x10Eu, 0x10u, 0x10u, v0, 0, UIMSG_ChangeVoiceVolume, 5u, 0, v1, - &pIcons_LOD->pTextures[uTextureID_ControlBG[5]], 0); - pGUIWindow_CurrentMenu->CreateButton(0x107u, 0x10Eu, 0xACu, 0x11u, v0, 0, UIMSG_ChangeVoiceVolume, 0, 0, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, v0, 0, UIMSG_Escape, 0, 0, - pGlobalTXT_LocalizationStrings[619],// "Return to Game" - 0); - pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x8Cu, 0xD6u, 0x28u, v0, 0, UIMSG_OpenKeyMappingOptions, 0, 0x4Bu, v1, 0); - pGUIWindow_CurrentMenu->CreateButton(19, 194, 214, 40, v0, 0, UIMSG_OpenVideoOptions, 0, 86, v1, 0); - continue; + pGUIWindow_CurrentMenu->CreateButton(128, 303, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage)->uTextureWidth, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ShowDamage)->uTextureHeight, + v0, 0, UIMSG_ToggleShowDamage, 0, 0, v1, 0); + pGUIWindow_CurrentMenu->CreateButton(20, 325, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun)->uTextureWidth, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_AlwaysRun)->uTextureHeight, + v0, 0, UIMSG_ToggleAlwaysRun, 0, 0, v1, 0); + pGUIWindow_CurrentMenu->CreateButton(128, 325, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit)->uTextureWidth, + pIcons_LOD->GetTexture(options_menu_skin.uTextureID_FlipOnExit)->uTextureHeight, + v0, 0, UIMSG_ToggleFlipOnExit, 0, 0, v1, 0); + + pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(243, 162, 16, 16, v0, 0, UIMSG_ChangeSoundVolume, 4, 0, v1, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0); + pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(435, 162, 16, 16, v0, 0, UIMSG_ChangeSoundVolume, 5, 0, v1, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0); + pGUIWindow_CurrentMenu->CreateButton(263, 162, 172, 17, v0, 0, UIMSG_ChangeSoundVolume, 0, 0, v1, 0); + + pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(243, 216, 16, 16, v0, 0, UIMSG_ChangeMusicVolume, 4, 0, v1, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0); + pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(435, 216, 16, 16, v0, 0, UIMSG_ChangeMusicVolume, 5, 0, v1, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0); + pGUIWindow_CurrentMenu->CreateButton(263, 216, 172, 17, v0, 0, UIMSG_ChangeMusicVolume, 0, 0, v1, 0); + + pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(243, 270, 16, 16, v0, 0, UIMSG_ChangeVoiceVolume, 4, 0, v1, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowLeft), 0); + pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(435, 270, 16, 16, v0, 0, UIMSG_ChangeVoiceVolume, 5, 0, v1, pIcons_LOD->GetTexture(options_menu_skin.uTextureID_ArrowRight), 0); + pGUIWindow_CurrentMenu->CreateButton(263, 270, 172, 17, v0, 0, UIMSG_ChangeVoiceVolume, 0, 0, v1, 0); + + pGUIWindow_CurrentMenu->CreateButton(241, 302, 214, 40, v0, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[619], 0); // "Return to Game" + pGUIWindow_CurrentMenu->CreateButton( 19, 140, 214, 40, v0, 0, UIMSG_OpenKeyMappingOptions, 0, 0x4Bu, v1, 0); + pGUIWindow_CurrentMenu->CreateButton( 19, 194, 214, 40, v0, 0, UIMSG_OpenVideoOptions, 0, 86, v1, 0); + continue; + case UIMSG_OpenKeyMappingOptions://Open if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; @@ -1126,15 +1124,8 @@ pEventTimer->Resume(); continue; case SCREEN_OPTIONS://Close - thisa = (signed int)&uTextureID_ControlBG; - do - { - if ( *(int *)thisa ) - pIcons_LOD->pTextures[*(int *)thisa].Release(); - thisa += 4; - } - while ( thisa < (signed int)&dword_507CBC ); - memset(&uTextureID_ControlBG, 0, 0x5Cu); + options_menu_skin.Relaease(); + pIcons_LOD->_40F9C5(); WriteWindowsRegistryInt("soundflag", (char)uSoundVolumeMultiplier); WriteWindowsRegistryInt("musicflag", (char)uMusicVolimeMultiplier); @@ -10486,7 +10477,7 @@ } case WINDOW_Book: { - SellectDrawBook((unsigned int)pWindow->ptr_1C); + DrawCurrentBook((unsigned int)pWindow->ptr_1C); break; } case WINDOW_QuickReference:
--- a/mm7_data.cpp Wed May 01 14:30:02 2013 +0200 +++ b/mm7_data.cpp Wed May 01 17:31:10 2013 +0200 @@ -527,37 +527,7 @@ }; unsigned char hourglass_icon_idx = 12; // weak -char aSS[777]; // idb -char ascii_4E2C54[6]; -char ascii_4E2C5C[7]; -char ascii_4E2C68[8]; -char ascii_4E2C70[9]; -char ascii_4E2C7C[8]; -char ascii_4E2C84[11]; -char ascii_4E2C90[12]; -char ascii_4E2C9C[8]; -char ascii_4E2CA4[7]; -char ascii_4E2CB0[12]; -char ascii_4E2CBC[12]; -char ascii_4E2CC8[12]; -char ascii_4E2CD4[6]; -char ascii_4E2CDC[11]; -char ascii_4E2CE8[8]; -char ascii_4E2CF0[12]; -char ascii_4E2CFC[6]; -char ascii_4E2D04[8]; -char ascii_4E2D0C[8]; -char ascii_4E2D14[6]; -char ascii_4E2D1C[12]; -char ascii_4E2D28[8]; -char ascii_4E2D30[7]; -char ascii_4E2D38[5]; -char ascii_4E2D40[8];// = {0xC2, 0xCF, 0xD0, 0xC0, 0xC2, 0xCE, 0};//russian text in keyboard options -char ascii_4E2D48[6];// = {0xC2, 0xCB, 0xC5, 0xC2, 0xCE, 0}; -char ascii_4E2D50[6];// = {0xCD, 0xC0, 0xC7, 0xC0, 0xC4, 0}; -char ascii_4E2D5C[7];// = {0xC2, 0xCF, 0xC5, 0xD0, 0xC5, 0xC4, 0}; -char aMakingItemNumb[777]; // idb -char aNpc03d[777]; // idb + const char *format_4E2D80 = "\f%05d%s\f00000\n"; char format_4E2D90[8]; char aS03d03dS000_0[777]; // idb
--- a/mm7_data.h Wed May 01 14:30:02 2013 +0200 +++ b/mm7_data.h Wed May 01 17:31:10 2013 +0200 @@ -450,44 +450,10 @@ extern char monster_popup_y_offsets[]; // weak extern unsigned char hourglass_icon_idx; // weak -extern char aSS[]; // idb -extern char ascii_4E2C54[6]; -extern char ascii_4E2C5C[7]; -extern char ascii_4E2C68[8]; -extern char ascii_4E2C70[9]; -extern char ascii_4E2C7C[8]; -extern char ascii_4E2C84[11]; -extern char ascii_4E2C90[12]; -extern char ascii_4E2C9C[8]; -extern char ascii_4E2CA4[7]; -extern char ascii_4E2CB0[12]; -extern char ascii_4E2CBC[12]; -extern char ascii_4E2CC8[12]; -extern char ascii_4E2CD4[6]; -extern char ascii_4E2CDC[11]; -extern char ascii_4E2CE8[8]; -extern char ascii_4E2CF0[12]; -extern char ascii_4E2CFC[6]; -extern char ascii_4E2D04[8]; -extern char ascii_4E2D0C[8]; -extern char ascii_4E2D14[6]; -extern char ascii_4E2D1C[12]; -extern char ascii_4E2D28[8]; -extern char ascii_4E2D30[7]; -extern char ascii_4E2D38[5]; -extern char ascii_4E2D40[8]; -extern char ascii_4E2D48[6]; -extern char ascii_4E2D50[6]; -extern char ascii_4E2D5C[7]; -extern char aMakingItemNumb[]; // idb -extern char aNpc03d[]; // idb + extern const char *format_4E2D80; extern char format_4E2D90[8]; -extern char aS03d03dS000_0[]; // idb -extern char aS03d03dS000[]; // idb //extern const char *format_4E2DC8; -extern char aS[]; // idb -extern char aLuSLuS[]; // idb extern const char *format_4E2DE8; // idb extern char asc_4E2DFC[3]; // idb extern const char *format_4E2E00; // idb @@ -1600,34 +1566,34 @@ void __cdecl InitializeBookFonts(); void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer); void sub_412AF9(); -void __cdecl DrawSpellBookContent(); -char __cdecl DrawBook_History(); -void __cdecl DrawBook_Quests(); -void __cdecl DrawBook_Autonotes(); +void DrawSpellBookContent(); +char DrawBook_History(); +void DrawBook_Quests(); +void DrawBook_Autonotes(); void DrawBook_Maps(); -void __thiscall SellectDrawBook(unsigned int uBook); // idb -char *__cdecl GetDayPart(); -char __cdecl DrawBook_Calendar(); -void __cdecl SetAttributeNames(); -void __cdecl uGameUIFontMain_initialize(); -void __cdecl uGameUIFontShadow_initialize(); -void __cdecl sub_41420D_press_esc(); -void __cdecl sub_41426F(); -char __cdecl GameMenuUI_DrawKeyBindings(); +void DrawCurrentBook(unsigned int uBook); // idb +char *GetDayPart(); +char DrawBook_Calendar(); +void SetAttributeNames(); +void uGameUIFontMain_initialize(); +void uGameUIFontShadow_initialize(); +void sub_41420D_press_esc(); +void sub_41426F(); +char GameMenuUI_DrawKeyBindings(); unsigned int __thiscall sub_414D24(int _this); -void __cdecl GameMenuUI_DrawVideoOptions(); -void __cdecl DrawGameOptions(); +void GameMenuUI_DrawVideoOptions(); +void DrawGameOptions(); void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight); // idb void DrawCopyrightWindow(); void LoadFonts_and_DrawCopyrightWindow(); -void __cdecl GUI_UpdateWindows(); -void __cdecl identify_item(); +void GUI_UpdateWindows(); +void identify_item(); void __thiscall sub_416B01(void *_this); void __thiscall sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(struct Vec2_int_ *_this); void UI_OnMouseLeftClick(int *pXY); // idb void __thiscall sub_417871(int *pXY); -void __cdecl sub_4178C4(); -void __cdecl sub_4178E1(); +void sub_4178C4(); +void sub_4178E1(); unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2); signed int __thiscall GetConditionDrawColor(unsigned int uConditionIdx); // idb char __fastcall sub_4179BC_draw_tooltip(const char *a1, const char *a2); // idb