Mercurial > mm7
diff Chest.cpp @ 1583:75fafd8ced59
Allocator (CMemory) bye-bye
author | Nomad |
---|---|
date | Tue, 10 Sep 2013 21:07:07 +0200 |
parents | c4ab816fcc5e |
children | 4da5644df18f |
line wrap: on
line diff
--- a/Chest.cpp Tue Sep 10 18:43:52 2013 +0200 +++ b/Chest.cpp Tue Sep 10 21:07:07 2013 +0200 @@ -8,7 +8,6 @@ #include "Items.h" #include "Chest.h" #include "FrameTableInc.h" -#include "Allocator.h" #include "LOD.h" #include "MapInfo.h" #include "Actor.h" @@ -635,7 +634,7 @@ assert(uNumChests); assert(!num_mm8_chests); - pChests = (ChestDesc *)pAllocator->AllocNamedChunk(pChests, uNumChests * sizeof(ChestDesc), "Chest Descrip"); + pChests = (ChestDesc *)malloc(uNumChests * sizeof(ChestDesc)); memcpy(pChests, (char *)data_mm7 + 4, num_mm7_chests * sizeof(ChestDesc)); memcpy(pChests + num_mm7_chests, (char *)data_mm6 + 4, num_mm6_chests * sizeof(ChestDesc)); memcpy(pChests + num_mm6_chests + num_mm7_chests, (char *)data_mm8 + 4, num_mm8_chests * sizeof(ChestDesc)); @@ -664,7 +663,7 @@ unsigned int Argsa; // [sp+300h] [bp+8h]@3 v2 = this; - pAllocator->FreeChunk(this->pChests); + free(this->pChests); v3 = 0; v2->pChests = 0; v2->uNumChests = 0; @@ -690,7 +689,7 @@ } v6 = v2->pChests; v2->uNumChests = v5; - v7 = pAllocator->AllocNamedChunk(v6, 36 * v5, "Chest Descrip"); + v7 = malloc(36 * v5); v2->pChests = (ChestDesc *)v7; if ( v7 == (void *)v3 ) Error("ChestDescriptionList::load - Out of Memory!");