Mercurial > mm7
changeset 744:4b06e19fcdbc
Слияние
author | Ritor1 |
---|---|
date | Fri, 22 Mar 2013 23:42:21 +0600 |
parents | 353ff9ea11e6 (current diff) 9cc972ebd3cf (diff) |
children | 0b7a55e955f2 |
files | mm7_4.cpp |
diffstat | 15 files changed, 121 insertions(+), 102 deletions(-) [+] |
line wrap: on
line diff
--- a/Arcomage.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/Arcomage.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -5668,7 +5668,7 @@ while ( v10 <= 120 ); if ( v10 == 121 ) _449B7E_toggle_bit(pParty->_quest_bits, 238, 1u); - v11 = pParty->pPlayers[0]._guilds_member_bits; + v11 = (char *)pParty->pPlayers[0]._guilds_member_bits; do { if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v11, 1) ) @@ -5682,7 +5682,7 @@ } else { - v12 = pParty->pPlayers[0]._guilds_member_bits; + v12 = (char *)pParty->pPlayers[0]._guilds_member_bits; do { if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v12, 1) )
--- a/GUIWindow.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/GUIWindow.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -1785,7 +1785,7 @@ pMainScreenNum = pCurrentScreen; pCurrentScreen = SCREEN_NPC_DIALOGUE; pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], //"Exit" - (Texture *)(uExitCancelTextureId != -1 ? &pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); + pIcons_LOD->GetTexture(uExitCancelTextureId), 0); if ( pWindow->par1C != 1 ) { num_menu_buttons = 0; @@ -1877,9 +1877,9 @@ pMainScreenNum = pCurrentScreen; pCurrentScreen = SCREEN_CHANGE_LOCATION; pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Bu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[156],// - (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); + pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Au, 0, 0x59u, pWindow->Hint, - (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); + pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 0x3Fu, 0x49u, 1, 0, 0x5Au, 1u, 0x20u, pWindow->Hint, 0, 0, 0); pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x5Au, 1u, 0, pWindow->Hint, 0); break; @@ -1907,7 +1907,7 @@ { pCurrentScreen = SCREEN_HOUSE; pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[80],// - (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); + pIcons_LOD->GetTexture(uExitCancelTextureId), 0); v25 = uNumDialogueNPCPortraits; v26 = 0; if ( uNumDialogueNPCPortraits > 0 ) @@ -1930,10 +1930,10 @@ v30 = v27; v29 = (char*)pGlobalTXT_LocalizationStrings[435];// "Converse with %s" ^Pt[%s] } - sprintf(&byte_591180[100 * v26], v29, v30); + sprintfex(byte_591180[v26], v29, v30); HouseNPCData[v26 + 7] = (NPCData *)pWindow->CreateButton(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v26], pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v26], - 0x3Fu, 0x49u, 1, 0, 0x19Au, v26, 0, &byte_591180[100 * v26], 0, 0, 0); + 0x3Fu, 0x49u, 1, 0, 0x19Au, v26, 0, byte_591180[v26], 0, 0, 0); ++v26; v25 = uNumDialogueNPCPortraits; }
--- a/GUIWindow.h Fri Mar 22 23:42:09 2013 +0600 +++ b/GUIWindow.h Fri Mar 22 23:42:21 2013 +0600 @@ -195,7 +195,7 @@ UIMSG_PlayerCreationRemoveDownSkill = 0x4B, UIMSG_4E = 0x4E, UIMSG_SPellbook_ShowHightlightedSpellInfo = 0x4F, - UIMSG_51 = 0x51, + UIMSG_BuyInShop_Identify_Repair = 0x51, UIMSG_LoadGame = 0x52, UIMSG_SaveGame = 0x53, UIMSG_54 = 0x54,
--- a/IndoorCameraD3D.h Fri Mar 22 23:42:09 2013 +0600 +++ b/IndoorCameraD3D.h Fri Mar 22 23:42:21 2013 +0600 @@ -169,14 +169,14 @@ float fov_x; float fov_y; float inv_fov; - float field_DC; - float field_E0; - float field_E4; + float blv_party_x; + float blv_party_y; + float blv_party_z; char field_E8[32]; float field_108; - float field_10C; - float field_110; - float field_114; + float blv_party_x_2; + float blv_party_y_2; + float blv_party_z_2; char field_118[32]; float field_138; char field_13C[44];
--- a/Monsters.h Fri Mar 22 23:42:09 2013 +0600 +++ b/Monsters.h Fri Mar 22 23:42:21 2013 +0600 @@ -126,7 +126,10 @@ unsigned __int8 uResLight; unsigned __int8 uResDark; unsigned __int8 uResPhysical; - unsigned __int8 uSpecialAbilityType; + unsigned __int8 uSpecialAbilityType; // 0 SPECIAL_ABILITY_TYPE_NONE + // 1 SPECIAL_ABILITY_TYPE_SHOT + // 2 SPECIAL_ABILITY_TYPE_SUMMON + // 3 SPECIAL_ABILITY_TYPE_EXPLODE unsigned __int8 uSpecialAbilityDamageDiceRolls; unsigned __int8 uSpecialAbilityDamageDiceSides; unsigned __int8 uSpecialAbilityDamageDiceBonus;
--- a/Player.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/Player.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -8917,7 +8917,7 @@ v3 = 1; v14->PlaySound(SPEECH_96, 0); } - v15 = v4->_guilds_member_bits; + v15 = (char *)v4->_guilds_member_bits; goto LABEL_44; case VAR_Experience: v16 = __CFADD__(val, LODWORD(Dst->uExperience));
--- a/Player.h Fri Mar 22 23:42:09 2013 +0600 +++ b/Player.h Fri Mar 22 23:42:21 2013 +0600 @@ -13,6 +13,9 @@ #define PLAYER_BUFF_REGENERATION 12 +#define PLAYER_GUID_BITS__SPIRIT_MEMBERSHIP 58 + + /* 301 */ enum PlayerSpeech { @@ -653,7 +656,7 @@ }; unsigned __int16 pActiveSkills[37]; }; - char _guilds_member_bits[64]; + unsigned char _guilds_member_bits[64]; PlayerSpells spellbook; char field_1F5[30]; // used to be [31] ItemGen pInventoryItems[126];
--- a/UIHouses.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/UIHouses.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -357,8 +357,8 @@ //----- (0044622E) -------------------------------------------------------- -bool EnterHouse(enum HOUSE_ID uHouseID) - { +bool EnterHouse(enum HOUSE_ID uHouseID) +{ //enum HOUSE_ID v1; // edi@1 //int v2; // edi@5 signed int uOpenTime; // eax@5 @@ -498,32 +498,32 @@ } } else - { //guilds - v19 = guild_mambership_flags[uHouseID-139]; //guilds flags + { //guilds + v19 = guild_mambership_flags[uHouseID - HOUSE_FIRE_GUILD_INITIATE_EMERALD_ISLE]; //guilds flags //v20 = uHouseID; //if ( !((unsigned __int8)(0x80u >> v19 % 8) & pPlayers[uActiveCharacter]->_guilds_member_bits[v19 /8]) ) - if(_449B57_test_bit((unsigned char*)pPlayers[uActiveCharacter]->_guilds_member_bits,v19)) - { - HousePlaySomeSound(uHouseID, 3); + if(_449B57_test_bit(pPlayers[uActiveCharacter]->_guilds_member_bits,v19)) + { + PlayHouseSound(uHouseID, HouseSound_Greeting_2); return 1; - } - } - HousePlaySomeSound(uHouseID, 1); + } + } + PlayHouseSound(uHouseID, HouseSound_Greeting); dword_5C35D4 = 1; return 1; } } //----- (004B1E92) -------------------------------------------------------- -void __fastcall HousePlaySomeSound(unsigned int uHouseID, int a2) - { +void PlayHouseSound(unsigned int uHouseID, HouseSoundID sound) +{ //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * uHouseID]].field_C) ) if ( pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId ) pAudioPlayer->PlaySound( //(SoundID)(a2 + 100 * (BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * uHouseID]].field_C) + 300)), - (SoundID)(a2 + 100 * (pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId) + 300), + (SoundID)(sound + 100 * (pAnimatedRooms[p2DEvents[uHouseID - 1].uAnimationID].uRoomSoundId + 300)), 806, 0, -1, 0, 0, 0, 0); - } +} //----- (004B4F4F) -------------------------------------------------------- char *__cdecl JailDialog() @@ -734,7 +734,7 @@ } if ( v1 > pParty->uNumGold ) { - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); v2 = pParty->uNumGold; } if ( v2 > pParty->uFine ) @@ -830,7 +830,7 @@ } if ( v6 > pParty->uNumGold ) { - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); v7 = pParty->uNumGold; } if ( v7 ) @@ -877,7 +877,7 @@ { if ( v2 > pParty->uNumGoldInBank ) { - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); v3 = pParty->uNumGoldInBank; } if ( v3 ) @@ -1187,7 +1187,7 @@ { Party::TakeGold((unsigned int)pOutString); v27 = (int)window_SpeakInHouse->ptr_1C; - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); dialog_menu_id = 0; sub_4BD8B5(); sub_4B1D27(); @@ -1203,7 +1203,7 @@ return; } ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 4); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); break; } @@ -1297,12 +1297,12 @@ Party::TakeGold(v7); //pParty->uNumFoodRations = (signed __int64)p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C]; pParty->uNumFoodRations = (signed __int64)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 3); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); return; } - ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 4); + ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2); // "You don't have enough gold" + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Goodbye); pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, v5, 0); break; } @@ -3224,7 +3224,7 @@ if ( pParty->uNumGold < v63 ) { ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); //"You don't have enough gold" - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); } else { @@ -3708,7 +3708,7 @@ { LABEL_55: ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); goto LABEL_46; } Party::TakeGold(v2); @@ -4057,7 +4057,7 @@ if ( pParty->uNumGold >= v11) { Party::TakeGold(v11); - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); ++pPlayers[uActiveCharacter]->uLevel; pPlayers[uActiveCharacter]->uSkillPoints += pPlayers[uActiveCharacter]->uLevel / 10 + 5; pPlayers[uActiveCharacter]->sHealth = pPlayers[uActiveCharacter]->GetMaxHealth(); @@ -4094,7 +4094,7 @@ ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold" v63 = 4; LABEL_55: - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v63); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v63); //LABEL_56: /*result = pMessageQueue_50CBD0->uNumMessages; if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
--- a/UIHouses.h Fri Mar 22 23:42:09 2013 +0600 +++ b/UIHouses.h Fri Mar 22 23:42:21 2013 +0600 @@ -57,6 +57,14 @@ HOUSE_601 = 601//??? }; +enum HouseSoundID: unsigned __int32 +{ + HouseSound_Greeting = 1, + HouseSound_NotEnoughMoney = 2, + HouseSound_Greeting_2 = 3, // good greeting when you're guild member + HouseSound_Goodbye = 4 // farewells when bought something +}; + int __cdecl TrainingDialog(); char *__cdecl JailDialog(); void MagicShopDialog(); @@ -68,7 +76,7 @@ void __cdecl TownHallDialog(); void __cdecl BankDialog(); void __cdecl TavernDialog(); -void __fastcall HousePlaySomeSound(unsigned int uHouseID, int a2); // idb +void PlayHouseSound(unsigned int uHouseID, HouseSoundID sound); // idb void __cdecl WeaponShopDialog(); void __cdecl AlchemistDialog(); void __cdecl ArmorShopDialog();
--- a/mm7_2.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/mm7_2.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -1698,7 +1698,7 @@ v39 = 4; else v39 = 2; - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v39); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v39); } else { @@ -1761,7 +1761,7 @@ v39 = 4; else v39 = 2; - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v39); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, v39); } else { @@ -1907,7 +1907,7 @@ int v0; // eax@4 int v1; // eax@29 unsigned int v2; // esi@30 - const char *v3; // ebx@31 + //const char *v3; // ebx@31 if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; @@ -1981,14 +1981,14 @@ pBtn_ExitCancel = window_SpeakInHouse->pControlsHead; if ( uNumDialogueNPCPortraits > 0 ) { - v3 = byte_591180; + //v3 = byte_591180; do { HouseNPCData[v2 + 7] = (NPCData *)window_SpeakInHouse->CreateButton(pNPCPortraits_x[v1 - 1][v2], pNPCPortraits_y[v1 - 1][v2], - 0x3Fu, 0x49u, 1, 0, 0x19Au, v2, 0, v3, 0, 0, 0); + 0x3Fu, 0x49u, 1, 0, 0x19Au, v2, 0, byte_591180[v2], 0, 0, 0); v1 = uNumDialogueNPCPortraits; ++v2; - v3 += 100; + //v3 += 100; } while ( (signed int)v2 < uNumDialogueNPCPortraits ); } @@ -2004,7 +2004,7 @@ //----- (004BDB56) -------------------------------------------------------- -void __cdecl sub_4BDB56_buy_skill____() +void __cdecl UIShop_Buy_Identify_Repair() { Player *v0; // edi@1 signed int v1; // esi@9 @@ -2064,15 +2064,15 @@ int v55; // [sp+0h] [bp-B4h]@26 int v56; // [sp+0h] [bp-B4h]@36 POINT v57; // [sp+10h] [bp-A4h]@49 - POINT v58; // [sp+18h] [bp-9Ch]@18 + //POINT v58; // [sp+18h] [bp-9Ch]@18 POINT v59; // [sp+20h] [bp-94h]@49 POINT v60; // [sp+28h] [bp-8Ch]@9 POINT v61; // [sp+30h] [bp-84h]@37 POINT v62; // [sp+38h] [bp-7Ch]@18 POINT v63; // [sp+40h] [bp-74h]@37 - POINT v64; // [sp+48h] [bp-6Ch]@19 + //POINT v64; // [sp+48h] [bp-6Ch]@19 POINT v65; // [sp+50h] [bp-64h]@32 - POINT v66; // [sp+58h] [bp-5Ch]@18 + //POINT v66; // [sp+58h] [bp-5Ch]@18 POINT v67; // [sp+60h] [bp-54h]@31 POINT a2; // [sp+68h] [bp-4Ch]@9 POINT v69; // [sp+70h] [bp-44h]@31 @@ -2135,7 +2135,7 @@ { v24 = 2; //LABEL_62: - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v24); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v24); v9 = pGlobalTXT_LocalizationStrings[155]; v54 = 2; ShowStatusBarString(v9, v54); @@ -2198,14 +2198,14 @@ pAudioPlayer->PlaySound(SOUND_27, v46, v47, v48, v49, v50, v52, v56); break; } + case 4: + { + pMouse->GetCursorPos(&v62); + v10 = v62.x - 14; + v79 = (v10 >> 5) + 14 * ((v62.y - 17) >> 5); + if (v62.x > 13 && v62.x < 462) { - v10 = pMouse->GetCursorPos(&v62)->x - 14; - v79 = (v10 >> 5) + 14 * ((pMouse->GetCursorPos(&v66)->y - 17) >> 5); - if ( pMouse->GetCursorPos(&v58)->x > 13 ) - { - if ( pMouse->GetCursorPos(&v64)->x < 462 ) - { v11 = v0->GetItemIDAtInventoryIndex((int *)&v79); if ( v11 ) { @@ -2230,7 +2230,7 @@ } v13 = _this; v55 = 2; - HousePlaySomeSound((unsigned int)v13, v55); + PlayHouseSound((unsigned int)v13, (HouseSoundID)v55); return; } pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); @@ -2247,7 +2247,6 @@ v27->PlaySound((PlayerSpeech)v51, v53); return; } - } } break; } @@ -2296,7 +2295,7 @@ v13 = _this; v55 = 2; //LABEL_84: - HousePlaySomeSound((unsigned int)v13, v55); + PlayHouseSound((unsigned int)v13, (HouseSoundID)v55); return; } pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); @@ -2372,7 +2371,7 @@ { if ( uNumSeconds != 1 ) { - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v24); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v24); v9 = pGlobalTXT_LocalizationStrings[155]; v54 = 2; ShowStatusBarString(v9, v54); @@ -2451,7 +2450,7 @@ v55 = 4; else v55 = 2; - HousePlaySomeSound((unsigned int)v13, v55); + PlayHouseSound((unsigned int)v13, (HouseSoundID)v55); return; } Party::TakeGold(v44); @@ -9457,6 +9456,10 @@ wcxw.hInstance, nullptr); SetWindowTextW(hWnd, L"Might and Magic VII"); + + HMENU menu = CreateMenu(); + AppendMenuW(menu, MF_ENABLED | MF_STRING, 0x101, L"Open level..."); + SetMenu(hWnd, menu); SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
--- a/mm7_4.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/mm7_4.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -7040,7 +7040,7 @@ DDM_DLV_Header *v7; // eax@14 Player **v8; // edi@18 Player *result; // eax@19 - char *v10; // esi@20 + //char *v10; // esi@20 v3 = 0; if ( a2 ) @@ -7090,10 +7090,10 @@ result = *v8; if ( pParty->uFine ) { - v10 = result->_guilds_member_bits; + //v10 = result->_guilds_member_bits; result = (Player *)_449B57_test_bit((unsigned __int8 *)result->_guilds_member_bits, 1); if ( !(short)result ) - __debugbreak; + __debugbreak(); //result = (Player *)_449B7E_toggle_bit((unsigned char *)v10, 1, 1u); } ++v8; @@ -7350,7 +7350,7 @@ } v1 = (unsigned int)window_SpeakInHouse->ptr_1C; LABEL_28: - HousePlaySomeSound(v1, v0); + PlayHouseSound(v1, (HouseSoundID)v0); return; } v1 = (unsigned int)window_SpeakInHouse->ptr_1C; @@ -7363,7 +7363,7 @@ v0 = 4; goto LABEL_28; } - HousePlaySomeSound(v1, dword_F8B1E4 + 3); + PlayHouseSound(v1, (HouseSoundID)(dword_F8B1E4 + 3)); if ( !dword_F8B1E4 && !qword_A750D8 ) { v5 = 0; @@ -9404,7 +9404,7 @@ *(short *)v6 = 1; v27 = 2; } - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v27); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v27); } } else @@ -9740,7 +9740,7 @@ if ( pParty->uNumGold < s1 ) { ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 3); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) return; pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; @@ -9784,7 +9784,7 @@ pParty->uFallStartY = pParty->vPosition.z; pParty->sRotationY = v5->field_18; } - HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); + PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney); v12 = v5->uTravelTime; int _v47; if ( (signed int)window_SpeakInHouse->ptr_1C >= 63 ) @@ -10466,7 +10466,7 @@ pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, (int)sHouseName); //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].uRoomSoundId ) - HousePlaySomeSound(v9, 1); + PlayHouseSound(v9, HouseSound_Greeting); if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); result = v23;
--- a/mm7_5.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/mm7_5.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -390,9 +390,11 @@ } } continue; - case UIMSG_51: - sub_4BDB56_buy_skill____(); - continue; + + case UIMSG_BuyInShop_Identify_Repair: + UIShop_Buy_Identify_Repair(); + continue; + case UIMSG_ClickNPCTopic: ClickNPCTopic(uMessageParam); continue; @@ -1361,7 +1363,7 @@ continue; case SCREEN_INPUT_BLV: if ( uCurrentHouse_Animation == 153 ) - HousePlaySomeSound(0x99u, 3); + PlayHouseSound(0x99u, HouseSound_Greeting_2); pVideoPlayer->Unload(); if ( dword_5B65CC ) { @@ -1577,7 +1579,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; dword_50CDC8 = v0; sub_42FBDD(); - HousePlaySomeSound(uCurrentHouse_Animation, 2); + PlayHouseSound(uCurrentHouse_Animation, HouseSound_NotEnoughMoney); pVideoPlayer->Unload(); sub_44603D(); viewparams->bRedrawGameUI = v0;
--- a/mm7_6.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/mm7_6.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -458,12 +458,12 @@ IndoorCameraD3D::IndoorCameraD3D() { IndoorCameraD3D *v1; // esi@1 - double v2; // st7@1 - double v3; // st6@1 - double v4; // st5@1 - double v5; // st7@1 - double v6; // st6@1 - double v7; // st5@1 + //double v2; // st7@1 + //double v3; // st6@1 + //double v4; // st5@1 + //double v5; // st7@1 + //double v6; // st6@1 + //double v7; // st5@1 v1 = this; //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&this->field_4); @@ -474,20 +474,20 @@ 6, (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4, (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor);*/ - v2 = 0;//(double)pBLVRenderParams->vPartyPos.z; - v3 = 0;//(double)pBLVRenderParams->vPartyPos.y; - v4 = 0;//(double)pBLVRenderParams->vPartyPos.x; + //v2 = 0;//(double)pBLVRenderParams->vPartyPos.z; + //v3 = 0;//(double)pBLVRenderParams->vPartyPos.y; + //v4 = 0;//(double)pBLVRenderParams->vPartyPos.x; v1->field_108 = 0.0; - v1->field_DC = v4; - v1->field_E0 = v3; - v1->field_E4 = v2; - v5 = 0;//(double)pBLVRenderParams->vPartyPos.z; - v6 = 0;//(double)pBLVRenderParams->vPartyPos.y; - v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300); + v1->blv_party_x = 0; + v1->blv_party_y = 0; + v1->blv_party_z = 0; + //v5 = 0;//(double)pBLVRenderParams->vPartyPos.z; + //v6 = 0;//(double)pBLVRenderParams->vPartyPos.y; + //v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300); v1->field_138 = 0.0; - v1->field_10C = v7; - v1->field_110 = v6; - v1->field_114 = v5; + v1->blv_party_x_2 = 300; + v1->blv_party_y_2 = 0; + v1->blv_party_z_2 = 0; v1->field_168 = 0.0; v1->field_198 = 0.0; v1->field_1C8 = 0.0;
--- a/mm7_data.cpp Fri Mar 22 23:42:09 2013 +0600 +++ b/mm7_data.cpp Fri Mar 22 23:42:21 2013 +0600 @@ -1888,7 +1888,7 @@ int dword_591174_teleportz; // weak int dword_591178_teleporty; // weak int dword_59117C_teleportx; // weak -char byte_591180[600]; // idb +char byte_591180[6][100]; // idb struct NPCData *HouseNPCData[6];//array_5913D8 struct Texture *pTexture_591428;
--- a/mm7_data.h Fri Mar 22 23:42:09 2013 +0600 +++ b/mm7_data.h Fri Mar 22 23:42:21 2013 +0600 @@ -1334,7 +1334,7 @@ extern int dword_591174_teleportz; // weak extern int dword_591178_teleporty; // weak extern int dword_59117C_teleportx; // weak -extern char byte_591180[600]; // idb +extern char byte_591180[6][100]; // idb extern struct NPCData *HouseNPCData[6]; extern struct Texture *pTexture_591428; @@ -2317,7 +2317,7 @@ void __fastcall OnSelectShopDialogueOption(signed int uMessageParam); signed int __cdecl sub_4BD8B5(); bool __fastcall sub_4BDAAF(ItemGen *a1, int _2da_idx); -void __cdecl sub_4BDB56_buy_skill____(); +void __cdecl UIShop_Buy_Identify_Repair(); void __cdecl ShowIntroVideo_and_LoadingScreen();