Mercurial > mm7
diff mm7_4.cpp @ 506:9b4bdf6089af
Слияние
author | Ritor1 |
---|---|
date | Tue, 26 Feb 2013 18:48:05 +0600 |
parents | d027c6848fbb 5b6e2021c6fe |
children | 00ce82758c72 |
line wrap: on
line diff
--- a/mm7_4.cpp Tue Feb 26 18:47:30 2013 +0600 +++ b/mm7_4.cpp Tue Feb 26 18:48:05 2013 +0600 @@ -9069,20 +9069,20 @@ ItemGen *v7; // ecx@13 signed int v8; // esi@17 unsigned int v9; // eax@19 - char v10; // [sp+8h] [bp-44h]@12 - char v11; // [sp+10h] [bp-3Ch]@12 - char v12; // [sp+18h] [bp-34h]@18 - char v13; // [sp+20h] [bp-2Ch]@17 - char v14; // [sp+28h] [bp-24h]@17 - char v15; // [sp+30h] [bp-1Ch]@17 - char v16; // [sp+38h] [bp-14h]@5 + POINT v10; // [sp+8h] [bp-44h]@12 + POINT v11; // [sp+10h] [bp-3Ch]@12 + POINT v12; // [sp+18h] [bp-34h]@18 + POINT v13; // [sp+20h] [bp-2Ch]@17 + POINT v14; // [sp+28h] [bp-24h]@17 + POINT v15; // [sp+30h] [bp-1Ch]@17 + POINT v16; // [sp+38h] [bp-14h]@5 POINT a2; // [sp+40h] [bp-Ch]@5 int v18; // [sp+48h] [bp-4h]@5 //v0 = pPlayers[uActiveCharacter]; - if ( dword_F8B198 <= 0 ) + if ( in_current_bilding_type <= 0 ) return; - if ( dword_F8B198 <= 4 ) + if ( in_current_bilding_type <= BildingType_AlchemistShop ) { if ( dword_F8B19C != 2 ) { @@ -9090,10 +9090,10 @@ return; if ( dword_F8B19C <= 5 || dword_F8B19C == 94 ) { - v8 = pMouse->GetCursorPos((POINT *)&v15)->x - 14; - v18 = (v8 >> 5) + 14 * ((pMouse->GetCursorPos((POINT *)&v14)->y - 17) >> 5); - if ( pMouse->GetCursorPos((POINT *)&v13)->x <= 13 - || pMouse->GetCursorPos((POINT *)&v12)->x >= 462 + v8 = pMouse->GetCursorPos(&v15)->x - 14; + v18 = (v8 >> 5) + 14 * ((pMouse->GetCursorPos(&v14)->y - 17) >> 5); + if ( pMouse->GetCursorPos(&v13)->x <= 13 + || pMouse->GetCursorPos(&v12)->x >= 462 || (v9 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex(&v18)) == 0 ) return; v7 = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[v9-1]; @@ -9104,8 +9104,8 @@ if ( dword_F8B19C != 95 ) return; } - v4 = pMouse->GetCursorPos((POINT *)&v11); - v5 = pRenderer->pActiveZBuffer[v4->x + pSRZBufferLineOffsets[pMouse->GetCursorPos((POINT *)&v10)->y]] & 0xFFFF; + v4 = pMouse->GetCursorPos(&v11); + v5 = pRenderer->pActiveZBuffer[v4->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v10)->y]] & 0xFFFF; v18 = v5; if ( !v5 ) return; @@ -9113,13 +9113,13 @@ v7 = (ItemGen *)((char *)&pParty->pPickedItem + 4 * v6 + 4); if ( dword_F8B19C != 2 ) // v7 = (ItemGen *)&pParty->field_C59C[v6 + 715]; - v7 =&pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v5]; + v7 =&pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v5]; goto LABEL_15; } - if ( dword_F8B198 <= 16 && dword_F8B19C == 18 ) + if ( in_current_bilding_type <= BildingType_16 && dword_F8B19C == BildingType_18 ) { v1 = pMouse->GetCursorPos(&a2); - v2 = v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos((POINT *)&v16)->y]; + v2 = v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v16)->y]; v3 = pRenderer->pActiveZBuffer[v2] & 0xFFFF; v18 = pRenderer->pActiveZBuffer[v2] & 0xFFFF; if ( v18 ) @@ -9180,19 +9180,19 @@ int v6; // esi@20 int v7[4]; // [sp+Ch] [bp-10h]@12 - if ( dword_F8B198 > 0 ) + if ( in_current_bilding_type > 0 ) { v0 = 3; - if ( dword_F8B198 > 3 ) - { - if ( dword_F8B198 == 22 ) + if ( in_current_bilding_type > BildingType_MagicShop ) + { + if ( in_current_bilding_type == BildingType_Bank ) { if ( !dword_F8B1E4 ) return; } else { - if ( dword_F8B198 != 23 ) + if ( in_current_bilding_type != BildingType_Temple ) return; } v1 = (unsigned int)window_SpeakInHouse->ptr_1C; @@ -9638,7 +9638,7 @@ strcpy(v22, v24); pParty->field_709 = 0; sub_44A56A(); - PrepareHouse((HOUSE_TYPE)(int)window_SpeakInHouse->ptr_1C); + PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C); dword_F8B19C = 1; pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); @@ -10350,94 +10350,61 @@ //----- (004B36CC) -------------------------------------------------------- -GUIButton *__fastcall sub_4B36CC(int a1, unsigned int a2) -{ - return pDialogueWindow->CreateButton( - 0x1E0u, - 30 * a1 + 146, - 0x8Cu, - 0x1Eu, - 1, - 0, - 0x195u, - a2, - 0, - "", - 0); +void CreateButtonInColumn( int column_pos, unsigned int control_id ) + { + pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30, 1, 0, 0x195u, control_id, 0, "", 0); } //----- (004B3A72) -------------------------------------------------------- -int __thiscall sub_4B3A72(int a1) -{ - int v1; // esi@1 - int result; // eax@4 - - v1 = 0; +void sub_4B3A72( int a1 ) + { + int num_buttons; // esi@1 + + num_buttons = 0; if ( a1 == 21 ) { - sub_4B36CC(0, 0x66u); - v1 = 2; - sub_4B36CC(1, 0x67u); - if ( pParty->HasItem(0x28Bu) ) - { - v1 = 3; - sub_4B36CC(2, 0x68u); - } - } - pDialogueWindow->_41D08F(v1, 1, 0, 2); - result = pDialogueWindow->pNumPresenceButton; + CreateButtonInColumn(0, 0x66u); + num_buttons = 2; + CreateButtonInColumn(1, 0x67u); + if ( pParty->HasItem(651) ) //Arcomage Deck + { + num_buttons = 3; + CreateButtonInColumn(2, 0x68u); + } + } + pDialogueWindow->_41D08F(num_buttons, 1, 0, 2); dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; - return result; } // F8B1E0: using guessed type int dword_F8B1E0; //----- (004B3AD4) -------------------------------------------------------- -int __fastcall sub_4B3AD4(signed int a1) -{ - int result; // eax@7 - int v2; // [sp-10h] [bp-10h]@4 - int v3; // [sp-Ch] [bp-Ch]@4 - int v4; // [sp-8h] [bp-8h]@4 - int v5; // [sp-4h] [bp-4h]@4 - +void sub_4B3AD4( signed int a1 ) + { if ( a1 > 0 ) { if ( a1 <= 3 ) { - sub_4B36CC(0, 3u); - sub_4B36CC(1, 4u); - sub_4B36CC(2, 5u); - v5 = 2; - v4 = 0; - v3 = 1; - v2 = 3; - goto LABEL_6; + CreateButtonInColumn(0, 3u); + CreateButtonInColumn(1, 4u); + CreateButtonInColumn(2, 5u); + pDialogueWindow->_41D08F(3, 1, 0, 2); } if ( a1 == 4 ) { - sub_4B36CC(0, 3u); - sub_4B36CC(1, 4u); - v5 = 2; - v4 = 0; - v3 = 1; - v2 = 2; -LABEL_6: - pDialogueWindow->_41D08F(v2, v3, v4, v5); - goto LABEL_7; - } - } -LABEL_7: - result = pDialogueWindow->pNumPresenceButton; + CreateButtonInColumn(0, 3u); + CreateButtonInColumn(1, 4u); + pDialogueWindow->_41D08F(2, 1, 0, 2); + } + } dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; - return result; } // F8B1E0: using guessed type int dword_F8B1E0; //----- (004B3B42) -------------------------------------------------------- -int __fastcall sub_4B3B42(signed int a1) -{ +void sub_4B3B42( signed int a1 ) + { int v1; // ecx@18 int v2; // ecx@19 int v3; // ecx@20 @@ -10462,11 +10429,11 @@ { if ( a1 == 23 ) { - sub_4B36CC(0, 0xAu); - sub_4B36CC(1, 0xBu); + CreateButtonInColumn(0, 0xAu); + CreateButtonInColumn(1, 0xBu); v14 = 96; LABEL_41: - sub_4B36CC(2, v14); + CreateButtonInColumn(2, v14); v17 = 2; v11 = 0; v10 = 1; @@ -10479,31 +10446,31 @@ { if ( a1 != 30 ) goto LABEL_43; - sub_4B36CC(0, 0x11u); + CreateButtonInColumn(0, 0x11u); v16 = 96; goto LABEL_37; } - sub_4B36CC(0, 0x69u); - sub_4B36CC(1, 0x6Au); - sub_4B36CC(2, 0x6Bu); + CreateButtonInColumn(0, 0x69u); + CreateButtonInColumn(1, 0x6Au); + CreateButtonInColumn(2, 0x6Bu); v12 = 108; } else { if ( a1 == 22 ) { - sub_4B36CC(0, 7u); + CreateButtonInColumn(0, 7u); v16 = 8; goto LABEL_37; } v1 = a1 - 14; if ( !v1 ) { - sub_4B36CC(0, 0x12u); - sub_4B36CC(1, 0x30u); - sub_4B36CC(2, 0x31u); - sub_4B36CC(3, 0x32u); - sub_4B36CC(4, 0x33u); + CreateButtonInColumn(0, 0x12u); + CreateButtonInColumn(1, 0x30u); + CreateButtonInColumn(2, 0x31u); + CreateButtonInColumn(3, 0x32u); + CreateButtonInColumn(4, 0x33u); v17 = 2; v11 = 0; v10 = 1; @@ -10518,10 +10485,10 @@ { if ( v3 != 4 ) goto LABEL_43; - sub_4B36CC(0, 0xFu); - sub_4B36CC(1, 0x10u); + CreateButtonInColumn(0, 0xFu); + CreateButtonInColumn(1, 0x10u); v4 = 3; - sub_4B36CC(2, 0x60u); + CreateButtonInColumn(2, 0x60u); v5 = (signed int)window_SpeakInHouse->ptr_1C; if ( v5 < 108 || v5 > 120 ) goto LABEL_28; @@ -10532,7 +10499,7 @@ else { v4 = 1; - sub_4B36CC(0, 0x63u); + CreateButtonInColumn(0, 0x63u); if ( !pParty->uFine ) { LABEL_28: @@ -10548,16 +10515,16 @@ v7 = 1; v6 = 100; } - sub_4B36CC(v7, v6); + CreateButtonInColumn(v7, v6); goto LABEL_28; } - sub_4B36CC(0, 0x12u); - sub_4B36CC(1, 0x34u); - sub_4B36CC(2, 0x35u); + CreateButtonInColumn(0, 0x12u); + CreateButtonInColumn(1, 0x34u); + CreateButtonInColumn(2, 0x35u); v12 = 54; } LABEL_39: - sub_4B36CC(3, v12); + CreateButtonInColumn(3, v12); v17 = 2; v11 = 0; v10 = 1; @@ -10566,10 +10533,10 @@ } if ( a1 == 13 ) { - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v16 = 56; LABEL_37: - sub_4B36CC(1, v16); + CreateButtonInColumn(1, v16); v17 = 2; v11 = 0; v10 = 1; @@ -10582,56 +10549,54 @@ case 2: case 3: case 4: - sub_4B36CC(0, 2u); - sub_4B36CC(1, 0x5Fu); - sub_4B36CC(2, 0x5Eu); + CreateButtonInColumn(0, 2u); + CreateButtonInColumn(1, 0x5Fu); + CreateButtonInColumn(2, 0x5Eu); v12 = 96; goto LABEL_39; case 5: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v13 = 48; goto LABEL_9; case 6: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v13 = 49; goto LABEL_9; case 7: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v13 = 50; goto LABEL_9; case 8: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v13 = 51; LABEL_9: - sub_4B36CC(1, v13); + CreateButtonInColumn(1, v13); v14 = 72; goto LABEL_41; case 9: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v15 = 52; goto LABEL_13; case 10: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v15 = 53; goto LABEL_13; case 11: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v15 = 54; LABEL_13: - sub_4B36CC(1, v15); + CreateButtonInColumn(1, v15); v14 = 61; goto LABEL_41; case 12: - sub_4B36CC(0, 0x12u); + CreateButtonInColumn(0, 0x12u); v16 = 55; goto LABEL_37; default: break; } LABEL_43: - result = pDialogueWindow->pNumPresenceButton; dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; - return result; } // F8B1E0: using guessed type int dword_F8B1E0; @@ -10816,7 +10781,7 @@ pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", 0); if ( pDialogueNPCCount == 1 && dword_591080 ) { - sub_4B3B42(dword_F8B198); + sub_4B3B42(in_current_bilding_type); } else { @@ -10891,17 +10856,12 @@ //----- (004B46A5) -------------------------------------------------------- -char __fastcall sub_4B46A5(const char *Str, int a5) -{ - const char *v2; // esi@1 - int v3; // edi@1 +char __fastcall DrawTextAtStatusBar(const char *sText, int font_color) +{ int v4; // eax@1 - - v2 = Str; - v3 = a5; - pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar); - v4 = pFontLucida->AlignText_Center(0x1C2u, v2); - return pPrimaryWindow->DrawText(pFontLucida, v4 + 11, 357, v3, v2, 0, 0, 0); + pRenderer->DrawTextureRGB(0, 352, pTexture_StatusBar); + v4 = pFontLucida->AlignText_Center(450, sText); + return pPrimaryWindow->DrawText(pFontLucida, v4 + 11, 357, font_color, sText, 0, 0, 0); } //----- (004B46F8) -------------------------------------------------------- @@ -11611,7 +11571,7 @@ { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); - sub_4B46A5(pGlobalTXT_LocalizationStrings[198], 0);// "Select the Item to Repair" + DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[198], 0);// "Select the Item to Repair" result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); if ( !result || (v27 = pMouse->GetCursorPos(&v110)->x - 14, @@ -11697,7 +11657,7 @@ { draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); - sub_4B46A5(pGlobalTXT_LocalizationStrings[197], 0);// "Select the Item to Identify" + DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[197], 0);// "Select the Item to Identify" result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); if ( result ) { @@ -11742,7 +11702,7 @@ } draw_leather(); CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); - sub_4B46A5(pGlobalTXT_LocalizationStrings[199], 0);// "Select the Item to Sell" + DrawTextAtStatusBar(pGlobalTXT_LocalizationStrings[199], 0);// "Select the Item to Sell" result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); if ( !result || (v11 = pMouse->GetCursorPos(&v107)->x - 14, @@ -11785,7 +11745,7 @@ // if ( pParty->field_777C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)] ) if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID); { - v50 = dword_F8B168[v49]; + v50 = ItemsInShopTexture[v49]; v51 = 152 - v50->uTextureHeight; if ( (signed int)v51 < 1 ) v51 = 0; @@ -11794,7 +11754,7 @@ { if ( v122 == 5 ) { - v53 = dword_F8B168[5]->uTextureWidth; + v53 = ItemsInShopTexture[5]->uTextureWidth; if ( (signed int)v52 > 457 - v53 ) v52 = 457 - v53; } @@ -11805,7 +11765,7 @@ v52 = 18; } pRenderer->DrawTextureTransparent(v52, v51, v50); - sub_40F92A(&pRenderer->pActiveZBuffer[v52 + 640 * v51], dword_F8B168[v122], v122 + 1); + sub_40F92A(&pRenderer->pActiveZBuffer[v52 + 640 * v51], ItemsInShopTexture[v122], v122 + 1); v49 = v122; } ++v49; @@ -11818,14 +11778,14 @@ //if ( pParty->field_777C[9 * (v122 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 54] ) if ( pParty->StandartItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v122+1].uItemID); { - v54 = dword_F8B168[v122 + 6]; + v54 = ItemsInShopTexture[v122 + 6]; v55 = 306 - v54->uTextureHeight; v56 = 75 * v122 - v54->uTextureWidth / 2 + 40; if ( v122 ) { if ( v122 == 5 ) { - v57 = dword_F8B168[11]->uTextureWidth; + v57 = ItemsInShopTexture[11]->uTextureWidth; if ( (signed int)v56 > 457 - v57 ) v56 = 457 - v57; } @@ -11836,7 +11796,7 @@ v56 = 18; } pRenderer->DrawTextureTransparent(v56, v55, v54); - sub_40F92A(&pRenderer->pActiveZBuffer[v56 + 640 * v55], dword_F8B168[v122 + 6], v122 + 7); + sub_40F92A(&pRenderer->pActiveZBuffer[v56 + 640 * v55], ItemsInShopTexture[v122 + 6], v122 + 7); } ++v122; } @@ -11847,9 +11807,9 @@ do { // if ( pParty->field_C59C[9 * (v49 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) - if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID) - { - v58 = dword_F8B168[v49]; + if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uItemID) + { + v58 = ItemsInShopTexture[v49]; v59 = 152 - v58->uTextureHeight; if ( (signed int)v59 < 1 ) v59 = 0; @@ -11858,7 +11818,7 @@ { if ( v122 == 5 ) { - v61 = dword_F8B168[5]->uTextureWidth; + v61 = ItemsInShopTexture[5]->uTextureWidth; if ( (signed int)v60 > 457 - v61 ) v60 = 457 - v61; } @@ -11869,7 +11829,7 @@ v60 = 18; } pRenderer->DrawTextureTransparent(v60, v59, v58); - sub_40F92A(&pRenderer->pActiveZBuffer[v60 + 640 * v59], dword_F8B168[v122], v122 + 1); + sub_40F92A(&pRenderer->pActiveZBuffer[v60 + 640 * v59], ItemsInShopTexture[v122], v122 + 1); v49 = v122; } ++v49; @@ -11880,9 +11840,9 @@ do { //if ( pParty->Spell_Item[(unsigned int)window_SpeakInHouse->ptr_1C][v49] + 778] ) //weak - if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uAttributes) - { - v62 = dword_F8B168[v122 + 6]; + if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v49].uAttributes) + { + v62 = ItemsInShopTexture[v122 + 6]; v63 = 306 - v62->uTextureHeight; if ( (signed int)v63 < 1 ) v63 = 0; @@ -11891,7 +11851,7 @@ { if ( v122 == 5 ) { - v65 = dword_F8B168[11]->uTextureWidth; + v65 = ItemsInShopTexture[11]->uTextureWidth; if ( (signed int)v64 > 457 - v65 ) v64 = 457 - v65; } @@ -11902,7 +11862,7 @@ v64 = 18; } pRenderer->DrawTextureTransparent(v64, v63, v62); - sub_40F92A(&pRenderer->pActiveZBuffer[v64 + 640 * v63], dword_F8B168[v122 + 6], v122 + 7); + sub_40F92A(&pRenderer->pActiveZBuffer[v64 + 640 * v63], ItemsInShopTexture[v122 + 6], v122 + 7); } ++v122; } @@ -11928,7 +11888,7 @@ do { //if ( pParty->field_C59C[9 * (v66 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C) + 724] ) - if (pParty->SpecialItemsInShop[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID) + if (pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v66].uItemID) ++v117; ++v66; } @@ -11947,13 +11907,12 @@ if ( dword_F8B19C != 2 ) v69 = pGlobalTXT_LocalizationStrings[196];// "Select the Special Item to Buy" } - sub_4B46A5(v69, 0); + DrawTextAtStatusBar(v69, 0); if ( !v117 ) - return (int)v112._4B1854( - __PAIR__( - pParty->field_3C.field_50[2 * (unsigned int)window_SpeakInHouse->ptr_1C + 1], - pParty->field_3C.field_50[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) - - pParty->uTimePlayed); + { + v112.DrawCurrentTime( pParty->field_3C.field_50[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed); + return 0; + } v70 = pMouse->GetCursorPos(&v102); result = v70->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v100)->y]; if ( pRenderer->pActiveZBuffer[result] & 0xFFFF ) @@ -11965,7 +11924,7 @@ v74 = (ItemGen *)&pParty->StandartItemsInShops[v72][v71]; if ( dword_F8B19C != 2 ) // v74 = (ItemGen *)&pParty->field_C59C[v73 + 724]; - v74 =&pParty->SpecialItemsInShop[v72][v71]; + v74 =&pParty->SpecialItemsInShops[v72][v71]; if ( v67 && Str ) { v10 = pGlobalTXT_LocalizationStrings[181];// "Steal %24" @@ -12457,8 +12416,8 @@ { if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v6 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) { - pRenderer->DrawTextureTransparent(v63, 0x5Au, dword_F8B168[v6]); - ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 230528), dword_F8B168[v6], v6 + 1); + pRenderer->DrawTextureTransparent(v63, 0x5Au, ItemsInShopTexture[v6]); + ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 230528), ItemsInShopTexture[v6], v6 + 1); v1 = v58; } v63 += 70; @@ -12473,8 +12432,8 @@ { if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v7 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) ) { - pRenderer->DrawTextureTransparent(v63, 0xFAu, dword_F8B168[v7]); - ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), dword_F8B168[v7], v7 + 1); + pRenderer->DrawTextureTransparent(v63, 0xFAu, ItemsInShopTexture[v7]); + ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), ItemsInShopTexture[v7], v7 + 1); v1 = v58; } v63 += 70; @@ -12500,13 +12459,16 @@ v11 = pGlobalTXT_LocalizationStrings[195]; if ( dword_F8B19C != 2 ) v11 = pGlobalTXT_LocalizationStrings[196]; - sub_4B46A5(v11, 0); + DrawTextAtStatusBar(v11, 0); if ( !v8 ) - return (int)v52._4B1854( + { + v52.DrawCurrentTime( __PAIR__( *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44472], *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)window_SpeakInHouse->ptr_1C + 44468]) - pParty->uTimePlayed); + return 0; + } v12 = pMouse->GetCursorPos(&v51); result = v12->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v50)->y]; v13 = pRenderer->pActiveZBuffer[result] & 0xFFFF; @@ -13172,9 +13134,7 @@ pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5); return result; // void func } - if ( !(unsigned __int16)_449B57_test_bit( - (unsigned __int8 *)v1->field_152, - word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) ) + if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v1->field_152, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) ) { v24 = pNPCTopics[171].pText; v25 = v31; @@ -14249,7 +14209,7 @@ } //----- (0044606A) -------------------------------------------------------- -void PrepareHouse(HOUSE_TYPE house) +void PrepareHouse(HOUSE_ID house) { //unsigned int v1; // ebx@1 //signed int v2; // esi@1 @@ -14372,9 +14332,9 @@ //----- (0044622E) -------------------------------------------------------- -bool __fastcall EnterHouse(HOUSE_TYPE uHouseID) -{ - //enum HOUSE_TYPE v1; // edi@1 +bool __fastcall EnterHouse(enum HOUSE_ID uHouseID) +{ + //enum HOUSE_ID v1; // edi@1 //int v2; // edi@5 unsigned int uOpenTime; // eax@5 int uCloseTime; // esi@5 @@ -14397,7 +14357,7 @@ //const char *v22; // [sp-4h] [bp-40h]@33 char pContainer[40]; // [sp+Ch] [bp-30h]@32 unsigned int v24; // [sp+34h] [bp-8h]@5 - //enum HOUSE_TYPE v25; // [sp+38h] [bp-4h]@1 + //enum HOUSE_ID v25; // [sp+38h] [bp-4h]@1 //v1 = uHouseID; //v25 = uHouseID; @@ -14476,17 +14436,17 @@ pAudioPlayer->StopChannels(-1, -1); //uCurrentHouse_Animation = p2DEvents_minus1___02[v2]; uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID; - dword_F8B198 = LOBYTE(pAnimatedRooms[uCurrentHouse_Animation].field_C); - if ( dword_F8B198 == 20 && pParty->uFine ) // going 2 jail + in_current_bilding_type = LOBYTE(pAnimatedRooms[uCurrentHouse_Animation].field_C); + if ( in_current_bilding_type == BildingType_20 && pParty->uFine ) // going 2 jail { uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID; //v25 = HOUSE_187; uHouseID = HOUSE_JAIL; v12 = LODWORD(pParty->uTimePlayed); LODWORD(pParty->uTimePlayed) += 0x7620000u; - v14 = LOBYTE(pAnimatedRooms[(signed __int16)p2DEvents[HOUSE_186].uAnimationID].field_C); + v14 = LOBYTE(pAnimatedRooms[(signed __int16)p2DEvents[HOUSE_LORD_AND_JUDGE].uAnimationID].field_C); pParty->uTimePlayed = __PAIR__(HIDWORD(pParty->uTimePlayed), v12) + 0x7620000; - dword_F8B198 = v14; + in_current_bilding_type = v14; //v13 = pParty->pPlayers;//[0].uNumDivineInterventionCastsThisDay; //do ++pParty->uNumPrisonTerms;