Mercurial > mm7
diff mm7_6.cpp @ 141:cca78efb377e
Constants -> enums
author | Nomad |
---|---|
date | Tue, 12 Feb 2013 03:02:13 +0200 |
parents | f4d7a9a8c363 |
children | 9abdd40a107b ee11772d0ad2 |
line wrap: on
line diff
--- a/mm7_6.cpp Tue Feb 12 02:02:26 2013 +0200 +++ b/mm7_6.cpp Tue Feb 12 03:02:13 2013 +0200 @@ -3324,7 +3324,7 @@ v666 = v1; a2 = stru_50C198.FindClosesActor(5120, 1, v666); v6 = pMouse->uPointingObjectID; - if ( pMouse->uPointingObjectID != v1 && (v6 & 7) == 3 && pActors[v6 >> 3].CanAct() ) + if ( pMouse->uPointingObjectID != v1 && (v6 & 7) == OBJECT_Actor && pActors[v6 >> 3].CanAct() ) { v4 = pMouse->uPointingObjectID; LABEL_18: @@ -3333,9 +3333,9 @@ a1.uItemType = stru_4E3ACC[v3->spellnum].uItemType; if ( (short)a1.uItemType != (short)v1 ) { - if ( (a2 & 7) == 3 ) + if ( (a2 & 7) == OBJECT_Actor) { - memcpy(&v715, Actor::GetDirectionInfo((8 * v3->uPlayerID + 8) | 4, a2, &a3, 0), sizeof(v715)); + memcpy(&v715, Actor::GetDirectionInfo((8 * v3->uPlayerID + 8) | OBJECT_Player, a2, &a3, 0), sizeof(v715)); v2 = v723; v1 = 0; } @@ -3672,7 +3672,7 @@ goto LABEL_83; if ( a2 == v1 ) goto LABEL_200; - if ( (a2 & 7) != 3 ) + if ( (a2 & 7) != OBJECT_Actor) goto LABEL_1056; v699 = v1; v698 = v1; @@ -3750,7 +3750,7 @@ v47 = v38; goto LABEL_139; case 79: - if ( !pPlayer->CanCastSpell(uRequiredMana) || a2 == v1 || (a2 & 7) != 3 ) + if ( !pPlayer->CanCastSpell(uRequiredMana) || a2 == v1 || (a2 & 7) != OBJECT_Actor) goto LABEL_83; v730 = a2 >> 3; v693 = v1; @@ -3855,7 +3855,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; if ( a2 == v1 - || (a2 & 7) != 3 + || (a2 & 7) != OBJECT_Actor || (v730 = a2 >> 3, v721 = (int)&pActors[a2 >> 3], !stru_50C198.GetMagicalResistance(&pActors[a2 >> 3], 9u)) ) @@ -3897,7 +3897,7 @@ LODWORD(v733) = v57; if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - if ( (a2 & 7) != 3 + if ( (a2 & 7) != OBJECT_Actor || (v721 = 836 * (a2 >> 3), LODWORD(v718) = (int)&pActors[a2 >> 3], !stru_50C198.GetMagicalResistance(&pActors[a2 >> 3], 3u)) ) @@ -4324,7 +4324,7 @@ while ( v730b <= &pParty->pPlayers[3] ); goto LABEL_1056; case 52: - if ( pPlayer->CanCastSpell(uRequiredMana) && a2 != v1 && (a2 & 7) == 3 ) + if ( pPlayer->CanCastSpell(uRequiredMana) && a2 != v1 && (a2 & 7) == OBJECT_Actor) { v730 = a2 >> 3; v112 = &pActors[a2 >> 3]; @@ -4511,7 +4511,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; LODWORD(v725) = a2 & 7; - if ( (a2 & 7) == 3 ) + if ( (a2 & 7) == OBJECT_Actor) { v152 = a2 >> 3; uRequiredMana = pActors[v152].vPosition.x; @@ -5820,7 +5820,7 @@ v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[4]; goto LABEL_104; } - if ( (v342 & 7) == 3 ) + if ( (v342 & 7) == OBJECT_Actor) { v343 = v342 >> 3; HIDWORD(v344) = v1 + ((pParty->uTimePlayed + 1280) >> 32); @@ -6211,7 +6211,7 @@ case 59: if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; - if ( a2 == v1 || (a2 & 7) != 3 ) + if ( a2 == v1 || (a2 & 7) != OBJECT_Actor) goto LABEL_1056; v417 = (int)&pActors[a2 >> 3]; v730 = v417; @@ -6303,7 +6303,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v426 = a2 >> 3; - if ( (a2 & 7) != 3 ) + if ( (a2 & 7) != OBJECT_Actor) goto LABEL_1056; v730 = 836 * v426; if ( stru_50C198.GetMagicalResistance(&pActors[v426], 7u) ) @@ -6331,7 +6331,7 @@ goto LABEL_83; amount = 600 * v2; v427 = a2 >> 3; - if ( (a2 & 7) != 3 ) + if ( (a2 & 7) != OBJECT_Actor) goto LABEL_1056; v730 = 836 * v427; if ( MonsterStats::BelongsToSupertype(pActors[v427].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) @@ -6464,7 +6464,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) goto LABEL_83; v445 = a2 >> 3; - if ( (a2 & 7) == 2 ) + if ( (a2 & 7) == OBJECT_Item) { v449 = (char *)&pLayingItems[v445].stru_24; v450 = *(int *)v449; @@ -6484,15 +6484,15 @@ } else { - if ( (a2 & 7) == 3 ) + if ( (a2 & 7) == OBJECT_Actor) { stru_50C198.LootActor(&pActors[v445]); } else { - if ( (a2 & 7) != 5 ) + if ( (a2 & 7) != OBJECT_Decoration) { - if ( (a2 & 7) != 6 ) + if ( (a2 & 7) != OBJECT_BModel) goto LABEL_1056; dword_507CD8 = 1; v677 = 1; @@ -6607,7 +6607,7 @@ } else { - if ( (v460 & 7) == 3 ) + if ( (v460 & 7) == OBJECT_Actor) { v461 = &pActors[v460 >> 3]; v462 = v461->uAIState; @@ -7431,7 +7431,7 @@ LODWORD(v733) = 29030400; LABEL_1082: v599 = a2 >> 3; - if ( (a2 & 7) != 3 ) + if ( (a2 & 7) != OBJECT_Actor) goto LABEL_1056; v730 = 836 * v599; if ( !MonsterStats::BelongsToSupertype(pActors[v599].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) @@ -7916,12 +7916,12 @@ v29 = 0; v28 = 0; v7 = pMouse->uPointingObjectID; - if ( (pMouse->uPointingObjectID & 7) != 3 || (v34 = pMouse->uPointingObjectID, !pActors[v7 >> 3].CanAct()) ) + if ( (pMouse->uPointingObjectID & 7) != OBJECT_Actor || (v34 = pMouse->uPointingObjectID, !pActors[v7 >> 3].CanAct()) ) v34 = stru_50C198.FindClosesActor(5120, 0, 0); a3.z = 0; a3.y = 0; a3.x = 0; - if ( (v34 & 7) == 3 ) + if ( (v34 & 7) == OBJECT_Actor) { a2 = v34 >> 3; v8 = &pActors[v34 >> 3]; @@ -8174,7 +8174,7 @@ { v22 = *v28; v11 = *v28 & 0xFFFF; - if ( (*(char *)v28 & 7) == 3 ) + if ( (*(char *)v28 & 7) == OBJECT_Actor) { v12 = &pActors[(unsigned int)v11 >> 3]; v13 = v12->uAIState; @@ -9115,7 +9115,7 @@ { if (pParty->bTurnBasedModeOn) { - if ( pTurnEngine->field_4 == 3 || (pTurnEngine->pQueue[0].uPackedID & 7) == 4 ) + if ( pTurnEngine->field_4 == OBJECT_Actor || (pTurnEngine->pQueue[0].uPackedID & 7) == OBJECT_Player) { pParty->bTurnBasedModeOn = 0; pTurnEngine->End(true);