smartTexObj

This commit is contained in:
Seeky 2020-12-26 18:42:16 +00:00
parent 714e2231f0
commit ba1e32e0aa
3 changed files with 23 additions and 2 deletions

6
include/gx.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef GX_H
#define GX_H
void GXInitTextObjData(void * texObj, void * image); // 802918f8
#endif

View File

@ -63,7 +63,7 @@ void smartAutoFree(s32 type); // 801a64f4
void smartFree(SmartAllocation * lp); // 801a6598
SmartAllocation * smartAlloc(size_t size, u8 type); // 801a6794
void smartGarbage(); // 801a6b60
// smartTexObj 801a6cf0
void * smartTexObj(void * texObj, SmartAllocation * imageAllocation); // 801a6cf0
// New to SPM so no symbols:
// 801a6d4c

View File

@ -1,5 +1,6 @@
#include <common.h>
#include <filemgr.h>
#include <gx.h>
#include <mem.h>
#include <memory.h>
#include <os.h>
@ -408,7 +409,21 @@ SmartAllocation * smartAlloc(size_t size, u8 type) {
}
}
// a lot
// smartGarbage
void * smartTexObj(void * texObj, SmartAllocation * imageAllocation) {
if (imageAllocation) {
GXInitTextObjData(texObj, imageAllocation->data);
}
else {
assert(0, "スマートメモリの情報がないよ\n");
}
return texObj;
}
// 801a6d4c
// 801a6e34
// 801a6e8c
#undef IS_FIRST_SMART_ALLOC
#undef IS_LAST_SMART_ALLOC