Mercurial > mm7
changeset 412:bbd8888534dc
Merge
author | Nomad |
---|---|
date | Sat, 23 Feb 2013 16:02:04 +0200 |
parents | 747933903b1c (current diff) 6cb79ea315ba (diff) |
children | 111f25d1cc04 ac6039b9ab5b |
files | AudioPlayer.cpp |
diffstat | 11 files changed, 87 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/Actor.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/Actor.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -3291,7 +3291,6 @@ } } - //----- (00402AD7) -------------------------------------------------------- void Actor::_402AD7(unsigned int uActorID, unsigned int a2, signed int arg0, signed int uActionLength, AIDirection *pDir) {
--- a/AudioPlayer.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/AudioPlayer.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -1796,7 +1796,6 @@ } - //----- (004AB66C) -------------------------------------------------------- int __fastcall sub_4AB66C(int a1, int a2) {
--- a/GUIWindow.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/GUIWindow.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -1018,7 +1018,7 @@ //----- (004B3157) -------------------------------------------------------- -void GUIWindow::_4B3157() +void GUIWindow::HouseDialogManager() { unsigned __int16 v1; // di@2 const char *v2; // edx@4 @@ -1142,7 +1142,7 @@ } if ( v4 || !dword_591080 ) { - sub_4B2A74(); + SimpleHouseDialog(); } else { @@ -1160,23 +1160,23 @@ sub_4B6478(); break; case 1: - _4B910F_shop_interaction(); + WeaponShopDialog(); break; case 2: - sub_4BA928(); + ArmorShopDialog(); break; case 3: - ui_shop_teachers(); + MagicShopDialog(); break; case 4: - sub_4B9CC6(); + AlchemistDialog(); break; default: if ( dword_F8B198 > 4 ) { if ( dword_F8B198 <= 16 ) { - sub_4B5D7C(); + GuildDialog(); } else { @@ -1191,13 +1191,13 @@ switch ( dword_F8B198 ) { case 21: - sub_4B8285_prolly_draw_arcomage_result(); + TavernDialog(); break; case 22: _4B7D7E_bank(); break; case 23: - sub_4B705E(); + TampleDialog(); break; default: if ( dword_F8B198 <= 26 ) @@ -1214,7 +1214,7 @@ break; goto LABEL_36; } - ui_training(); + TrainingDialog(); } break; }
--- a/GUIWindow.h Sat Feb 23 16:00:21 2013 +0200 +++ b/GUIWindow.h Sat Feb 23 16:02:04 2013 +0200 @@ -115,7 +115,7 @@ char *DrawTitleText(GUIFont *a2, unsigned int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing); char *_4B1854(__int64 a2); - void _4B3157(); + void HouseDialogManager(); void OpenSpellBook(); void InitializeBookView(); void DrawMessageBox(int arg0);
--- a/Party.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/Party.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -780,7 +780,6 @@ } - //----- (0043AD34) -------------------------------------------------------- void Party::Yell() {
--- a/mm7_1.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/mm7_1.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -6930,7 +6930,6 @@ return v55; } - //----- (00424579) -------------------------------------------------------- int __fastcall sub_424579(int uFaceID, stru320 *a2) {
--- a/mm7_2.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/mm7_2.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -415,7 +415,7 @@ // F8B19C: using guessed type int dword_F8B19C; //----- (004B8285) -------------------------------------------------------- -void __cdecl sub_4B8285_prolly_draw_arcomage_result()//Maybe TavernDialogue +void __cdecl TavernDialog() { GUIWindow *v0; // ebx@1 Player *v1; // edi@1 @@ -992,8 +992,8 @@ } v3 = 5 * v2; v2 = (signed int)v0->ptr_1C; - v4 = word_4F03FE[v3]; - v5 = word_4F0400[5 * v2 + rand() % 4]; + v4 = word_4F0404[v3 - 4]; + v5 = word_4F0404[5 * v2 + rand() % 4 - 2]; goto LABEL_13; } LABEL_15: @@ -1005,7 +1005,7 @@ //----- (004B910F) -------------------------------------------------------- -char *__cdecl _4B910F_shop_interaction() +char *__cdecl WeaponShopDialog() { Player *v0; // ebx@1 char *result; // eax@6 @@ -1619,7 +1619,7 @@ //----- (004B9CC6) -------------------------------------------------------- -POINT *__cdecl sub_4B9CC6() +POINT *__cdecl AlchemistDialog() { Player *v0; // ebx@1 POINT *result; // eax@7 @@ -2231,7 +2231,7 @@ //----- (004BA928) -------------------------------------------------------- -void __cdecl sub_4BA928() +void __cdecl ArmorShopDialog() { Player *v0; // ebx@1 signed int v1; // esi@8
--- a/mm7_4.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/mm7_4.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -10034,7 +10034,7 @@ //----- (004B2A74) -------------------------------------------------------- -char __cdecl sub_4B2A74() +char __cdecl SimpleHouseDialog() { char *v0; // esi@3 char *v1; // ST1C_4@3 @@ -10440,7 +10440,7 @@ if ( v1 ) v21 = word_4F063E[(signed int)v20]; else - v21 = word_4F03FE[(signed int)v20]; + v21 = word_4F0404[(signed int)v20 - 4];//word_4F03FE[(signed int)v20]; v22 = v21 - 23; if ( v22 ) { @@ -11458,7 +11458,7 @@ } //----- (004B4710) -------------------------------------------------------- -int __cdecl ui_training() +int __cdecl TrainingDialog() { Player *v0; // ebx@1 int color2; // eax@1 @@ -11854,7 +11854,7 @@ //----- (004B4FCF) -------------------------------------------------------- -int __cdecl ui_shop_teachers() +int __cdecl MagicShopDialog() { Player *v0; // ebx@1 int result; // eax@6 @@ -12852,7 +12852,7 @@ //----- (004B5D7C) -------------------------------------------------------- -int __cdecl sub_4B5D7C() +int __cdecl GuildDialog() { GUIWindow *v0; // ebx@1 Player *v1; // edi@1 @@ -13199,7 +13199,7 @@ //----- (004B705E) -------------------------------------------------------- -int __cdecl sub_4B705E() +int __cdecl TampleDialog() { GUIWindow *v0; // ebx@1 Player *v1; // esi@1 @@ -14990,7 +14990,6 @@ - //----- (0044622E) -------------------------------------------------------- bool __fastcall EnterHouse(HOUSE_TYPE uHouseID) {
--- a/mm7_5.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/mm7_5.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -14858,8 +14858,6 @@ } - - //----- (004151D9) -------------------------------------------------------- void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight) { @@ -15515,7 +15513,7 @@ } continue; } - pWindowList[pVisibleWindowsIdxs[i] - 1]._4B3157(); + pWindowList[pVisibleWindowsIdxs[i] - 1].HouseDialogManager(); if ( !window_SpeakInHouse ) continue; v10 = window_SpeakInHouse->ptr_1C;
--- a/mm7_data.cpp Sat Feb 23 16:00:21 2013 +0200 +++ b/mm7_data.cpp Sat Feb 23 16:02:04 2013 +0200 @@ -67,7 +67,7 @@ Award pAwards[104]; #include "stru159.h" -stru159 pAnimatedRooms[196] = +stru159 pAnimatedRooms[196] = //0x4E5F70 { "", 0x4, 0x1F4, 0, "Human Armor01", 0x20, 0x2C0, 0x3A02, @@ -144,10 +144,13 @@ "Lord And Judge Out01", 1, 0, 0x271D, "Human Poor House 1", 8, 0, 0x1D, "Human Poor House 2", 8, 0, 0x1D, + "Human Poor House 3", 8, 0, 0x1D, "Human Medium House 1", 8, 0, 0x1D, "Human Medium House 2", 8, 0, 0x1D, + "Human Medium House 3", 8, 0, 0x1D, "Human Rich House 1", 8, 0, 0x1D, "Human Rich House 2", 8, 0, 0x1D, + "Human Rich House 3", 8, 0, 0x1D, "Elven Poor House 1", 8, 0, 0x1D, "Elven Poor House 2", 8, 0, 0x1D, "Elven Poor House 3", 8, 0, 0x1D, @@ -219,11 +222,13 @@ "Out10 The Maze", 0x24, 0, 0x19, "Out10 Connecting Tunnel Cave #1", 0x24, 0, 0x19, "", 0x24, 0, 0x19, + "", 0x24, 0, 0x19, "Out11 Stone City", 0x24, 0, 0x19, "", 0x24, 0, 0x19, "Out12 Colony Zod", 0x24, 0, 0x19, "Out12 Connecting Tunnel Cave #1", 0x24, 0, 0x19, "", 0x24, 0, 0x19, + "", 0x24, 0, 0x19, "Out13 Mercenary Guild", 0x24, 0, 0x19, "Out13 Tidewater Caverns", 0x24, 0, 0x19, "Out13 Wine Cellar", 0x24, 0, 0x19, @@ -247,9 +252,13 @@ "Arbiter Evil Town", 0x24, 0, 0x1D, "Necromancer Throne Room Empty", 0x24, 0, 0x14, "", 0x24, 0, 0x1D, + "", 0x24, 0, 0x1D, + "", 0x24, 0, 0x1D, + "", 0x24, 0, 0x1D, "Boat01", 0xF, 0, 0x3351D, "", 0x24, 0, 0x1C, "", 0x24, 0, 0x1D, + "", 0x24, 0, 0x1D, "Arbiter Room Neutral", 0x24, 0, 0x1D, "Out02 Castle Harmondy Abandoned", 0x24, 0, 0x19, "Human Temple02", 0x24, 0x3AB, 0x1B17, @@ -1585,12 +1594,48 @@ "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF", - "MAGSHELF" + "MAGSHELF", "MAGSHELF", "MAGSHELF" +}; +//__int16 word_4F03FE[777]; // weak +//__int16 word_4F0400[777]; // weak +__int16 word_4F0404[] = +{ + 0, 0, 1, 0x17, 0x1B, 0x14, 0x14, 1, 0x17, 0x18, 0x1C, + 0x14, 2, 0x17, 0x18, 0x19, 0x14, 2, 0x1B, 0x1B, 0x1A, 0x1A, + 4, 0x18, 0x1E, 0x19, 0x1B, 4, 0x18, 0x1E, 0x19, 0x1B, 3, 0x1E, + 0x18, 0x14, 0x14, 2, 0x14, 0x14, 0x14, 0x14, 3, 0x1B, 0x1B, 0x1A, 0x1A, + 3, 0x1C, 0x1C, 0x19, 0x19, 2, 0x17, 0x17, 0x18, 0x18, + 3, 0x17, 0x17, 0x1A, 0x1A, 2, 0x1E, 0x1A, 0x1A, 0x1A, 2, 0x1C, + 0x19, 0x1C, 0x1D, 0, 0 }; -__int16 word_4F03FE[777]; // weak -__int16 word_4F0400[777]; // weak -__int16 word_4F0498[777]; // weak -__int16 word_4F0576[777]; // weak +//__int16 word_4F0498[777]; // weak +__int16 word_4F0498[] = +{ +1, 0x23, 0x23, 0x26, 0x26, 1, 0x1F, 0x1F, 0x1F, 0x22, 1, 0x23, 0x23, +0x26, 0x26, 1, 0x1F, 0x1F, 0x20, 0x22, 2, 0x23, 0x23, +0x26, 0x26, 2, 0x1F, 0x20, 0x20, 0x21, 2, 0x23, 0x23, +0x26, 0x26, 2, 0x1F, 0x1F, 0x20, 0x20, 4, 0x23, 0x23, +0x26, 0x26, 4, 0x1F, 0x20, 0x21, 0x22, 4, 0x23, 0x23, 0x26, 0x26, +4, 0x1F, 0x20, 0x21, 0x22, 3, 0x23, 0x23, 0x26, 0x26, 3, +0x1F, 0x1F, 0x1F, 0x1F, 2, 0x23, 0x23, 0x26, 0x26, 2, 0x1F, 0x20, +0x22, 0x22, 3, 0x23, 0x23, 0x26, 0x26, 3, 0x1F, 0x1F, +0x20, 0x20, 3, 0x23, 0x23, 0x26, 0x26, 3, 0x20, 0x20, 0x20, +0x21, 3, 0x23, 0x23, 0x26, 0x26, 3, 0x1F, 0x1F, 0x1F, 0x20 +}; +//__int16 word_4F0576[777]; // weak +__int16 word_4F0576[] = +{ +0x23, 0x23, 0x26, 0x26, 3, 0x21, 0x1F, 0x20, 0x22, 3, 0x23, 0x23, +0x26, 0x26, 3, 0x21, 0x1F, 0x20, 0x22, 4, 0x23, 0x23, 0x26, 0x26, +4, 0x21, 0x1F, 0x20, 0x22, 0x1, 0x1, 0x2, 0x2, 0x4, 0x4, +3, 2, 2, 2, 2, 2, 2, 0, 0x1, 0x1, 0x2, 0x2, 0x3, 0x3, 0x4, 0x4, +2, 2, 2, 2, 0x0, 0x0, 1, 0, 0xA3, 0xA3, 0xA2, 0xA1, 0xA0, +2, 0, 0xA3, 0xA3, 0xA2, 0xA1, 0xA0, 2, 0, 0xA3, 0xA3, +0xA2, 0xA1, 0xA0, 2, 0, 0x0A3, 0x0A3, 0xA2, 0xA1, 0xA0, +3, 0, 0xA3, 0xA3, 0xA2, 0xA1, 0xA0, 3, 0, 0xA3, 0xA3, +0xA2, 0xA1, 0xA0 +}; + __int16 word_4F0578[777]; // weak __int16 word_4F05AE[777]; // weak char _4F063C_smthn_by_2da_uType[777]; // weak
--- a/mm7_data.h Sat Feb 23 16:00:21 2013 +0200 +++ b/mm7_data.h Sat Feb 23 16:02:04 2013 +0200 @@ -1000,8 +1000,9 @@ extern void *off_4EFDB0; // weak extern int dword_4F031C[]; // weak extern const char *off_4F03B8[]; // idb -extern __int16 word_4F03FE[]; // weak -extern __int16 word_4F0400[]; // weak +//extern __int16 word_4F03FE[]; // weak +//extern __int16 word_4F0400[]; // weak +extern __int16 word_4F0404[]; extern __int16 word_4F0498[]; // weak extern __int16 word_4F0576[]; // weak extern __int16 word_4F0578[]; // weak @@ -2307,7 +2308,7 @@ void __fastcall sub_4B2001(signed int a1); char *__thiscall _4B254D_SkillMasteryTeacher(int _this); const char *__fastcall sub_4B29F2(int a1); -char __cdecl sub_4B2A74(); +char __cdecl SimpleHouseDialog(); struct GUIButton *__fastcall sub_4B36CC(int a1, unsigned int a2); int __thiscall sub_4B3703(void *_this); int __thiscall sub_4B3A72(int a1); // idb @@ -2320,22 +2321,22 @@ struct GUIButton *__thiscall _4B4224_UpdateNPCTopics(int _this); char __fastcall sub_4B46A5(const char *Str, int a5); int __fastcall sub_4B46F8(int a1); -int __cdecl ui_training(); +int __cdecl TrainingDialog(); char *__cdecl sub_4B4F4F(); -int __cdecl ui_shop_teachers(); -int __cdecl sub_4B5D7C(); +int __cdecl MagicShopDialog(); +int __cdecl GuildDialog(); int __cdecl sub_4B6478(); bool __fastcall sub_4B68EA(int a1); void __cdecl TravelByTransport(); -int __cdecl sub_4B705E(); +int __cdecl TampleDialog(); void __cdecl sub_4B7911(); void __cdecl _4B7D7E_bank(); -void __cdecl sub_4B8285_prolly_draw_arcomage_result(); +void __cdecl TavernDialog(); void *__cdecl GenerateShopItems(); void *__cdecl sub_4B8F94(); -char *__cdecl _4B910F_shop_interaction(); -POINT *__cdecl sub_4B9CC6(); -void __cdecl sub_4BA928(); +char *__cdecl WeaponShopDialog(); +POINT *__cdecl AlchemistDialog(); +void __cdecl ArmorShopDialog(); signed int __fastcall sub_4BB756(signed int a1); const char *sub_4BBA85_bounties(); void __cdecl sub_4BBCDD();