comparison mm7_3.cpp @ 708:af5771589d22

Dropped items in blv
author Nomad
date Thu, 21 Mar 2013 10:35:13 +0200
parents 436ae1842e92
children 735dab8d3c9a a5e587c8e30e 737d7fec67f0
comparison
equal deleted inserted replaced
707:436ae1842e92 708:af5771589d22
11368 int v7; // ecx@12 11368 int v7; // ecx@12
11369 int v8; // edx@12 11369 int v8; // edx@12
11370 int v9; // ecx@12 11370 int v9; // ecx@12
11371 unsigned __int16 v10; // ax@12 11371 unsigned __int16 v10; // ax@12
11372 int *v11; // eax@20 11372 int *v11; // eax@20
11373 char v12; // zf@26 11373 //char v12; // zf@26
11374 int v18; // ST5C_4@27 11374 __int64 v18; // ST5C_4@27
11375 signed __int64 v19; // qtt@28 11375 signed __int64 v19; // qtt@28
11376 int v20; // ST5C_4@28 11376 int v20; // ST5C_4@28
11377 int v21; // edx@29 11377 //int v21; // edx@29
11378 __int16 v22; // ax@29 11378 __int16 v22; // ax@29
11379 int v23; // eax@29 11379 //int v23; // eax@29
11380 SpriteFrame *v24; // [sp+1Ch] [bp-40h]@12 11380 SpriteFrame *v24; // [sp+1Ch] [bp-40h]@12
11381 __int16 a5; // [sp+28h] [bp-34h]@12 11381 //__int16 a5; // [sp+28h] [bp-34h]@12
11382 int a6; // [sp+2Ch] [bp-30h]@12 11382 int a6; // [sp+2Ch] [bp-30h]@12
11383 int a2; // [sp+30h] [bp-2Ch]@12 11383 int a2; // [sp+30h] [bp-2Ch]@12
11384 int a1; // [sp+34h] [bp-28h]@12 11384 int a1; // [sp+34h] [bp-28h]@12
11385 int v30; // [sp+38h] [bp-24h]@12 11385 int v30; // [sp+38h] [bp-24h]@12
11386 int v31; // [sp+38h] [bp-24h]@27 11386 int v31; // [sp+38h] [bp-24h]@27
11403 if ( ((v2 = p->uType, v2 < 1000) || v2 >= 10000) 11403 if ( ((v2 = p->uType, v2 < 1000) || v2 >= 10000)
11404 && (v2 < 500 || v2 >= 600) 11404 && (v2 < 500 || v2 >= 600)
11405 && (v2 < 811 || v2 >= 815) 11405 && (v2 < 811 || v2 >= 815)
11406 || pGame->pStru6Instance->_4A81CA(p)) 11406 || pGame->pStru6Instance->_4A81CA(p))
11407 { 11407 {
11408 a5 = p->uSectorID; 11408 //a5 = p->uSectorID;
11409 a1 = p->vPosition.x; 11409 a1 = p->vPosition.x;
11410 a2 = p->vPosition.y; 11410 a2 = p->vPosition.y;
11411 a3 = p->vPosition.z; 11411 a3 = p->vPosition.z;
11412 v3 = &pBillboardRenderList[uNumBillboardsToDraw]; 11412 v3 = &pBillboardRenderList[uNumBillboardsToDraw];
11413 v4 = pSpriteFrameTable->GetFrame(v1->uSpriteID, p->uSpriteFrameID); 11413 v4 = pSpriteFrameTable->GetFrame(v1->uSpriteID, p->uSpriteFrameID);
11442 LOBYTE(v11) = byte_4E94D3; 11442 LOBYTE(v11) = byte_4E94D3;
11443 pMobileLightsStack->AddLight( 11443 pMobileLightsStack->AddLight(
11444 a1, 11444 a1,
11445 a2, 11445 a2,
11446 a3, 11446 a3,
11447 a5, 11447 p->uSectorID,
11448 a6, 11448 a6,
11449 v1->uParticleTrailColorR, 11449 v1->uParticleTrailColorR,
11450 v1->uParticleTrailColorG, 11450 v1->uParticleTrailColorG,
11451 v1->uParticleTrailColorB, 11451 v1->uParticleTrailColorB,
11452 byte_4E94D3); 11452 byte_4E94D3);
11459 &y, 11459 &y,
11460 &z, 11460 &z,
11461 1) ) 11461 1) )
11462 { 11462 {
11463 pGame->pIndoorCameraD3D->Project(x, y, z, &v36, &v35); 11463 pGame->pIndoorCameraD3D->Project(x, y, z, &v36, &v35);
11464 if ( (signed int)uNumBillboardsToDraw >= 500 ) 11464
11465 return; 11465 assert(uNumBillboardsToDraw < 500);
11466 //if ( (signed int)uNumBillboardsToDraw >= 500 )
11467 // return;
11466 ++uNumBillboardsToDraw; 11468 ++uNumBillboardsToDraw;
11467 ++uNumSpritesDrawnThisFrame; 11469 ++uNumSpritesDrawnThisFrame;
11468 p->uAttributes |= 1u; 11470 p->uAttributes |= 1u;
11469 v12 = pRenderer->pRenderD3D == 0; 11471 //v12 = pRenderer->pRenderD3D == 0;
11470 v3->uPalette = v24->uPaletteIndex; 11472 v3->uPalette = v24->uPaletteIndex;
11471 v3->uIndoorSectorID = a5; 11473 v3->uIndoorSectorID = p->uSectorID;
11472 if ( v12 ) 11474 if ( pRenderer->pRenderD3D )
11475 {
11476 v3->fov_x = pGame->pIndoorCameraD3D->fov_x;
11477 v3->fov_y = pGame->pIndoorCameraD3D->fov_y;
11478 LODWORD(v18) = 0;
11479 HIDWORD(v18) = (int)floorf(v3->fov_x + 0.5f);
11480 v18 = v18 / x;
11481 v3->_screenspace_x_scaler_packedfloat = (unsigned __int64)(v24->scale * v18) >> 16;
11482 v31 = (unsigned __int64)(v24->scale * v18) >> 16;
11483 }
11484 else
11473 { 11485 {
11474 LODWORD(v19) = pBLVRenderParams->field_40 << 16; 11486 LODWORD(v19) = pBLVRenderParams->field_40 << 16;
11475 HIDWORD(v19) = pBLVRenderParams->field_40 >> 16; 11487 HIDWORD(v19) = pBLVRenderParams->field_40 >> 16;
11476 v20 = v19 / x; 11488 v20 = v19 / x;
11477 v3->_screenspace_x_scaler_packedfloat = (unsigned __int64)(v24->scale * v19 / x) >> 16; 11489 v3->_screenspace_x_scaler_packedfloat = (unsigned __int64)(v24->scale * v19 / x) >> 16;
11478 v31 = (unsigned __int64)(v24->scale * (signed __int64)v20) >> 16; 11490 v31 = (unsigned __int64)(v24->scale * (signed __int64)v20) >> 16;
11479 } 11491 }
11480 else 11492 //HIWORD(v21) = HIWORD(x);
11481 { 11493 //LOWORD(v21) = 0;
11482 v3->fov_x = pGame->pIndoorCameraD3D->fov_x;
11483 v3->fov_y = pGame->pIndoorCameraD3D->fov_y;
11484 v18 = (int)floorf(v3->fov_x + 0.5f) / x;
11485 v3->_screenspace_x_scaler_packedfloat = (unsigned __int64)(v24->scale * (__int64)v18) >> 16;
11486 v31 = (unsigned __int64)(v24->scale * (__int64)v18) >> 16;
11487 }
11488 HIWORD(v21) = HIWORD(x);
11489 v3->_screenspace_y_scaler_packedfloat = v31; 11494 v3->_screenspace_y_scaler_packedfloat = v31;
11490 v3->field_1E = v34; 11495 v3->field_1E = v34;
11491 v3->world_x = a1; 11496 v3->world_x = a1;
11492 v3->world_y = a2; 11497 v3->world_y = a2;
11493 v3->world_z = a3; 11498 v3->world_z = a3;
11494 v3->uScreenSpaceX = v36; 11499 v3->uScreenSpaceX = v36;
11495 v22 = v35; 11500 v22 = v35;
11496 v3->uTintColor = 0; 11501 v3->uTintColor = 0;
11497 v3->uScreenSpaceY = v22; 11502 v3->uScreenSpaceY = v22;
11498 LOWORD(v21) = 0; 11503 //v23 = 8 * i;
11499 v23 = 8 * i; 11504 //LOBYTE(v23) = 8 * i | OBJECT_Item;
11500 LOBYTE(v23) = 8 * i | OBJECT_Item;
11501 v3->pSpriteFrame = v24; 11505 v3->pSpriteFrame = v24;
11502 v12 = (p->uAttributes & 0x20) == 0; 11506 //v12 = (p->uAttributes & 0x20) == 0;
11503 v3->sZValue = v21 + v23; 11507 //v3->sZValue = v21 + v23;
11504 if ( !v12 ) 11508 v3->actual_z = HIWORD(x);
11509 v3->object_pid = 8 * i | OBJECT_Item;
11510 if (p->uAttributes & 0x20)
11505 { 11511 {
11506 if ( !pRenderer->pRenderD3D ) 11512 if ( !pRenderer->pRenderD3D )
11507 v3->sZValue = 0; 11513 v3->sZValue = 0;
11508 } 11514 }
11509 } 11515 }