Mercurial > mm7
diff Player.cpp @ 1260:dd70fc7eaf08
Player::SetVariable cleanup - preparing to remove LABEL_111 and LABEL_112
author | Grumpy7 |
---|---|
date | Wed, 12 Jun 2013 15:12:38 +0200 |
parents | d6e5b6b76612 |
children | 0aeac0b9ca30 |
line wrap: on
line diff
--- a/Player.cpp Wed Jun 12 04:14:33 2013 +0200 +++ b/Player.cpp Wed Jun 12 15:12:38 2013 +0200 @@ -7895,7 +7895,7 @@ signed int v25; // eax@172 int v26; // [sp-8h] [bp-3Ch]@84 signed int unused27; // [sp-4h] [bp-38h]@4 - int v28; // [sp-4h] [bp-38h]@84 + int v28_unused; // [sp-4h] [bp-38h]@84 ItemGen item; // [sp+Ch] [bp-28h]@52 char v30_unused; // [sp+32h] [bp-2h]@1 char v31_unused; // [sp+33h] [bp-1h]@1 @@ -8171,48 +8171,40 @@ goto LABEL_73; case VAR_BaseMight: this->uMight = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_BaseIntellect: this->uIntelligence = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_BasePersonality: this->uWillpower = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_BaseEndurance: this->uEndurance = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_BaseSpeed: this->uSpeed = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_BaseAccuracy: this->uAccuracy = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_BaseLuck: this->uLuck = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; default: return; } LABEL_111: - v28 = 0; v26 = SPEECH_91; LABEL_112: v19 = pPlayers[currPlayerId + 1]; - v19->PlaySound((PlayerSpeech)v26, v28); + v19->PlaySound((PlayerSpeech)v26, 0); DrawPlayerBuffAnimBasedOnCondition(currPlayerId); PlaySoundBasedOnCondition(currPlayerId); return; @@ -8251,52 +8243,42 @@ goto LABEL_111; case VAR_FireResistance: this->sResFireBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_AirResistance: this->sResAirBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_WaterResistance: this->sResWaterBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_EarthResistance: this->sResEarthBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_SpiritResistance: this->sResSpiritBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_MindResistance: this->sResMindBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_BodyResistance: this->sResBodyBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_LightResistance: this->sResLightBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_DarkResistance: this->sResDarkBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; case VAR_MagicResistance: this->sResMagicBase = (unsigned __int8)var_value; - v28 = 0; v26 = 92; goto LABEL_112; default: @@ -8325,24 +8307,26 @@ } memset(this, 0, 0xA0u); } -LABEL_124: - DrawPlayerBuffAnimBasedOnCondition(currPlayerId); - PlaySoundBasedOnCondition(currPlayerId); - return; - } - v16 = (int)((char *)&this->pConditions[16] + 2 * var_type); - v17 = *(char *)v16; - if ( var_value <= VAR_BodyResistanceBonus ) - { - LOWORD(v15) = (unsigned __int8)var_value; - v18 = v15 | v17 & VAR_BodyResistanceBonus; } else { - LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0); - } - *(short *)v16 = v18; - goto LABEL_124; + v16 = (int)((char *)&this->pConditions[16] + 2 * var_type); + v17 = *(char *)v16; + if ( var_value <= VAR_BodyResistanceBonus ) + { + LOWORD(v15) = (unsigned __int8)var_value; + v18 = v15 | v17 & VAR_BodyResistanceBonus; + } + else + { + LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0); + } + *(short *)v16 = v18; + } +LABEL_124: + DrawPlayerBuffAnimBasedOnCondition(currPlayerId); + PlaySoundBasedOnCondition(currPlayerId); + return; } if ( var_type <= VAR_MagicResistanceBonus ) {