Redline/source/gamemem.h
maride 02061d74c2 Original 1.0.5 code
(as received from Jonas Echterhoff)
2016-04-02 14:43:55 +02:00

13 lines
461 B
C
Executable File

#ifndef __GAMEMEM
#define __GAMEMEM
#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
#define MemoryMove(dest,source,n) BlockMoveData(source,dest,n)
#endif