Mercurial > might-and-magic-trilogy
diff mm7_6.cpp @ 166:87c503d426e0
11.12.2012
author | Ritor1 |
---|---|
date | Tue, 11 Dec 2012 17:23:17 +0600 |
parents | 8be5293b6b33 |
children | 90a9c828c2a6 |
line wrap: on
line diff
--- a/mm7_6.cpp Mon Dec 10 17:07:27 2012 +0600 +++ b/mm7_6.cpp Tue Dec 11 17:23:17 2012 +0600 @@ -2324,8 +2324,8 @@ v15->spellnum = 0; if ( !v8 ) { - ptr_507BD4->Release(); - ptr_507BD4 = 0; + pGUIWindow_Settings->Release(); + pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); GameUI_StatusBar_TimedStringTimeLeft = 0; unk_50C9A0 = 0; @@ -2340,18 +2340,18 @@ { if ( v6 & 2 ) { - if ( ptr_507BD4 ) + if ( pGUIWindow_Settings ) return result; - ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); - ptr_507BD4->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0); - ptr_507BD4->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0); - ptr_507BD4->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0); - ptr_507BD4->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0); + pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); + pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0); + pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0); + pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0); + pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0); return sub_421B2C_PlaceInInventory_or_DropPickedItem(); } if ( v6 & 8 ) { - if ( ptr_507BD4 ) + if ( pGUIWindow_Settings ) return result; v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); v29 = 0; @@ -2366,7 +2366,7 @@ v21 = 460; v20 = 8; v19 = 8; - ptr_507BD4 = v17; + pGUIWindow_Settings = v17; v18 = v17; LABEL_56: v18->CreateButton(v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29); @@ -2374,7 +2374,7 @@ } if ( v6 & 0x40 ) { - if ( ptr_507BD4 ) + if ( pGUIWindow_Settings ) return result; v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0); v29 = 0; @@ -2386,25 +2386,25 @@ } if ( (char)v6 < 0 ) { - if ( ptr_507BD4 ) + if ( pGUIWindow_Settings ) return result; ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - ptr_507BD4 = pStru277[result].sub_4219BE(); + pGUIWindow_Settings = pStru277[result].sub_4219BE(); unk_50C9A0 = 1; some_active_character = uActiveCharacter; return sub_421B2C_PlaceInInventory_or_DropPickedItem(); } if ( HIBYTE(v6) & 1 ) { - if ( ptr_507BD4 ) + if ( pGUIWindow_Settings ) return result; - ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); - ptr_507BD4->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0); - ptr_507BD4->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0); - ptr_507BD4->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0); - ptr_507BD4->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0); + pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); + pGUIWindow_Settings->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0); + pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0); + pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0); + pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0); v29 = 0; v28 = ""; v27 = 0; @@ -2416,13 +2416,13 @@ v21 = 460; v20 = 8; v19 = 8; - v18 = ptr_507BD4; + v18 = pGUIWindow_Settings; goto LABEL_56; } - if ( HIBYTE(v6) & 2 && !ptr_507BD4 ) + if ( HIBYTE(v6) & 2 && !pGUIWindow_Settings ) { - ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); - ptr_5079EC = ptr_507BD4->CreateButton( + pGUIWindow_Settings = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0); + ptr_5079EC = pGUIWindow_Settings->CreateButton( 0x1D5u, 0xB2u, (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureWidth : 24), @@ -2435,7 +2435,7 @@ "", (Texture *)(uTextureID_507990 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507990] : 0), 0); - ptr_5079E8 = ptr_507BD4->CreateButton( + ptr_5079E8 = pGUIWindow_Settings->CreateButton( 0x272u, 0xB2u, (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureWidth : 24), @@ -2448,8 +2448,8 @@ "", (Texture *)(uTextureID_50798C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50798C] : 0), 0); - ptr_507BD4->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0); - result = (bool)ptr_507BD4->CreateButton( + pGUIWindow_Settings->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0); + result = (bool)pGUIWindow_Settings->CreateButton( 0x231u, 0x95u, 0x40u, @@ -2484,8 +2484,8 @@ if ( v2->field_8 & 0x3CA ) { v2->spellnum = 0; - ptr_507BD4->Release(); - ptr_507BD4 = 0; + pGUIWindow_Settings->Release(); + pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); GameUI_StatusBar_TimedStringTimeLeft = 0; unk_50C9A0 = 0;