Mercurial > mm7
changeset 708:af5771589d22
Dropped items in blv
author | Nomad |
---|---|
date | Thu, 21 Mar 2013 10:35:13 +0200 |
parents | 436ae1842e92 |
children | af08fc9e29c8 |
files | mm7_3.cpp |
diffstat | 1 files changed, 33 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/mm7_3.cpp Thu Mar 21 10:21:46 2013 +0200 +++ b/mm7_3.cpp Thu Mar 21 10:35:13 2013 +0200 @@ -11370,15 +11370,15 @@ int v9; // ecx@12 unsigned __int16 v10; // ax@12 int *v11; // eax@20 - char v12; // zf@26 - int v18; // ST5C_4@27 + //char v12; // zf@26 + __int64 v18; // ST5C_4@27 signed __int64 v19; // qtt@28 int v20; // ST5C_4@28 - int v21; // edx@29 + //int v21; // edx@29 __int16 v22; // ax@29 - int v23; // eax@29 + //int v23; // eax@29 SpriteFrame *v24; // [sp+1Ch] [bp-40h]@12 - __int16 a5; // [sp+28h] [bp-34h]@12 + //__int16 a5; // [sp+28h] [bp-34h]@12 int a6; // [sp+2Ch] [bp-30h]@12 int a2; // [sp+30h] [bp-2Ch]@12 int a1; // [sp+34h] [bp-28h]@12 @@ -11405,7 +11405,7 @@ && (v2 < 811 || v2 >= 815) || pGame->pStru6Instance->_4A81CA(p)) { - a5 = p->uSectorID; + //a5 = p->uSectorID; a1 = p->vPosition.x; a2 = p->vPosition.y; a3 = p->vPosition.z; @@ -11444,7 +11444,7 @@ a1, a2, a3, - a5, + p->uSectorID, a6, v1->uParticleTrailColorR, v1->uParticleTrailColorG, @@ -11461,15 +11461,27 @@ 1) ) { pGame->pIndoorCameraD3D->Project(x, y, z, &v36, &v35); - if ( (signed int)uNumBillboardsToDraw >= 500 ) - return; + + assert(uNumBillboardsToDraw < 500); + //if ( (signed int)uNumBillboardsToDraw >= 500 ) + // return; ++uNumBillboardsToDraw; ++uNumSpritesDrawnThisFrame; p->uAttributes |= 1u; - v12 = pRenderer->pRenderD3D == 0; + //v12 = pRenderer->pRenderD3D == 0; v3->uPalette = v24->uPaletteIndex; - v3->uIndoorSectorID = a5; - if ( v12 ) + v3->uIndoorSectorID = p->uSectorID; + if ( pRenderer->pRenderD3D ) + { + v3->fov_x = pGame->pIndoorCameraD3D->fov_x; + v3->fov_y = pGame->pIndoorCameraD3D->fov_y; + LODWORD(v18) = 0; + HIDWORD(v18) = (int)floorf(v3->fov_x + 0.5f); + v18 = v18 / x; + v3->_screenspace_x_scaler_packedfloat = (unsigned __int64)(v24->scale * v18) >> 16; + v31 = (unsigned __int64)(v24->scale * v18) >> 16; + } + else { LODWORD(v19) = pBLVRenderParams->field_40 << 16; HIDWORD(v19) = pBLVRenderParams->field_40 >> 16; @@ -11477,15 +11489,8 @@ v3->_screenspace_x_scaler_packedfloat = (unsigned __int64)(v24->scale * v19 / x) >> 16; v31 = (unsigned __int64)(v24->scale * (signed __int64)v20) >> 16; } - else - { - v3->fov_x = pGame->pIndoorCameraD3D->fov_x; - v3->fov_y = pGame->pIndoorCameraD3D->fov_y; - v18 = (int)floorf(v3->fov_x + 0.5f) / x; - v3->_screenspace_x_scaler_packedfloat = (unsigned __int64)(v24->scale * (__int64)v18) >> 16; - v31 = (unsigned __int64)(v24->scale * (__int64)v18) >> 16; - } - HIWORD(v21) = HIWORD(x); + //HIWORD(v21) = HIWORD(x); + //LOWORD(v21) = 0; v3->_screenspace_y_scaler_packedfloat = v31; v3->field_1E = v34; v3->world_x = a1; @@ -11495,13 +11500,14 @@ v22 = v35; v3->uTintColor = 0; v3->uScreenSpaceY = v22; - LOWORD(v21) = 0; - v23 = 8 * i; - LOBYTE(v23) = 8 * i | OBJECT_Item; + //v23 = 8 * i; + //LOBYTE(v23) = 8 * i | OBJECT_Item; v3->pSpriteFrame = v24; - v12 = (p->uAttributes & 0x20) == 0; - v3->sZValue = v21 + v23; - if ( !v12 ) + //v12 = (p->uAttributes & 0x20) == 0; + //v3->sZValue = v21 + v23; + v3->actual_z = HIWORD(x); + v3->object_pid = 8 * i | OBJECT_Item; + if (p->uAttributes & 0x20) { if ( !pRenderer->pRenderD3D ) v3->sZValue = 0;