mirror of
https://github.com/SeekyCt/spm-decomp.git
synced 2024-11-23 21:39:52 +00:00
smartTexObj
This commit is contained in:
parent
714e2231f0
commit
ba1e32e0aa
6
include/gx.h
Normal file
6
include/gx.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef GX_H
|
||||
#define GX_H
|
||||
|
||||
void GXInitTextObjData(void * texObj, void * image); // 802918f8
|
||||
|
||||
#endif
|
@ -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
|
||||
|
17
src/memory.c
17
src/memory.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user