Mercurial > mm7
comparison 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 |
comparison
equal
deleted
inserted
replaced
1259:d6e5b6b76612 | 1260:dd70fc7eaf08 |
---|---|
7893 char v23; // zf@146 | 7893 char v23; // zf@146 |
7894 DDM_DLV_Header *v24; // ecx@148 | 7894 DDM_DLV_Header *v24; // ecx@148 |
7895 signed int v25; // eax@172 | 7895 signed int v25; // eax@172 |
7896 int v26; // [sp-8h] [bp-3Ch]@84 | 7896 int v26; // [sp-8h] [bp-3Ch]@84 |
7897 signed int unused27; // [sp-4h] [bp-38h]@4 | 7897 signed int unused27; // [sp-4h] [bp-38h]@4 |
7898 int v28; // [sp-4h] [bp-38h]@84 | 7898 int v28_unused; // [sp-4h] [bp-38h]@84 |
7899 ItemGen item; // [sp+Ch] [bp-28h]@52 | 7899 ItemGen item; // [sp+Ch] [bp-28h]@52 |
7900 char v30_unused; // [sp+32h] [bp-2h]@1 | 7900 char v30_unused; // [sp+32h] [bp-2h]@1 |
7901 char v31_unused; // [sp+33h] [bp-1h]@1 | 7901 char v31_unused; // [sp+33h] [bp-1h]@1 |
7902 | 7902 |
7903 currPlayerId = -1; | 7903 currPlayerId = -1; |
8169 goto LABEL_72; | 8169 goto LABEL_72; |
8170 case VAR_LuckBonus: | 8170 case VAR_LuckBonus: |
8171 goto LABEL_73; | 8171 goto LABEL_73; |
8172 case VAR_BaseMight: | 8172 case VAR_BaseMight: |
8173 this->uMight = (unsigned __int8)var_value; | 8173 this->uMight = (unsigned __int8)var_value; |
8174 v28 = 0; | |
8175 v26 = 92; | 8174 v26 = 92; |
8176 goto LABEL_112; | 8175 goto LABEL_112; |
8177 case VAR_BaseIntellect: | 8176 case VAR_BaseIntellect: |
8178 this->uIntelligence = (unsigned __int8)var_value; | 8177 this->uIntelligence = (unsigned __int8)var_value; |
8179 v28 = 0; | |
8180 v26 = 92; | 8178 v26 = 92; |
8181 goto LABEL_112; | 8179 goto LABEL_112; |
8182 case VAR_BasePersonality: | 8180 case VAR_BasePersonality: |
8183 this->uWillpower = (unsigned __int8)var_value; | 8181 this->uWillpower = (unsigned __int8)var_value; |
8184 v28 = 0; | |
8185 v26 = 92; | 8182 v26 = 92; |
8186 goto LABEL_112; | 8183 goto LABEL_112; |
8187 case VAR_BaseEndurance: | 8184 case VAR_BaseEndurance: |
8188 this->uEndurance = (unsigned __int8)var_value; | 8185 this->uEndurance = (unsigned __int8)var_value; |
8189 v28 = 0; | |
8190 v26 = 92; | 8186 v26 = 92; |
8191 goto LABEL_112; | 8187 goto LABEL_112; |
8192 case VAR_BaseSpeed: | 8188 case VAR_BaseSpeed: |
8193 this->uSpeed = (unsigned __int8)var_value; | 8189 this->uSpeed = (unsigned __int8)var_value; |
8194 v28 = 0; | |
8195 v26 = 92; | 8190 v26 = 92; |
8196 goto LABEL_112; | 8191 goto LABEL_112; |
8197 case VAR_BaseAccuracy: | 8192 case VAR_BaseAccuracy: |
8198 this->uAccuracy = (unsigned __int8)var_value; | 8193 this->uAccuracy = (unsigned __int8)var_value; |
8199 v28 = 0; | |
8200 v26 = 92; | 8194 v26 = 92; |
8201 goto LABEL_112; | 8195 goto LABEL_112; |
8202 case VAR_BaseLuck: | 8196 case VAR_BaseLuck: |
8203 this->uLuck = (unsigned __int8)var_value; | 8197 this->uLuck = (unsigned __int8)var_value; |
8204 v28 = 0; | |
8205 v26 = 92; | 8198 v26 = 92; |
8206 goto LABEL_112; | 8199 goto LABEL_112; |
8207 default: | 8200 default: |
8208 return; | 8201 return; |
8209 } | 8202 } |
8210 LABEL_111: | 8203 LABEL_111: |
8211 v28 = 0; | |
8212 v26 = SPEECH_91; | 8204 v26 = SPEECH_91; |
8213 LABEL_112: | 8205 LABEL_112: |
8214 v19 = pPlayers[currPlayerId + 1]; | 8206 v19 = pPlayers[currPlayerId + 1]; |
8215 v19->PlaySound((PlayerSpeech)v26, v28); | 8207 v19->PlaySound((PlayerSpeech)v26, 0); |
8216 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); | 8208 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); |
8217 PlaySoundBasedOnCondition(currPlayerId); | 8209 PlaySoundBasedOnCondition(currPlayerId); |
8218 return; | 8210 return; |
8219 } | 8211 } |
8220 if ( var_type <= VAR_MagicResistance ) | 8212 if ( var_type <= VAR_MagicResistance ) |
8249 LABEL_73: | 8241 LABEL_73: |
8250 this->uLuckBonus = (unsigned __int8)var_value; | 8242 this->uLuckBonus = (unsigned __int8)var_value; |
8251 goto LABEL_111; | 8243 goto LABEL_111; |
8252 case VAR_FireResistance: | 8244 case VAR_FireResistance: |
8253 this->sResFireBase = (unsigned __int8)var_value; | 8245 this->sResFireBase = (unsigned __int8)var_value; |
8254 v28 = 0; | |
8255 v26 = 92; | 8246 v26 = 92; |
8256 goto LABEL_112; | 8247 goto LABEL_112; |
8257 case VAR_AirResistance: | 8248 case VAR_AirResistance: |
8258 this->sResAirBase = (unsigned __int8)var_value; | 8249 this->sResAirBase = (unsigned __int8)var_value; |
8259 v28 = 0; | |
8260 v26 = 92; | 8250 v26 = 92; |
8261 goto LABEL_112; | 8251 goto LABEL_112; |
8262 case VAR_WaterResistance: | 8252 case VAR_WaterResistance: |
8263 this->sResWaterBase = (unsigned __int8)var_value; | 8253 this->sResWaterBase = (unsigned __int8)var_value; |
8264 v28 = 0; | |
8265 v26 = 92; | 8254 v26 = 92; |
8266 goto LABEL_112; | 8255 goto LABEL_112; |
8267 case VAR_EarthResistance: | 8256 case VAR_EarthResistance: |
8268 this->sResEarthBase = (unsigned __int8)var_value; | 8257 this->sResEarthBase = (unsigned __int8)var_value; |
8269 v28 = 0; | |
8270 v26 = 92; | 8258 v26 = 92; |
8271 goto LABEL_112; | 8259 goto LABEL_112; |
8272 case VAR_SpiritResistance: | 8260 case VAR_SpiritResistance: |
8273 this->sResSpiritBase = (unsigned __int8)var_value; | 8261 this->sResSpiritBase = (unsigned __int8)var_value; |
8274 v28 = 0; | |
8275 v26 = 92; | 8262 v26 = 92; |
8276 goto LABEL_112; | 8263 goto LABEL_112; |
8277 case VAR_MindResistance: | 8264 case VAR_MindResistance: |
8278 this->sResMindBase = (unsigned __int8)var_value; | 8265 this->sResMindBase = (unsigned __int8)var_value; |
8279 v28 = 0; | |
8280 v26 = 92; | 8266 v26 = 92; |
8281 goto LABEL_112; | 8267 goto LABEL_112; |
8282 case VAR_BodyResistance: | 8268 case VAR_BodyResistance: |
8283 this->sResBodyBase = (unsigned __int8)var_value; | 8269 this->sResBodyBase = (unsigned __int8)var_value; |
8284 v28 = 0; | |
8285 v26 = 92; | 8270 v26 = 92; |
8286 goto LABEL_112; | 8271 goto LABEL_112; |
8287 case VAR_LightResistance: | 8272 case VAR_LightResistance: |
8288 this->sResLightBase = (unsigned __int8)var_value; | 8273 this->sResLightBase = (unsigned __int8)var_value; |
8289 v28 = 0; | |
8290 v26 = 92; | 8274 v26 = 92; |
8291 goto LABEL_112; | 8275 goto LABEL_112; |
8292 case VAR_DarkResistance: | 8276 case VAR_DarkResistance: |
8293 this->sResDarkBase = (unsigned __int8)var_value; | 8277 this->sResDarkBase = (unsigned __int8)var_value; |
8294 v28 = 0; | |
8295 v26 = 92; | 8278 v26 = 92; |
8296 goto LABEL_112; | 8279 goto LABEL_112; |
8297 case VAR_MagicResistance: | 8280 case VAR_MagicResistance: |
8298 this->sResMagicBase = (unsigned __int8)var_value; | 8281 this->sResMagicBase = (unsigned __int8)var_value; |
8299 v28 = 0; | |
8300 v26 = 92; | 8282 v26 = 92; |
8301 goto LABEL_112; | 8283 goto LABEL_112; |
8302 default: | 8284 default: |
8303 return; | 8285 return; |
8304 } | 8286 } |
8323 byte_5E4C15[var_type] = var_value; | 8305 byte_5E4C15[var_type] = var_value; |
8324 return; | 8306 return; |
8325 } | 8307 } |
8326 memset(this, 0, 0xA0u); | 8308 memset(this, 0, 0xA0u); |
8327 } | 8309 } |
8310 } | |
8311 else | |
8312 { | |
8313 v16 = (int)((char *)&this->pConditions[16] + 2 * var_type); | |
8314 v17 = *(char *)v16; | |
8315 if ( var_value <= VAR_BodyResistanceBonus ) | |
8316 { | |
8317 LOWORD(v15) = (unsigned __int8)var_value; | |
8318 v18 = v15 | v17 & VAR_BodyResistanceBonus; | |
8319 } | |
8320 else | |
8321 { | |
8322 LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0); | |
8323 } | |
8324 *(short *)v16 = v18; | |
8325 } | |
8328 LABEL_124: | 8326 LABEL_124: |
8329 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); | 8327 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); |
8330 PlaySoundBasedOnCondition(currPlayerId); | 8328 PlaySoundBasedOnCondition(currPlayerId); |
8331 return; | 8329 return; |
8332 } | |
8333 v16 = (int)((char *)&this->pConditions[16] + 2 * var_type); | |
8334 v17 = *(char *)v16; | |
8335 if ( var_value <= VAR_BodyResistanceBonus ) | |
8336 { | |
8337 LOWORD(v15) = (unsigned __int8)var_value; | |
8338 v18 = v15 | v17 & VAR_BodyResistanceBonus; | |
8339 } | |
8340 else | |
8341 { | |
8342 LOWORD(v18) = (unsigned __int8)(var_value | v17 & 0xC0); | |
8343 } | |
8344 *(short *)v16 = v18; | |
8345 goto LABEL_124; | |
8346 } | 8330 } |
8347 if ( var_type <= VAR_MagicResistanceBonus ) | 8331 if ( var_type <= VAR_MagicResistanceBonus ) |
8348 { | 8332 { |
8349 switch ( var_type ) | 8333 switch ( var_type ) |
8350 { | 8334 { |