comparison mm7_4.cpp @ 735:6daaa2f18d0d

Fixed some house sounds & shop-related stuff
author Nomad
date Fri, 22 Mar 2013 20:01:46 +0200
parents 2f4e33c1ed24
children 225d92620998 4b06e19fcdbc
comparison
equal deleted inserted replaced
734:2f4e33c1ed24 735:6daaa2f18d0d
7036 int v5; // eax@8 7036 int v5; // eax@8
7037 unsigned __int64 v6; // qax@12 7037 unsigned __int64 v6; // qax@12
7038 DDM_DLV_Header *v7; // eax@14 7038 DDM_DLV_Header *v7; // eax@14
7039 Player **v8; // edi@18 7039 Player **v8; // edi@18
7040 Player *result; // eax@19 7040 Player *result; // eax@19
7041 char *v10; // esi@20 7041 //char *v10; // esi@20
7042 7042
7043 v3 = 0; 7043 v3 = 0;
7044 if ( a2 ) 7044 if ( a2 )
7045 { 7045 {
7046 if ( a2 != 1 ) 7046 if ( a2 != 1 )
7086 do 7086 do
7087 { 7087 {
7088 result = *v8; 7088 result = *v8;
7089 if ( pParty->uFine ) 7089 if ( pParty->uFine )
7090 { 7090 {
7091 v10 = result->_guilds_member_bits; 7091 //v10 = result->_guilds_member_bits;
7092 result = (Player *)_449B57_test_bit((unsigned __int8 *)result->_guilds_member_bits, 1); 7092 result = (Player *)_449B57_test_bit((unsigned __int8 *)result->_guilds_member_bits, 1);
7093 if ( !(short)result ) 7093 if ( !(short)result )
7094 __debugbreak; 7094 __debugbreak();
7095 //result = (Player *)_449B7E_toggle_bit((unsigned char *)v10, 1, 1u); 7095 //result = (Player *)_449B7E_toggle_bit((unsigned char *)v10, 1, 1u);
7096 } 7096 }
7097 ++v8; 7097 ++v8;
7098 } 7098 }
7099 while ( (signed int)v8 <= (signed int)&pPlayers[4] ); 7099 while ( (signed int)v8 <= (signed int)&pPlayers[4] );
7346 if ( in_current_building_type != BildingType_Temple ) 7346 if ( in_current_building_type != BildingType_Temple )
7347 return; 7347 return;
7348 } 7348 }
7349 v1 = (unsigned int)window_SpeakInHouse->ptr_1C; 7349 v1 = (unsigned int)window_SpeakInHouse->ptr_1C;
7350 LABEL_28: 7350 LABEL_28:
7351 HousePlaySomeSound(v1, v0); 7351 PlayHouseSound(v1, (HouseSoundID)v0);
7352 return; 7352 return;
7353 } 7353 }
7354 v1 = (unsigned int)window_SpeakInHouse->ptr_1C; 7354 v1 = (unsigned int)window_SpeakInHouse->ptr_1C;
7355 if ( (signed __int64)pParty->field_3C._shop_ban_times[v1 ]<= (signed __int64)pParty->uTimePlayed ) 7355 if ( (signed __int64)pParty->field_3C._shop_ban_times[v1 ]<= (signed __int64)pParty->uTimePlayed )
7356 { 7356 {
7359 if ( !dword_F8B1E4 ) 7359 if ( !dword_F8B1E4 )
7360 return; 7360 return;
7361 v0 = 4; 7361 v0 = 4;
7362 goto LABEL_28; 7362 goto LABEL_28;
7363 } 7363 }
7364 HousePlaySomeSound(v1, dword_F8B1E4 + 3); 7364 PlayHouseSound(v1, (HouseSoundID)(dword_F8B1E4 + 3));
7365 if ( !dword_F8B1E4 && !qword_A750D8 ) 7365 if ( !dword_F8B1E4 && !qword_A750D8 )
7366 { 7366 {
7367 v5 = 0; 7367 v5 = 0;
7368 v6 = 1; 7368 v6 = 1;
7369 do 7369 do
9400 { 9400 {
9401 Party::TakeGold(v4); 9401 Party::TakeGold(v4);
9402 *(short *)v6 = 1; 9402 *(short *)v6 = 1;
9403 v27 = 2; 9403 v27 = 2;
9404 } 9404 }
9405 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, v27); 9405 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v27);
9406 } 9406 }
9407 } 9407 }
9408 else 9408 else
9409 { 9409 {
9410 v5 = 0; 9410 v5 = 0;
9736 if ( dialog_menu_id > 104 && dialog_menu_id <= 108 ) 9736 if ( dialog_menu_id > 104 && dialog_menu_id <= 108 )
9737 { 9737 {
9738 if ( pParty->uNumGold < s1 ) 9738 if ( pParty->uNumGold < s1 )
9739 { 9739 {
9740 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); 9740 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);
9741 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 3); 9741 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2);
9742 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) 9742 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
9743 return; 9743 return;
9744 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; 9744 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
9745 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1; 9745 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
9746 goto LABEL_33;*/ 9746 goto LABEL_33;*/
9780 pParty->vPosition.y = v7; 9780 pParty->vPosition.y = v7;
9781 pParty->vPosition.z = v5->field_14; 9781 pParty->vPosition.z = v5->field_14;
9782 pParty->uFallStartY = pParty->vPosition.z; 9782 pParty->uFallStartY = pParty->vPosition.z;
9783 pParty->sRotationY = v5->field_18; 9783 pParty->sRotationY = v5->field_18;
9784 } 9784 }
9785 HousePlaySomeSound((unsigned int)window_SpeakInHouse->ptr_1C, 2); 9785 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_NotEnoughMoney);
9786 v12 = v5->uTravelTime; 9786 v12 = v5->uTravelTime;
9787 int _v47; 9787 int _v47;
9788 if ( (signed int)window_SpeakInHouse->ptr_1C >= 63 ) 9788 if ( (signed int)window_SpeakInHouse->ptr_1C >= 63 )
9789 { 9789 {
9790 v63 = SPEECH_SetSail; 9790 v63 = SPEECH_SetSail;
10462 strcpy(sHouseName, v21); 10462 strcpy(sHouseName, v21);
10463 LABEL_20: 10463 LABEL_20:
10464 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, (int)sHouseName); 10464 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, (int)sHouseName);
10465 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) 10465 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) )
10466 if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].uRoomSoundId ) 10466 if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].uRoomSoundId )
10467 HousePlaySomeSound(v9, 1); 10467 PlayHouseSound(v9, HouseSound_Greeting);
10468 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) 10468 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 )
10469 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); 10469 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0);
10470 result = v23; 10470 result = v23;
10471 if ( v23 ) 10471 if ( v23 )
10472 uCurrentHouse_Animation = v23; 10472 uCurrentHouse_Animation = v23;