comparison mm7_4.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
3145 { 3145 {
3146 qword_A750D8 -= (signed int)pMiscTimer->uTimeElapsed; 3146 qword_A750D8 -= (signed int)pMiscTimer->uTimeElapsed;
3147 if ( qword_A750D8 <= 0 ) 3147 if ( qword_A750D8 <= 0 )
3148 { 3148 {
3149 if ( pPlayers[word_A750E2]->CanAct() ) 3149 if ( pPlayers[word_A750E2]->CanAct() )
3150 pPlayers[word_A750E2]->PlaySound(word_A750E0, 0); 3150 pPlayers[word_A750E2]->PlaySound((PlayerSpeech)word_A750E0, 0);
3151 qword_A750D8 = 0i64; 3151 qword_A750D8 = 0i64;
3152 } 3152 }
3153 } 3153 }
3154 3154
3155 for (uint i = 0; i < 4; ++i) 3155 for (uint i = 0; i < 4; ++i)
9563 case 4: 9563 case 4:
9564 v13 = (char *)&pPlayers[uActiveCharacter]->pActiveSkills[dword_F8B1AC_something_todo_with_awards]; 9564 v13 = (char *)&pPlayers[uActiveCharacter]->pActiveSkills[dword_F8B1AC_something_todo_with_awards];
9565 v13[1] |= 1u; 9565 v13[1] |= 1u;
9566 break; 9566 break;
9567 } 9567 }
9568 pPlayers[uActiveCharacter]->PlaySound(85, 0); 9568 pPlayers[uActiveCharacter]->PlaySound(SPEECH_85, 0);
9569 } 9569 }
9570 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 9570 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
9571 { 9571 {
9572 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; 9572 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
9573 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1; 9573 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1;
9633 } 9633 }
9634 v11 = uActiveCharacter; 9634 v11 = uActiveCharacter;
9635 if ( uActiveCharacter ) 9635 if ( uActiveCharacter )
9636 { 9636 {
9637 v25 = 0; 9637 v25 = 0;
9638 v23 = 86; 9638 v23 = SPEECH_86;
9639 LABEL_50: 9639 LABEL_50:
9640 pPlayers[v11]->PlaySound(v23, v25); 9640 pPlayers[v11]->PlaySound((PlayerSpeech)v23, v25);
9641 goto _return; 9641 goto _return;
9642 } 9642 }
9643 } 9643 }
9644 } 9644 }
9645 } 9645 }
9662 byte_F8B1EC = 0; 9662 byte_F8B1EC = 0;
9663 uDialogueType = 13; 9663 uDialogueType = 13;
9664 ptr_F8B1E8 = (char *)*(&pNPCStats->field_13A64 + 5 * v2->uProfession); 9664 ptr_F8B1E8 = (char *)*(&pNPCStats->field_13A64 + 5 * v2->uProfession);
9665 ptr_F8B1E8 = sub_495461((char *)ptr_F8B1E8, uActiveCharacter - 1, 0, 0, 0, 0); 9665 ptr_F8B1E8 = sub_495461((char *)ptr_F8B1E8, uActiveCharacter - 1, 0, 0, 0, 0);
9666 if ( uActiveCharacter ) 9666 if ( uActiveCharacter )
9667 pPlayers[uActiveCharacter]->PlaySound(38, 0); 9667 pPlayers[uActiveCharacter]->PlaySound(SPEECH_38, 0);
9668 v19 = pGlobalTXT_LocalizationStrings[155]; 9668 v19 = pGlobalTXT_LocalizationStrings[155];
9669 goto LABEL_77; 9669 goto LABEL_77;
9670 } 9670 }
9671 Party::TakeGold(v21); 9671 Party::TakeGold(v21);
9672 } 9672 }
11760 v42 += 720; 11760 v42 += 720;
11761 RestAndHeal((signed int)(v42 + 10080)); 11761 RestAndHeal((signed int)(v42 + 10080));
11762 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor ) 11762 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor )
11763 pOutdoor->SetFog(); 11763 pOutdoor->SetFog();
11764 } 11764 }
11765 v0->PlaySound(87, 0); 11765 v0->PlaySound(SPEECH_87, 0);
11766 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[430], v0->pName, v0->uLevel, v0->uLevel / 10 + 5);// 11766 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[430], v0->pName, v0->uLevel, v0->uLevel / 10 + 5);//
11767 // "%s is now Level %lu and has earned %lu Skill Points!" 11767 // "%s is now Level %lu and has earned %lu Skill Points!"
11768 ShowStatusBarString(pTmpBuf, 2u); 11768 ShowStatusBarString(pTmpBuf, 2u);
11769 goto LABEL_56; 11769 goto LABEL_56;
11770 } 11770 }
12690 { 12690 {
12691 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);// "You don't have enough gold" 12691 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);// "You don't have enough gold"
12692 byte_F8B1EC = 0; 12692 byte_F8B1EC = 0;
12693 uDialogueType = 13; 12693 uDialogueType = 13;
12694 if ( uActiveCharacter ) 12694 if ( uActiveCharacter )
12695 pPlayers[uActiveCharacter]->PlaySound(38, 0); 12695 pPlayers[uActiveCharacter]->PlaySound(SPEECH_38, 0);
12696 v7 = pGlobalTXT_LocalizationStrings[155]; 12696 v7 = pGlobalTXT_LocalizationStrings[155];
12697 goto LABEL_64; 12697 goto LABEL_64;
12698 } 12698 }
12699 Party::TakeGold(v10); 12699 Party::TakeGold(v10);
12700 } 12700 }
12722 ++pMessageQueue_50CBD0->uNumMessages; 12722 ++pMessageQueue_50CBD0->uNumMessages;
12723 } 12723 }
12724 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) 12724 if ( (uDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 )
12725 pDialogue_SpeakingActor->uAIState = Removed; 12725 pDialogue_SpeakingActor->uAIState = Removed;
12726 if ( uActiveCharacter ) 12726 if ( uActiveCharacter )
12727 pPlayers[uActiveCharacter]->PlaySound(61, 0); 12727 pPlayers[uActiveCharacter]->PlaySound(SPEECH_61, 0);
12728 goto LABEL_87; 12728 goto LABEL_87;
12729 } 12729 }
12730 if ( v3 == 22 ) 12730 if ( v3 == 22 )
12731 { 12731 {
12732 v4 = v2->evtd; 12732 v4 = v2->evtd;
13494 _42777D_CastSpell_UseWand_ShootArrow(85, v29 - 1, v34, 48, 0); 13494 _42777D_CastSpell_UseWand_ShootArrow(85, v29 - 1, v34, 48, 0);
13495 v29 = uActiveCharacter; 13495 v29 = uActiveCharacter;
13496 } 13496 }
13497 } 13497 }
13498 ++byte_F8B1EF[v29]; 13498 ++byte_F8B1EF[v29];
13499 v1->PlaySound(83, 0); 13499 v1->PlaySound(SPEECH_83, 0);
13500 ShowStatusBarString(pGlobalTXT_LocalizationStrings[527], 2u); 13500 ShowStatusBarString(pGlobalTXT_LocalizationStrings[527], 2u);
13501 goto LABEL_46; 13501 goto LABEL_46;
13502 } 13502 }
13503 goto LABEL_55; 13503 goto LABEL_55;
13504 } 13504 }
13555 v39 = (GUIWindow *)HIDWORD(pParty->uTimePlayed); 13555 v39 = (GUIWindow *)HIDWORD(pParty->uTimePlayed);
13556 } 13556 }
13557 HIDWORD(v1->pConditions[17]) = (int)v39; 13557 HIDWORD(v1->pConditions[17]) = (int)v39;
13558 LABEL_63: 13558 LABEL_63:
13559 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0); 13559 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x2), -1, 0, -1, 0, 0, 0, 0);
13560 v1->PlaySound(82, 0); 13560 v1->PlaySound(SPEECH_82, 0);
13561 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536); 13561 pOtherOverlayList->_4418B1(20, uActiveCharacter + 99, 0, 65536);
13562 LABEL_46: 13562 LABEL_46:
13563 result = pMessageQueue_50CBD0->uNumMessages; 13563 result = pMessageQueue_50CBD0->uNumMessages;
13564 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 13564 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
13565 { 13565 {
14218 } 14218 }
14219 HousePlaySomeSound((unsigned int)ptr_507BC0->ptr_1C, 2); 14219 HousePlaySomeSound((unsigned int)ptr_507BC0->ptr_1C, 2);
14220 v12 = (unsigned __int8)v5[8]; 14220 v12 = (unsigned __int8)v5[8];
14221 if ( (signed int)ptr_507BC0->ptr_1C >= 63 ) 14221 if ( (signed int)ptr_507BC0->ptr_1C >= 63 )
14222 { 14222 {
14223 v63 = 72; 14223 v63 = SPEECH_72;
14224 v13 = 2500; 14224 v13 = 2500;
14225 if ( CheckHiredNPCSpeciality(8u) ) 14225 if ( CheckHiredNPCSpeciality(8u) )
14226 v12 -= 2; 14226 v12 -= 2;
14227 if ( CheckHiredNPCSpeciality(9u) ) 14227 if ( CheckHiredNPCSpeciality(9u) )
14228 v12 -= 3; 14228 v12 -= 3;
14229 v47[1] = (const char *)45; 14229 v47[1] = (const char *)45;
14230 } 14230 }
14231 else 14231 else
14232 { 14232 {
14233 v63 = 71; 14233 v63 = SPEECH_71;
14234 v13 = 1500; 14234 v13 = 1500;
14235 v47[1] = (const char *)35; 14235 v47[1] = (const char *)35;
14236 } 14236 }
14237 if ( CheckHiredNPCSpeciality((unsigned int)v47[1]) ) 14237 if ( CheckHiredNPCSpeciality((unsigned int)v47[1]) )
14238 v12 -= 2; 14238 v12 -= 2;
14239 if ( CheckHiredNPCSpeciality(0x2Cu) ) 14239 if ( CheckHiredNPCSpeciality(0x2Cu) )
14240 --v12; 14240 --v12;
14241 if ( v12 < 1 ) 14241 if ( v12 < 1 )
14242 v12 = 1; 14242 v12 = 1;
14243 RestAndHeal(1440 * v12); 14243 RestAndHeal(1440 * v12);
14244 v61->PlaySound(v63, 0); 14244 v61->PlaySound((PlayerSpeech)v63, 0);
14245 v14 = GetTickCount(); 14245 v14 = GetTickCount();
14246 v15 = v14 + v13; 14246 v15 = v14 + v13;
14247 if ( v15 < v14 ) 14247 if ( v15 < v14 )
14248 v15 = v14; 14248 v15 = v14;
14249 while ( GetTickCount() < v15 ) 14249 while ( GetTickCount() < v15 )
14898 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)26, 0, (int)byte_591098); 14898 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)26, 0, (int)byte_591098);
14899 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) 14899 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) )
14900 if ( BYTE1(pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].field_C) ) 14900 if ( BYTE1(pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].field_C) )
14901 HousePlaySomeSound(v9, 1); 14901 HousePlaySomeSound(v9, 1);
14902 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) 14902 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 )
14903 pPlayers[uActiveCharacter]->PlaySound(47, 0); 14903 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0);
14904 result = v23; 14904 result = v23;
14905 if ( v23 ) 14905 if ( v23 )
14906 uCurrentHouse_Animation = v23; 14906 uCurrentHouse_Animation = v23;
14907 return result; 14907 return result;
14908 } 14908 }
15104 v8 = 1; 15104 v8 = 1;
15105 } 15105 }
15106 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[414], v6, aAMPMNames[v7], v9, aAMPMNames[v8]); 15106 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[414], v6, aAMPMNames[v7], v9, aAMPMNames[v8]);
15107 ShowStatusBarString(pTmpBuf, 2u); 15107 ShowStatusBarString(pTmpBuf, 2u);
15108 if ( uActiveCharacter ) 15108 if ( uActiveCharacter )
15109 pPlayers[uActiveCharacter]->PlaySound(3, 0); 15109 pPlayers[uActiveCharacter]->PlaySound(SPEECH_3, 0);
15110 return 0; 15110 return 0;
15111 } 15111 }
15112 } 15112 }
15113 if ( pParty->uCurrentHour > v5 ) 15113 if ( pParty->uCurrentHour > v5 )
15114 goto LABEL_10; 15114 goto LABEL_10;