Mercurial > mm7
changeset 1093:c59ac5ea63f5
* stru154::GetFacePlane mistake fixed
* messing with memory leaks
author | zipi |
---|---|
date | Sun, 26 May 2013 13:59:49 +0100 |
parents | 38890b8385e4 |
children | 7c3772c91c7c |
files | Allocator.cpp Game.cpp Render.cpp Texture.cpp mm7_4.cpp |
diffstat | 5 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Allocator.cpp Sun May 26 14:13:43 2013 +0400 +++ b/Allocator.cpp Sun May 26 13:59:49 2013 +0100 @@ -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 14:13:43 2013 +0400 +++ b/Game.cpp Sun May 26 13:59:49 2013 +0100 @@ -769,6 +769,7 @@ if (pMouse) pMouse->Deactivate(); + delete pRenderer; pAudioPlayer->Release();//error pNew_LOD->FreeSubIndexAndIO(); pGames_LOD->FreeSubIndexAndIO();
--- a/Render.cpp Sun May 26 14:13:43 2013 +0400 +++ b/Render.cpp Sun May 26 13:59:49 2013 +0100 @@ -11019,7 +11019,7 @@ while ( v2 < (signed int)v1->uNumItems ); } } - return 1; + return true; } //----- (00452347) --------------------------------------------------------
--- a/Texture.cpp Sun May 26 14:13:43 2013 +0400 +++ b/Texture.cpp Sun May 26 13:59:49 2013 +0100 @@ -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 14:13:43 2013 +0400 +++ b/mm7_4.cpp Sun May 26 13:59:49 2013 +0100 @@ -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;