Mercurial > mm7
comparison Player.cpp @ 333:405d0c4dd1b3
Слияние
author | Ritor1 |
---|---|
date | Wed, 20 Feb 2013 20:51:55 +0600 |
parents | 72de4ad353c6 8e23edf57e27 |
children | d27e30e0158a |
comparison
equal
deleted
inserted
replaced
332:e8fcde8ba3fc | 333:405d0c4dd1b3 |
---|---|
618 | 618 |
619 if (int _v1 = byte_4ECF08[v11 - 1][uVoiceID]) | 619 if (int _v1 = byte_4ECF08[v11 - 1][uVoiceID]) |
620 { | 620 { |
621 pSoundId = rand() % _v1 + 2 * (v11 + 50 * uVoiceID) + 4998; | 621 pSoundId = rand() % _v1 + 2 * (v11 + 50 * uVoiceID) + 4998; |
622 v12 = (8 * pPlayerNum + 312) | OBJECT_Player; | 622 v12 = (8 * pPlayerNum + 312) | OBJECT_Player; |
623 pAudioPlayer->PlaySound((SoundID)pSoundId, v12, 0, -1, 0, 0, (pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0), 0); | 623 pAudioPlayer->PlaySound((SoundID)pSoundId, v12, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0); |
624 } | 624 } |
625 } | 625 } |
626 } | 626 } |
627 | 627 |
628 v13 = 0; | 628 v13 = 0; |
1857 LABEL_15: | 1857 LABEL_15: |
1858 if ( !v10 ) | 1858 if ( !v10 ) |
1859 return result; | 1859 return result; |
1860 } | 1860 } |
1861 LABEL_16: | 1861 LABEL_16: |
1862 if ( BYTE1(pItem->uAttributes) & 1 ) | 1862 if (pItem->Stolen()) |
1863 return 6; | 1863 return 6; |
1864 LABEL_26: | 1864 LABEL_26: |
1865 //v14 = &p2DEvents_minus1__20[13 * a4]; | 1865 //v14 = &p2DEvents_minus1__20[13 * a4]; |
1866 v14 = &p2DEvents[a4 - 1].fPriceMultiplier; | 1866 v14 = &p2DEvents[a4 - 1].fPriceMultiplier; |
1867 v15 = *v14; | 1867 v15 = *v14; |
1870 if ( a5 == 3 ) | 1870 if ( a5 == 3 ) |
1871 { | 1871 { |
1872 v23 = *v14; | 1872 v23 = *v14; |
1873 v24 = pItem->GetValue(); | 1873 v24 = pItem->GetValue(); |
1874 v17 = v27->_4B8102(v24, v23); | 1874 v17 = v27->_4B8102(v24, v23); |
1875 if ( !(pItem->uAttributes & 2) ) | 1875 if (!pItem->Broken()) |
1876 goto LABEL_39; | 1876 goto LABEL_39; |
1877 goto LABEL_38; | 1877 goto LABEL_38; |
1878 } | 1878 } |
1879 if ( a5 == 4 ) | 1879 if ( a5 == 4 ) |
1880 { | 1880 { |
1893 if ( a5 != 6 ) | 1893 if ( a5 != 6 ) |
1894 goto LABEL_39; | 1894 goto LABEL_39; |
1895 v18 = *v14; | 1895 v18 = *v14; |
1896 v19 = pItem->GetValue(); | 1896 v19 = pItem->GetValue(); |
1897 v17 = v27->_4B8102(v19, v18) / 2; | 1897 v17 = v27->_4B8102(v19, v18) / 2; |
1898 if ( pItem->uAttributes & 2 ) | 1898 if (pItem->Broken()) |
1899 v17 = 1; | 1899 v17 = 1; |
1900 if ( v17 >= 1 ) | 1900 if ( v17 >= 1 ) |
1901 goto LABEL_39; | 1901 goto LABEL_39; |
1902 LABEL_38: | 1902 LABEL_38: |
1903 v17 = 1; | 1903 v17 = 1; |
2337 auto thos = this; | 2337 auto thos = this; |
2338 | 2338 |
2339 v20 = thos; | 2339 v20 = thos; |
2340 v2 = pItem->uItemID; | 2340 v2 = pItem->uItemID; |
2341 if ( !pItemsTable->pItems[v2].uItemID_Rep_St ) | 2341 if ( !pItemsTable->pItems[v2].uItemID_Rep_St ) |
2342 pItem->uAttributes |= 1u; | 2342 pItem->SetIdentified(); |
2343 ///v15 = 0; | 2343 ///v15 = 0; |
2344 //v16 = 1; | 2344 //v16 = 1; |
2345 //v18 = 3; | 2345 //v18 = 3; |
2346 //v17 = 2; | 2346 //v17 = 2; |
2347 if ( uActiveCharacter ) | 2347 if ( uActiveCharacter ) |
3507 v30 = dword_4EDEA0[v8]; | 3507 v30 = dword_4EDEA0[v8]; |
3508 v29 = dword_4EDEB4[v9 % 100 / 20]; | 3508 v29 = dword_4EDEB4[v9 % 100 / 20]; |
3509 v10 = v5->pMonsterInfo.uLevel + 100 * (_steal_perm + reputation); | 3509 v10 = v5->pMonsterInfo.uLevel + 100 * (_steal_perm + reputation); |
3510 if ( rand() % 100 < 5 || v10 > v29 + v7 * v30 || (_steal_perma = 2, BYTE2(v5->uAttributes) & 8) ) | 3510 if ( rand() % 100 < 5 || v10 > v29 + v7 * v30 || (_steal_perma = 2, BYTE2(v5->uAttributes) & 8) ) |
3511 { | 3511 { |
3512 Actor::_43AC45(uActorID, 1); | 3512 Actor::AggroSurroundingPeasants(uActorID, 1); |
3513 _steal_perma = 0; | 3513 _steal_perma = 0; |
3514 v26 = (int)v31->pName; | 3514 v26 = (int)v31->pName; |
3515 v25 = pGlobalTXT_LocalizationStrings[376]; | 3515 v25 = pGlobalTXT_LocalizationStrings[376]; |
3516 } | 3516 } |
3517 else | 3517 else |
3794 case 17: | 3794 case 17: |
3795 v12 = 0; | 3795 v12 = 0; |
3796 v13 = this->pInventoryItems; | 3796 v13 = this->pInventoryItems; |
3797 do | 3797 do |
3798 { | 3798 { |
3799 if ( (signed int)v13->uItemID > 0 && (signed int)v13->uItemID <= 134 && !(v13->uAttributes & 2) ) | 3799 if ( (signed int)v13->uItemID > 0 && (signed int)v13->uItemID <= 134 && !v13->Broken()) |
3800 v46[v4++] = v12; | 3800 v46[v4++] = v12; |
3801 ++v12; | 3801 ++v12; |
3802 ++v13; | 3802 ++v13; |
3803 } | 3803 } |
3804 while ( v12 < 138 ); | 3804 while ( v12 < 138 ); |
4052 goto LABEL_87; | 4052 goto LABEL_87; |
4053 } | 4053 } |
4054 } | 4054 } |
4055 return result; | 4055 return result; |
4056 } | 4056 } |
4057 | |
4057 // 48DCF6: using guessed type char var_94[140]; | 4058 // 48DCF6: using guessed type char var_94[140]; |
4058 | 4059 |
4059 //----- (0048E1A3) -------------------------------------------------------- | 4060 //----- (0048E1A3) -------------------------------------------------------- |
4060 unsigned int Player::GetSpellSchool(unsigned int uSpellID) | 4061 unsigned int Player::GetSpellSchool(unsigned int uSpellID) |
4061 { | 4062 { |
7540 ShowStatusBarString(v23, 2u); | 7541 ShowStatusBarString(v23, 2u); |
7541 v4 = 0; | 7542 v4 = 0; |
7542 goto LABEL_92; | 7543 goto LABEL_92; |
7543 } | 7544 } |
7544 v15 = pParty->pPickedItem.uItemID - 400; | 7545 v15 = pParty->pPickedItem.uItemID - 400; |
7545 v72 = (char *)&v3->pConditions[0] + pParty->pPickedItem.uItemID + 2; | 7546 v72 = (char *)&v3->spellbook.pFireSpellbook+pParty->pPickedItem.uItemID-400;//(char *)&v3->pConditions[0] + pParty->pPickedItem.uItemID + 2; |
7546 if ( *v72 ) | 7547 if ( *v72 ) |
7547 { | 7548 { |
7548 v66 = pParty->pPickedItem.GetDisplayName(); | 7549 v66 = pParty->pPickedItem.GetDisplayName(); |
7549 v57 = pGlobalTXT_LocalizationStrings[380]; | 7550 v57 = pGlobalTXT_LocalizationStrings[380]; |
7550 LABEL_72: | 7551 LABEL_72: |
8299 pParty->uNumGoldInBank = a3; | 8300 pParty->uNumGoldInBank = a3; |
8300 return; | 8301 return; |
8301 } | 8302 } |
8302 if ( var <= VAR_Counter8 ) | 8303 if ( var <= VAR_Counter8 ) |
8303 { | 8304 { |
8304 if ( (signed int)var >= 245 ) | 8305 if ( (signed int)var >= 0xF5 ) |
8305 { | 8306 { |
8306 *(int *)&stru_AA1058[3].pSounds[8 * var + 44300] = LODWORD(pParty->uTimePlayed); | 8307 *(int *)&stru_AA1058[3].pSounds[8 * var + 44300] = LODWORD(pParty->uTimePlayed); |
8307 *(int *)&stru_AA1058[3].pSounds[8 * var + 44304] = HIDWORD(pParty->uTimePlayed); | 8308 *(int *)&stru_AA1058[3].pSounds[8 * var + 44304] = HIDWORD(pParty->uTimePlayed); |
8308 } | 8309 } |
8309 else | 8310 else |
8326 } | 8327 } |
8327 return; | 8328 return; |
8328 } | 8329 } |
8329 if ( var < VAR_Counter9 ) | 8330 if ( var < VAR_Counter9 ) |
8330 return; | 8331 return; |
8331 if ( (signed int)var <= 274 ) | 8332 if ( (signed int)var <= 0x112 ) |
8332 { | 8333 { |
8333 *(int *)&stru_AA1058[3].pSounds[8 * var + 44532] = LODWORD(pParty->uTimePlayed); | 8334 *(int *)&stru_AA1058[3].pSounds[8 * var + 44532] = LODWORD(pParty->uTimePlayed); |
8334 *(int *)&stru_AA1058[3].pSounds[8 * var + 44536] = HIDWORD(pParty->uTimePlayed); | 8335 *(int *)&stru_AA1058[3].pSounds[8 * var + 44536] = HIDWORD(pParty->uTimePlayed); |
8335 } | 8336 } |
8336 else | 8337 else |
8762 } | 8763 } |
8763 | 8764 |
8764 | 8765 |
8765 | 8766 |
8766 //----- (0044AFFB) -------------------------------------------------------- | 8767 //----- (0044AFFB) -------------------------------------------------------- |
8767 void Player::AddVariable(enum VariableType var, signed int val) | 8768 void Player::AddVariable(enum VariableType var_type, signed int val) |
8768 { | 8769 { |
8769 char v3; // bl@1 | 8770 char v3; // bl@1 |
8770 Player *v4; // esi@1 | 8771 Player *v4; // esi@1 |
8771 signed int uPlayerIdx; // edi@1 | 8772 signed int uPlayerIdx; // edi@1 |
8772 int v6; // eax@15 | 8773 int v6; // eax@15 |
8791 int v25; // eax@150 | 8792 int v25; // eax@150 |
8792 char v26; // zf@151 | 8793 char v26; // zf@151 |
8793 DDM_DLV_Header *v27; // eax@153 | 8794 DDM_DLV_Header *v27; // eax@153 |
8794 signed int v28; // eax@176 | 8795 signed int v28; // eax@176 |
8795 int v29; // [sp-8h] [bp-40h]@84 | 8796 int v29; // [sp-8h] [bp-40h]@84 |
8796 signed int v30; // [sp-4h] [bp-3Ch]@4 | 8797 // signed int v30; // [sp-4h] [bp-3Ch]@4 |
8797 int v31; // [sp-4h] [bp-3Ch]@84 | 8798 int v31; // [sp-4h] [bp-3Ch]@84 |
8798 ItemGen item; // [sp+Ch] [bp-2Ch]@45 | 8799 ItemGen item; // [sp+Ch] [bp-2Ch]@45 |
8799 unsigned int v33; // [sp+30h] [bp-8h]@34 | 8800 unsigned int v33; // [sp+30h] [bp-8h]@34 |
8800 char v34; // [sp+37h] [bp-1h]@1 | 8801 char v34; // [sp+37h] [bp-1h]@1 |
8801 | 8802 |
8803 v3 = 0; | 8804 v3 = 0; |
8804 v34 = 0; | 8805 v34 = 0; |
8805 v4 = Dst; | 8806 v4 = Dst; |
8806 uPlayerIdx = 0; | 8807 uPlayerIdx = 0; |
8807 if ( Dst == pPlayers[2] ) | 8808 if ( Dst == pPlayers[2] ) |
8808 { | |
8809 uPlayerIdx = 1; | 8809 uPlayerIdx = 1; |
8810 goto LABEL_8; | 8810 else if ( Dst == pPlayers[3] ) |
8811 } | 8811 uPlayerIdx = 2; |
8812 if ( Dst == pPlayers[3] ) | 8812 else if ( Dst == pPlayers[4] ) |
8813 { | 8813 uPlayerIdx = 3; |
8814 v30 = 2; | 8814 |
8815 } | 8815 if ( var_type <= VAR_AutoNotes ) |
8816 else | 8816 { |
8817 { | 8817 if ( var_type != VAR_AutoNotes ) |
8818 if ( Dst != pPlayers[4] ) | 8818 { |
8819 goto LABEL_8; | 8819 if ( var_type <= VAR_ActualMight ) |
8820 v30 = 3; | 8820 { |
8821 } | 8821 if ( var_type != VAR_ActualMight ) |
8822 uPlayerIdx = v30; | 8822 { |
8823 LABEL_8: | 8823 switch ( var_type ) |
8824 if ( var <= VAR_AutoNotes ) | |
8825 { | |
8826 if ( var != VAR_AutoNotes ) | |
8827 { | |
8828 if ( var <= VAR_ActualMight ) | |
8829 { | |
8830 if ( var != VAR_ActualMight ) | |
8831 { | |
8832 switch ( var ) | |
8833 { | 8824 { |
8834 case VAR_RandomGold: | 8825 case VAR_RandomGold: |
8835 if ( !val ) | 8826 if ( !val ) |
8836 val = 1; | 8827 val = 1; |
8837 v6 = rand(); | 8828 v6 = rand(); |
9000 } | 8991 } |
9001 LABEL_62: | 8992 LABEL_62: |
9002 v19 = (__int16 *)&Dst->uMightBonus; | 8993 v19 = (__int16 *)&Dst->uMightBonus; |
9003 goto LABEL_113; | 8994 goto LABEL_113; |
9004 } | 8995 } |
9005 if ( var <= VAR_FireResistanceBonus ) | 8996 if ( var_type <= VAR_FireResistanceBonus ) |
9006 { | 8997 { |
9007 if ( var != VAR_FireResistanceBonus ) | 8998 if ( var_type != VAR_FireResistanceBonus ) |
9008 { | 8999 { |
9009 switch ( var ) | 9000 switch ( var_type ) |
9010 { | 9001 { |
9011 case VAR_ActualIntellect: | 9002 case VAR_ActualIntellect: |
9012 LABEL_66: | 9003 LABEL_66: |
9013 v19 = (__int16 *)&Dst->uIntelligenceBonus; | 9004 v19 = (__int16 *)&Dst->uIntelligenceBonus; |
9014 goto LABEL_113; | 9005 goto LABEL_113; |
9083 LABEL_116: | 9074 LABEL_116: |
9084 v3 = 1; | 9075 v3 = 1; |
9085 pPlayers[uPlayerIdx + 1]->PlaySound((PlayerSpeech)v29, v31); | 9076 pPlayers[uPlayerIdx + 1]->PlaySound((PlayerSpeech)v29, v31); |
9086 goto _play_anim_and_maybe_sound; | 9077 goto _play_anim_and_maybe_sound; |
9087 } | 9078 } |
9088 if ( var <= VAR_DisarmTrapSkill ) | 9079 if ( var_type <= VAR_DisarmTrapSkill ) |
9089 { | 9080 { |
9090 if ( var != VAR_DisarmTrapSkill ) | 9081 if ( var_type != VAR_DisarmTrapSkill ) |
9091 { | 9082 { |
9092 if ( var <= VAR_BodyResistanceBonus ) | 9083 if ( var_type <= VAR_BodyResistanceBonus ) |
9093 { | 9084 { |
9094 switch ( var ) | 9085 switch ( var_type ) |
9095 { | 9086 { |
9096 case VAR_BodyResistanceBonus: | 9087 case VAR_BodyResistanceBonus: |
9097 v19 = &Dst->sResBodyBonus; | 9088 v19 = &Dst->sResBodyBonus; |
9098 break; | 9089 break; |
9099 case VAR_AirResistanceBonus: | 9090 case VAR_AirResistanceBonus: |
9107 break; | 9098 break; |
9108 case VAR_SpiritResistanceBonus: | 9099 case VAR_SpiritResistanceBonus: |
9109 v19 = &Dst->sResSpiritBonus; | 9100 v19 = &Dst->sResSpiritBonus; |
9110 break; | 9101 break; |
9111 default: | 9102 default: |
9112 if ( var != 62 ) | 9103 if ( var_type != 62 ) |
9113 return; | 9104 return; |
9114 v19 = &Dst->sResMindBonus; | 9105 v19 = &Dst->sResMindBonus; |
9115 break; | 9106 break; |
9116 } | 9107 } |
9117 goto LABEL_113; | 9108 goto LABEL_113; |
9118 } | 9109 } |
9119 if ( var == VAR_LightResistanceBonus ) | 9110 if ( var_type == VAR_LightResistanceBonus ) |
9120 { | 9111 { |
9121 v19 = &Dst->sResLightBonus; | 9112 v19 = &Dst->sResLightBonus; |
9122 goto LABEL_113; | 9113 goto LABEL_113; |
9123 } | 9114 } |
9124 if ( var == VAR_DarkResistanceBonus ) | 9115 if ( var_type == VAR_DarkResistanceBonus ) |
9125 { | 9116 { |
9126 v19 = &Dst->sResDarkBonus; | 9117 v19 = &Dst->sResDarkBonus; |
9127 goto LABEL_113; | 9118 goto LABEL_113; |
9128 } | 9119 } |
9129 if ( var == VAR_MagicResistanceBonus ) | 9120 if ( var_type == VAR_MagicResistanceBonus ) |
9130 { | 9121 { |
9131 v19 = &Dst->sResMagicBonus; | 9122 v19 = &Dst->sResMagicBonus; |
9132 goto LABEL_113; | 9123 goto LABEL_113; |
9133 } | 9124 } |
9134 if ( var <= VAR_MagicResistanceBonus || var > VAR_DiplomacySkill ) | 9125 if ( var_type <= VAR_MagicResistanceBonus || var_type > VAR_DiplomacySkill ) |
9135 return; | 9126 return; |
9136 } | 9127 } |
9137 goto LABEL_106; | 9128 goto LABEL_106; |
9138 } | 9129 } |
9139 if ( var == VAR_LearningSkill ) | 9130 if ( var_type == VAR_LearningSkill ) |
9140 { | 9131 { |
9141 LABEL_106: | 9132 LABEL_106: |
9142 if ( val <= VAR_BodyResistanceBonus ) | 9133 if ( val <= VAR_BodyResistanceBonus ) |
9143 { | 9134 { |
9144 *((short *)&Dst->pConditions[16] + var) = (unsigned __int8)val | *((char *)&Dst->pConditions[16] + 2 * var) & VAR_BodyResistanceBonus; | 9135 *((short *)&Dst->pConditions[16] + var_type) = (unsigned __int8)val | *((char *)&Dst->pConditions[16] + 2 * var_type) & VAR_BodyResistanceBonus; |
9145 } | 9136 } |
9146 else | 9137 else |
9147 { | 9138 { |
9148 v20 = (char *)&Dst->pConditions[16] + 2 * var; | 9139 v20 = (char *)&Dst->pConditions[16] + 2 * var_type; |
9149 v21 = *(short *)v20; | 9140 v21 = *(short *)v20; |
9150 v22 = (unsigned __int8)val + (v21 & VAR_BodyResistanceBonus); | 9141 v22 = (unsigned __int8)val + (v21 & VAR_BodyResistanceBonus); |
9151 if ( v22 > 60 ) | 9142 if ( v22 > 60 ) |
9152 LOWORD(v22) = 60; | 9143 LOWORD(v22) = 60; |
9153 LOBYTE(v21) = v21 & 0xC0; | 9144 LOBYTE(v21) = v21 & 0xC0; |
9154 *(short *)v20 = v22 | v21; | 9145 *(short *)v20 = v22 | v21; |
9155 } | 9146 } |
9156 goto _play_anim_and_exit; | 9147 goto _play_anim_and_exit; |
9157 } | 9148 } |
9158 if ( var <= VAR_LearningSkill ) | 9149 if ( var_type <= VAR_LearningSkill ) |
9159 return; | 9150 return; |
9160 if ( var <= VAR_Eradicated ) | 9151 if ( var_type <= VAR_Eradicated ) |
9161 { | 9152 { |
9162 Dst->SetCondition(var - 105, 0); | 9153 Dst->SetCondition(var_type - 105, 0); |
9163 } | 9154 } |
9164 else | 9155 else |
9165 { | 9156 { |
9166 if ( var != VAR_MajorCondition ) | 9157 if ( var_type != VAR_MajorCondition ) |
9167 { | 9158 { |
9168 if ( var > VAR_MajorCondition && var <= VAR_ActiveSpells ) | 9159 if ( var_type > VAR_MajorCondition && var_type <= VAR_ActiveSpells ) |
9169 { | 9160 { |
9170 if ( (unsigned __int8)val + (unsigned __int8)byte_5E4C15[var] <= 255 ) | 9161 if ( (unsigned __int8)val + (unsigned __int8)byte_5E4C15[var_type] <= 255 ) |
9171 byte_5E4C15[var] += val; | 9162 byte_5E4C15[var_type] += val; |
9172 else | 9163 else |
9173 byte_5E4C15[var] = -1; | 9164 byte_5E4C15[var_type] = -1; |
9174 } | 9165 } |
9175 return; | 9166 return; |
9176 } | 9167 } |
9177 memset(Dst, 0, 0xA0u); | 9168 memset(Dst, 0, 0xA0u); |
9178 } | 9169 } |
9201 LABEL_173: | 9192 LABEL_173: |
9202 if ( v34 != 1 ) | 9193 if ( v34 != 1 ) |
9203 goto _maybe_play_sound; | 9194 goto _maybe_play_sound; |
9204 goto _play_anim_and_maybe_sound; | 9195 goto _play_anim_and_maybe_sound; |
9205 } | 9196 } |
9206 if ( var > VAR_GoldInBank ) | 9197 if ( var_type > VAR_GoldInBank ) |
9207 { | 9198 { |
9208 if ( var == 307 ) | 9199 if ( var_type == 307 ) |
9209 { | 9200 { |
9210 pParty->uNumDeaths += val; | 9201 pParty->uNumDeaths += val; |
9211 goto LABEL_173; | 9202 goto LABEL_173; |
9212 } | 9203 } |
9213 switch ( var ) | 9204 switch ( var_type ) |
9214 { | 9205 { |
9215 case 308: | 9206 case 308: |
9216 pParty->uNumBountiesCollected += val; | 9207 pParty->uNumBountiesCollected += val; |
9217 break; | 9208 break; |
9218 case 309: | 9209 case 309: |
9232 break; | 9223 break; |
9233 } | 9224 } |
9234 } | 9225 } |
9235 else | 9226 else |
9236 { | 9227 { |
9237 if ( var == VAR_GoldInBank ) | 9228 if ( var_type == VAR_GoldInBank ) |
9238 { | 9229 { |
9239 pParty->uNumGoldInBank += val; | 9230 pParty->uNumGoldInBank += val; |
9240 return; | 9231 return; |
9241 } | 9232 } |
9242 if ( var <= VAR_Counter8 ) | 9233 if ( var_type <= VAR_Counter8 ) |
9243 { | 9234 { |
9244 if ( (signed int)var >= 245 ) | 9235 if ( (signed int)var_type >= 245 ) |
9245 { | 9236 { |
9246 *(int *)&stru_AA1058[3].pSounds[8 * var + 44300] = LODWORD(pParty->uTimePlayed); | 9237 *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44300] = LODWORD(pParty->uTimePlayed); |
9247 *(int *)&stru_AA1058[3].pSounds[8 * var + 44304] = HIDWORD(pParty->uTimePlayed); | 9238 *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44304] = HIDWORD(pParty->uTimePlayed); |
9248 } | 9239 } |
9249 else | 9240 else |
9250 { | 9241 { |
9251 switch ( var ) | 9242 switch ( var_type ) |
9252 { | 9243 { |
9253 case VAR_MonthEquals|VAR_CurrentSP: | 9244 case VAR_MonthEquals|VAR_CurrentSP: |
9254 _449B7E_toggle_bit((unsigned char *)Dst->field_1A50, val, 1u); | 9245 _449B7E_toggle_bit((unsigned char *)Dst->field_1A50, val, 1u); |
9255 break; | 9246 break; |
9256 case VAR_NPCs2: | 9247 case VAR_NPCs2: |
9264 break; | 9255 break; |
9265 } | 9256 } |
9266 } | 9257 } |
9267 return; | 9258 return; |
9268 } | 9259 } |
9269 if ( var < VAR_Counter9 ) | 9260 if ( var_type < VAR_Counter9 ) |
9270 return; | 9261 return; |
9271 if ( (signed int)var <= 274 ) | 9262 if ( (signed int)var_type <= 274 ) |
9272 { | 9263 { |
9273 *(int *)&stru_AA1058[3].pSounds[8 * var + 44532] = LODWORD(pParty->uTimePlayed); | 9264 *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44532] = LODWORD(pParty->uTimePlayed); |
9274 *(int *)&stru_AA1058[3].pSounds[8 * var + 44536] = HIDWORD(pParty->uTimePlayed); | 9265 *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44536] = HIDWORD(pParty->uTimePlayed); |
9275 goto _play_sound; | 9266 goto _play_sound; |
9276 } | 9267 } |
9277 if ( var != VAR_ReputationInCurrentLocation ) | 9268 if ( var_type != VAR_ReputationInCurrentLocation ) |
9278 { | 9269 { |
9279 if ( var <= VAR_ReputationInCurrentLocation | 9270 if ( var_type <= VAR_ReputationInCurrentLocation |
9280 || var > VAR_History_28 | 9271 || var_type > VAR_History_28 |
9281 || (v25 = var - 276, pParty->field_3C.field_4F0[2 * v25 + 1] | pParty->field_3C.field_4F0[2 * v25]) | 9272 || (v25 = var_type - 276, pParty->field_3C.field_4F0[2 * v25 + 1] | pParty->field_3C.field_4F0[2 * v25]) |
9282 || (pParty->field_3C.field_4F0[2 * (var - 276)] = LODWORD(pParty->uTimePlayed), | 9273 || (pParty->field_3C.field_4F0[2 * (var_type - 276)] = LODWORD(pParty->uTimePlayed), |
9283 v26 = pStorylineText->StoreLine[v25].pText==0,//*(&pStorylineText->field_0 + 3 * v25) == 0, | 9274 v26 = pStorylineText->StoreLine[v25].pText==0,//*(&pStorylineText->field_0 + 3 * v25) == 0, |
9284 pParty->field_3C.field_4F0[2 * (var - 276) + 1] = HIDWORD(pParty->uTimePlayed), | 9275 pParty->field_3C.field_4F0[2 * (var_type - 276) + 1] = HIDWORD(pParty->uTimePlayed), |
9285 v26) ) | 9276 v26) ) |
9286 return; | 9277 return; |
9287 bFlashHistoryBook = 1; | 9278 bFlashHistoryBook = 1; |
9288 _play_sound: | 9279 _play_sound: |
9289 v28 = 8 * uPlayerIdx + 400; | 9280 v28 = 8 * uPlayerIdx + 400; |