Mercurial > mm7
diff mm7_5.cpp @ 141:cca78efb377e
Constants -> enums
author | Nomad |
---|---|
date | Tue, 12 Feb 2013 03:02:13 +0200 |
parents | 9b0d651821f1 |
children | d92c78ab54fe |
line wrap: on
line diff
--- a/mm7_5.cpp Tue Feb 12 02:02:26 2013 +0200 +++ b/mm7_5.cpp Tue Feb 12 03:02:13 2013 +0200 @@ -5221,7 +5221,7 @@ v61 = 0; v59 = 0; v62 = 0; - if ( (a1 & 7) == 2 ) + if ( (a1 & 7) == OBJECT_Item) { v4 = &pLayingItems[a1 >> 3]; uDamageAmount = (int)v4; @@ -6293,7 +6293,7 @@ a2 = uObjID; if ( !pActors[uActorID].IsAlive() ) { - if ( (a2 & 7) == 2 ) + if ( (a2 & 7) == OBJECT_Item) { v4 = &pLayingItems[(signed int)a2 >> 3]; v5 = v4->field_48; @@ -6352,7 +6352,7 @@ v4 = 0; uActorID = a2; v17 = a1; - if ( (a1 & 7) == 2 ) + if ( (a1 & 7) == OBJECT_Item) { v5 = &pLayingItems[a1 >> 3]; v4 = v5->field_60_distance_related_prolly_lod; @@ -9437,7 +9437,7 @@ while ( 1 ) { v5 = v16->uPackedID; - if ( (v16->uPackedID & 7) == 4 ) + if ( (v16->uPackedID & 7) == OBJECT_Player) break; LABEL_8: ++v17; @@ -9480,7 +9480,7 @@ v8 = v1->pQueue; do { - if ( (v8->uPackedID & 7) == 3 && ai_array_4F7DB0_actor_ids[v20] == v8->uPackedID >> 3 ) + if ( (v8->uPackedID & 7) == OBJECT_Actor && ai_array_4F7DB0_actor_ids[v20] == v8->uPackedID >> 3 ) break; ++v18; ++v8; @@ -9559,7 +9559,7 @@ _404544(); v2 = v1->pQueue; v3 = 0; - if ( (v1->pQueue[0].uPackedID & 7) == 4 ) + if ( (v1->pQueue[0].uPackedID & 7) == OBJECT_Player) uActiveCharacter = (v1->pQueue[0].uPackedID >> 3) + 1; else uActiveCharacter = 0; @@ -9578,7 +9578,7 @@ goto LABEL_27; do { - if ( (v2->uPackedID & 7) != 4 ) + if ( (v2->uPackedID & 7) != OBJECT_Player) { v5 = &pActors[v2->uPackedID >> 3]; LOWORD(v6) = v5->uAIState; @@ -9636,7 +9636,7 @@ v9 = v1->pQueue; do { - if ( (v9->uPackedID & 7) != 4 ) + if ( (v9->uPackedID & 7) != OBJECT_Player) { v10 = v9->uPackedID >> 3; v11 = pActors[v10].uAIState; @@ -9688,7 +9688,7 @@ v4 = v1->pQueue[0].field_4; if ( v4 ) { - if ( (v1->pQueue[0].uPackedID & 7) == 4 ) + if ( (v1->pQueue[0].uPackedID & 7) == OBJECT_Player) { v5 = v1->uActorQueueSize; while ( 1 ) @@ -9769,7 +9769,7 @@ v2 = this; v3 = *(&this->field_0 + 4 * (a2 + 2)); - if ( (*((char *)&this->field_0 + 16 * (a2 + 2)) & 7) == 4 ) + if ( (*((char *)&this->field_0 + 16 * (a2 + 2)) & 7) == OBJECT_Player) { v4 = v3 >> 3; v5 = (char *)&pParty->pTurnBasedPlayerRecoveryTimes[v3 >> 3]; @@ -9787,7 +9787,7 @@ } v2->pQueue[a2].field_4 = v6; v2->_404544(); - if ( (v2->pQueue[0].uPackedID & 7) == 4 ) + if ( (v2->pQueue[0].uPackedID & 7) == OBJECT_Player) uActiveCharacter = (v2->pQueue[0].uPackedID >> 3) + 1; else uActiveCharacter = 0; @@ -9835,11 +9835,11 @@ { if ( !*(int *)v1 ) { - if ( (*(v1 - 4) & 7) == 4 ) + if ( (*(v1 - 4) & 7) == OBJECT_Player) return; v2 = &pActors[*((int *)v1 - 1) >> 3]; v3 = v2->uAIState; - if ( !v3 || v3 == 9 || v3 == 7 ) + if (v3 == Standing || v3 == Fleeing || v3 == Fidgeting) { v4 = pMonsterStats->pInfos[v2->pMonsterInfo.uID].uRecoveryTime; *(int *)v1 = v4; @@ -9866,7 +9866,7 @@ v1 = this; LOWORD(v2) = _404544(); if ( v1->pQueue[0].field_4 <= 0 - || ((_4063A1(), v2 = v1->pQueue[0].uPackedID, (v1->pQueue[0].uPackedID & 7) != 4) ? (uActiveCharacter = 0) : (v2 = (v2 >> 3) + 1, uActiveCharacter = v2), + || ((_4063A1(), v2 = v1->pQueue[0].uPackedID, (v1->pQueue[0].uPackedID & 7) != OBJECT_Player) ? (uActiveCharacter = 0) : (v2 = (v2 >> 3) + 1, uActiveCharacter = v2), viewparams->bRedrawGameUI = 1, v1->pQueue[0].field_4 <= 0) ) { @@ -9877,7 +9877,7 @@ do { v2 = *(int *)v4; - if ( (*(char *)v4 & 7) == 4 || *(int *)(v4 + 4) > 0 ) + if ( (*(char *)v4 & 7) == OBJECT_Player || *(int *)(v4 + 4) > 0 ) break; if ( *(int *)(v4 + 8) <= 0 ) { @@ -9935,7 +9935,7 @@ v1 = (TurnBased_QueueElem *)((char *)this + 16 * (a2 + 2)); v28 = v1; v3 = v1->uPackedID; - if ( (v1->uPackedID & 7) != 4 ) + if ( (v1->uPackedID & 7) != OBJECT_Player) { v4 = v3 >> 3; // turn based only stuff a2a = dword_4F6E08[v3 >> 3]; @@ -10099,7 +10099,7 @@ v9 = 0; v20 = 0; } - if ( (v22 & 7) == 3 ) + if ( (v22 & 7) == OBJECT_Actor) v10 = (unsigned __int8)*(&byte_5C8D1A[89 * (pMonsterStats->pInfos[pActors[v22 >> 3].pMonsterInfo.uID].uID - 1) / 3] @@ -10232,7 +10232,7 @@ while ( 1 ) { v5 = v10->uPackedID; - if ( (v10->uPackedID & 7) == 3 ) + if ( (v10->uPackedID & 7) == OBJECT_Actor) { v8 = dword_4F6E08[v5 >> 3]; memcpy(&v7, Actor::GetDirectionInfo(v5, v8, &a3, v2), sizeof(v7)); @@ -10271,7 +10271,7 @@ v2 = this->pQueue; do { - if ( (v2->uPackedID & 7) == 3 ) + if ( (v2->uPackedID & 7) == OBJECT_Actor) { v3 = v2->uPackedID >> 3; v8 = v3; @@ -10326,7 +10326,7 @@ { v4 = v14->uPackedID; a1 = v14->uPackedID; - if ( (a1 & 7) != 4 ) + if ( (a1 & 7) != OBJECT_Player) { v5 = v4 >> 3; v12 = v5; @@ -10410,7 +10410,7 @@ unsigned int a2a; // [sp+5Ch] [bp+8h]@7 v2 = *(&this->field_0 + 4 * (a2 + 2)); - if ( (v2 & 7) == 4 ) + if ( (v2 & 7) == OBJECT_Player) return 0; v3 = v2 >> 3; uActorID = v3; @@ -10604,7 +10604,7 @@ v14 = this->pQueue; do { - if ( (v3->uPackedID & 7) != 4 ) + if ( (v3->uPackedID & 7) != OBJECT_Player) { v4 = v3->uPackedID >> 3; uActorID = v4; @@ -16352,9 +16352,9 @@ else v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; v6 = (unsigned __int16)v5; - if ( (v6 & 7) != 2 ) - { - if ( (v6 & 7) == 3 ) + if ( (v6 & 7) != OBJECT_Item) + { + if ( (v6 & 7) == OBJECT_Actor) { if ( pRenderer->uNumSceneBegins ) { @@ -16484,7 +16484,7 @@ } //----- (004175C0) -------------------------------------------------------- -void __thiscall UI_OnMouseLeftClick(int *pXY) +void UI_OnMouseLeftClick(int *pXY) { int *pXY_; // esi@1 signed int y; // eax@7 @@ -16591,7 +16591,7 @@ else v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]]; v6 = (unsigned __int16)v5; - if ( (v5 & 7) == 3 + if ( (v5 & 7) == OBJECT_Actor && uActiveCharacter && v5 < 33554432 && pPlayers[uActiveCharacter]->CanAct()