mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
ov11_022EBFC8
This commit is contained in:
parent
d7a944dff9
commit
d694532887
|
|
@ -325,7 +325,7 @@
|
|||
.public ov11_022EBAA0
|
||||
.public ov11_022EBC18
|
||||
.public ov11_022EBEAC
|
||||
.public ov11_022EBF60
|
||||
.public ov11_022EBFC8
|
||||
.public ov11_02316AFC
|
||||
.public ov11_02316B04
|
||||
.public ov11_02316B14
|
||||
|
|
@ -2496,9 +2496,7 @@
|
|||
.public sub_02062D9C
|
||||
.public sub_02062DB4
|
||||
.public sub_0206351C
|
||||
.public sub_020635D8
|
||||
.public sub_02063628
|
||||
.public sub_0206367C
|
||||
.public sub_02063734
|
||||
.public sub_02063830
|
||||
.public sub_02064FFC
|
||||
|
|
@ -1,67 +1,8 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "overlay_11_022EBFC8.inc"
|
||||
.include "overlay_11_022EC08C.inc"
|
||||
|
||||
.text
|
||||
|
||||
arm_func_start ov11_022EBFC8
|
||||
ov11_022EBFC8: ; 0x022EBFC8
|
||||
stmdb sp!, {r4, r5, r6, r7, r8, lr}
|
||||
mov r8, r0
|
||||
ldrsh r1, [r8]
|
||||
cmp r1, #3
|
||||
bne _022EBFE4
|
||||
bl ov11_022EBF60
|
||||
ldmia sp!, {r4, r5, r6, r7, r8, pc}
|
||||
_022EBFE4:
|
||||
mov r6, #0
|
||||
add r5, r8, #0xc4
|
||||
mov r4, #0x2c
|
||||
_022EBFF0:
|
||||
mla r7, r6, r4, r5
|
||||
add r0, r7, #8
|
||||
bl PointsToZero
|
||||
cmp r0, #0
|
||||
bne _022EC00C
|
||||
add r0, r7, #8
|
||||
bl UnloadFile
|
||||
_022EC00C:
|
||||
add r6, r6, #1
|
||||
cmp r6, #4
|
||||
blt _022EBFF0
|
||||
add r0, r8, #0x1a0
|
||||
bl sub_0206367C
|
||||
add r0, r8, #0x194
|
||||
bl sub_020635D8
|
||||
add r0, r8, #0x174
|
||||
bl PointsToZero
|
||||
cmp r0, #0
|
||||
bne _022EC040
|
||||
add r0, r8, #0x174
|
||||
bl UnloadFile
|
||||
_022EC040:
|
||||
add r0, r8, #0x17c
|
||||
bl PointsToZero
|
||||
cmp r0, #0
|
||||
bne _022EC058
|
||||
add r0, r8, #0x17c
|
||||
bl UnloadFile
|
||||
_022EC058:
|
||||
add r0, r8, #0x184
|
||||
bl PointsToZero
|
||||
cmp r0, #0
|
||||
bne _022EC070
|
||||
add r0, r8, #0x184
|
||||
bl UnloadFile
|
||||
_022EC070:
|
||||
add r0, r8, #0x18c
|
||||
bl PointsToZero
|
||||
cmp r0, #0
|
||||
ldmneia sp!, {r4, r5, r6, r7, r8, pc}
|
||||
add r0, r8, #0x18c
|
||||
bl UnloadFile
|
||||
ldmia sp!, {r4, r5, r6, r7, r8, pc}
|
||||
arm_func_end ov11_022EBFC8
|
||||
|
||||
arm_func_start ov11_022EC08C
|
||||
ov11_022EC08C: ; 0x022EC08C
|
||||
stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}
|
||||
|
|
@ -128,7 +128,7 @@ struct UnkGroundBg_194
|
|||
// size: 0x55C
|
||||
typedef struct GroundBg
|
||||
{
|
||||
u16 newUnk0; // Not present in Red
|
||||
s16 newUnk0; // Not present in Red
|
||||
SubStruct_0 unk0[UNK_0_ARR_COUNT];
|
||||
SubStruct_3E0 unk3E0[UNK_3E0_ARR_COUNT]; // 0xc4
|
||||
struct iovec bplFile; // 0x174
|
||||
|
|
@ -216,5 +216,6 @@ void LoadBackgroundAttributes(struct bg_list_entry* entry, int bgId);
|
|||
void ov11_022EBC18(GroundBg *groundBg, const SubStruct_52C *a1);
|
||||
void ov11_022EBEAC(GroundBg *groundBg);
|
||||
void ov11_022EBF60(GroundBg *groundBg);
|
||||
void ov11_022EBFC8(GroundBg *groundBg);
|
||||
|
||||
#endif //PMDSKY_OVERLAY_11_022EBB40_H
|
||||
|
|
|
|||
2
main.lsf
2
main.lsf
|
|
@ -185,7 +185,7 @@ Overlay OVY_11
|
|||
After OVY_10
|
||||
Object asm/overlay_11.o
|
||||
Object src/overlay_11_022EBB40.o
|
||||
Object asm/overlay_11_022EBFC8.o
|
||||
Object asm/overlay_11_022EC08C.o
|
||||
}
|
||||
Overlay OVY_12
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ extern void FileClose(struct file_stream* file);
|
|||
extern void ZInit8(struct iovec *dst);
|
||||
extern void* MemAlloc(u32 len, u32 flags);
|
||||
extern void MemFree(void* ptr);
|
||||
extern BOOL PointsToZero(struct iovec* ptr);
|
||||
extern void UnloadFile(struct iovec* ptr);
|
||||
|
||||
#define FREE_AND_SET_NULL(ptr) \
|
||||
{ \
|
||||
MemFree(ptr); \
|
||||
|
|
@ -13,6 +16,7 @@ extern void MemFree(void* ptr);
|
|||
}
|
||||
|
||||
#define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr)
|
||||
#define TRY_CLOSE_FILE(f) if (!PointsToZero(&f)) {UnloadFile(&f);}
|
||||
|
||||
|
||||
extern const char ov11_02320C44[];
|
||||
|
|
@ -48,8 +52,10 @@ void LoadBackgroundAttributes(struct bg_list_entry* entry, int bgId)
|
|||
void ov11_022EBF60(GroundBg *groundBg);
|
||||
void *sub_0200B500(void *unk);
|
||||
void ov11_022EBFC8(GroundBg *groundBg); // Close Opened Files ?
|
||||
void sub_02063600(void *);
|
||||
void sub_02063600(struct UnkGroundBg_1A0 *);
|
||||
void sub_0206367C(struct UnkGroundBg_1A0 *);
|
||||
void sub_020635C8(struct UnkGroundBg_194 *);
|
||||
void sub_020635D8(struct UnkGroundBg_194 *);
|
||||
|
||||
struct UnkStruct_2324CBC
|
||||
{
|
||||
|
|
@ -203,3 +209,24 @@ void ov11_022EBF60(GroundBg *groundBg)
|
|||
ZInit8(&groundBg->bpcFile);
|
||||
ZInit8(&groundBg->bmaFile);
|
||||
}
|
||||
|
||||
void ov11_022EBFC8(GroundBg *groundBg)
|
||||
{
|
||||
s32 i;
|
||||
if (groundBg->newUnk0 == 3) {
|
||||
ov11_022EBF60(groundBg);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < UNK_3E0_ARR_COUNT; i++) {
|
||||
SubStruct_3E0 *unkPtr = &groundBg->unk3E0[i];
|
||||
TRY_CLOSE_FILE(unkPtr->bpaFile);
|
||||
}
|
||||
sub_0206367C(&groundBg->unk1A0);
|
||||
sub_020635D8(&groundBg->unk194);
|
||||
|
||||
TRY_CLOSE_FILE(groundBg->bplFile);
|
||||
TRY_CLOSE_FILE(groundBg->unk17C);
|
||||
TRY_CLOSE_FILE(groundBg->bpcFile);
|
||||
TRY_CLOSE_FILE(groundBg->bmaFile);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user