mirror of
https://github.com/pret/pokeheartgold.git
synced 2024-11-27 23:20:40 +00:00
Rename unk_0201F4C4 routines
This commit is contained in:
parent
66026bd01a
commit
2bf936a01c
@ -25,8 +25,8 @@
|
||||
.public BG_ClearCharDataRange
|
||||
.public BgClearTilemapBufferAndCommit
|
||||
.public DoScheduledBgGpuUpdates
|
||||
.public sub_0201F590
|
||||
.public sub_0201F63C
|
||||
.public Simple3DVramManager_Init
|
||||
.public Simple3DVramManager_Delete
|
||||
.public GF_CreateVramTransferManager
|
||||
.public GF_DestroyVramTransferManager
|
||||
.public GF_RunVramTransferTasks
|
||||
|
@ -10,7 +10,7 @@
|
||||
.public AllocFromHeap
|
||||
.public AllocFromHeapAtEnd
|
||||
.public FreeToHeap
|
||||
.public sub_0201F53C
|
||||
.public G3dResTexIsLoaded
|
||||
.public sub_020237EC
|
||||
.public sub_02023874
|
||||
.public sub_02023D44
|
||||
|
@ -11,7 +11,7 @@
|
||||
.public AllocFromHeap
|
||||
.public AllocFromHeapAtEnd
|
||||
.public FreeToHeap
|
||||
.public sub_0201F53C
|
||||
.public G3dResTexIsLoaded
|
||||
.public Draw3dModel
|
||||
.public Bind3dModelSet
|
||||
.public SysTask_GetData
|
||||
|
@ -17,10 +17,10 @@
|
||||
.public DestroyHeap
|
||||
.public FreeToHeap
|
||||
.public GF_ExpHeap_FndInitAllocator
|
||||
.public sub_0201F51C
|
||||
.public G3dRenderObjInit_FromHeader
|
||||
.public Draw3dModel
|
||||
.public sub_0201F590
|
||||
.public sub_0201F63C
|
||||
.public Simple3DVramManager_Init
|
||||
.public Simple3DVramManager_Delete
|
||||
.public GfGfx_SetBanks
|
||||
.public GfGfx_DisableEngineAPlanes
|
||||
.public GfGfx_DisableEngineBPlanes
|
||||
|
@ -16,10 +16,10 @@
|
||||
.public DestroyHeap
|
||||
.public FreeToHeap
|
||||
.public GF_ExpHeap_FndInitAllocator
|
||||
.public sub_0201F51C
|
||||
.public G3dRenderObjInit_FromHeader
|
||||
.public Draw3dModel
|
||||
.public sub_0201F590
|
||||
.public sub_0201F63C
|
||||
.public Simple3DVramManager_Init
|
||||
.public Simple3DVramManager_Delete
|
||||
.public GfGfx_SetBanks
|
||||
.public GfGfx_DisableEngineAPlanes
|
||||
.public GfGfx_DisableEngineBPlanes
|
||||
|
@ -59,10 +59,10 @@
|
||||
.public BG_SetMaskColor
|
||||
.public BgClearTilemapBufferAndCommit
|
||||
.public DoScheduledBgGpuUpdates
|
||||
.public sub_0201F51C
|
||||
.public G3dRenderObjInit_FromHeader
|
||||
.public Draw3dModel
|
||||
.public sub_0201F590
|
||||
.public sub_0201F63C
|
||||
.public Simple3DVramManager_Init
|
||||
.public Simple3DVramManager_Delete
|
||||
.public SysTask_GetData
|
||||
.public GfGfx_SetBanks
|
||||
.public GfGfx_EngineATogglePlanes
|
||||
|
@ -113,10 +113,10 @@
|
||||
.public GetWindowWidth
|
||||
.public DoScheduledBgGpuUpdates
|
||||
.public ScheduleBgTilemapBufferTransfer
|
||||
.public sub_0201F51C
|
||||
.public G3dRenderObjInit_FromHeader
|
||||
.public Draw3dModel
|
||||
.public sub_0201F590
|
||||
.public sub_0201F63C
|
||||
.public Simple3DVramManager_Init
|
||||
.public Simple3DVramManager_Delete
|
||||
.public TextPrinterCheckActive
|
||||
.public AddTextPrinterParameterized
|
||||
.public AddTextPrinterParameterizedWithColor
|
||||
|
@ -96,7 +96,7 @@
|
||||
.public DoScheduledBgGpuUpdates
|
||||
.public ScheduleBgTilemapBufferTransfer
|
||||
.public ScheduleSetBgPosText
|
||||
.public sub_0201F51C
|
||||
.public G3dRenderObjInit_FromHeader
|
||||
.public Draw3dModel
|
||||
.public GetLCRNGSeed
|
||||
.public SetLCRNGSeed
|
||||
|
@ -59,10 +59,10 @@
|
||||
.public RemoveWindow
|
||||
.public CopyWindowToVram
|
||||
.public FillWindowPixelRect
|
||||
.public sub_0201F51C
|
||||
.public G3dRenderObjInit_FromHeader
|
||||
.public Draw3dModel
|
||||
.public sub_0201F590
|
||||
.public sub_0201F63C
|
||||
.public Simple3DVramManager_Init
|
||||
.public Simple3DVramManager_Delete
|
||||
.public GF_DegreeToSinCosIdxNoWrap
|
||||
.public ResetAllTextPrinters
|
||||
.public TextPrinterCheckActive
|
||||
|
@ -179,7 +179,7 @@ _021E5A50:
|
||||
add r1, r0, #0
|
||||
bl sub_02023738
|
||||
mov r0, #4
|
||||
bl sub_0201F590
|
||||
bl Simple3DVramManager_Init
|
||||
bl ov01_021E61E0
|
||||
bl ov01_021E6178
|
||||
bl GfGfx_SwapDisplay
|
||||
@ -580,7 +580,7 @@ _021E5E12:
|
||||
bl ov01_021E6214
|
||||
bl sub_02023778
|
||||
bl GF_DestroyVramTransferManager
|
||||
bl sub_0201F63C
|
||||
bl Simple3DVramManager_Delete
|
||||
ldr r0, [r4, #4]
|
||||
ldr r0, [r0, #4]
|
||||
bl ov01_021E6734
|
||||
|
@ -1086,7 +1086,7 @@ ov01_021F1A48: ; 0x021F1A48
|
||||
bl NNS_G3dGetTex
|
||||
cmp r0, #0
|
||||
beq _021F1A78
|
||||
bl sub_0201F53C
|
||||
bl G3dResTexIsLoaded
|
||||
cmp r0, #0
|
||||
bne _021F1A78
|
||||
ldr r0, [r4]
|
||||
|
@ -4299,7 +4299,7 @@ _021F66B6:
|
||||
ldr r0, [r4, #0x14]
|
||||
cmp r0, #0
|
||||
beq _021F66CE
|
||||
bl sub_0201F53C
|
||||
bl G3dResTexIsLoaded
|
||||
cmp r0, #1
|
||||
bne _021F66CE
|
||||
ldr r0, [r4, #0x10]
|
||||
@ -4436,7 +4436,7 @@ ov01_021F67B4: ; 0x021F67B4
|
||||
ldr r0, [sp, #0x10]
|
||||
cmp r0, #0
|
||||
beq _021F67DE
|
||||
bl sub_0201F53C
|
||||
bl G3dResTexIsLoaded
|
||||
cmp r0, #1
|
||||
bne _021F67DE
|
||||
ldr r0, [r4]
|
||||
|
@ -305,7 +305,7 @@ _021E5B36:
|
||||
bl Camera_Delete
|
||||
ldr r0, [sp]
|
||||
bl OverlayManager_FreeData
|
||||
bl sub_0201F63C
|
||||
bl Simple3DVramManager_Delete
|
||||
mov r0, #0x95
|
||||
bl DestroyHeap
|
||||
mov r0, #1
|
||||
@ -335,7 +335,7 @@ ov104_021E5B88: ; 0x021E5B88
|
||||
str r0, [r2]
|
||||
bl ov104_021E5CA8
|
||||
mov r0, #0x95
|
||||
bl sub_0201F590
|
||||
bl Simple3DVramManager_Init
|
||||
ldr r2, _021E5BE0 ; =0x04000060
|
||||
ldr r0, _021E5BE4 ; =0xFFFFCFFF
|
||||
ldrh r1, [r2]
|
||||
@ -585,7 +585,7 @@ _021E5D76:
|
||||
add r0, r5, #0
|
||||
add r1, #0x54
|
||||
add r2, #0x58
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r0, [sp]
|
||||
add r0, r0, r4
|
||||
ldr r0, [r0, #0x5c]
|
||||
|
@ -292,7 +292,7 @@ _021E5B28:
|
||||
bl Camera_Delete
|
||||
ldr r0, [sp]
|
||||
bl OverlayManager_FreeData
|
||||
bl sub_0201F63C
|
||||
bl Simple3DVramManager_Delete
|
||||
mov r0, #0x97
|
||||
bl DestroyHeap
|
||||
mov r0, #1
|
||||
@ -321,7 +321,7 @@ ov105_021E5B68: ; 0x021E5B68
|
||||
str r0, [r2]
|
||||
bl ov105_021E5C84
|
||||
mov r0, #0x97
|
||||
bl sub_0201F590
|
||||
bl Simple3DVramManager_Init
|
||||
ldr r2, _021E5BC0 ; =0x04000060
|
||||
ldr r0, _021E5BC4 ; =0xFFFFCFFF
|
||||
ldrh r1, [r2]
|
||||
@ -513,7 +513,7 @@ _021E5D04:
|
||||
add r0, r5, #0
|
||||
add r1, #0x54
|
||||
add r2, #0x58
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r0, [r7, #0x5c]
|
||||
bl NNS_G3dGetTex
|
||||
str r0, [sp, #8]
|
||||
|
@ -274,7 +274,7 @@ _021E5AC8:
|
||||
add r0, r4, #0
|
||||
add r1, #0x54
|
||||
add r2, #0x58
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r0, [r4, #0x58]
|
||||
bl NNS_G3dGetTex
|
||||
str r0, [sp, #0x1c]
|
||||
@ -618,7 +618,7 @@ ov106_021E5D70: ; 0x021E5D70
|
||||
bl Camera_New
|
||||
str r0, [r4, #0x18]
|
||||
mov r0, #0x99
|
||||
bl sub_0201F590
|
||||
bl Simple3DVramManager_Init
|
||||
ldr r2, _021E5DF0 ; =0x04000060
|
||||
ldr r0, _021E5DF4 ; =0xFFFFCFFF
|
||||
ldrh r1, [r2]
|
||||
@ -675,7 +675,7 @@ _021E5DF8: .word 0x00007FFF
|
||||
ov106_021E5DFC: ; 0x021E5DFC
|
||||
push {r4, lr}
|
||||
add r4, r0, #0
|
||||
bl sub_0201F63C
|
||||
bl Simple3DVramManager_Delete
|
||||
ldr r0, [r4, #0x18]
|
||||
bl Camera_Delete
|
||||
pop {r4, pc}
|
||||
|
@ -8759,7 +8759,7 @@ ov15_021FD93C: ; 0x021FD93C
|
||||
sub sp, #0xc
|
||||
add r5, r0, #0
|
||||
mov r0, #6
|
||||
bl sub_0201F590
|
||||
bl Simple3DVramManager_Init
|
||||
ldr r2, _021FDA94 ; =0x04000060
|
||||
ldr r0, _021FDA98 ; =0xFFFFCFFF
|
||||
ldrh r1, [r2]
|
||||
@ -9155,7 +9155,7 @@ ov15_021FDC6C: ; 0x021FDC6C
|
||||
ldr r0, _021FDC84 ; =0x00000818
|
||||
ldr r0, [r4, r0]
|
||||
bl Camera_Delete
|
||||
bl sub_0201F63C
|
||||
bl Simple3DVramManager_Delete
|
||||
pop {r4, pc}
|
||||
nop
|
||||
_021FDC84: .word 0x00000818
|
||||
@ -9317,7 +9317,7 @@ _021FDDB6:
|
||||
add r0, r4, #0
|
||||
add r1, #0x54
|
||||
add r2, #0x58
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r0, [r4, #0x58]
|
||||
bl NNS_G3dGetTex
|
||||
str r0, [sp, #0xc]
|
||||
|
@ -5836,7 +5836,7 @@ _021E99DE:
|
||||
add r0, r0, r7
|
||||
add r1, sp, #0x28
|
||||
add r2, r2, r7
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r0, [sp, #0xc]
|
||||
add r0, r0, r7
|
||||
add r0, #0xd8
|
||||
|
@ -76,7 +76,7 @@ _021E5960:
|
||||
ldr r0, [r5]
|
||||
lsl r0, r0, #0x18
|
||||
lsr r0, r0, #0x18
|
||||
bl sub_0201F590
|
||||
bl Simple3DVramManager_Init
|
||||
ldr r0, [r5]
|
||||
bl BgConfig_Alloc
|
||||
ldr r1, _021E5A24 ; =0x0000C010
|
||||
@ -904,7 +904,7 @@ ov69_021E6080: ; 0x021E6080
|
||||
ldr r0, _021E60EC ; =0x0000C080
|
||||
ldr r0, [r4, r0]
|
||||
bl MessageFormat_Delete
|
||||
bl sub_0201F63C
|
||||
bl Simple3DVramManager_Delete
|
||||
ldr r0, _021E60F0 ; =0x0000C010
|
||||
ldr r0, [r4, r0]
|
||||
bl FreeToHeap
|
||||
@ -2612,7 +2612,7 @@ ov69_021E6E88: ; 0x021E6E88
|
||||
add r0, r5, r0
|
||||
add r1, r5, r1
|
||||
add r2, r5, r2
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r2, [r5]
|
||||
add r0, r4, #0
|
||||
mov r1, #1
|
||||
@ -2626,7 +2626,7 @@ ov69_021E6E88: ; 0x021E6E88
|
||||
add r0, r5, r0
|
||||
add r1, r5, r1
|
||||
add r2, r5, r2
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r2, [r5]
|
||||
add r0, r4, #0
|
||||
mov r1, #2
|
||||
@ -2640,7 +2640,7 @@ ov69_021E6E88: ; 0x021E6E88
|
||||
add r0, r5, r0
|
||||
add r1, r5, r1
|
||||
add r2, r5, r2
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r2, [r5]
|
||||
add r0, r4, #0
|
||||
mov r1, #3
|
||||
@ -2653,7 +2653,7 @@ ov69_021E6E88: ; 0x021E6E88
|
||||
add r0, r5, r0
|
||||
add r1, r5, r1
|
||||
add r2, r5, r2
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
ldr r2, [r5]
|
||||
add r0, r4, #0
|
||||
mov r1, #4
|
||||
@ -2666,7 +2666,7 @@ ov69_021E6E88: ; 0x021E6E88
|
||||
add r0, r5, r0
|
||||
add r1, r5, r1
|
||||
add r2, r5, r2
|
||||
bl sub_0201F51C
|
||||
bl G3dRenderObjInit_FromHeader
|
||||
pop {r3, r4, r5, pc}
|
||||
nop
|
||||
_021E6F2C: .word 0x0000C0DC
|
||||
|
@ -4,11 +4,11 @@
|
||||
#include "global.h"
|
||||
#include "heap.h"
|
||||
|
||||
BOOL sub_0201F53C(NNSG3dResTex *tex);
|
||||
void sub_0201F51C(NNSG3dRenderObj *obj, NNSG3dResMdl **p_mdl, NNSG3dResFileHeader **p_header);
|
||||
BOOL G3dResTexIsLoaded(NNSG3dResTex *tex);
|
||||
void G3dRenderObjInit_FromHeader(NNSG3dRenderObj *obj, NNSG3dResMdl **p_mdl, NNSG3dResFileHeader **p_header);
|
||||
void Draw3dModel(NNSG3dRenderObj *obj, const VecFx32 *translation, const MtxFx33 *rotation, const VecFx32 *scale);
|
||||
void sub_0201F590(HeapID heapID);
|
||||
void sub_0201F63C(void);
|
||||
void Simple3DVramManager_Init(HeapID heapID);
|
||||
void Simple3DVramManager_Delete(void);
|
||||
BOOL Bind3dModelSet(NNSG3dResFileHeader *obj, const NNSG3dResTex *tex);
|
||||
BOOL AllocAndLoad3dTexResources(NNSG3dResTex *tex);
|
||||
|
||||
|
@ -300,7 +300,7 @@ static void TitleScreen_Load3DObjects(TitleScreenAnimObject *animObj, int texFil
|
||||
GF_ExpHeap_FndInitAllocator(&animObj->allocator, heapID, 4);
|
||||
void *pAnim;
|
||||
animObj->resFileHeader = AllocAndReadWholeNarcMemberByIdPair(NARC_demo_title_titledemo, texFileId, heapID);
|
||||
sub_0201F51C(&animObj->renderObj, &animObj->resModel, &animObj->resFileHeader);
|
||||
G3dRenderObjInit_FromHeader(&animObj->renderObj, &animObj->resModel, &animObj->resFileHeader);
|
||||
NNSG3dResTex *tex = NNS_G3dGetTex(animObj->resFileHeader);
|
||||
|
||||
if (nsbcaId > 0) {
|
||||
|
@ -3,14 +3,14 @@
|
||||
#include "gf_3d_vramman.h"
|
||||
#include "gf_gfx_planes.h"
|
||||
|
||||
static GF3DVramMan *_021D15A0;
|
||||
static GF3DVramMan *sSimple3DVramManager;
|
||||
|
||||
static void sub_0201F4C4(NNSG3dResMdl **ppMdl, NNSG3dResFileHeader **ppHeader);
|
||||
static void sub_0201F5B8(void);
|
||||
static void getFirstMdlFromSet(NNSG3dResMdl **ppMdl, NNSG3dResFileHeader **ppHeader);
|
||||
static void initializeSimple3DVramManager(void);
|
||||
|
||||
static void sub_0201F4C4(NNSG3dResMdl **ppMdl, NNSG3dResFileHeader **ppHeader) {
|
||||
static void getFirstMdlFromSet(NNSG3dResMdl **ppMdl, NNSG3dResFileHeader **ppHeader) {
|
||||
NNSG3dResTex *tex = NNS_G3dGetTex(*ppHeader);
|
||||
if (tex != NULL && !sub_0201F53C(tex)) {
|
||||
if (tex != NULL && !G3dResTexIsLoaded(tex)) {
|
||||
DC_FlushRange(*ppHeader, (*ppHeader)->fileSize);
|
||||
NNS_G3dResDefaultSetup(*ppHeader);
|
||||
}
|
||||
@ -19,13 +19,13 @@ static void sub_0201F4C4(NNSG3dResMdl **ppMdl, NNSG3dResFileHeader **ppHeader) {
|
||||
*ppMdl = NNS_G3dGetMdlByIdx(mdlSet, 0);
|
||||
}
|
||||
|
||||
void sub_0201F51C(NNSG3dRenderObj *obj, NNSG3dResMdl **p_mdl, NNSG3dResFileHeader **p_header) {
|
||||
sub_0201F4C4(p_mdl, p_header);
|
||||
void G3dRenderObjInit_FromHeader(NNSG3dRenderObj *obj, NNSG3dResMdl **p_mdl, NNSG3dResFileHeader **p_header) {
|
||||
getFirstMdlFromSet(p_mdl, p_header);
|
||||
GF_ASSERT(p_mdl != NULL);
|
||||
NNS_G3dRenderObjInit(obj, *p_mdl);
|
||||
}
|
||||
|
||||
BOOL sub_0201F53C(NNSG3dResTex *tex) {
|
||||
BOOL G3dResTexIsLoaded(NNSG3dResTex *tex) {
|
||||
return (tex->texInfo.flag & NNS_G3D_RESTEX_LOADED) || (tex->tex4x4Info.flag & NNS_G3D_RESTEX_LOADED);
|
||||
}
|
||||
|
||||
@ -37,11 +37,11 @@ void Draw3dModel(NNSG3dRenderObj *obj, const VecFx32 *translation, const MtxFx33
|
||||
NNS_G3dDraw(obj);
|
||||
}
|
||||
|
||||
void sub_0201F590(HeapID heapID) {
|
||||
_021D15A0 = GF_3DVramMan_Create(heapID, 0, 2, 0, 4, sub_0201F5B8);
|
||||
void Simple3DVramManager_Init(HeapID heapID) {
|
||||
sSimple3DVramManager = GF_3DVramMan_Create(heapID, 0, 2, 0, 4, initializeSimple3DVramManager);
|
||||
}
|
||||
|
||||
static void sub_0201F5B8(void) {
|
||||
static void initializeSimple3DVramManager(void) {
|
||||
GfGfx_EngineATogglePlanes(GX_PLANEMASK_BG0, GF_PLANE_TOGGLE_ON);
|
||||
G2_SetBG0Priority(1);
|
||||
G3X_SetShading(GX_SHADING_TOON);
|
||||
@ -54,8 +54,8 @@ static void sub_0201F5B8(void) {
|
||||
G3_ViewPort(0, 0, 255, 191);
|
||||
}
|
||||
|
||||
void sub_0201F63C(void) {
|
||||
GF_3DVramMan_Delete(_021D15A0);
|
||||
void Simple3DVramManager_Delete(void) {
|
||||
GF_3DVramMan_Delete(sSimple3DVramManager);
|
||||
}
|
||||
|
||||
BOOL Bind3dModelSet(NNSG3dResFileHeader *hdr, const NNSG3dResTex *tex) {
|
||||
|
@ -157,7 +157,7 @@ void sub_020556C8(FieldSystem *fieldSystem, UnkStruct_020556FC *unkPtrB) {
|
||||
void* unkB = fieldSystem->unk_44;
|
||||
unkPtrB->unk5c = AllocFromHeap(unkPtrB->heapID, ov01_021F149C(unkB, 31));
|
||||
ov01_021F14A8(unkB, 31, unkPtrB->unk5c);
|
||||
sub_0201F51C(&unkPtrB->unk4, &unkPtrB->unk58, &unkPtrB->unk5c);
|
||||
G3dRenderObjInit_FromHeader(&unkPtrB->unk4, &unkPtrB->unk58, &unkPtrB->unk5c);
|
||||
}
|
||||
|
||||
void sub_020556FC(struct UnkStruct_020556FC *unkPtr) {
|
||||
|
Loading…
Reference in New Issue
Block a user