Mercurial > mm7
changeset 564:8b77231088d8
Moon Temple doesn't crash
author | Nomad |
---|---|
date | Tue, 05 Mar 2013 01:45:15 +0200 |
parents | b23f19fc0d1b |
children | e429ad557cda |
files | Indoor.cpp mm7_1.cpp stru6.cpp |
diffstat | 3 files changed, 282 insertions(+), 324 deletions(-) [+] |
line wrap: on
line diff
--- a/Indoor.cpp Tue Mar 05 00:25:08 2013 +0200 +++ b/Indoor.cpp Tue Mar 05 01:45:15 2013 +0200 @@ -3836,8 +3836,7 @@ { v52 = v15->uBitmapID; if ( v52 != -1 ) - v28->sTextureDeltaV -= v82 - + *(short *)((signed __int16)v52 != -1 ? 72 * (signed __int16)v52 + 7278780 + 0x1A : 26); + v28->sTextureDeltaV -= v82 + (v52 != -1 ? pBitmaps_LOD->pTextures[v52].uTextureHeight : 26); } } if ( BYTE2(v15->uAttributes) & 4 )
--- a/mm7_1.cpp Tue Mar 05 00:25:08 2013 +0200 +++ b/mm7_1.cpp Tue Mar 05 01:45:15 2013 +0200 @@ -5800,7 +5800,7 @@ _50B924_view_transformed_xs[v1->uNumVertices] = _50B924_view_transformed_xs[0]; _50B834_view_transformed_zs[v1->uNumVertices] = _50B834_view_transformed_zs[0]; _50B744_view_transformed_ys[v1->uNumVertices] = _50B744_view_transformed_ys[0]; - thisa = _50B924_view_transformed_xs[0] >= 0x80000u; + thisa = _50B924_view_transformed_xs[0] >= (signed int)0x80000u; //int i = 1; for (uint i = 1; i <= v1->uNumVertices; ++i) {
--- a/stru6.cpp Tue Mar 05 00:25:08 2013 +0200 +++ b/stru6.cpp Tue Mar 05 01:45:15 2013 +0200 @@ -741,11 +741,11 @@ //----- (004A81CA) -------------------------------------------------------- bool stru6::_4A81CA(SpriteObject *a2) { - stru6 *v2; // ebx@1 + //stru6 *v2; // ebx@1 int result; // eax@1 int v4; // eax@27 - unsigned int diffuse; // esi@41 - int v6; // ecx@49 + //unsigned int diffuse; // esi@41 + //int v6; // ecx@49 int v7; // eax@54 int v8; // eax@55 char v9; // zf@56 @@ -760,28 +760,108 @@ int v18; // eax@140 int v19; // eax@141 int v20; // eax@151 - unsigned int v21; // [sp-8h] [bp-20h]@66 - SpriteObject *v22; // [sp-8h] [bp-20h]@81 - unsigned int v23; // [sp-4h] [bp-1Ch]@4 - unsigned int v24; // [sp-4h] [bp-1Ch]@5 + //unsigned int v21; // [sp-8h] [bp-20h]@66 + //SpriteObject *v22; // [sp-8h] [bp-20h]@81 + //unsigned int v23; // [sp-4h] [bp-1Ch]@4 + //unsigned int v24; // [sp-4h] [bp-1Ch]@5 unsigned int v25; // [sp-4h] [bp-1Ch]@30 - unsigned int v26; // [sp-4h] [bp-1Ch]@57 - unsigned int v27; // [sp-4h] [bp-1Ch]@66 - int v28; // [sp-4h] [bp-1Ch]@81 - unsigned int v29; // [sp+0h] [bp-18h]@4 - unsigned int v30; // [sp+0h] [bp-18h]@5 - int v31; // [sp+0h] [bp-18h]@30 - unsigned int v32; // [sp+0h] [bp-18h]@45 - float v33; // [sp+0h] [bp-18h]@57 - float v34; // [sp+0h] [bp-18h]@66 - signed int v35; // [sp+0h] [bp-18h]@81 + //unsigned int v26; // [sp-4h] [bp-1Ch]@57 + //unsigned int v27; // [sp-4h] [bp-1Ch]@66 + //int v28; // [sp-4h] [bp-1Ch]@81 + //unsigned int v29; // [sp+0h] [bp-18h]@4 + //unsigned int v30; // [sp+0h] [bp-18h]@5 + //int v31; // [sp+0h] [bp-18h]@30 + //unsigned int v32; // [sp+0h] [bp-18h]@45 + //float v33; // [sp+0h] [bp-18h]@57 + //float v34; // [sp+0h] [bp-18h]@66 + //signed int v35; // [sp+0h] [bp-18h]@81 char pContainer[7]; // [sp+10h] [bp-8h]@81 - __debugbreak(); // need to refactor carefully & collect data - v2 = this; + //__debugbreak(); // need to refactor carefully & collect data + //v2 = this; result = a2->uType; + + switch (a2->uType) + { + case 550: + case 555: return true; + + case 556: + AddMobileLight(a2, 0xFF0000, 256); + return false; + + case 600: + AddMobileLight(a2, 0xFF3C1E, 256); + return true; + + case 1010: // Fire Bolt + { + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1); + AddMobileLight(a2, 0xFF3C1E, 256); + } + return false; + + case 1011: // Fire Bolt impact + { + _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); + AddMobileLight(a2, 0xFF3C1E, 256); + } + return false; + + case 1050: // Fireball + { + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1); + AddMobileLight(a2, 0xFF3C1E, 256); + } + return false; + + case 1051: // Fireball hit + { + AddMobileLight(a2, 0xFF3C1E, 256); + if (pRenderer->pRenderD3D) + { + result = a2->field_58_pid & 7; + if ((a2->field_58_pid & 7) != OBJECT_Actor && + (a2->field_58_pid & 7) != OBJECT_Item) + { + if (field_204 != 4) + { + field_204++; + _4A7688_fireball_collision_particle(a2); + } + return false; + } + } + } + return true; + + case 1081: + { + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 300.0); + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 250.0); + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 200.0); + AddMobileLight(a2, 0xFF3C1E, 256); + } + return false; + + case 2101: + { + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xC8C814, uTextureID_effpar1, 200.0); + AddMobileLight(a2, 0xC8C814, 256); + } + return false; + + case 3060: // Acid Burst + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0AB450, uTextureID_effpar1); + AddMobileLight(a2, 0x0AB450, 256); + return false; + + case 9000: return true; + } + if ( result <= 545 ) { + __debugbreak(); // find out what kind of spells are these if ( result != 545 ) { result -= 500; @@ -789,68 +869,65 @@ { case 0: case 30: - v29 = this->uTextureID_effpar1; - v23 = 0xAAAFFu; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xAAAFF, uTextureID_effpar1); + return false; case 1: case 31: - v30 = this->uTextureID_effpar1; - v24 = 0xAAAFFu; - goto LABEL_32; + _4A75CC_single_spell_collision_particle(a2, 0xAAAFF, uTextureID_effpar1); + return true; case 5: - v29 = this->uTextureID_effpar1; - v23 = 0x5C310Eu; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x5C310E, uTextureID_effpar1); + return false; case 10: - v29 = this->uTextureID_effpar1; - v23 = 0xFF3C1Eu; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1); + return false; case 15: - v29 = this->uTextureID_effpar1; - v23 = 0x62D0u; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0062D0, uTextureID_effpar1); + return false; case 16: - v30 = this->uTextureID_effpar1; - v24 = 0x62D0u; - goto LABEL_32; + _4A75CC_single_spell_collision_particle(a2, 0x0062D0, uTextureID_effpar1); + return false; case 20: - v29 = this->uTextureID_effpar1; - v23 = 0xAB450u; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0AB450, uTextureID_effpar1); + return false; case 21: - v30 = this->uTextureID_effpar1; - v24 = 0xAB450u; - goto LABEL_32; + _4A75CC_single_spell_collision_particle(a2, 0x0AB450, uTextureID_effpar1); + return false; case 25: - v29 = this->uTextureID_effpar1; - v23 = 0xC8C805u; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xC8C805, uTextureID_effpar1); + return false; case 26: - v30 = this->uTextureID_effpar1; - v24 = 0xC8C805u; - goto LABEL_32; + _4A75CC_single_spell_collision_particle(a2, 0xC8C805, uTextureID_effpar1); + return false; case 35: - v29 = this->uTextureID_effpar1; - v23 = 0xFFFFFFu; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFFFFFF, uTextureID_effpar1); + return false; case 36: - v30 = this->uTextureID_effpar1; - goto LABEL_154; + _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar1); + return false; + case 40: - goto LABEL_17; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1); + return false; + case 11: - goto LABEL_31; + _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); + return false; case 6: - goto LABEL_115; + _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1); + return false; + case 41: - goto LABEL_164; + _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1); + return false; default: - goto LABEL_168; + return false; } - goto LABEL_168; + return false; } - goto LABEL_34; + return true; } + if ( result <= 4051 ) { if ( result != 4051 ) @@ -859,398 +936,285 @@ { if ( result != 2031 ) { - if ( result <= 1051 ) + if ( result < 1051 ) { - if ( result == 1051 ) - { - result = AddMobileLight(a2, 0xFF3C1Eu, 256);// fireball hit - if ( pRenderer->pRenderD3D ) - { - result = a2->field_58_pid & 7; - if ( result != 3 ) - { - if ( result != 2 ) - { - result = (bool)&v2->field_204; - v6 = v2->field_204; - if ( v6 != 4 ) - { - *(int *)result = v6 + 1; - _4A7688_fireball_collision_particle(a2); - } - goto LABEL_168; - } - } - } - goto LABEL_34; - } - if ( result <= 600 ) + if ( result < 600 ) { - if ( result == 600 ) - { - result = AddMobileLight(a2, 0xFF3C1Eu, 256); - goto LABEL_34; - } - result -= 550; - if ( !result ) - { -LABEL_34: - LOBYTE(result) = 1; - return result; - } - v4 = result - 1; - if ( v4 ) - { - result = v4 - 4; - if ( !result ) - goto LABEL_34; - --result; - if ( !result ) - { - v31 = 256; - v25 = 0xFF0000u; -LABEL_144: - result = AddMobileLight(a2, v25, v31); - goto LABEL_168; - } - goto LABEL_168; - } - goto LABEL_31; + _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); + return false; } if ( result < 811 ) - goto LABEL_168; + return false; if ( result <= 814 ) - goto LABEL_34; - if ( result == 1010 ) - goto LABEL_41; // fire strike - if ( result != 1011 ) - { - if ( result != 1050 ) - goto LABEL_168; -LABEL_41: - diffuse = 0xFF3C1Eu; -LABEL_42: - _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc( - a2, - diffuse, - this->uTextureID_effpar1); -LABEL_43: - v31 = 256; -LABEL_44: - v25 = diffuse; - goto LABEL_144; - } - v32 = this->uTextureID_effpar1; - diffuse = 0xFF3C1Eu; -LABEL_146: - _4A75CC_single_spell_collision_particle(a2, diffuse, v32); - goto LABEL_43; + return true; + return false; + } if ( result <= 1081 ) { - if ( result == 1081 ) - { - diffuse = 0xFF3C1Eu; - _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning( - a2, - 0xFF3C1Eu, - this->uTextureID_effpar1, - 300.0); - _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning( - a2, - 0xFF3C1Eu, - v2->uTextureID_effpar1, - 250.0); - v33 = 200.0; - v26 = v2->uTextureID_effpar1; - } - else + if (result != 1081) { result -= 1060; if ( !result ) - goto LABEL_34; + return true; v7 = result - 1; if ( v7 ) { v8 = v7 - 9; if ( !v8 ) { -LABEL_31: - v30 = this->uTextureID_effpar1; - v24 = 0xFF3C1Eu; - goto LABEL_32; + _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); + return false; } result = v8 - 10; v9 = result == 0; -LABEL_129: +//LABEL_129: if ( v9 ) - goto LABEL_34; - goto LABEL_168; + return true; + return false; } - diffuse = 0xFF3C1Eu; - v33 = 250.0; - v26 = this->uTextureID_effpar1; + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 250.0); + AddMobileLight(a2, 0xFF3C1E, 256); + return false; } -LABEL_84: - _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, diffuse, v26, v33); - goto LABEL_43; +//LABEL_84: +// _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, diffuse, v26, v33); + //goto LABEL_43; + return false; } v10 = result - 1090; if ( v10 ) { result = v10 - 10; if ( !result ) - goto LABEL_34; + return true; v11 = result - 1; if ( !v11 ) { - diffuse = 0xFF3C1Eu; - _4A75CC_single_spell_collision_particle(a2, 0xFF3C1Eu, this->uTextureID_effpar1); - v32 = v2->uTextureID_effpar1; - goto LABEL_146; + //diffuse = 0xFF3C1E; + _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); + //v32 = v2->uTextureID_effpar1; + _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1); + //goto LABEL_43; + AddMobileLight(a2, 0xFF3C1E, 256); + return false; } result = v11 - 929; if ( result ) - goto LABEL_168; -LABEL_63: + return false; +//LABEL_63: if ( !pRenderer->pRenderD3D ) - goto LABEL_34; + return true; _4A78AE_sparks_spell(a2); - v31 = 128; - v25 = 0x64640Fu; - goto LABEL_144; + AddMobileLight(a2, 0x64640F, 128); + return false; } - v34 = 250.0; - v27 = this->uTextureID_effpar1; - v21 = 0xFF3C1Eu; -LABEL_117: - _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, v21, v27, v34); - goto LABEL_168; + + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1Eu, uTextureID_effpar1, 250.0); + return false; } - goto LABEL_67; + //goto LABEL_67; } - if ( result <= 3060 ) + if ( result < 3060 ) { - if ( result == 3060 ) - goto LABEL_171; // acid burst - if ( result <= 2101 ) + if ( result < 2101 ) { - if ( result == 2101 ) - { - v33 = 200.0; - v26 = this->uTextureID_effpar1; - goto LABEL_83; - } if ( result != 2060 ) { if ( result != 2061 ) { if ( result <= 2079 ) - goto LABEL_168; + return false; if ( result <= 2081 ) { if ( pRenderer->pRenderD3D ) _4A77FD_some_stuff_d3d(a2); else _4A80DC_some_stuff_sw(a2); - goto LABEL_168; + return false; } v9 = result == 2100; - goto LABEL_129; + if ( v9 ) + return true; + return false; } -LABEL_67: - v33 = 200.0; - v26 = this->uTextureID_effpar2; -LABEL_83: - diffuse = (unsigned int)&pDecalBuilder->std__vector_pDecals[557].pVertices[57].vWorldViewPosition.y; - goto LABEL_84; + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xC8C814, uTextureID_effpar2, 200.0); + AddMobileLight(a2, 0xC8C814, 256); + return false; } if ( !pRenderer->pRenderD3D ) - goto LABEL_34; + return true; memcpy(pContainer, "sp18h1", 7); pRnd->SetRange(1, 6); pContainer[5] = pRnd->GetInRange() + '0'; - v35 = pBitmaps_LOD->LoadTexture(pContainer, TEXTURE_DEFAULT); - v28 = 100; - v22 = a2; -LABEL_157: - AddProjectile(v22, v28, v35); - goto LABEL_168; + AddProjectile(a2, 100, pBitmaps_LOD->LoadTexture(pContainer)); + return false; } v12 = result - 3010; if ( !v12 ) { -LABEL_171: - diffuse = 0xAB450u; - goto LABEL_42; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xAB450, uTextureID_effpar1); + AddMobileLight(a2, 0xAB450, 256); + return false; } v13 = v12 - 1; if ( !v13 ) { - v32 = this->uTextureID_effpar1; - diffuse = 0xAB450u; - goto LABEL_146; + _4A75CC_single_spell_collision_particle(a2, 0xAB450, uTextureID_effpar1); + AddMobileLight(a2, 0xAB450, 256); + return false; } result = v13 - 19; if ( !result ) - goto LABEL_34; + return true; --result; if ( result ) - goto LABEL_168; -LABEL_89: - v32 = this->uTextureID_effpar1; - diffuse = 0x9EB9F1u; - goto LABEL_146; + return false; + + _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1); + AddMobileLight(a2, 0x9EB9F1, 256); + return false; } if ( result > 4000 ) { result -= 4030; if ( !result || (--result, !result) ) - goto LABEL_34; + return true; result -= 19; v9 = result == 0; - goto LABEL_129; + if ( v9 ) + return true; + return false; } if ( result == 4000 ) { if ( !pRenderer->pRenderD3D ) - goto LABEL_34; + return true; _4A7C07(a2); - goto LABEL_168; + return false; } result -= 3061; if ( !result || (result -= 29) == 0 ) - goto LABEL_34; + return true; v14 = result - 1; if ( !v14 ) - goto LABEL_89; + { + _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1); + AddMobileLight(a2, 0x9EB9F1, 256); + return false; + } result = v14 - 1; if ( result ) - goto LABEL_168; - v29 = this->uTextureID_effpar1; - v23 = 0x9EB9F1u; -LABEL_8: - _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, v23, v29); - goto LABEL_168; + return false; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x9EB9F1, uTextureID_effpar1); + return false; } - goto LABEL_122; + _4A7948_mind_blast_after_effect(a2); + return false; } if ( result <= 7090 ) { if ( result == 7090 ) - goto LABEL_34; + return true; if ( result > 6030 ) { if ( result > 6091 ) { result -= 6100; if ( !result ) - goto LABEL_34; + return true; result -= 930; if ( result ) { --result; - if ( result ) - goto LABEL_168; - v30 = this->uTextureID_effpar1; - v24 = 0xF00000u; - goto LABEL_32; + if (!result) + _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1); + return false; } - goto LABEL_63; + if ( !pRenderer->pRenderD3D ) + return true; + _4A78AE_sparks_spell(a2); + AddMobileLight(a2, 0x64640F, 128); + return false; } if ( result != 6091 ) { result -= 6040; if ( !result || (result -= 20) == 0 || (result -= 10) == 0 ) - goto LABEL_34; + return true; result -= 20; v9 = result == 0; - goto LABEL_129; + if ( v9 ) + return true; + return false; } } else { if ( result == 6030 ) - goto LABEL_34; + return true; if ( result <= 4091 ) { if ( result != 4091 ) { result -= 4070; if ( !result ) - goto LABEL_34; + return true; v15 = result - 1; if ( v15 ) { result = v15 - 9; if ( !result ) - goto LABEL_34; + return true; result -= 10; if ( !result ) { - _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc( - a2, - 0x7E7E7Eu, - this->uTextureID_effpar1); - goto LABEL_34; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1); + return true; } - goto LABEL_168; + return false; } -LABEL_115: - v30 = this->uTextureID_effpar1; - v24 = 0x5C310Eu; -LABEL_32: - _4A75CC_single_spell_collision_particle(a2, v24, v30); - goto LABEL_168; + _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1); + return false; } - v34 = 200.0; - v27 = this->uTextureID_effpar1; - v21 = 0x7E7E7Eu; - goto LABEL_117; + _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0x7E7E7E, uTextureID_effpar1, 200.0); + return false; } v16 = result - 4092; if ( !v16 ) { -LABEL_17: - v29 = this->uTextureID_effpar1; - v23 = 0x7E7E7Eu; - goto LABEL_8; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1); + return false; } result = v16 - 8; if ( !result ) - goto LABEL_168; + return false; result -= 1910; if ( !result ) - goto LABEL_34; + return true; --result; if ( result ) - goto LABEL_168; + return false; } -LABEL_122: +//LABEL_122: _4A7948_mind_blast_after_effect(a2); - goto LABEL_168; + return false; } if ( result <= 9000 ) { - if ( result == 9000 ) - goto LABEL_34; if ( result <= 8030 ) { if ( result == 8030 ) - goto LABEL_34; + return true; v17 = result - 7091; if ( v17 ) { v18 = v17 - 909; if ( !v18 ) { - diffuse = 0xFFFFFFu; - _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc( - a2, - 0xFFFFFFu, - this->uTextureID_effpar3); - v31 = 128; - goto LABEL_44; + _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFFFFFF, uTextureID_effpar3); + AddMobileLight(a2, 0xFFFFFF, 128); + return false; } v19 = v18 - 1; if ( v19 ) @@ -1258,64 +1222,59 @@ result = v19 - 9; if ( !result ) { - v31 = 64; - v25 = 0xFFFFFFu; - goto LABEL_144; + AddMobileLight(a2, 0xFFFFFF, 64); + return false; } - goto LABEL_168; + return false; } - v32 = this->uTextureID_effpar2; - diffuse = 0xFFFFFFu; + _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar2); + AddMobileLight(a2, 0xFFFFFF, 256); + return false; } else { - v32 = this->uTextureID_effpar1; - diffuse = 0xF00000u; + _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1); + AddMobileLight(a2, 0xF00000, 256); + return false; } - goto LABEL_146; } result -= 8040; if ( !result || (result -= 20) == 0 ) - goto LABEL_34; + return true; v20 = result - 30; if ( v20 ) { result = v20 - 1; if ( result ) - goto LABEL_168; - v30 = this->uTextureID_effpar3; -LABEL_154: - v24 = 16777215; - goto LABEL_32; + return false; + + _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar3); + return false; } - result = AddMobileLight(a2, 0xFFFFFFu, 128); + AddMobileLight(a2, 0xFFFFFFu, 128); if ( !pRenderer->pRenderD3D ) - goto LABEL_34; - v35 = -1; - v28 = 100; - v22 = a2; - goto LABEL_157; + return true; + AddProjectile(a2, 100, -1); + return false; } if ( result > 9050 ) { result -= 9070; if ( !result || (result -= 10) == 0 || (--result, !result) ) - goto LABEL_34; - goto LABEL_168; + return true; + return false; } if ( result == 9050 || (result -= 9010) == 0 || (result -= 20) == 0 || (result -= 10) == 0 ) - goto LABEL_34; + return true; --result; if ( !result ) { -LABEL_164: - v30 = this->uTextureID_effpar1; - v24 = 0x7E7E7Eu; - goto LABEL_32; +//LABEL_164: + _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1); + return false; } -LABEL_168: - LOBYTE(result) = 0; - return result; +//LABEL_168: + return false; } //----- (004A89BD) --------------------------------------------------------