comparison mm7_2.cpp @ 907:f3ccfc765502

RentRoom
author Ritor1
date Sun, 21 Apr 2013 19:22:42 +0600
parents 4dc2252e0b03
children 8cd0b155bebe
comparison
equal deleted inserted replaced
906:23655ae9cd18 907:f3ccfc765502
1039 if ( pMouse->GetCursorPos(&v67)->x <= 13 1039 if ( pMouse->GetCursorPos(&v67)->x <= 13
1040 || pMouse->GetCursorPos(&v65)->x >= 462 1040 || pMouse->GetCursorPos(&v65)->x >= 462
1041 || (v15 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79), !v15) ) 1041 || (v15 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79), !v15) )
1042 return; 1042 return;
1043 v16 = window_SpeakInHouse; 1043 v16 = window_SpeakInHouse;
1044 if ( sub_4BDAAF(&pPlayers[uActiveCharacter]->pInventoryItems[v15-1], (int)window_SpeakInHouse->ptr_1C) ) 1044 if ( MerchandiseTest(&pPlayers[uActiveCharacter]->pInventoryItems[v15-1], (int)window_SpeakInHouse->ptr_1C) )
1045 { 1045 {
1046 dword_F8B1E4 = 1; 1046 dword_F8B1E4 = 1;
1047 pPlayers[uActiveCharacter]->SalesProcess(v79, v15 - 1, (int)v16->ptr_1C); 1047 pPlayers[uActiveCharacter]->SalesProcess(v79, v15 - 1, (int)v16->ptr_1C);
1048 viewparams->bRedrawGameUI = 1; 1048 viewparams->bRedrawGameUI = 1;
1049 pRenderer->ClearZBuffer(0, 479); 1049 pRenderer->ClearZBuffer(0, 479);
1068 v80 = pPlayers[uActiveCharacter]->_4B8179(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier); 1068 v80 = pPlayers[uActiveCharacter]->_4B8179(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier);
1069 v12 = (int)&pPlayers[uActiveCharacter]->pInventoryItems[v11-1]; 1069 v12 = (int)&pPlayers[uActiveCharacter]->pInventoryItems[v11-1];
1070 if ( !(*(char *)(v12 + 20) & 1) ) 1070 if ( !(*(char *)(v12 + 20) & 1) )
1071 { 1071 {
1072 _this = (ItemGen *)window_SpeakInHouse->ptr_1C; 1072 _this = (ItemGen *)window_SpeakInHouse->ptr_1C;
1073 if ( sub_4BDAAF((ItemGen *)v12, (int)_this) ) 1073 if ( MerchandiseTest((ItemGen *)v12, (int)_this) )
1074 { 1074 {
1075 if ( pParty->uNumGold >= v80 ) 1075 if ( pParty->uNumGold >= v80 )
1076 { 1076 {
1077 dword_F8B1E4 = 1; 1077 dword_F8B1E4 = 1;
1078 Party::TakeGold(v80); 1078 Party::TakeGold(v80);
1115 v7 = (*(char *)(v3 + 20) & 2) == 0; 1115 v7 = (*(char *)(v3 + 20) & 2) == 0;
1116 v80 = v6; 1116 v80 = v6;
1117 if ( !v7 ) 1117 if ( !v7 )
1118 { 1118 {
1119 _this = (ItemGen *)window_SpeakInHouse->ptr_1C; 1119 _this = (ItemGen *)window_SpeakInHouse->ptr_1C;
1120 if ( sub_4BDAAF((ItemGen *)v3, (int)_this) ) 1120 if ( MerchandiseTest((ItemGen *)v3, (int)_this) )
1121 { 1121 {
1122 if ( pParty->uNumGold >= v80 ) 1122 if ( pParty->uNumGold >= v80 )
1123 { 1123 {
1124 dword_F8B1E4 = 1; 1124 dword_F8B1E4 = 1;
1125 Party::TakeGold(v80); 1125 Party::TakeGold(v80);
9016 { 9016 {
9017 SetCurrentMenuID(MENU_NEWGAME); 9017 SetCurrentMenuID(MENU_NEWGAME);
9018 uGameState = 0; 9018 uGameState = 0;
9019 continue; 9019 continue;
9020 } 9020 }
9021 if ( uGameState == GAME_STATE_GAME_QUITTING_TO_MAIN_MENU) 9021 if ( uGameState == GAME_STATE_GAME_QUITTING_TO_MAIN_MENU)// from the loaded game
9022 __debugbreak(); 9022 {
9023 /*{
9024 pAudioPlayer->StopChannels(-1, -1); 9023 pAudioPlayer->StopChannels(-1, -1);
9025 uGameState = 0; 9024 uGameState = 0;
9026 break; 9025 break;
9027 }*/ 9026 }
9028 } 9027 }
9029 if (!bNoSound && pAudioPlayer->hAILRedbook) 9028 if (!bNoSound && pAudioPlayer->hAILRedbook)
9030 { 9029 {
9031 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f); 9030 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f);
9032 AIL_redbook_stop(pAudioPlayer->hAILRedbook); 9031 AIL_redbook_stop(pAudioPlayer->hAILRedbook);