Mercurial > might-and-magic-trilogy
changeset 166:87c503d426e0
11.12.2012
author | Ritor1 |
---|---|
date | Tue, 11 Dec 2012 17:23:17 +0600 |
parents | c778b7aead81 |
children | 90a9c828c2a6 8e6ed320a356 |
files | GUIButton.cpp GUIButton.h mm7_1.cpp mm7_2.cpp mm7_5.cpp mm7_6.cpp mm7_data.cpp mm7_data.h |
diffstat | 8 files changed, 126 insertions(+), 130 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIButton.cpp Mon Dec 10 17:07:27 2012 +0600 +++ b/GUIButton.cpp Tue Dec 11 17:23:17 2012 +0600 @@ -78,7 +78,7 @@ struct GUIWindow *ptr_507BC8; struct GUIWindow *pGUIWindow_CurrentMenu; struct GUIWindow *ptr_507BD0; -struct GUIWindow *ptr_507BD4; +struct GUIWindow *pGUIWindow_Settings; struct GUIWindow *ptr_507BDC; struct GUIWindow *ptr_507BE0; struct GUIWindow *pGUIWindow2;
--- a/GUIButton.h Mon Dec 10 17:07:27 2012 +0600 +++ b/GUIButton.h Tue Dec 11 17:23:17 2012 +0600 @@ -104,7 +104,7 @@ extern struct GUIWindow *ptr_507BC8; extern struct GUIWindow *pGUIWindow_CurrentMenu; extern struct GUIWindow *ptr_507BD0; -extern struct GUIWindow *ptr_507BD4; +extern struct GUIWindow *pGUIWindow_Settings; extern struct GUIWindow *ptr_507BDC; extern struct GUIWindow *ptr_507BE0; extern struct GUIWindow *pGUIWindow2;
--- a/mm7_1.cpp Mon Dec 10 17:07:27 2012 +0600 +++ b/mm7_1.cpp Tue Dec 11 17:23:17 2012 +0600 @@ -5731,10 +5731,10 @@ v6 = v0->GetItemIDAtInventoryIndex(&a4); if ( v6 ) { - *((char *)ptr_507BD4->ptr_1C + 8) &= 0x7Fu; - *((short *)ptr_507BD4->ptr_1C + 2) = uActiveCharacter - 1; - *((int *)ptr_507BD4->ptr_1C + 3) = v6 - 1; - *((short *)ptr_507BD4->ptr_1C + 3) = a4; + *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu; + *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; + *((int *)pGUIWindow_Settings->ptr_1C + 3) = v6 - 1; + *((short *)pGUIWindow_Settings->ptr_1C + 3) = a4; ptr_50C9A4 = (ItemGen *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v6 + 5]; unk_50C9A0 = 0; if ( pMessageQueue_50CBD0->uNumMessages )
--- a/mm7_2.cpp Mon Dec 10 17:07:27 2012 +0600 +++ b/mm7_2.cpp Tue Dec 11 17:23:17 2012 +0600 @@ -15496,11 +15496,11 @@ } if ( unk_50C9A0 ) { - *((char *)ptr_507BD4->ptr_1C + 8) &= 0x7Fu; - *((short *)ptr_507BD4->ptr_1C + 2) = uActiveCharacter - 1; + *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu; + *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; v39 = v52; - *((int *)ptr_507BD4->ptr_1C + 3) = v36; - *((short *)ptr_507BD4->ptr_1C + 3) = v39; + *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; + *((short *)pGUIWindow_Settings->ptr_1C + 3) = v39; ptr_50C9A4 = v38; unk_50C9A0 = 0; if ( pMessageQueue_50CBD0->uNumMessages )
--- a/mm7_5.cpp Mon Dec 10 17:07:27 2012 +0600 +++ b/mm7_5.cpp Tue Dec 11 17:23:17 2012 +0600 @@ -1552,7 +1552,7 @@ pIcons_LOD->_4114F2(); } LABEL_322: - if ( ptr_507BD4 ) + if ( pGUIWindow_Settings ) { if ( pCurrentScreen == 7 ) { @@ -1560,8 +1560,8 @@ } else { - ptr_507BD4->Release(); - ptr_507BD4 = 0; + pGUIWindow_Settings->Release(); + pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); GameUI_StatusBar_TimedStringTimeLeft = 0; unk_50C9A0 = 0; @@ -1580,8 +1580,8 @@ pIcons_LOD->_4355F7(); goto _continue; } - v36 = ptr_507BD4; - if ( !ptr_507BD4 ) + v36 = pGUIWindow_Settings; + if ( !pGUIWindow_Settings ) { dword_6BE138 = -1; GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0); @@ -1946,16 +1946,16 @@ if ( v48 ) goto _continue; LABEL_415: - v51 = ptr_507BD4->ptr_1C; + v51 = pGUIWindow_Settings->ptr_1C; *((char *)v51 + 8) &= 0xBFu; LABEL_416: *((short *)v51 + 2) = uMessageParam; *((int *)v51 + 3) = v44; pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300); - v36 = ptr_507BD4; + v36 = pGUIWindow_Settings; LABEL_333: v36->Release(); - ptr_507BD4 = 0; + pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); GameUI_StatusBar_TimedStringTimeLeft = 0; unk_50C9A0 = 0; @@ -1976,9 +1976,9 @@ } else { - if ( ptr_507BD4 ) - { - v52 = ptr_507BD4->ptr_1C; + if ( pGUIWindow_Settings ) + { + v52 = pGUIWindow_Settings->ptr_1C; switch ( uMessage ) { case 69: @@ -1993,8 +1993,8 @@ } *((short *)v52 + 2) = uMessageParam; pParty->pPlayers[*((short *)v52 + 1)].SetRecoveryTime(300); - ptr_507BD4->Release(); - ptr_507BD4 = 0; + pGUIWindow_Settings->Release(); + pGUIWindow_Settings = 0; pEventTimer->Resume(); pMouse->SetCursorBitmap("MICON1"); GameUI_StatusBar_TimedStringTimeLeft = 0; @@ -2452,7 +2452,7 @@ v84 = v83 >> 16; if ( (v44 & 7) != 3 || v84 >= 5120 ) goto LABEL_90; - v51 = ptr_507BD4->ptr_1C; + v51 = pGUIWindow_Settings->ptr_1C; if ( uMessage == 70 ) { *((char *)v51 + 8) &= 0xF7u; @@ -3365,7 +3365,7 @@ if ( ptr_507BC4 ) free_book_subwindow(); if ( !pCurrentScreen - && !ptr_507BD4 ) + && !pGUIWindow_Settings ) pEventTimer->Resume(); viewparams->bRedrawGameUI = 1; } @@ -15775,7 +15775,7 @@ //----- (00416D62) -------------------------------------------------------- void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) { - signed int v1; // eax@12 + signed int pPlayerNum; // eax@12 char *v2; // eax@32 void *v3; // ecx@52 unsigned int v4; // eax@59 @@ -15786,14 +15786,14 @@ unsigned int v9; // eax@72 unsigned int v10; // eax@76 char v11; // zf@83 - GUIButton *v12; // esi@84 + GUIButton *pButton; // esi@84 unsigned int v13; // ecx@85 - char *v14; // edi@85 - signed int v15; // eax@92 + char *pStr; // edi@85 + signed int pControlID; // eax@92 int v16; // eax@95 int v17; // eax@96 enum PLAYER_SKILL_TYPE v18; // eax@98 - char *v19; // eax@99 + char *pStr2; // eax@99 unsigned int v20; // eax@108 unsigned int v21; // eax@109 const char *v22; // eax@111 @@ -15808,7 +15808,7 @@ unsigned int pX; // [sp+70h] [bp-8h]@3 unsigned int pY; // [sp+74h] [bp-4h]@3 - if ( pCurrentScreen == 16 ) + if ( pCurrentScreen == 16 )//окно видео ролика return; if ( _this ) { @@ -15831,33 +15831,30 @@ } if ( pParty->pPickedItem.uItemID ) { - v1 = 0; - do - { - if ( (signed int)pX > word_4E2930[v1] - && (signed int)pX < word_4E2938[v1] - && (signed int)pY > 375 - && (signed int)pY < 466 ) - { - pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(v1 + 1, 1); + //v1 = 0; + //do + for ( pPlayerNum = 0; pPlayerNum < 4; ++pPlayerNum) + { + if ( (signed int)pX > RightClickPortraitXmin[pPlayerNum] && (signed int)pX < RightClickPortraitXmax[pPlayerNum] + && (signed int)pY > 375 && (signed int)pY < 466 ) + { + pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(pPlayerNum + 1, 1); return; } - ++v1; - } - while ( v1 < 4 ); + //++v1; + } + //while ( v1 < 4 ); } pEventTimer->Pause(); if ( pCurrentScreen <= 10 ) { - if ( pCurrentScreen == 10 ) + if ( pCurrentScreen == 10 )//окно ящика { __debugbreak(); if ( !pPlayers[uActiveCharacter]->CanAct() ) { - sprintf(pTmpBuf, - pGlobalTXT_LocalizationStrings[427],//%s не в состоянии %s - pPlayers[uActiveCharacter]->pName, - pGlobalTXT_LocalizationStrings[541]);//Опознать предметы + sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427],//%s не в состоянии %s + pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);//Опознать предметы pWindow.Hint = pTmpBuf; pWindow.uFrameWidth = 384; pWindow.uFrameHeight = 180; @@ -15883,7 +15880,7 @@ { if ( pCurrentScreen != 7 ) { - if ( pCurrentScreen == 8 ) + if ( pCurrentScreen == 8 )//окно книги заклов { if ( dword_507B00_spell_info_to_draw_in_popup ) DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1)); @@ -15891,8 +15888,7 @@ goto LABEL_132; } LABEL_119: - if ( (signed int)pX > 467 - && pCurrentScreen != 14 ) + if ( (signed int)pX > 467 && pCurrentScreen != 14 ) { LABEL_126: identify_item(); @@ -16030,7 +16026,7 @@ GameUI_DrawItemInfo(v8); goto LABEL_132; } - if ( pCurrentScreen == 13 ) + if ( pCurrentScreen == 13 )//окно дома { if ( (signed int)pY < 345 && (signed int)pX < 469 ) sub_4B1A2D(); @@ -16046,29 +16042,29 @@ goto LABEL_125; } pWindow.Hint = 0; - v12 = pGUIWindow_CurrentMenu->pControlsHead; - if ( !v12 ) + pButton = pGUIWindow_CurrentMenu->pControlsHead; + if ( !pButton ) goto LABEL_132; v13 = pY; - v14 = v29; + pStr = v29; while ( 1 ) { - if ( v12->uButtonType != 1 && v12->uButtonType != 3 || (signed int)pX < (signed int)v12->uX || (signed int)pX > (signed int)v12->uZ - || (signed int)v13 < (signed int)v12->uY || (signed int)v13 > (signed int)v12->uW ) + if ( pButton->uButtonType != 1 && pButton->uButtonType != 3 || (signed int)pX < (signed int)pButton->uX || (signed int)pX > (signed int)pButton->uZ + || (signed int)v13 < (signed int)pButton->uY || (signed int)v13 > (signed int)pButton->uW ) goto LABEL_117; - v15 = v12->uControlID; - if ( v15 <= 65 ) - { - if ( v15 == 65 ) - { - pWindow.Hint = pClassDescriptions[v12->uControlParam]; - v14 = pClassNames[v12->uControlParam]; + pControlID = pButton->uControlID; + if ( pControlID <= 65 ) + { + if ( pControlID == 65 ) + { + pWindow.Hint = pClassDescriptions[pButton->uControlParam]; + pStr = pClassNames[pButton->uControlParam]; } else { - if ( v15 ) - { - v16 = v15 - 62; + if ( pControlID ) + { + v16 = pControlID - 62; if ( v16 ) { v17 = v16 - 1; @@ -16076,69 +16072,69 @@ { if ( v17 == 1 ) { - v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(v12->uControlParam + 4); - v14 = pSkillNames[v18]; + v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->uControlParam + 4); + pStr = pSkillNames[v18]; pWindow.Hint = pSkillDesc[v18]; v13 = pY; } goto LABEL_117; } - v14 = pGlobalTXT_LocalizationStrings[668];//Вычесть - v19 = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков" + pStr = pGlobalTXT_LocalizationStrings[668];//Вычесть + pStr2 = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков" } else { - v14 = pGlobalTXT_LocalizationStrings[670];//Добавить - v19 = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков" + pStr = pGlobalTXT_LocalizationStrings[670];//Добавить + pStr2 = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков" } goto LABEL_116; } - pWindow.Hint = pAttributeDescriptions[(signed int)v12->uControlParam % 7]; - v14 = aAttributeNames[(signed int)v12->uControlParam % 7]; + pWindow.Hint = pAttributeDescriptions[(signed int)pButton->uControlParam % 7]; + pStr = aAttributeNames[(signed int)pButton->uControlParam % 7]; } goto LABEL_117; } - if ( v15 == 66 ) - { - v19 = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры. - v14 = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК + if ( pControlID == 66 ) + { + pStr2 = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры. + pStr = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК goto LABEL_116; } - if ( v15 == 67 ) - { - v19 = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда. - v14 = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить + if ( pControlID == 67 ) + { + pStr2 = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда. + pStr = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить goto LABEL_116; } - if ( v15 > 71 ) + if ( pControlID > 71 ) break; LABEL_117: - v12 = v12->pNext; - if ( !v12 ) + pButton = pButton->pNext; + if ( !pButton ) goto LABEL_112; } - if ( v15 > 75 ) - { - if ( v15 == 118 ) - { - v20 = v12->uControlParam; - v14 = pParty->pPlayers[v20].pName; - v19 = pClassDescriptions[pParty->pPlayers[v20].uClass]; + if ( pControlID > 75 ) + { + if ( pControlID == 118 ) + { + v20 = pButton->uControlParam; + pStr = pParty->pPlayers[v20].pName; + pStr2 = pClassDescriptions[pParty->pPlayers[v20].uClass]; LABEL_116: - pWindow.Hint = v19; + pWindow.Hint = pStr2; goto LABEL_117; } goto LABEL_117; } - v21 = pParty->pPlayers[v12->uControlParam].GetSkillIdxByOrder(v15 - 72); + v21 = pParty->pPlayers[pButton->uControlParam].GetSkillIdxByOrder(pControlID - 72); v13 = v21; pY = v21; if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 ) goto LABEL_117; - v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21); + v22 = CharacterUI_GetSkillDescText(pButton->uControlParam, (enum PLAYER_SKILL_TYPE)v21); strcpy(pTmpBuf2, v22); pWindow.Hint = pTmpBuf2; - v14 = pSkillNames[pY]; + pStr = pSkillNames[pY]; LABEL_112: v23 = pWindow.Hint; if ( pWindow.Hint ) @@ -16160,7 +16156,7 @@ pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1; pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1; v25 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0x9B); - sprintf(pTmpBuf, format_4E2D80, v25, v14); + sprintf(pTmpBuf, format_4E2D80, v25, pStr); pWindow.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3); pWindow.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v23, 0, 0, 0); }
--- 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;
--- a/mm7_data.cpp Mon Dec 10 17:07:27 2012 +0600 +++ b/mm7_data.cpp Tue Dec 11 17:23:17 2012 +0600 @@ -475,8 +475,8 @@ char byte_4E28FC; // weak unsigned int uGammaPos; int dword_4E2910[777]; // weak -__int16 word_4E2930[4]; -__int16 word_4E2938[4]; +__int16 RightClickPortraitXmin[4]; +__int16 RightClickPortraitXmax[4]; void *off_4E2A12; // weak int dword_4E2A18[5]; int dword_4E2A2C[9];
--- a/mm7_data.h Mon Dec 10 17:07:27 2012 +0600 +++ b/mm7_data.h Tue Dec 11 17:23:17 2012 +0600 @@ -461,8 +461,8 @@ extern char byte_4E28FC; // weak extern unsigned int uGammaPos; extern int dword_4E2910[]; // weak -extern __int16 word_4E2930[4]; -extern __int16 word_4E2938[4]; +extern __int16 RightClickPortraitXmin[4]; +extern __int16 RightClickPortraitXmax[4]; extern void *off_4E2A12; // weak extern int dword_4E2A18[5]; extern int dword_4E2A2C[9];