Mercurial > mm7
comparison mm7_2.cpp @ 1124:dd1cb6a2dba6
Merge
author | Grumpy7 |
---|---|
date | Fri, 31 May 2013 00:41:13 +0200 |
parents | 8a965c8faf05 aa706cde7fda |
children | f87e7d1aa9ec |
comparison
equal
deleted
inserted
replaced
1123:8a965c8faf05 | 1124:dd1cb6a2dba6 |
---|---|
11056 UpdateActors_ODM(); | 11056 UpdateActors_ODM(); |
11057 check_event_triggers(); | 11057 check_event_triggers(); |
11058 } | 11058 } |
11059 | 11059 |
11060 //----- (0046BEF1) -------------------------------------------------------- | 11060 //----- (0046BEF1) -------------------------------------------------------- |
11061 void SpriteObject::_46BEF1_apply_spells() | 11061 void SpriteObject::_46BEF1_apply_spells_aoe() |
11062 { | 11062 { |
11063 SpriteObject *v1; // edi@1 | 11063 SpriteObject *v1; // edi@1 |
11064 Actor *v2; // esi@2 | 11064 Actor *v2; // esi@2 |
11065 __int16 v3; // fps@4 | 11065 __int16 v3; // fps@4 |
11066 unsigned __int8 v4; // c0@4 | 11066 unsigned __int8 v4; // c0@4 |
11067 unsigned __int8 v5; // c3@4 | 11067 unsigned __int8 v5; // c3@4 |
11068 signed int v6; // [sp+8h] [bp-4h]@1 | 11068 signed int v6; // [sp+8h] [bp-4h]@1 |
11069 | 11069 |
11070 int v7,v8,v9,v10,v11; | |
11071 | |
11070 v6 = 0; | 11072 v6 = 0; |
11071 v1 = this; | 11073 v1 = this; |
11072 if ( (signed int)uNumActors > 0 ) | 11074 if ( (signed int)uNumActors > 0 ) |
11073 { | 11075 { |
11074 v2 = pActors;//[0].vPosition.y; | 11076 v2 = pActors;//[0].vPosition.y; |
11075 do | 11077 do |
11076 { | 11078 { |
11077 if ( v2->CanAct() ) | 11079 if ( v2->CanAct() ) |
11078 { | 11080 { |
11079 //UNDEF(v3); | 11081 //UNDEF(v3); |
11080 if ( !(v4 | v5) ) | 11082 //.text:0046BF26 movsx eax, word ptr [esi-2] |
11083 //.text:0046BF2A sub eax, [edi+4] | |
11084 //.text:0046BF31 mov [ebp+var_8], eax | |
11085 //.text:0046BF37 fild [ebp+var_8] | |
11086 // v7 pushed to stack | |
11087 v7 = v2->vPosition.x - this->vPosition.x; | |
11088 | |
11089 //.text:0046BF2D movsx ecx, word ptr [esi+2] | |
11090 v8 = v2->vPosition.z; | |
11091 | |
11092 //.text:0046BF34 movsx eax, word ptr [esi] | |
11093 //.text:0046BF3A sub eax, [edi+8] | |
11094 //.text:0046BF3D mov [ebp+var_8], eax | |
11095 //.text:0046BF44 fild [ebp+var_8] | |
11096 // v9 pushed to stack | |
11097 v9 = v2->vPosition.y - this->vPosition.y; | |
11098 | |
11099 //.text:0046BF40 movsx eax, word ptr [esi-6] | |
11100 //.text:0046BF47 sar eax, 1 | |
11101 //.text:0046BF49 add eax, ecx | |
11102 //.text:0046BF4B sub eax, [edi+0Ch] | |
11103 //.text:0046BF4E mov [ebp+var_8], eax | |
11104 //.text:0046BF51 fild [ebp+var_8] | |
11105 //.text:0046BF58 fld st | |
11106 // v10 pushed to stack, two times | |
11107 v10 = v2->uActorHeight / 2 + v8 - this->vVelocity.y; | |
11108 | |
11109 //.text:0046BF54 movsx eax, word ptr [esi-8] | |
11110 //.text:0046BF5A add eax, 100h | |
11111 //.text:0046BF63 mov ecx, eax | |
11112 v11 = this->vVelocity.x; | |
11113 | |
11114 //.text:0046BF5F fmul st, st(1) | |
11115 // stack: v10*v10, v10, v9, v7 | |
11116 //.text:0046BF61 fld st(2) | |
11117 // stack: v7, v10*v10, v10, v9, v7 | |
11118 | |
11119 | |
11120 //.text:0046BF65 fmul st, st(3) | |
11121 // stack: v7*v9, v10*v10, v10, v9, v7 | |
11122 | |
11123 //.text:0046BF67 imul ecx, eax | |
11124 v11 = v11 * v11; | |
11125 | |
11126 //.text:0046BF6A faddp st(1), st | |
11127 // stack: v10*v10+v7*v9, v10, v9, v7 | |
11128 //.text:0046BF6C fld st(3) | |
11129 // stack: v7, v10*v10+v7*v9, v10, v9, v7 | |
11130 //.text:0046BF6E fmul st, st(4) | |
11131 // stack: v7*v7, v10*v10+v7*v9, v10, v9, v7 | |
11132 //.text:0046BF70 faddp st(1), st | |
11133 // stack: v10*v10+v7*v9+v7*v7, v10, v9, v7 | |
11134 | |
11135 //.text:0046BF72 mov [ebp+var_8], ecx | |
11136 //.text:0046BF75 fild [ebp+var_8] | |
11137 // v11 pushed to stack | |
11138 | |
11139 //.text:0046BF78 fcompp | |
11140 // if ( v11 > v10*v10+v7*v9+v7*v7 ) | |
11141 // stack: v10, v9, v7 | |
11142 | |
11143 //.text:0046BF7A fstp st | |
11144 // stack: v9, v7 | |
11145 | |
11146 //.text:0046BF7C fnstsw ax | |
11147 //.text:0046BF7E fstp st | |
11148 // stack: v7 | |
11149 | |
11150 //.text:0046BF80 test ah, 41h | |
11151 //.text:0046BF83 fstp st | |
11152 //.text:0046BF85 jnz short loc_46BFDD | |
11153 | |
11154 if ( v11 >= v10*v10+v7*v9+v7*v7 ) | |
11081 { | 11155 { |
11082 if ( stru_50C198.GetMagicalResistance(v2, 0xAu) ) | 11156 if ( stru_50C198.GetMagicalResistance(v2, 0xAu) ) |
11083 { | 11157 { |
11084 v2->pActorBuffs[v1->spell_id].Apply( | 11158 v2->pActorBuffs[v1->spell_id].Apply( |
11085 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v1->spell_level << 7) * 0.033333335), | 11159 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v1->spell_level << 7) * 0.033333335), |
11336 v138 = 1; | 11410 v138 = 1; |
11337 if ( v151 != OBJECT_Actor) | 11411 if ( v151 != OBJECT_Actor) |
11338 { | 11412 { |
11339 if ( v6 != 9030 || v2->spell_skill != 4 ) | 11413 if ( v6 != 9030 || v2->spell_skill != 4 ) |
11340 goto LABEL_246; | 11414 goto LABEL_246; |
11341 v2->_46BEF1_apply_spells(); | 11415 v2->_46BEF1_apply_spells_aoe(); |
11342 LABEL_233: | 11416 LABEL_233: |
11343 if ( !v138 ) | 11417 if ( !v138 ) |
11344 { | 11418 { |
11345 v109 = pObjectList->uNumObjects; | 11419 v109 = pObjectList->uNumObjects; |
11346 ++v2->uType; | 11420 ++v2->uType; |
11445 0); | 11519 0); |
11446 } | 11520 } |
11447 } | 11521 } |
11448 else | 11522 else |
11449 { | 11523 { |
11450 v2->_46BEF1_apply_spells(); | 11524 v2->_46BEF1_apply_spells_aoe(); |
11451 } | 11525 } |
11452 v2->spell_level = 0; | 11526 v2->spell_level = 0; |
11453 v2->spell_skill = 0; | 11527 v2->spell_skill = 0; |
11454 v2->spell_id = 0; | 11528 v2->spell_id = 0; |
11455 goto LABEL_233; | 11529 goto LABEL_233; |