diff options
Diffstat (limited to 'engines/cruise/function.cpp')
-rw-r--r-- | engines/cruise/function.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 53549bff9e..8e112ef804 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -276,8 +276,8 @@ void freeObjectList(cellStruct *pListHead) { cellStruct *pNext = pCurrent->next; if (pCurrent->freeze == 0) { - free(pCurrent->gfxPtr); - free(pCurrent); + MemFree(pCurrent->gfxPtr); + MemFree(pCurrent); } var_2 = 1; @@ -938,7 +938,7 @@ int16 Op_RemoveBackground(void) { if (backgroundIdx > 0 && backgroundIdx < 8) { if (backgroundScreens[backgroundIdx]) - free(backgroundScreens[backgroundIdx]); + MemFree(backgroundScreens[backgroundIdx]); if (masterScreen == backgroundIdx) { masterScreen = 0; @@ -1106,7 +1106,7 @@ actorStruct *addAnimation(actorStruct * pHead, int overlay, int objIdx, int para return NULL; } - actorStruct *pNewElement = (actorStruct *) malloc(sizeof(actorStruct)); + actorStruct *pNewElement = (actorStruct *) MemAlloc(sizeof(actorStruct)); if (!pNewElement) return NULL; @@ -1180,7 +1180,7 @@ int removeAnimation(actorStruct * pHead, int overlay, int objIdx, int objType) { if (pl->pathId >= 0) freePerso(pl->pathId); - free(pl); + MemFree(pl); pl = pl4; } else { pl2 = pl; |