Mercurial > mm7
diff Render.cpp @ 2002:2e6c63bdcfa9
RenderBillboardD3D initialization
Viewport initialization
some more constructor functions
author | zipi |
---|---|
date | Tue, 05 Nov 2013 23:35:21 +0000 |
parents | 079f2abf54e4 |
children | 30c2b575d25c |
line wrap: on
line diff
--- a/Render.cpp Tue Nov 05 22:07:34 2013 +0000 +++ b/Render.cpp Tue Nov 05 23:35:21 2013 +0000 @@ -128,6 +128,35 @@ return v0; } +void Render::sub_4A19B0() +{ + char *result; // eax@1 + signed int v1; // ecx@1 + /* + result = (char *)&this->pBillboardRenderListD3D[0].uOpacity; + v1 = 1000; + do + { + *(_DWORD *)result = 0; + *((_DWORD *)result + 1) = -1; + *((_DWORD *)result + 3) = -1; + *((_DWORD *)result - 34) = 4; + result += 156; + --v1; + } + while ( v1 ); + */ + for( int i = 0; i < 1000; i++ ) + { + this->pBillboardRenderListD3D[i].uOpacity = (RenderBillboardD3D::OpacityType)0; + this->pBillboardRenderListD3D[i].field_90 = -1; + this->pBillboardRenderListD3D[i].sParentBillboardID = -1; + this->pBillboardRenderListD3D[i].uNumVertices = 4; + } + + return; +} + //----- (00440CB8) -------------------------------------------------------- void Render::DrawBillboardList_BLV() { @@ -135,7 +164,7 @@ int v5; // eax@11 RenderBillboardTransform_local0 soft_billboard; // [sp+4h] [bp-50h]@1 - soft_billboard.uParentBillboardID = -1; + soft_billboard.sParentBillboardID = -1; soft_billboard.pTarget = pBLVRenderParams->pRenderTarget; soft_billboard.pTargetZ = pBLVRenderParams->pTargetZBuffer; soft_billboard.uTargetPitch = pRenderer->uTargetSurfacePitch; @@ -150,7 +179,7 @@ RenderBillboard* p = &pBillboardRenderList[i]; soft_billboard.uScreenSpaceX = p->uScreenSpaceX; - soft_billboard.uParentBillboardID = i; + soft_billboard.sParentBillboardID = i; soft_billboard.uScreenSpaceY = p->uScreenSpaceY; soft_billboard._screenspace_x_scaler_packedfloat = p->_screenspace_x_scaler_packedfloat; soft_billboard._screenspace_y_scaler_packedfloat = p->_screenspace_y_scaler_packedfloat; @@ -378,7 +407,7 @@ //int v17; // [sp+5Ch] [bp-8h]@2 int v18; // [sp+60h] [bp-4h]@13 - billboard.uParentBillboardID = -1; + billboard.sParentBillboardID = -1; billboard.pTarget = pRenderer->pTargetSurface; billboard.pTargetZ = pRenderer->pActiveZBuffer; billboard.uTargetPitch = pRenderer->uTargetSurfacePitch; @@ -394,7 +423,7 @@ billboard.uScreenSpaceX = pBillboard->uScreenSpaceX; billboard.uScreenSpaceY = pBillboard->uScreenSpaceY; - billboard.uParentBillboardID = i; + billboard.sParentBillboardID = i; billboard._screenspace_x_scaler_packedfloat = pBillboard->_screenspace_x_scaler_packedfloat; billboard.uTintColor = pBillboard->uTintColor; billboard._screenspace_y_scaler_packedfloat = pBillboard->_screenspace_y_scaler_packedfloat; @@ -2095,6 +2124,7 @@ hd_water_tile_id = -1; hd_water_current_frame = 0; + sub_4A19B0(); } bool Render::Initialize(bool bWindowed, OSWindow *window, bool bColoredLights, uint32_t uDetailLevel, bool bTinting) @@ -4508,7 +4538,7 @@ //----- (004A1EA3) -------------------------------------------------------- unsigned int Render::GetParentBillboardID(unsigned int uBillboardID) { - return pRenderer->pBillboardRenderListD3D[uBillboardID].uParentBillboardID; + return pRenderer->pBillboardRenderListD3D[uBillboardID].sParentBillboardID; } //----- (004A1EB6) -------------------------------------------------------- @@ -5597,7 +5627,7 @@ //v10 = a3; pBillboardRenderListD3D[v7].field_90 = pSoftBillboard->field_44; pBillboardRenderListD3D[v7].sZValue = pSoftBillboard->sZValue; - pBillboardRenderListD3D[v7].uParentBillboardID = pSoftBillboard->uParentBillboardID; + pBillboardRenderListD3D[v7].sParentBillboardID = pSoftBillboard->sParentBillboardID; //v25 = pSoftBillboard->uScreenSpaceX; //v24 = pSoftBillboard->uScreenSpaceY; a1 = (pSoftBillboard->_screenspace_x_scaler_packedfloat & 0xFFFF) * 0.000015260186 + HIWORD(pSoftBillboard->_screenspace_x_scaler_packedfloat); @@ -5730,7 +5760,7 @@ pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_1; pBillboardRenderListD3D[v8].field_90 = a2->field_44; pBillboardRenderListD3D[v8].sZValue = a2->sZValue; - pBillboardRenderListD3D[v8].uParentBillboardID = a2->uParentBillboardID; + pBillboardRenderListD3D[v8].sParentBillboardID = a2->sParentBillboardID; //v9 = a2->uScreenSpaceX; //v10 = a2->uScreenSpaceY; v11 = (a2->_screenspace_x_scaler_packedfloat & 0xFFFF) * 0.000015260186 + HIWORD(a2->_screenspace_x_scaler_packedfloat); @@ -5903,7 +5933,7 @@ pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_1; pBillboardRenderListD3D[v8].field_90 = a2->field_44; pBillboardRenderListD3D[v8].sZValue = a2->sZValue; - pBillboardRenderListD3D[v8].uParentBillboardID = a2->uParentBillboardID; + pBillboardRenderListD3D[v8].sParentBillboardID = a2->sParentBillboardID; v9 = a2->uScreenSpaceX; v10 = a2->uScreenSpaceY; v11 = (a2->_screenspace_x_scaler_packedfloat & 0xFFFF) * 0.000015260186 + HIWORD(a2->_screenspace_x_scaler_packedfloat); @@ -6117,7 +6147,7 @@ pBillboardRenderListD3D[v8].z_order = a2->zbuffer_depth; pBillboardRenderListD3D[v8].field_90 = a2->field_44; pBillboardRenderListD3D[v8].sZValue = a2->sZValue; - pBillboardRenderListD3D[v8].uParentBillboardID = a2->uParentBillboardID; + pBillboardRenderListD3D[v8].sParentBillboardID = a2->sParentBillboardID; if (a2->uTintColor & 0xFF000000) pBillboardRenderListD3D[v8].uOpacity = RenderBillboardD3D::Opaque_3; @@ -6306,7 +6336,7 @@ v5 = Billboard_ProbablyAddToListAndSortByZOrder(depth); pBillboardRenderListD3D[v5].field_90 = 0; - pBillboardRenderListD3D[v5].uParentBillboardID = -1; + pBillboardRenderListD3D[v5].sParentBillboardID = -1; pBillboardRenderListD3D[v5].uOpacity = RenderBillboardD3D::Opaque_2; pBillboardRenderListD3D[v5].pTexture = 0; pBillboardRenderListD3D[v5].uNumVertices = a1->uNumVertices;