comparison mm7_1.cpp @ 58:41cbaabde2cb

BLV render
author Nomad
date Thu, 25 Oct 2012 02:05:16 +0200
parents 0f4ed4f0f472
children 5159d2e6f559
comparison
equal deleted inserted replaced
53:fd2fd234a66c 58:41cbaabde2cb
3809 dword_506F14 = 0; 3809 dword_506F14 = 0;
3810 uRestUI_FoodRequiredToRest = 2; 3810 uRestUI_FoodRequiredToRest = 2;
3811 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) 3811 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
3812 uRestUI_FoodRequiredToRest = pOutdoor->GetNumFoodRequiredToRestInCurrentPos( 3812 uRestUI_FoodRequiredToRest = pOutdoor->GetNumFoodRequiredToRestInCurrentPos(
3813 pParty->vPosition.x, 3813 pParty->vPosition.x,
3814 pParty->vPosition.z, 3814 pParty->vPosition.y,
3815 pParty->vPosition.y); 3815 pParty->vPosition.z);
3816 if ( sub_476387() ) 3816 if ( sub_476387() )
3817 { 3817 {
3818 v0 = (char *)&pParty->pPlayers[0].uClass; 3818 v0 = (char *)&pParty->pPlayers[0].uClass;
3819 while ( *v0 != 31 ) 3819 while ( *v0 != 31 )
3820 { 3820 {
4540 v38 = (v8 + v11) >> 1; 4540 v38 = (v8 + v11) >> 1;
4541 v15 = (v12 + v9) >> 1; 4541 v15 = (v12 + v9) >> 1;
4542 } 4542 }
4543 v18 = (double)pParty->vPosition.x - (double)v14; 4543 v18 = (double)pParty->vPosition.x - (double)v14;
4544 *(float *)&a4 = v18; 4544 *(float *)&a4 = v18;
4545 v19 = (double)pParty->vPosition.z - (double)v38; 4545 v19 = (double)pParty->vPosition.y - (double)v38;
4546 v33 = v19; 4546 v33 = v19;
4547 v41 = (double)pParty->sEyelevel + (double)pParty->vPosition.y - (double)v15; 4547 v41 = (double)pParty->sEyelevel + (double)pParty->vPosition.z - (double)v15;
4548 *(float *)&sRotY = v19 * v19; 4548 *(float *)&sRotY = v19 * v19;
4549 *(float *)&sRotX = v18 * v18; 4549 *(float *)&sRotX = v18 * v18;
4550 v20 = sqrt(v41 * v41 + *(float *)&sRotX + *(float *)&sRotY); 4550 v20 = sqrt(v41 * v41 + *(float *)&sRotX + *(float *)&sRotY);
4551 v40 = v20; 4551 v40 = v20;
4552 if ( v20 <= 1.0 ) 4552 if ( v20 <= 1.0 )
5564 goto LABEL_15; 5564 goto LABEL_15;
5565 } 5565 }
5566 } 5566 }
5567 a1.field_58 = 4; 5567 a1.field_58 = 4;
5568 a1.uObjectDescID = v6; 5568 a1.uObjectDescID = v6;
5569 a1.vPosition.y = pParty->vPosition.z; 5569 a1.vPosition.y = pParty->vPosition.y;
5570 a1.vPosition.x = pParty->vPosition.x; 5570 a1.vPosition.x = pParty->vPosition.x;
5571 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.y; 5571 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
5572 a1.uSoundID = 0; 5572 a1.uSoundID = 0;
5573 a1.uFacing = 0; 5573 a1.uFacing = 0;
5574 a1.uAttributes = 8; 5574 a1.uAttributes = 8;
5575 v8 = pIndoor->GetSector( 5575 v8 = pIndoor->GetSector(
5576 pParty->vPosition.x, 5576 pParty->vPosition.x,
5577 pParty->vPosition.z, 5577 pParty->vPosition.y,
5578 pParty->sEyelevel + pParty->vPosition.y); 5578 pParty->sEyelevel + pParty->vPosition.z);
5579 a1.uSpriteFrameID = 0; 5579 a1.uSpriteFrameID = 0;
5580 a1.uSectorID = v8; 5580 a1.uSectorID = v8;
5581 memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24)); 5581 memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24));
5582 a1.Create(pParty->sRotationY, 184, 200, 0); 5582 a1.Create(pParty->sRotationY, 184, 200, 0);
5583 } 5583 }
5916 if ( v6 >= (signed int)pObjectList->uNumObjects ) 5916 if ( v6 >= (signed int)pObjectList->uNumObjects )
5917 goto LABEL_18; 5917 goto LABEL_18;
5918 } 5918 }
5919 } 5919 }
5920 a1.uObjectDescID = v6; 5920 a1.uObjectDescID = v6;
5921 a1.vPosition.y = pParty->vPosition.z; 5921 a1.vPosition.y = pParty->vPosition.y;
5922 a1.field_58 = 4; 5922 a1.field_58 = 4;
5923 a1.vPosition.x = pParty->vPosition.x; 5923 a1.vPosition.x = pParty->vPosition.x;
5924 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.y; 5924 a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
5925 a1.uSoundID = 0; 5925 a1.uSoundID = 0;
5926 a1.uFacing = 0; 5926 a1.uFacing = 0;
5927 a1.uAttributes = 8; 5927 a1.uAttributes = 8;
5928 a1.uSectorID = pIndoor->GetSector( 5928 a1.uSectorID = pIndoor->GetSector(
5929 pParty->vPosition.x, 5929 pParty->vPosition.x,
5930 pParty->vPosition.z, 5930 pParty->vPosition.y,
5931 pParty->sEyelevel + pParty->vPosition.y); 5931 pParty->sEyelevel + pParty->vPosition.z);
5932 a1.uSpriteFrameID = 0; 5932 a1.uSpriteFrameID = 0;
5933 memcpy(&a1.stru_24, &pParty->pPickedItem, 0x24u); 5933 memcpy(&a1.stru_24, &pParty->pPickedItem, 0x24u);
5934 v8 = (int *)pMouse->GetCursorPos(&v25); 5934 v8 = (int *)pMouse->GetCursorPos(&v25);
5935 v9 = UnprojectX(*v8); 5935 v9 = UnprojectX(*v8);
5936 a1.Create(pParty->sRotationY + v9, 184, 200, 0); 5936 a1.Create(pParty->sRotationY + v9, 184, 200, 0);
6479 signed int id; // [sp+24h] [bp-4h]@51 6479 signed int id; // [sp+24h] [bp-4h]@51
6480 signed int ie; // [sp+24h] [bp-4h]@61 6480 signed int ie; // [sp+24h] [bp-4h]@61
6481 6481
6482 v1 = &pIndoor->pFaces[uFaceID]; 6482 v1 = &pIndoor->pFaces[uFaceID];
6483 //this = pGame->pIndoorCameraD3D; 6483 //this = pGame->pIndoorCameraD3D;
6484 v2 = &pIndoor->pVertices[*v1->pVertexIDs]; 6484 v2 = &pIndoor->pVertices[v1->pVertexIDs[0]];
6485 //v3 = *(_DWORD *)&v2->x; 6485 //v3 = *(_DWORD *)&v2->x;
6486 v4 = v2->z; 6486 v4 = v2->z;
6487 //v5 = 0; 6487 //v5 = 0;
6488 if ( v1->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x) 6488 if ( v1->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x)
6489 + v1->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y) 6489 + v1->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y)
6490 + v1->pFacePlane_old.vNormal.z * (v4 - pBLVRenderParams->vPartyPos.z) < 0 ) 6490 + v1->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 )
6491 { 6491 {
6492 dword_50B700 = 1; 6492 dword_50B700 = 1;
6493 } 6493 }
6494 else 6494 else
6495 { 6495 {