diff Render.cpp @ 1410:38df78aba732

deleted stru220.h and stru220 (bezier terrain stuff) stru167 -> TrailParticle stru167warp -> TrailParticleGenerator
author Nomad
date Fri, 26 Jul 2013 22:19:29 +0200
parents c9e3b93ec570
children 3881d2f94eb1 b67a3e0d6fc3
line wrap: on
line diff
--- a/Render.cpp	Fri Jul 26 21:16:51 2013 +0200
+++ b/Render.cpp	Fri Jul 26 22:19:29 2013 +0200
@@ -25,7 +25,6 @@
 #include "Time.h"
 #include "Game.h"
 #include "LightmapBuilder.h"
-#include "stru220.h"
 #include "ObjectList.h"
 #include "SpriteObject.h"
 #include "DecorationList.h"
@@ -517,7 +516,7 @@
       v6 = abs(v83);//v6 = 13108
       --X;
       //__debugbreak(); // uncoment & refactor following large if
-      v93 = (int)&stru_76E5C8[(v5 << 7) + v6];
+      v93 = (int)&terrain_76E5C8[(v5 << 7) + v6];
       /*if ( !v93->field_0 || ((v7 = 48 * v4, v8 = &pVerticesSR_806210[v4], a2 = v8, !v82) ? (v9 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7),
                                                                        v10 = &pVerticesSR_806210[1] + v7) : (v9 = &pVerticesSR_806210[1] + v7, v10 = (RenderVertexSoft *)((char *)&pVerticesSR_801A10 + v7)),
              ((a8 = v9,
@@ -538,8 +537,8 @@
                WorldPosToGridCellZ(sY),
                !byte_4D864C)
            || !(pGame->uFlags & 0x80))
-          && !sub_481EFA(v8, v9, v101, pVertices, 1)) )*/
-      /*if ( !&stru_76E5C8[(v5 << 7) + v6] )
+          && !_481EFA_clip_terrain_poly(v8, v9, v101, pVertices, 1)) )*/
+      /*if ( !&terrain_76E5C8[(v5 << 7) + v6] )
         goto LABEL_162*/
       v8 = &pVerticesSR_806210[v4];
       //pVertices2 = &pVerticesSR_801A10[v4 + 1];
@@ -560,7 +559,7 @@
       v97 = WorldPosToGridCellZ(floorf((pVertices->vWorldPosition.z + v8->vWorldPosition.z) / 2 + 0.5f));
       /*WorldPosToGridCellX(sX);
       WorldPosToGridCellZ(sY);
-      if ((!byte_4D864C || !(pGame->uFlags & 0x80)) && !sub_481EFA(v8, pVertices, v101, pVertices2, 1))
+      if ((!byte_4D864C || !(pGame->uFlags & 0x80)) && !_481EFA_clip_terrain_poly(v8, pVertices, v101, pVertices2, 1))
         if ( v8->vWorldPosition.y != pVertices->vWorldPosition.y || pVertices->vWorldPosition.y != pVertices2->vWorldPosition.y 
              || pVertices2->vWorldPosition.y != v101->vWorldPosition.y )
           break;*/
@@ -590,7 +589,7 @@
           if ( pOutdoorCamera->uNumPolygons >= 1999 )
             return;
           ++pOutdoorCamera->uNumPolygons;
-          //if ( !sub_481FC9(v8, pVertices, v101, v16) )//Ritor1: It's temporary
+          //if ( !_481FC9_terrain(v8, pVertices, v101, v16) )//Ritor1: It's temporary
           //goto LABEL_126;
           //{
             //--pOutdoorCamera->uNumPolygons;
@@ -731,7 +730,7 @@
       if ( pOutdoorCamera->uNumPolygons >= 1999 )
         return;
       ++pOutdoorCamera->uNumPolygons;
-      /*if ( !sub_481FC9(pVertices, pVertices2, v8, v40) ) // Ritor1: It's temporary
+      /*if ( !_481FC9_terrain(pVertices, pVertices2, v8, v40) ) // Ritor1: It's temporary
         //goto LABEL_77;
         {
           --pOutdoorCamera->uNumPolygons;
@@ -860,7 +859,7 @@
       if ( pOutdoorCamera->uNumPolygons >= 1999 )
         return;
       ++pOutdoorCamera->uNumPolygons;
-      if ( !sub_481FC9(v101, v102, pVertices2, v59) )
+      if ( !_481FC9_terrain(v101, v102, pVertices2, v59) )
       {
 //LABEL_126:
         --pOutdoorCamera->uNumPolygons;
@@ -1015,11 +1014,12 @@
     billboard.uFlags = pBillboard->field_1E;
     if (pBillboard->uHwSpriteID != -1)
     {
-      if (pRenderer->pRenderD3D)
+      if (!pRenderer->pRenderD3D) __debugbreak(); // no sw rendering
+      //if (pRenderer->pRenderD3D)
         pRenderer->TransformBillboard(&billboard,
                                       &pSprites_LOD->pHardwareSprites[pBillboard->uHwSpriteID],
                                       pBillboard->dimming_level, pBillboard);
-      else
+      /*else
       {
           assert(false);
 
@@ -1027,7 +1027,7 @@
           if ( *(v1 - 10) & 2 )
             v9 = PaletteManager::Get_Dark_or_Red_LUT(*((short *)v1 - 7), 0, 1);
           else
-            v9 = GetBillboardPalette((RenderBillboard *)(v1 - 40), *((short *)v1 - 7), pBillboard->sZValue, *((short *)v1 + 1));
+            v9 = sr_GetBillboardPalette((RenderBillboard *)(v1 - 40), *((short *)v1 - 7), pBillboard->sZValue, *((short *)v1 + 1));
           v10 = (*(v1 - 9) & 1) == 0;
           billboard.pPalette = v9;
           if ( !v10 )
@@ -1042,7 +1042,7 @@
           v13 = *((short *)v1 - 8);
           if ( v13 >= 0 )
             pSprites_LOD->pSpriteHeaders[v13].DrawSprite_sw(&billboard, 1);
-      }
+      }*/
     }
   }
 }