Mercurial > mm7
comparison mm7_2.cpp @ 822:c232f160e6f3
Named SpriteObject spell-related fields.
author | Nomad |
---|---|
date | Tue, 26 Mar 2013 17:56:24 +0200 |
parents | 522591080ac5 |
children | c1da83d8223f |
comparison
equal
deleted
inserted
replaced
820:522591080ac5 | 822:c232f160e6f3 |
---|---|
4301 a1a.uAttributes = 0; | 4301 a1a.uAttributes = 0; |
4302 a1a.uSoundID = 0; | 4302 a1a.uSoundID = 0; |
4303 a1a.uFacing = 0; | 4303 a1a.uFacing = 0; |
4304 a1a.vPosition.z = a2->vPosition.z; | 4304 a1a.vPosition.z = a2->vPosition.z; |
4305 a1a.vPosition.x = a2->vPosition.x; | 4305 a1a.vPosition.x = a2->vPosition.x; |
4306 a1a.field_50 = 0; | 4306 a1a.spell_skill = 0; |
4307 a1a.field_4C = 0; | 4307 a1a.spell_level = 0; |
4308 a1a.field_48 = 0; | 4308 a1a.spell_id = 0; |
4309 a1a.field_5C = 0; | 4309 a1a.field_5C = 0; |
4310 a1a.field_58_pid = 0; | 4310 a1a.spell_caster_pid = 0; |
4311 a1a.uSpriteFrameID = 0; | 4311 a1a.uSpriteFrameID = 0; |
4312 a1a.uSectorID = pIndoor->GetSector(a2->vPosition.x, a2->vPosition.y, a2->vPosition.z);; | 4312 a1a.uSectorID = pIndoor->GetSector(a2->vPosition.x, a2->vPosition.y, a2->vPosition.z);; |
4313 return a1a.Create(0, 0, 0, 0); | 4313 return a1a.Create(0, 0, 0, 0); |
4314 } | 4314 } |
4315 | 4315 |
10989 //UNDEF(v3); | 10989 //UNDEF(v3); |
10990 if ( !(v4 | v5) ) | 10990 if ( !(v4 | v5) ) |
10991 { | 10991 { |
10992 if ( stru_50C198.GetMagicalResistance(v2, 0xAu) ) | 10992 if ( stru_50C198.GetMagicalResistance(v2, 0xAu) ) |
10993 { | 10993 { |
10994 v2->pActorBuffs[v1->field_48].Apply( | 10994 v2->pActorBuffs[v1->spell_id].Apply( |
10995 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v1->field_4C << 7) * 0.033333335), | 10995 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v1->spell_level << 7) * 0.033333335), |
10996 v1->field_50, | 10996 v1->spell_skill, |
10997 4u, | 10997 4u, |
10998 0, | 10998 0, |
10999 0); | 10999 0); |
11000 HIWORD(v2->uAttributes) |= 8u; | 11000 HIWORD(v2->uAttributes) |= 8u; |
11001 } | 11001 } |
11168 v3 = &pObjectList->pObjects[v2->uObjectDescID]; | 11168 v3 = &pObjectList->pObjects[v2->uObjectDescID]; |
11169 v145 = a2; | 11169 v145 = a2; |
11170 v151 = a2 & 7; | 11170 v151 = a2 & 7; |
11171 if ( (a2 & 7) == OBJECT_Actor) | 11171 if ( (a2 & 7) == OBJECT_Actor) |
11172 { | 11172 { |
11173 if ( (v2->field_58_pid & 7) == OBJECT_Actor && !pActors[v2->field_58_pid >> 3].GetActorsRelation(&pActors[a2 >> 3]) ) | 11173 if ( (v2->spell_caster_pid & 7) == OBJECT_Actor && !pActors[v2->spell_caster_pid >> 3].GetActorsRelation(&pActors[a2 >> 3]) ) |
11174 return 1; | 11174 return 1; |
11175 } | 11175 } |
11176 else | 11176 else |
11177 { | 11177 { |
11178 if ( (a2 & 7) == OBJECT_Player && (v2->field_58_pid & 7) == OBJECT_Player) | 11178 if ( (a2 & 7) == OBJECT_Player && (v2->spell_caster_pid & 7) == OBJECT_Player) |
11179 return 1; | 11179 return 1; |
11180 } | 11180 } |
11181 if ( pParty->bTurnBasedModeOn == 1 ) | 11181 if ( pParty->bTurnBasedModeOn == 1 ) |
11182 { | 11182 { |
11183 v5 = v2->uAttributes; | 11183 v5 = v2->uAttributes; |
11185 { | 11185 { |
11186 --pTurnEngine->field_1C; | 11186 --pTurnEngine->field_1C; |
11187 v2->uAttributes = v5 & 0xFFFB; | 11187 v2->uAttributes = v5 & 0xFFFB; |
11188 } | 11188 } |
11189 } | 11189 } |
11190 if ( v151 == OBJECT_BModel && (v2->field_58_pid & 7) != OBJECT_Player) | 11190 if ( v151 == OBJECT_BModel && (v2->spell_caster_pid & 7) != OBJECT_Player) |
11191 BYTE2(pActors[v2->field_58_pid >> 3].uAttributes) |= 4u; | 11191 BYTE2(pActors[v2->spell_caster_pid >> 3].uAttributes) |= 4u; |
11192 v6 = v2->uType; | 11192 v6 = v2->uType; |
11193 v7 = v2->uType; | 11193 v7 = v2->uType; |
11194 if ( v7 > 3060 ) | 11194 if ( v7 > 3060 ) |
11195 { | 11195 { |
11196 if ( v7 > 6090 ) | 11196 if ( v7 > 6090 ) |
11244 break; | 11244 break; |
11245 } | 11245 } |
11246 v138 = 1; | 11246 v138 = 1; |
11247 if ( v151 != OBJECT_Actor) | 11247 if ( v151 != OBJECT_Actor) |
11248 { | 11248 { |
11249 if ( v6 != 9030 || v2->field_50 != 4 ) | 11249 if ( v6 != 9030 || v2->spell_skill != 4 ) |
11250 goto LABEL_246; | 11250 goto LABEL_246; |
11251 v2->_46BEF1_apply_spells(); | 11251 v2->_46BEF1_apply_spells(); |
11252 LABEL_233: | 11252 LABEL_233: |
11253 if ( !v138 ) | 11253 if ( !v138 ) |
11254 { | 11254 { |
11301 return 0; | 11301 return 0; |
11302 } | 11302 } |
11303 v106 = v145; | 11303 v106 = v145; |
11304 v150 = 0; | 11304 v150 = 0; |
11305 v139 = v106 >> 3; | 11305 v139 = v106 >> 3; |
11306 v137 = v2->field_4C; | 11306 v137 = v2->spell_level; |
11307 v152 = v2->field_50; | 11307 v152 = v2->spell_skill; |
11308 v136 = v2->field_48; | 11308 v136 = v2->spell_id; |
11309 if ( v6 == 9030 ) | 11309 if ( v6 == 9030 ) |
11310 { | 11310 { |
11311 v150 = 2; | 11311 v150 = 2; |
11312 if ( v152 == 2 ) | 11312 if ( v152 == 2 ) |
11313 { | 11313 { |
11357 } | 11357 } |
11358 else | 11358 else |
11359 { | 11359 { |
11360 v2->_46BEF1_apply_spells(); | 11360 v2->_46BEF1_apply_spells(); |
11361 } | 11361 } |
11362 v2->field_4C = 0; | 11362 v2->spell_level = 0; |
11363 v2->field_50 = 0; | 11363 v2->spell_skill = 0; |
11364 v2->field_48 = 0; | 11364 v2->spell_id = 0; |
11365 goto LABEL_233; | 11365 goto LABEL_233; |
11366 } | 11366 } |
11367 v135 = 10; | 11367 v135 = 10; |
11368 } | 11368 } |
11369 } | 11369 } |
11467 v128 = -1; | 11467 v128 = -1; |
11468 LOBYTE(v124) = v124 | 2; | 11468 LOBYTE(v124) = v124 | 2; |
11469 v127 = v9; | 11469 v127 = v9; |
11470 v126 = v124; | 11470 v126 = v124; |
11471 LABEL_268: | 11471 LABEL_268: |
11472 v116 = word_4EE088_sound_ids[v2->field_48]; | 11472 v116 = word_4EE088_sound_ids[v2->spell_id]; |
11473 LABEL_269: | 11473 LABEL_269: |
11474 v125 = v116 + 1; | 11474 v125 = v116 + 1; |
11475 goto LABEL_29; | 11475 goto LABEL_29; |
11476 } | 11476 } |
11477 v59 = v6 + 2; | 11477 v59 = v6 + 2; |
11500 } | 11500 } |
11501 v2->uObjectDescID = v63; | 11501 v2->uObjectDescID = v63; |
11502 if ( !v63 ) | 11502 if ( !v63 ) |
11503 SpriteObject::OnInteraction(v153); | 11503 SpriteObject::OnInteraction(v153); |
11504 v64 = v2->uFacing - stru_5C6E00->uIntegerDoublePi; | 11504 v64 = v2->uFacing - stru_5C6E00->uIntegerDoublePi; |
11505 v44 = v2->field_50 == 4; | 11505 v44 = v2->spell_skill == 4; |
11506 v2->vVelocity.z = 0; | 11506 v2->vVelocity.z = 0; |
11507 v2->vVelocity.y = 0; | 11507 v2->vVelocity.y = 0; |
11508 v2->vVelocity.x = 0; | 11508 v2->vVelocity.x = 0; |
11509 v65 = 7; | 11509 v65 = 7; |
11510 if ( v44 ) | 11510 if ( v44 ) |