Mercurial > mm7
diff Render.cpp @ 1980:c1c74df0a33e
changing most of auto types to their actual types
author | Grumpy7 |
---|---|
date | Wed, 30 Oct 2013 00:47:37 -0700 |
parents | bd5c3f33bff4 |
children | 2647e2f820a6 |
line wrap: on
line diff
--- a/Render.cpp Mon Oct 28 22:16:42 2013 -0700 +++ b/Render.cpp Wed Oct 30 00:47:37 2013 -0700 @@ -147,7 +147,7 @@ pODMRenderParams->uNumBillboards = ::uNumBillboardsToDraw; for (uint i = 0; i < ::uNumBillboardsToDraw; ++i) { - auto p = pBillboardRenderList + i; + RenderBillboard* p = &pBillboardRenderList[i]; soft_billboard.uScreenSpaceX = p->uScreenSpaceX; soft_billboard.uParentBillboardID = i; @@ -299,7 +299,7 @@ uint norm_idx = pTerrainNormalIndices[2 * (x * 128 + z) + 2]; assert(norm_idx < uNumTerrainNormals); - auto norm = pTerrainNormals + norm_idx; + Vec3_float_* norm = &pTerrainNormals[norm_idx]; float _f = ((norm->x * (float)pOutdoor->vSunlight.x / 65536.0) - (norm->y * (float)pOutdoor->vSunlight.y / 65536.0) - (norm->z * (float)pOutdoor->vSunlight.z / 65536.0)); @@ -390,7 +390,7 @@ for (int i = 0; i < ::uNumBillboardsToDraw; ++i) { - auto pBillboard = pBillboardRenderList + i; + RenderBillboard* pBillboard = &pBillboardRenderList[i]; billboard.uScreenSpaceX = pBillboard->uScreenSpaceX; billboard.uScreenSpaceY = pBillboard->uScreenSpaceY; @@ -489,7 +489,7 @@ //v41 = 0; for (int i = 0; i < uNumSpriteObjects; ++i) { - auto object = &pSpriteObjects[i]; + SpriteObject* object = &pSpriteObjects[i]; //auto v0 = (char *)&pSpriteObjects[i].uSectorID; //v0 = (char *)&pSpriteObjects[0].uSectorID; //do @@ -498,7 +498,7 @@ continue; assert(object->uObjectDescID < pObjectList->uNumObjects); - auto object_desc = pObjectList->pObjects + object->uObjectDescID; + ObjectDesc* object_desc = &pObjectList->pObjects[object->uObjectDescID]; if (object_desc->NoSprite()) continue; @@ -908,13 +908,13 @@ //do for (int i = 0; i < uNumLevelDecorations; ++i) { - auto decor = &pLevelDecorations[i]; - auto v0 = (char *)&pLevelDecorations[i].vPosition.y; + LevelDecoration* decor = &pLevelDecorations[i]; + char* v0 = (char *)&pLevelDecorations[i].vPosition.y; if ((!(decor->uFlags & LEVEL_DECORATION_OBELISK_CHEST) || decor->IsObeliskChestActive()) && !(decor->uFlags & LEVEL_DECORATION_INVISIBLE)) { //v1 = &pDecorationList->pDecorations[decor->uDecorationDescID]; - auto decor_desc = pDecorationList->pDecorations + decor->uDecorationDescID; + DecorationDesc* decor_desc = pDecorationList->pDecorations + decor->uDecorationDescID; v2 = decor_desc->uFlags; if ( (char)v2 >= 0 ) { @@ -2113,8 +2113,8 @@ this->bTinting = bTinting; - auto r1 = pD3DBitmaps.Load(L"data\\d3dbitmap.hwl"); - auto r2 = pD3DSprites.Load(L"data\\d3dsprite.hwl"); + bool r1 = pD3DBitmaps.Load(L"data\\d3dbitmap.hwl"); + bool r2 = pD3DSprites.Load(L"data\\d3dsprite.hwl"); return r1 && r2; } @@ -2949,7 +2949,7 @@ IDirectDrawSurface4 *v4; // ST0C_4@6 RECT v5; // [sp+8h] [bp-10h]@6 - auto a1 = this; + Render* a1 = this; v2 = a1; if ( a1->pRenderD3D ) { @@ -4302,7 +4302,7 @@ signed int v3; // [sp-8h] [bp-Ch]@3 int v4; // [sp-4h] [bp-8h]@3 - auto a5 = this; + Render* a5 = this; if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 ) { pFront = (IDirectDrawSurface *)a5->pFrontBuffer4; @@ -5434,7 +5434,7 @@ //v59 = pGame->pLightmapBuilder; //v9 = v59->std__vector_000004_size; - auto uCorrectedColor = uColor; + uint uCorrectedColor = uColor; if (pGame->pLightmapBuilder->std__vector_000004_size) uCorrectedColor = 0xFFFFFFFF; pGame->AlterGamma_BLV(pFace, &uCorrectedColor); @@ -6390,7 +6390,7 @@ HRESULT v16; // eax@23 stru350 Dst; // [sp+Ch] [bp-F8h]@12 - auto pHWLTexture = pD3DBitmaps.LoadTexture(pName, bMipMaps); + HWLTexture* pHWLTexture = pD3DBitmaps.LoadTexture(pName, bMipMaps); if ( pHWLTexture ) { bMipMaps = !strncmp(pName, "HDWTR", 5); @@ -6651,7 +6651,7 @@ __debugbreak(); - auto ecx0 = this; + Render* ecx0 = this; v3 = 0; if (!this->pRenderD3D) @@ -7168,7 +7168,7 @@ unsigned __int32 twoColors = (uColor16 << 16) | uColor16; for (uint y = 0; y < uHeight; ++y) { - auto pDst = &pTargetSurface[uX + (y + uY) * uTargetSurfacePitch]; + ushort* pDst = &pTargetSurface[uX + (y + uY) * uTargetSurfacePitch]; memset32(pDst, twoColors, uWidth / 2); if (uWidth & 1) @@ -7313,9 +7313,9 @@ unsigned int v29; // [sp+24h] [bp+14h]@22 unsigned int v30; // [sp+24h] [bp+14h]@31 - auto a2 = x; - auto a3 = y; - auto a6 = uFontHeight; + int a2 = x; + int a3 = y; + uint a6 = uFontHeight; if ( this->uNumSceneBegins ) { v8 = a5; @@ -8430,9 +8430,9 @@ idx2 = uNumItems; while (true) { - auto i = idx1 + (idx2 - idx1) / 2; - - auto res = _stricmp(pName, pSpriteNames[i]); + uint i = idx1 + (idx2 - idx1) / 2; + + int res = _stricmp(pName, pSpriteNames[i]); if (!res) { fseek(pFile, pSpriteOffsets[i], SEEK_SET); @@ -8451,7 +8451,7 @@ uint uCompressedSize = 0; fread(&uCompressedSize, 4, 1, pFile); - auto pTex = new HWLTexture; + HWLTexture* pTex = new HWLTexture; fread(&pTex->uBufferWidth, 4, 1, pFile); fread(&pTex->uBufferHeight, 4, 1, pFile); fread(&pTex->uAreaWidth, 4, 1, pFile); @@ -8464,10 +8464,10 @@ pTex->pPixels = new unsigned __int16[pTex->uWidth * pTex->uHeight]; if (uCompressedSize) { - auto pCompressedData = new char[uCompressedSize]; + char* pCompressedData = new char[uCompressedSize]; { fread(pCompressedData, 1, uCompressedSize, pFile); - auto uDecompressedSize = pTex->uWidth * pTex->uHeight * sizeof(short); + uint uDecompressedSize = pTex->uWidth * pTex->uHeight * sizeof(short); zlib::MemUnzip(pTex->pPixels, &uDecompressedSize, pCompressedData, uCompressedSize); } delete [] pCompressedData; @@ -8640,7 +8640,7 @@ for (uint i = pRenderer->uNumBillboardsToDraw - 1; i != (uint)-1; --i) { - auto p = &pRenderer->pBillboardRenderListD3D[i]; + RenderBillboardD3D* p = &pRenderer->pBillboardRenderListD3D[i]; if (p->uOpacity != RenderBillboardD3D::NoBlend) SetBillboardBlendOptions(p->uOpacity);