2016-04-02 12:43:55 +00:00
|
|
|
#ifndef __GAMEMEM
|
|
|
|
#define __GAMEMEM
|
|
|
|
|
2016-04-02 13:55:02 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2016-04-02 12:43:55 +00:00
|
|
|
#define MemoryAllocateBlock(size) ((void*)NewPtr(size))
|
|
|
|
#define MemoryResizeBlock(ptr,size) (SetPtrSize((Ptr)(ptr),size))
|
|
|
|
#define MemoryFreeBlock(ptr) DisposePtr((Ptr)(ptr))
|
|
|
|
|
|
|
|
#define MemoryAllocateZeroedBlock(size) ((void*)NewPtrClear(size)) //allocated block of zeros
|
|
|
|
#define MemoryBlockSize(ptr) GetPtrSize((Ptr)(ptr)) //size of an allocated block
|
|
|
|
|
2016-04-02 13:55:02 +00:00
|
|
|
// #define MemoryMove(dest,source,n) BlockMoveData(source,dest,n)
|
|
|
|
#define MemoryMove(dest,source,n) memmove(dest,source,n)
|
2016-04-02 12:43:55 +00:00
|
|
|
|
|
|
|
#endif
|