Translate from HIToolbox to "real-world" C.

TODO: remove #defines, replace with the real functions.
This commit is contained in:
maride 2016-04-02 15:55:02 +02:00
parent 49acbb7aa8
commit 4a8a562af5

View File

@ -1,6 +1,8 @@
#ifndef __GAMEMEM
#define __GAMEMEM
#include <stdio.h>
#define MemoryAllocateBlock(size) ((void*)NewPtr(size))
#define MemoryResizeBlock(ptr,size) (SetPtrSize((Ptr)(ptr),size))
#define MemoryFreeBlock(ptr) DisposePtr((Ptr)(ptr))
@ -8,6 +10,7 @@
#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)
// #define MemoryMove(dest,source,n) BlockMoveData(source,dest,n)
#define MemoryMove(dest,source,n) memmove(dest,source,n)
#endif