# HG changeset patch # User Gloval # Date 1369580205 -14400 # Node ID 7c3772c91c7c920f53da8a62aa9a3ecc9f98a895 # Parent c40d40027b777f168cb09e98fdf0686573f3f176# Parent c59ac5ea63f5c16de87d1601d75272b08df0e252 Merge diff -r c40d40027b77 -r 7c3772c91c7c Allocator.cpp --- 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 diff -r c40d40027b77 -r 7c3772c91c7c Game.cpp --- 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(); diff -r c40d40027b77 -r 7c3772c91c7c Render.cpp --- 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) -------------------------------------------------------- diff -r c40d40027b77 -r 7c3772c91c7c Texture.cpp --- 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; diff -r c40d40027b77 -r 7c3772c91c7c mm7_4.cpp --- 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;