changeset 1095:7c3772c91c7c

Merge
author Gloval
date Sun, 26 May 2013 18:56:45 +0400
parents c40d40027b77 (current diff) c59ac5ea63f5 (diff)
children f17cfb070f7a
files Game.cpp
diffstat 5 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Allocator.cpp	Sun May 26 18:55:31 2013 +0400
+++ b/Allocator.cpp	Sun May 26 18:56:45 2013 +0400
@@ -22,6 +22,10 @@
 void *Allocator::AllocNamedChunk(const void *pPrevPtrValue, unsigned int uSize, const char *pName)
 {
 
+  if ( pPrevPtrValue && !aborting_app )
+	  AbortWithError();
+  if (!uSize)
+	  return 0;
   return malloc(uSize);
 /*
   //Allocator *v4; // esi@1
--- a/Game.cpp	Sun May 26 18:55:31 2013 +0400
+++ b/Game.cpp	Sun May 26 18:56:45 2013 +0400
@@ -760,6 +760,7 @@
   if (pMouse)
     pMouse->Deactivate();
 
+  delete pRenderer;
   pAudioPlayer->Release();//error
   pNew_LOD->FreeSubIndexAndIO();
   pGames_LOD->FreeSubIndexAndIO();
--- a/Render.cpp	Sun May 26 18:55:31 2013 +0400
+++ b/Render.cpp	Sun May 26 18:56:45 2013 +0400
@@ -11019,7 +11019,7 @@
       while ( v2 < (signed int)v1->uNumItems );
     }
   }
-  return 1;
+  return true;
 }
 
 //----- (00452347) --------------------------------------------------------
--- a/Texture.cpp	Sun May 26 18:55:31 2013 +0400
+++ b/Texture.cpp	Sun May 26 18:56:45 2013 +0400
@@ -363,6 +363,7 @@
 void *Texture::UnzipPalette()
 {
   Texture *v1; // esi@1
+
   void *v2; // edi@1
   Texture *pSource; // [sp+0h] [bp-4h]@1
 
@@ -382,10 +383,13 @@
 
     if (pBits & 0x0400)
     {
-      pAllocator->FreeChunk(pLevelOfDetail0_prolly_alpha_mask);
+		__debugbreak();
+	}
+	
+	  pAllocator->FreeChunk(pLevelOfDetail0_prolly_alpha_mask);
       pAllocator->FreeChunk(pPalette16);
       pAllocator->FreeChunk(pPalette24);
-    }
+    
 
     pLevelOfDetail0_prolly_alpha_mask = nullptr;
     pLevelOfDetail1 = nullptr;
--- a/mm7_4.cpp	Sun May 26 18:55:31 2013 +0400
+++ b/mm7_4.cpp	Sun May 26 18:56:45 2013 +0400
@@ -3826,7 +3826,7 @@
       v9 = &pVertices->pVertices[pFace->pVertexIDs[i]];
       v12 = &pVertices->pVertices[pFace->pVertexIDs[i + 1]];
       v17 = &pVertices->pVertices[pFace->pVertexIDs[i + 2]];
-
+	  i++;
       v1.x = v12->x - v9->x;
       v26 = v17->x - v12->x;
       v1.y = v12->y - v9->y;