diff Indoor.cpp @ 1545:c4ab816fcc5e

assert, Abortf, AbortWithError -> Assert, Error refactors here and there
author Nomad
date Sat, 07 Sep 2013 20:05:20 +0200
parents 499761153844
children 9a6567c6c76c
line wrap: on
line diff
--- a/Indoor.cpp	Sat Sep 07 15:20:57 2013 +0200
+++ b/Indoor.cpp	Sat Sep 07 20:05:20 2013 +0200
@@ -2,8 +2,6 @@
 #define _CRT_SECURE_NO_WARNINGS
 #endif
 
-#include <assert.h>
-
 #include "LightmapBuilder.h"
 #include "DecalBuilder.h"
 #include "stru9.h"
@@ -1749,7 +1747,7 @@
   }
 
   if ( !pGames_LOD->DoesContainerExist(pFilename) )
-    Abortf("Unable to find %s in Games.LOD", pFilename);
+    Error("Unable to find %s in Games.LOD", pFilename);
 
   //v238 = pFilename - 4;
   //v81 = strlen(pFilename);
@@ -2971,7 +2969,7 @@
             v25 = abs(v15->pFacePlane_old.vNormal.z);
             //v26 = v87;
             if ( v24 > v25 )
-              Abortf("Door Error\ndoor id: %i\nfacet no: %i\n\nOverflow dividing facet->d [%i] by facet->nz [%i]",
+              Error("Door Error\ndoor id: %i\nfacet no: %i\n\nOverflow dividing facet->d [%i] by facet->nz [%i]",
                 door->uDoorID,
                 door->pFaceIDs[v88],
                 v15->pFacePlane_old.dist,
@@ -3670,7 +3668,7 @@
   __int16 v29; // ax@85
   signed int v30; // edi@94
   int v31; // esi@94
-  char Args; // [sp+350h] [bp-C4h]@16
+  //char Args; // [sp+350h] [bp-C4h]@16
   int v34[4]; // [sp+3E8h] [bp-2Ch]@96
   int v35; // [sp+3F8h] [bp-1Ch]@1
   //char b[4]; // [sp+3FCh] [bp-18h]@58
@@ -3727,21 +3725,17 @@
          (char *)&pDest)
      - 1;
   if ( !v4 )
-  {
-    sprintf(&Args, "Unable to open %s", pCurrentMapName);
-    Abortf(&Args);
-  }
+    Error("Unable to open %s", pCurrentMapName);
+
   v5 = v4 - 1;
   if ( !v5 )
-  {
-    sprintf(&Args, "File %s is not a BLV File", pCurrentMapName);
-    Abortf(&Args);
-  }
+    Error("File %s is not a BLV File", pCurrentMapName);
+
   v6 = v5 - 1;
   if ( !v6 )
-    Abortf("Attempt to open new level before clearing old");
+    Error("Attempt to open new level before clearing old");
   if ( v6 == 1 )
-    Abortf("Out of memory loading indoor level");
+    Error("Out of memory loading indoor level");
   if ( !(dword_6BE364_game_settings_1 & 0x2000) )
   {
     InitializeActors();
@@ -3836,21 +3830,6 @@
     if (!pFace->uBitmapID != -1)
       pBitmaps_LOD->pTextures[pFace->uBitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[pFace->uBitmapID].palette_id1);
  }
-
-  /*i = 0;
-  if ( (signed int)pIndoor->uNumFaces > 0 )
-  {
-    v12 = 0;
-    do
-    {
-      if ( pIndoor->pFaces[v12].uBitmapID != -1 )
-        pBitmaps_LOD->pTextures[pIndoor->pFaces[v12].uBitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[pIndoor->pFaces[v12].uBitmapID].palette_id1);
-      ++i;
-      ++v12;
-    }
-    while ( i < (signed int)pIndoor->uNumFaces );
-  }*/
-
   
   pGameLoadingUI_ProgressBar->Progress();