Mercurial > mm7
comparison mm7_2.cpp @ 190:9b77686e2239
Merge
author | Gloval |
---|---|
date | Sat, 16 Feb 2013 00:44:38 +0400 |
parents | 038a4d09406f 49728858c35e |
children | 650d96af8855 |
comparison
equal
deleted
inserted
replaced
189:038a4d09406f | 190:9b77686e2239 |
---|---|
242 Party::TakeGold(v2); | 242 Party::TakeGold(v2); |
243 pParty->uFine -= v2; | 243 pParty->uFine -= v2; |
244 if ( pParty->uFine < 0 ) | 244 if ( pParty->uFine < 0 ) |
245 pParty->uFine = 0; | 245 pParty->uFine = 0; |
246 if ( uActiveCharacter ) | 246 if ( uActiveCharacter ) |
247 pPlayers[uActiveCharacter]->PlaySound(81, 0); | 247 pPlayers[uActiveCharacter]->PlaySound(SPEECH_81, 0); |
248 v0 = ptr_507BC0; | 248 v0 = ptr_507BC0; |
249 } | 249 } |
250 else | 250 else |
251 { | 251 { |
252 if ( ptr_507BC0->field_40 != 3 ) | 252 if ( ptr_507BC0->field_40 != 3 ) |
346 if ( v7 ) | 346 if ( v7 ) |
347 { | 347 { |
348 Party::TakeGold(v7); | 348 Party::TakeGold(v7); |
349 pParty->uNumGoldInBank += v7; | 349 pParty->uNumGoldInBank += v7; |
350 if ( uActiveCharacter ) | 350 if ( uActiveCharacter ) |
351 pPlayers[uActiveCharacter]->PlaySound(81, 0); | 351 pPlayers[uActiveCharacter]->PlaySound(SPEECH_81, 0); |
352 } | 352 } |
353 v0 = ptr_507BC0; | 353 v0 = ptr_507BC0; |
354 LABEL_16: | 354 LABEL_16: |
355 v0->field_40 = 0; | 355 v0->field_40 = 0; |
356 goto LABEL_17; | 356 goto LABEL_17; |
742 //if ( (double)pParty->uNumFoodRations >= p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C] ) | 742 //if ( (double)pParty->uNumFoodRations >= p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C] ) |
743 if ( (double)pParty->uNumFoodRations >= p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier ) | 743 if ( (double)pParty->uNumFoodRations >= p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier ) |
744 { | 744 { |
745 ShowStatusBarString(pGlobalTXT_LocalizationStrings[140], 2u); | 745 ShowStatusBarString(pGlobalTXT_LocalizationStrings[140], 2u); |
746 if ( uActiveCharacter ) | 746 if ( uActiveCharacter ) |
747 pPlayers[uActiveCharacter]->PlaySound(67, 0); | 747 pPlayers[uActiveCharacter]->PlaySound(SPEECH_67, 0); |
748 goto LABEL_43; | 748 goto LABEL_43; |
749 } | 749 } |
750 if ( pParty->uNumGold >= v7 ) | 750 if ( pParty->uNumGold >= v7 ) |
751 { | 751 { |
752 Party::TakeGold(v7); | 752 Party::TakeGold(v7); |
4187 else | 4187 else |
4188 { | 4188 { |
4189 Party::TakeGold(v37); | 4189 Party::TakeGold(v37); |
4190 dword_F8B1E4 = 1; | 4190 dword_F8B1E4 = 1; |
4191 *(short *)v38 = 1; | 4191 *(short *)v38 = 1; |
4192 v35->PlaySound(78, 0); | 4192 v35->PlaySound(SPEECH_78, 0); |
4193 } | 4193 } |
4194 } | 4194 } |
4195 } | 4195 } |
4196 } | 4196 } |
4197 else | 4197 else |
4598 v26 = 1; | 4598 v26 = 1; |
4599 v20->uAttributes |= 1u; | 4599 v20->uAttributes |= 1u; |
4600 memcpy(&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v25 + 5], v20, 0x24u); | 4600 memcpy(&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v25 + 5], v20, 0x24u); |
4601 goto LABEL_42; | 4601 goto LABEL_42; |
4602 } | 4602 } |
4603 v0->PlaySound(15, 0); | 4603 v0->PlaySound(SPEECH_15, 0); |
4604 v54 = 5; | 4604 v54 = 5; |
4605 LABEL_70: | 4605 LABEL_70: |
4606 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!" | 4606 v9 = pGlobalTXT_LocalizationStrings[563]; // "Pack is Full!" |
4607 goto LABEL_71; | 4607 goto LABEL_71; |
4608 } | 4608 } |
4688 viewparams->bRedrawGameUI = v26; | 4688 viewparams->bRedrawGameUI = v26; |
4689 _this->Reset(); | 4689 _this->Reset(); |
4690 pRenderer->ClearZBuffer(0, 479); | 4690 pRenderer->ClearZBuffer(0, 479); |
4691 v27 = v77; | 4691 v27 = v77; |
4692 v53 = 0; | 4692 v53 = 0; |
4693 v51 = 75; | 4693 v51 = SPEECH_75; |
4694 LABEL_81: | 4694 LABEL_81: |
4695 v27->PlaySound(v51, v53); | 4695 v27->PlaySound((PlayerSpeech)v51, v53); |
4696 return; | 4696 return; |
4697 } | 4697 } |
4698 v0->PlaySound(15, 0); | 4698 v0->PlaySound(SPEECH_15, 0); |
4699 v54 = 2; | 4699 v54 = 2; |
4700 goto LABEL_70; | 4700 goto LABEL_70; |
4701 } | 4701 } |
4702 if ( dword_F8B19C == 3 ) | 4702 if ( dword_F8B19C == 3 ) |
4703 { | 4703 { |
4716 pRenderer->ClearZBuffer(0, 479); | 4716 pRenderer->ClearZBuffer(0, 479); |
4717 v53 = 0; | 4717 v53 = 0; |
4718 v51 = 77; | 4718 v51 = 77; |
4719 goto LABEL_80; | 4719 goto LABEL_80; |
4720 } | 4720 } |
4721 v0->PlaySound(79, 0); | 4721 v0->PlaySound(SPEECH_79, 0); |
4722 v56 = 0; | 4722 v56 = 0; |
4723 v52 = 0; | 4723 v52 = 0; |
4724 v50 = 0; | 4724 v50 = 0; |
4725 v49 = 0; | 4725 v49 = 0; |
4726 v48 = -1; | 4726 v48 = -1; |
4752 if ( pParty->uNumGold >= v80 ) | 4752 if ( pParty->uNumGold >= v80 ) |
4753 { | 4753 { |
4754 dword_F8B1E4 = 1; | 4754 dword_F8B1E4 = 1; |
4755 Party::TakeGold(v80); | 4755 Party::TakeGold(v80); |
4756 *(int *)(v12 + 20) |= 1u; | 4756 *(int *)(v12 + 20) |= 1u; |
4757 v0->PlaySound(73, 0); | 4757 v0->PlaySound(SPEECH_73, 0); |
4758 v9 = pGlobalTXT_LocalizationStrings[569]; | 4758 v9 = pGlobalTXT_LocalizationStrings[569]; |
4759 goto LABEL_25; | 4759 goto LABEL_25; |
4760 } | 4760 } |
4761 goto LABEL_26; | 4761 goto LABEL_26; |
4762 } | 4762 } |
4805 dword_F8B1E4 = 1; | 4805 dword_F8B1E4 = 1; |
4806 Party::TakeGold(v80); | 4806 Party::TakeGold(v80); |
4807 v8 = *(int *)(v3 + 20); | 4807 v8 = *(int *)(v3 + 20); |
4808 LOBYTE(v8) = v8 & 0xFD; | 4808 LOBYTE(v8) = v8 & 0xFD; |
4809 *(int *)(v3 + 20) = v8 | 1; | 4809 *(int *)(v3 + 20) = v8 | 1; |
4810 v0->PlaySound(74, 0); | 4810 v0->PlaySound(SPEECH_74, 0); |
4811 v9 = pGlobalTXT_LocalizationStrings[570]; | 4811 v9 = pGlobalTXT_LocalizationStrings[570]; |
4812 LABEL_25: | 4812 LABEL_25: |
4813 v54 = 2; | 4813 v54 = 2; |
4814 LABEL_71: | 4814 LABEL_71: |
4815 ShowStatusBarString(v9, v54); | 4815 ShowStatusBarString(v9, v54); |
4871 | 4871 |
4872 static struct FrameTableTxtLine static_stru_F8BA58; // weak | 4872 static struct FrameTableTxtLine static_stru_F8BA58; // weak |
4873 static_stru_F8BA58.field_0 = 0; | 4873 static_stru_F8BA58.field_0 = 0; |
4874 if ( _this && *_this ) | 4874 if ( _this && *_this ) |
4875 { | 4875 { |
4876 v2 = (char *)&unk_F8B668; | 4876 int i = 0; |
4877 v2 = (char *)&array_F8B668; | |
4877 v3 = 1; | 4878 v3 = 1; |
4878 v7 = 0; | 4879 v7 = 0; |
4879 v4 = _this - (char *)&unk_F8B668; | 4880 v4 = _this - (char *)&array_F8B668; |
4880 do | 4881 do |
4881 { | 4882 { |
4882 v5 = v2[v4]; | 4883 v5 = v2[v4]; |
4883 *v2 = v5; | 4884 *v2 = v5; |
4884 if ( !v5 ) | 4885 if ( !v5 ) |
4919 v3 = 1; | 4920 v3 = 1; |
4920 } | 4921 } |
4921 if ( static_stru_F8BA58.field_0 >= 30 ) | 4922 if ( static_stru_F8BA58.field_0 >= 30 ) |
4922 break; | 4923 break; |
4923 ++v2; | 4924 ++v2; |
4924 } | 4925 ++i; |
4925 while ( (unsigned int)v2 < (unsigned int)&unk_F8BA50 ); | 4926 } |
4927 while (i < 1000); | |
4926 *v2 = 0; | 4928 *v2 = 0; |
4927 } | 4929 } |
4928 result = a2; | 4930 result = a2; |
4929 memcpy(a2, &static_stru_F8BA58, 0x7Cu); | 4931 memcpy(a2, &static_stru_F8BA58, 0x7Cu); |
4930 return result; | 4932 return result; |
14792 LABEL_7: | 14794 LABEL_7: |
14793 LOBYTE(v5) = v0->GetActualSkillLevel(PLAYER_SKILL_SPEAR); | 14795 LOBYTE(v5) = v0->GetActualSkillLevel(PLAYER_SKILL_SPEAR); |
14794 if ( (signed int)SkillToMastery(v5) < 3 ) | 14796 if ( (signed int)SkillToMastery(v5) < 3 ) |
14795 { | 14797 { |
14796 LABEL_8: | 14798 LABEL_8: |
14797 v0->PlaySound(39, 0); | 14799 v0->PlaySound(SPEECH_39, 0); |
14798 return; | 14800 return; |
14799 } | 14801 } |
14800 v3 = pParty->pPickedItem.uItemID; | 14802 v3 = pParty->pPickedItem.uItemID; |
14801 goto LABEL_16; | 14803 goto LABEL_16; |
14802 } | 14804 } |