Mercurial > mm7
diff mm7_2.cpp @ 141:cca78efb377e
Constants -> enums
author | Nomad |
---|---|
date | Tue, 12 Feb 2013 03:02:13 +0200 |
parents | 9b0d651821f1 |
children | d92c78ab54fe ee11772d0ad2 |
line wrap: on
line diff
--- a/mm7_2.cpp Tue Feb 12 02:02:26 2013 +0200 +++ b/mm7_2.cpp Tue Feb 12 03:02:13 2013 +0200 @@ -3249,7 +3249,7 @@ do { v2 = v1->uAIState; - if ( v1->uAIState == 5 || v2 == 11 || v2 == 19 || (v3 = v1->uSummonerID) != 0 && (v3 & 7) == 4 ) + if ( v1->uAIState == Dead || v2 == Removed || v2 == Disabled || (v3 = v1->uSummonerID) != 0 && (v3 & 7) == OBJECT_Player) ++v0; ++v1; --v7; @@ -15597,7 +15597,7 @@ } while ( v6 < v22 ); } - if ( (v7 & 7) == 5 ) + if ( (v7 & 7) == OBJECT_Decoration) { v16 = (unsigned int)v7 >> 3; if ( (signed int)(((unsigned int)*v21 >> 16) @@ -15696,7 +15696,7 @@ v2 = a1; switch ( a1 & 7 ) { - case 2: + case OBJECT_Item: v17 = a1 >> 3; v26 = a1 >> 3; v18 = a1 >> 3; @@ -15729,7 +15729,8 @@ } LayingItem::_42F933(v21); break; - case 3: + + case OBJECT_Actor: v12 = a1 >> 3; v13 = &pActors[a1 >> 3]; v14 = v13->uAIState; @@ -15771,7 +15772,8 @@ } } break; - case 5: + + case OBJECT_Decoration: v8 = &pLevelDecorations[a1 >> 3]; v9 = v8->field_16_event_id; if ( v9 ) @@ -15791,10 +15793,11 @@ _5C3420_pDecoration = 0; } break; + default: - if ( (a1 & 7) != 6 ) - { - MessageBoxW(nullptr, L"Warning: Invalid ID reached!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Mouse.cpp:2020", 0); + if ( (a1 & 7) != OBJECT_BModel) + { + MessageBoxW(nullptr, L"Warning: Invalid ID reached!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Mouse.cpp:2020", 0); return 1; } if ( uCurrentlyLoadedLevelType != LEVEL_Indoor ) @@ -15865,7 +15868,7 @@ v6 = ((v12 - v4 - 1) >> 1) + 1; do { - if ( (*(char *)v5 & 7) == 3 ) + if ( (*(char *)v5 & 7) == OBJECT_Actor) { if ( *v5 <= a3 << 16 ) { @@ -15936,7 +15939,7 @@ v3 = pRenderer->GetParentBillboardID(a1a); v4 = pBillboardRenderList[v3].sZValue; v5 = (unsigned __int16)pBillboardRenderList[v3].sZValue; - if ( (v5 & 7) == 3 ) + if ( (v5 & 7) == OBJECT_Actor) { if ( v4 <= (unsigned int)(a3 << 16) ) { @@ -16195,7 +16198,7 @@ { v19 = dword_720020_zvalues[v18] & 0xFFFF; v20 = (dword_720020_zvalues[v18] & 0xFFFFu) >> 3; - if ( (dword_720020_zvalues[v18] & 7) == 2 ) + if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Item) { if ( v20 >= 0x3E8 ) return 0; @@ -16208,16 +16211,16 @@ } goto LABEL_41; } - if ( (dword_720020_zvalues[v18] & 7) == 3 ) + if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Actor) { if ( v20 >= 0xBB8 ) return 0; v24 = (const char *)&pActors[v20]; goto LABEL_51; } - if ( (dword_720020_zvalues[v18] & 7) == 5 ) + if ( (dword_720020_zvalues[v18] & 7) == OBJECT_Decoration) break; - if ( (dword_720020_zvalues[v18] & 7) == 6 ) + if ( (dword_720020_zvalues[v18] & 7) == OBJECT_BModel) { if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) { @@ -16549,14 +16552,14 @@ v3 = &pObjectList->pObjects[v2->uObjectDescID]; v145 = a2; v151 = a2 & 7; - if ( (a2 & 7) == 3 ) - { - if ( (v2->field_58 & 7) == 3 && !pActors[v2->field_58 >> 3].GetActorsRelation(&pActors[a2 >> 3]) ) + if ( (a2 & 7) == OBJECT_Actor) + { + if ( (v2->field_58 & 7) == OBJECT_Actor && !pActors[v2->field_58 >> 3].GetActorsRelation(&pActors[a2 >> 3]) ) return 1; } else { - if ( (a2 & 7) == 4 && (v2->field_58 & 7) == 4 ) + if ( (a2 & 7) == OBJECT_Player && (v2->field_58 & 7) == OBJECT_Player) return 1; } if ( pParty->bTurnBasedModeOn == 1 ) @@ -16568,7 +16571,7 @@ v2->uAttributes = v5 & 0xFFFB; } } - if ( v151 == 6 && (v2->field_58 & 7) != 4 ) + if ( v151 == OBJECT_BModel && (v2->field_58 & 7) != OBJECT_Player) BYTE2(pActors[v2->field_58 >> 3].uAttributes) |= 4u; v6 = v2->uItemType; v7 = v2->uItemType; @@ -16625,7 +16628,7 @@ break; } v138 = 1; - if ( v151 != 3 ) + if ( v151 != OBJECT_Actor) { if ( v6 != 9030 || v2->field_50 != 4 ) goto LABEL_246;