comparison mm7_1.cpp @ 187:49728858c35e

On player voices
author Nomad
date Fri, 15 Feb 2013 22:38:05 +0200
parents c5bd7a825ef2
children 9b77686e2239
comparison
equal deleted inserted replaced
186:d65528fc3bda 187:49728858c35e
2079 { 2079 {
2080 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; 2080 v8 = pCurrentScreen == SCREEN_PARTY_CREATION;
2081 pWindowList[v3].pCurrentPosActiveItem -= v12; 2081 pWindowList[v3].pCurrentPosActiveItem -= v12;
2082 if ( v8 ) 2082 if ( v8 )
2083 { 2083 {
2084 pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1); 2084 pAudioPlayer->PlaySound(SOUND_Button, v1, v1, -1, v1, v1, v1, v1);
2085 v2 = pMessageQueue_50CBD0->uNumMessages; 2085 v2 = pMessageQueue_50CBD0->uNumMessages;
2086 } 2086 }
2087 } 2087 }
2088 if ( pWindowList[v3].field_30 != v1 ) 2088 if ( pWindowList[v3].field_30 != v1 )
2089 goto LABEL_47; 2089 goto LABEL_47;
2119 { 2119 {
2120 v8 = pCurrentScreen == SCREEN_PARTY_CREATION; 2120 v8 = pCurrentScreen == SCREEN_PARTY_CREATION;
2121 pWindowList[v3].pCurrentPosActiveItem = v7; 2121 pWindowList[v3].pCurrentPosActiveItem = v7;
2122 if ( v8 ) 2122 if ( v8 )
2123 { 2123 {
2124 pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1); 2124 pAudioPlayer->PlaySound(SOUND_Button, v1, v1, -1, v1, v1, v1, v1);
2125 v2 = pMessageQueue_50CBD0->uNumMessages; 2125 v2 = pMessageQueue_50CBD0->uNumMessages;
2126 } 2126 }
2127 } 2127 }
2128 if ( pWindowList[v3].field_30 != v1 ) 2128 if ( pWindowList[v3].field_30 != v1 )
2129 goto LABEL_47; 2129 goto LABEL_47;
2448 { 2448 {
2449 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u); 2449 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u);
2450 } 2450 }
2451 else 2451 else
2452 { 2452 {
2453 v83 = (char *)8; 2453 v83 = (char *)SPEECH_8;
2454 if ( _this->GetValue() < 100 * (pPlayers[uActiveCharacter]->uLevel + 5) ) 2454 if ( _this->GetValue() < 100 * (pPlayers[uActiveCharacter]->uLevel + 5) )
2455 v83 = (char *)7; 2455 v83 = (char *)SPEECH_7;
2456 } 2456 }
2457 if ( dword_4E455C ) 2457 if ( dword_4E455C )
2458 { 2458 {
2459 pPlayers[uActiveCharacter]->PlaySound((int)v83, 0); 2459 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0);
2460 dword_4E455C = 0; 2460 dword_4E455C = 0;
2461 } 2461 }
2462 } 2462 }
2463 _this->UpdateTempBonus(pParty->uTimePlayed); 2463 _this->UpdateTempBonus(pParty->uTimePlayed);
2464 if ( a2.y ) 2464 if ( a2.y )
2466 v10 = pPlayers[uActiveCharacter]->CanRepair(_this) == 1; 2466 v10 = pPlayers[uActiveCharacter]->CanRepair(_this) == 1;
2467 v12 = _this; 2467 v12 = _this;
2468 if ( v10 ) 2468 if ( v10 )
2469 _this->uAttributes = _this->uAttributes & 0xFFFFFFFD | 1; 2469 _this->uAttributes = _this->uAttributes & 0xFFFFFFFD | 1;
2470 v10 = (v12->uAttributes & 2) == 0; 2470 v10 = (v12->uAttributes & 2) == 0;
2471 v83 = (char *)11; 2471 v83 = (char *)SPEECH_11;
2472 if ( v10 ) 2472 if ( v10 )
2473 v83 = (char *)10; 2473 v83 = (char *)SPEECH_10;
2474 else 2474 else
2475 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u); 2475 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u);
2476 if ( dword_4E455C ) 2476 if ( dword_4E455C )
2477 { 2477 {
2478 pPlayers[uActiveCharacter]->PlaySound((int)v83, 0); 2478 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0);
2479 dword_4E455C = 0; 2479 dword_4E455C = 0;
2480 } 2480 }
2481 } 2481 }
2482 } 2482 }
2483 v13 = _this->uAttributes; 2483 v13 = _this->uAttributes;
3261 { 3261 {
3262 v47 = pPlayers[uActiveCharacter]; 3262 v47 = pPlayers[uActiveCharacter];
3263 if ( v119 | v116 | i | (unsigned int)v112 ) 3263 if ( v119 | v116 | i | (unsigned int)v112 )
3264 { 3264 {
3265 if ( v121->pMonsterInfo.uLevel >= v47->uLevel - 5 ) 3265 if ( v121->pMonsterInfo.uLevel >= v47->uLevel - 5 )
3266 v73 = 105; 3266 v73 = SPEECH_105;
3267 else 3267 else
3268 v73 = 104; 3268 v73 = SPEECH_104;
3269 } 3269 }
3270 else 3270 else
3271 { 3271 {
3272 v73 = 106; 3272 v73 = SPEECH_106;
3273 } 3273 }
3274 v47->PlaySound(v73, 0); 3274 v47->PlaySound((PlayerSpeech)v73, 0);
3275 } 3275 }
3276 LABEL_84: 3276 LABEL_84:
3277 a2 = pParty->pPlayers; 3277 a2 = pParty->pPlayers;
3278 do 3278 do
3279 { 3279 {
4087 } 4087 }
4088 LABEL_8: 4088 LABEL_8:
4089 if ( v22 == v5 ) 4089 if ( v22 == v5 )
4090 { 4090 {
4091 if ( uActiveCharacter ) 4091 if ( uActiveCharacter )
4092 pPlayers[uActiveCharacter]->PlaySound(15, 0); 4092 pPlayers[uActiveCharacter]->PlaySound(SPEECH_15, 0);
4093 return 0; 4093 return 0;
4094 } 4094 }
4095 v7 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v4->uItemID].pIconName, TEXTURE_16BIT_PALETTE); 4095 v7 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v4->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
4096 HIWORD(v8) = 0; 4096 HIWORD(v8) = 0;
4097 v9 = v7 != -1 ? (int)&pIcons_LOD->pTextures[v7] : 0; 4097 v9 = v7 != -1 ? (int)&pIcons_LOD->pTextures[v7] : 0;
4517 pAudioPlayer->StopChannels(-1, -1); 4517 pAudioPlayer->StopChannels(-1, -1);
4518 pAudioPlayer->PlaySound((SoundID)208, 0, 0, -1, 0, 0, 0, 0); 4518 pAudioPlayer->PlaySound((SoundID)208, 0, 0, -1, 0, 0, 0, 0);
4519 if ( *(float *)&sRotY != 0.0 ) 4519 if ( *(float *)&sRotY != 0.0 )
4520 { 4520 {
4521 if ( !dword_507CD8 ) 4521 if ( !dword_507CD8 )
4522 pPlayers[uActiveCharacter]->PlaySound(4, 0); 4522 pPlayers[uActiveCharacter]->PlaySound(SPEECH_4, 0);
4523 } 4523 }
4524 dword_507CD8 = 0; 4524 dword_507CD8 = 0;
4525 v3 = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Chest, a4, 0); 4525 v3 = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Chest, a4, 0);
4526 pGUIWindow_CurrentMenu = v3; 4526 pGUIWindow_CurrentMenu = v3;
4527 pChestWindow = v3; 4527 pChestWindow = v3;
5754 { 5754 {
5755 if ( !pPlayers[uActiveCharacter]->CanAct() ) 5755 if ( !pPlayers[uActiveCharacter]->CanAct() )
5756 goto LABEL_9; 5756 goto LABEL_9;
5757 v4 = pPlayers[uActiveCharacter]; 5757 v4 = pPlayers[uActiveCharacter];
5758 } 5758 }
5759 v4->PlaySound(15, 0); 5759 v4->PlaySound(SPEECH_15, 0);
5760 } 5760 }
5761 LABEL_9: 5761 LABEL_9:
5762 if ( !pCurrentScreen ) 5762 if ( !pCurrentScreen )
5763 { 5763 {
5764 viewparams->bRedrawGameUI = 1; 5764 viewparams->bRedrawGameUI = 1;