diff options
author | aap <aap@papnet.eu> | 2020-11-28 18:52:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-28 18:52:44 +0100 |
commit | c57fee38caed4cc770aa8e57b74672ca85aa0fa3 (patch) | |
tree | d9b0a02ad6c0d81fc78b9c8f0bbb018189d92d39 /src/rw/RwHelper.cpp | |
parent | Make texture conversion work a bit faster (diff) | |
parent | moved some stuff to MemoryMgr (diff) | |
download | re3-c57fee38caed4cc770aa8e57b74672ca85aa0fa3.tar re3-c57fee38caed4cc770aa8e57b74672ca85aa0fa3.tar.gz re3-c57fee38caed4cc770aa8e57b74672ca85aa0fa3.tar.bz2 re3-c57fee38caed4cc770aa8e57b74672ca85aa0fa3.tar.lz re3-c57fee38caed4cc770aa8e57b74672ca85aa0fa3.tar.xz re3-c57fee38caed4cc770aa8e57b74672ca85aa0fa3.tar.zst re3-c57fee38caed4cc770aa8e57b74672ca85aa0fa3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/rw/RwHelper.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp index 0069934f..ee370c37 100644 --- a/src/rw/RwHelper.cpp +++ b/src/rw/RwHelper.cpp @@ -64,45 +64,6 @@ void FlushObrsPrintfs() #endif } -void * -RwMallocAlign(RwUInt32 size, RwUInt32 align) -{ -#ifdef FIX_BUGS - uintptr ptralign = align-1; - void *mem = (void *)malloc(size + sizeof(uintptr) + ptralign); - - ASSERT(mem != nil); - - void *addr = (void *)((((uintptr)mem) + sizeof(uintptr) + ptralign) & ~ptralign); - - ASSERT(addr != nil); -#else - void *mem = (void *)malloc(size + align); - - ASSERT(mem != nil); - - void *addr = (void *)((((uintptr)mem) + align) & ~(align - 1)); - - ASSERT(addr != nil); -#endif - - *(((void **)addr) - 1) = mem; - - return addr; -} - -void -RwFreeAlign(void *mem) -{ - ASSERT(mem != nil); - - void *addr = *(((void **)mem) - 1); - - ASSERT(addr != nil); - - free(addr); -} - void DefinedState(void) { |