Mercurial > might-and-magic-trilogy
diff Indoor.cpp @ 71:8453114181af
intermediate
author | Nomad |
---|---|
date | Sat, 27 Oct 2012 21:44:29 +0200 |
parents | fdacbc653945 |
children | f9a33f75bae3 |
line wrap: on
line diff
--- a/Indoor.cpp Sat Oct 27 20:48:36 2012 +0200 +++ b/Indoor.cpp Sat Oct 27 21:44:29 2012 +0200 @@ -3967,12 +3967,12 @@ AIDirection v52; // [sp+0h] [bp-60h]@75 AIDirection v53; // [sp+1Ch] [bp-44h]@116 int v54; // [sp+38h] [bp-28h]@53 - int v55; // [sp+3Ch] [bp-24h]@6 + unsigned int uSectorID; // [sp+3Ch] [bp-24h]@6 int v56; // [sp+40h] [bp-20h]@6 unsigned int _this; // [sp+44h] [bp-1Ch]@51 int v58; // [sp+48h] [bp-18h]@51 int v59; // [sp+4Ch] [bp-14h]@8 - int v60; // [sp+50h] [bp-10h]@6 + unsigned int uFaceID; // [sp+50h] [bp-10h]@6 int v61; // [sp+54h] [bp-Ch]@14 int v62; // [sp+58h] [bp-8h]@6 unsigned int v63; // [sp+5Ch] [bp-4h]@1 @@ -3986,9 +3986,9 @@ v1 = v0->uAIState; if ( v1 == 11 || v1 == 19 || v1 == 17 || !v0->uMovementSpeed ) goto LABEL_123; - v55 = v0->uSectorID; - v2 = _46ED1B_collide_against_floor(v0->vPosition.x, v0->vPosition.y, v0->vPosition.z, (unsigned int *)&v55, &v60); - v0->uSectorID = v55; + uSectorID = v0->uSectorID; + v2 = _46ED1B_collide_against_floor(v0->vPosition.x, v0->vPosition.y, v0->vPosition.z, &uSectorID, &uFaceID); + v0->uSectorID = uSectorID; v3 = v0->pMonsterInfo.uFlying; v56 = v2; v62 = v3; @@ -4003,7 +4003,7 @@ v5 = pIndoor->GetSector(v0->vPosition.x, v0->vPosition.y, v4); v0->uSectorID = v5; if ( !v5 - || (v56 = _46CEC3_get_floor_level(v0->vPosition.x, v0->vPosition.y, v0->vPosition.z, v5, &v60), v56 == -30000) ) + || (v56 = _46CEC3_get_floor_level(v0->vPosition.x, v0->vPosition.y, v0->vPosition.z, v5, &uFaceID), v56 == -30000) ) goto LABEL_123; } if ( v0->uCurrentActionAnimation == 1 ) @@ -4033,18 +4033,18 @@ if ( v6 > 1000 ) v6 = 1000; v12 = stru_5C6E00->SinCos(v0->uYawAngle); - v55 = v12; + uSectorID = v12; v13 = v12 * (signed __int64)v6; v61 = v13 >> 16; v0->vVelocity.x = WORD1(v13); - v55 = stru_5C6E00->SinCos(v0->uYawAngle - stru_5C6E00->uIntegerHalfPi); - v61 = (unsigned __int64)(v55 * (signed __int64)v6) >> 16; + uSectorID = stru_5C6E00->SinCos(v0->uYawAngle - stru_5C6E00->uIntegerHalfPi); + v61 = (unsigned __int64)(uSectorID * (signed __int64)v6) >> 16; v7 = v62 == 0; - v0->vVelocity.y = (unsigned int)(v55 * v6) >> 16; + v0->vVelocity.y = (unsigned int)(uSectorID * v6) >> 16; if ( !v7 ) { v14 = stru_5C6E00->SinCos(v0->uPitchAngle - stru_5C6E00->uIntegerHalfPi); - v55 = v14; + uSectorID = v14; v15 = v14 * (signed __int64)v6; v61 = v15 >> 16; v0->vVelocity.z = WORD1(v15); @@ -4053,16 +4053,16 @@ else { v61 = v0->vVelocity.x; - v55 = 55000; + uSectorID = 55000; v61 = (unsigned __int64)(55000i64 * v61) >> 16; v0->vVelocity.x = v61; v61 = v0->vVelocity.y; - v61 = (unsigned __int64)(v55 * (signed __int64)v61) >> 16; + v61 = (unsigned __int64)(uSectorID * (signed __int64)v61) >> 16; v7 = v62 == 0; v0->vVelocity.y = v61; if ( !v7 ) { - v55 = 55000; + uSectorID = 55000; v61 = v0->vVelocity.z; v61 = (unsigned __int64)(55000i64 * v61) >> 16; v0->vVelocity.z = v61; @@ -4072,7 +4072,7 @@ v17 = pIndoor->pFaces; v51 = __OFSUB__(v16, v56); v8 = v16 - v56 < 0; - v18 = v60; + v18 = uFaceID; if ( v8 ^ v51 ) { v0->vPosition.z = v56 + 1; @@ -4112,7 +4112,7 @@ v21 = v0->uActorHeight; stru_721530.field_84 = -1; stru_721530.field_70 = 0; - v55 = 0; + uSectorID = 0; stru_721530.field_0 = 1; stru_721530.field_8 = v20; stru_721530.prolly_normal_d = v20; @@ -4189,8 +4189,8 @@ v58 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16; v32 = v58 + v0->vPosition.z; } - v33 = _46ED1B_collide_against_floor(v30, v31, v32, &stru_721530.uSectorID, &v60); - v34 = pIndoor->pFaces[v60].uAttributes; + v33 = _46ED1B_collide_against_floor(v30, v31, v32, &stru_721530.uSectorID, &uFaceID); + v34 = pIndoor->pFaces[uFaceID].uAttributes; v35 = v34 & 0x400000; if (v35 && v0->uAIState == Dead) { @@ -4369,8 +4369,8 @@ } } LABEL_120: - ++v55; - if ( v55 >= 100 ) + ++uSectorID; + if ( uSectorID >= 100 ) goto LABEL_123; v20 = stru_721530.prolly_normal_d; }