Mercurial > mm7
diff mm7_6.cpp @ 2117:c7bf59066842
mm7_4-6 cleaned
author | Ritor1 |
---|---|
date | Mon, 23 Dec 2013 23:38:51 +0600 |
parents | 68fbaf45ef66 |
children | f6e59446c133 |
line wrap: on
line diff
--- a/mm7_6.cpp Mon Dec 23 17:30:22 2013 +0600 +++ b/mm7_6.cpp Mon Dec 23 23:38:51 2013 +0600 @@ -52,15 +52,12 @@ int v7; // esi@8 int v8; // eax@9 int v9; // edx@11 - int v10; // edx@13 - int v11; // esi@13 unsigned __int8 v12; // sf@13 unsigned __int8 v13; // of@13 int v14; // edx@14 int v15; // eax@14 signed int result; // eax@17 - __debugbreak();//Ritor1 v5 = pActor->pMonsterInfo.uAC; v6 = 0; if ( (signed __int64)pActor->pActorBuffs[ACTOR_BUFF_SOMETHING_THAT_HALVES_AC].uExpireTime > 0 ) @@ -78,27 +75,25 @@ if ( a3 == 2 ) { v14 = a4 + v9; - v15 = ((v7 + 15) >> 1) + v7 + 15; - v13 = __OFSUB__(v14, v15); + v15 = ((v7 + 15) / 2) + v7 + 15; + v13 = __OFSUB__(v14, v15); v12 = v14 - v15 < 0; } - else + else if ( a3 == 3 ) { - if ( a3 != 3 ) - { - v10 = a4 + v9; - v11 = v7 + 15; - v13 = __OFSUB__(v10, v11); - v12 = v10 - v11 < 0; - } - else - { - v14 = a4 + v9; - v15 = 2 * v7 + 30; - v13 = __OFSUB__(v14, v15); - v12 = v14 - v15 < 0; - } + v14 = a4 + v9; + v15 = 2 * v7 + 30; + v13 = __OFSUB__(v14, v15); + v12 = v14 - v15 < 0; } + else + { + v14 = a4 + v9; + v15 = v7 + 15; + v13 = __OFSUB__(v14, v15); + v12 = v14 - v15 < 0; + } + if ( v12 ^ v13 ) result = 0; else @@ -503,10 +498,10 @@ int *v9; // edx@8 signed int v10; // ebx@10 int v11; // edi@11 - Actor *v12; // esi@12 - unsigned __int16 v13; // ax@12 + //Actor *v12; // esi@12 + //unsigned __int16 v13; // ax@12 int v14; // eax@22 - char v15; // zf@30 + //char v15; // zf@30 int v16; // esi@32 int v17; // ecx@34 stru319 *v18; // eax@39 @@ -514,18 +509,18 @@ int v20; // ecx@41 unsigned __int16 v21; // ax@42 unsigned int v22; // [sp+8h] [bp-24h]@11 - unsigned int v23; // [sp+Ch] [bp-20h]@7 + //unsigned int v23; // [sp+Ch] [bp-20h]@7 stru319 *v24; // [sp+10h] [bp-1Ch]@1 unsigned int v25; // [sp+14h] [bp-18h]@8 int *v26; // [sp+18h] [bp-14h]@8 int v27; // [sp+1Ch] [bp-10h]@10 int *v28; // [sp+20h] [bp-Ch]@10 - unsigned int v29; // [sp+24h] [bp-8h]@7 + //unsigned int v29; // [sp+24h] [bp-8h]@7 int v30; // [sp+28h] [bp-4h]@6 int i; // [sp+38h] [bp+Ch]@33 signed int v32; // [sp+3Ch] [bp+10h]@32 - __debugbreak();//Ritor1 + //__debugbreak();//Ritor1 v4 = 0; v5 = this; v24 = this; @@ -544,49 +539,39 @@ v30 = 0; if ( pRenderer->pActiveZBuffer ) { - v29 = viewparams->uScreen_topL_X; - v23 = viewparams->uScreen_BttmR_X; if ( (signed int)viewparams->uScreen_topL_Y < (signed int)viewparams->uScreen_BttmR_Y ) { - v25 = viewparams->uScreen_BttmR_Y - viewparams->uScreen_topL_Y; v9 = &pRenderer->pActiveZBuffer[viewparams->uScreen_topL_X + 640 * viewparams->uScreen_topL_Y]; v26 = &pRenderer->pActiveZBuffer[viewparams->uScreen_topL_X + 640 * viewparams->uScreen_topL_Y]; - do + for ( v25 = viewparams->uScreen_BttmR_Y - viewparams->uScreen_topL_Y; v25; --v25 ) { - if ( (signed int)v29 < (signed int)v23 ) + if ( (signed int)viewparams->uScreen_topL_X < (signed int)viewparams->uScreen_BttmR_X ) { v28 = v9; v10 = v4; - v27 = v23 - v29; - do + for ( v27 = viewparams->uScreen_BttmR_X - viewparams->uScreen_topL_X; v27; --v27 ) { v22 = *v28; v11 = *v28 & 0xFFFF; if (PID_TYPE(v11) == OBJECT_Actor) { - v12 = &pActors[PID_ID(v11)]; - v13 = v12->uAIState; - if ( v13 != 5 ) + if ( pActors[PID_ID(v11)].uAIState != Dead ) { - if ( v13 != 4 - && v13 != 11 - && v13 != 19 - && v13 != 17 + if ( pActors[PID_ID(v11)].uAIState != Dying && pActors[PID_ID(v11)].uAIState != Removed + && pActors[PID_ID(v11)].uAIState != Summoned && pActors[PID_ID(v11)].uAIState != Disabled && (!a3 || pActors[PID_ID(v11)].GetActorsRelation(0)) ) { - if ( (!a4 || MonsterStats::BelongsToSupertype(v12->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD)) + if ( (!a4 || MonsterStats::BelongsToSupertype(pActors[PID_ID(v11)].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD)) && v22 <= pick_depth << 16 ) { v14 = 0; if ( v10 > 0 ) { - do + for ( v14; v14 < v30; ++v14 ) { if ( dword_50BDA0[v14] == v11 ) break; - ++v14; } - while ( v14 < v30 ); } if ( v14 == v30 && v10 < 100 ) { @@ -600,49 +585,39 @@ } } ++v28; - --v27; } - while ( v27 ); v4 = v30; v5 = v24; } v9 = v26 + 640; - v15 = v25-- == 1; v26 += 640; } - while ( !v15 ); } if ( v4 > 0 ) { - v32 = 1; v16 = (int)dword_50BC10.data(); - do + for ( v32 = 1; v32 - 1 < v4; ++v32 ) { for ( i = v32; i < v4; ++i ) { v17 = dword_50BC10[i]; - if ( v17 < *(int *)v16 ) + if ( dword_50BC10[i] < *(int *)v16 ) { dword_50BC10[i] = *(int *)v16; *(int *)v16 = v17; } } - ++v32; v16 += 4; } - while ( v32 - 1 < v4 ); v5 = v24; if ( v4 > 0 ) { v18 = v24; - v19 = v4; - do + for ( v19 = v4; v19; --v19 ) { *(int *)&v18->field_0 = (*(int *)&v18[(char *)dword_50BC10.data() - (char *)v24].field_0 >> 3) & 0x1FFF; v18 += 4; - --v19; } - while ( v19 ); } } v20 = 0;