mirror of
https://github.com/pret/pokediamond.git
synced 2026-08-28 03:34:38 -05:00
FUN_0203BBBC
This commit is contained in:
@@ -6,45 +6,10 @@
|
||||
.extern gMain
|
||||
.extern FUN_0203A2F0
|
||||
.extern FUN_0203BB90
|
||||
.extern FUN_0203BBBC
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start FUN_0203BBBC
|
||||
FUN_0203BBBC: ; 0x0203BBBC
|
||||
push {r4-r6, lr}
|
||||
add r0, #0x80
|
||||
ldr r5, [r0, #0x0]
|
||||
mov r1, #0x13
|
||||
add r0, r5, #0x0
|
||||
bl FieldSysGetAttrAddr
|
||||
add r4, r0, #0x0
|
||||
add r0, r5, #0x0
|
||||
ldr r6, [r4, #0x0]
|
||||
bl FUN_0204647C
|
||||
cmp r0, #0x0
|
||||
beq _0203BBDC
|
||||
mov r0, #0x0
|
||||
pop {r4-r6, pc}
|
||||
_0203BBDC:
|
||||
ldr r0, [r6, #0x8]
|
||||
cmp r0, #0x1
|
||||
bne _0203BBF4
|
||||
mov r0, #0xb
|
||||
bl FUN_02029048
|
||||
add r5, #0x98
|
||||
add r1, r0, #0x0
|
||||
ldr r0, [r5, #0x0]
|
||||
mov r2, #0x1
|
||||
bl FUN_02028AD4
|
||||
_0203BBF4:
|
||||
ldr r0, [r4, #0x0]
|
||||
bl FreeToHeap
|
||||
mov r0, #0x0
|
||||
str r0, [r4, #0x0]
|
||||
mov r0, #0x1
|
||||
pop {r4-r6, pc}
|
||||
.balign 4
|
||||
|
||||
thumb_func_start FUN_0203BC04
|
||||
FUN_0203BC04: ; 0x0203BC04
|
||||
push {r3, lr}
|
||||
|
||||
@@ -101,6 +101,8 @@ extern void *FUN_02037BB0(u32 param0, struct FieldSystem *fieldSystem, u16 param
|
||||
extern void *FUN_02037C00(u32 param0, struct FieldSystem *fieldSystem, u16 param2);
|
||||
extern u16 FUN_02037A78(void *runningAppData);
|
||||
extern u16 MOD05_021E1858(struct FieldSystem *fieldSystem, LocalMapObject *event, u16 param2);
|
||||
extern u32 FUN_02029048(u32 param0);
|
||||
extern void FUN_02028AD4(u32 *param0, u32 param1, u32 param2);
|
||||
|
||||
u8 UNK_021C5A0C[4];
|
||||
|
||||
@@ -127,6 +129,7 @@ static void FUN_0203B174(struct FieldSystem *fieldSystem, u32 param1, void *para
|
||||
static void FUN_0203B1A8(u32 param0, UnkStruct_0203B174 *param1);
|
||||
static BOOL FUN_0203B218(struct ScriptContext *ctx);
|
||||
/*static*/ BOOL FUN_0203BB90(ScriptContext *ctx);
|
||||
/*static*/ BOOL FUN_0203BBBC(ScriptContext *ctx);
|
||||
|
||||
extern BOOL FUN_0203BC04(struct ScriptContext *ctx);
|
||||
|
||||
@@ -1880,18 +1883,22 @@ THUMB_FUNC BOOL ScrCmd_Unk009B(ScriptContext *ctx) { //009B
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_DummySetWeather(ScriptContext *ctx) { //009C
|
||||
#pragma unused(ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_DummyInitWeather(ScriptContext *ctx) { //009D
|
||||
#pragma unused(ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_DummyUpdateWeather(ScriptContext *ctx) { //009E
|
||||
#pragma unused(ctx)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC BOOL ScrCmd_DummyGetMapPosition(ScriptContext *ctx) { //009F
|
||||
#pragma unused(ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1906,3 +1913,18 @@ THUMB_FUNC /*static*/ BOOL FUN_0203BB90(ScriptContext *ctx) {
|
||||
*runningAppData = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
THUMB_FUNC /*static*/ BOOL FUN_0203BBBC(ScriptContext *ctx) {
|
||||
struct FieldSystem *fieldSystem = ctx->fieldSystem;
|
||||
PCBoxAppData **pcBoxDataPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_RUNNING_APP_DATA);
|
||||
PCBoxAppData *pcBoxData = *pcBoxDataPtr;
|
||||
if (FUN_0204647C(fieldSystem)) {
|
||||
return FALSE;
|
||||
}
|
||||
if (pcBoxData->unk08 == TRUE) {
|
||||
FUN_02028AD4(fieldSystem->unk98, FUN_02029048(11), 1);
|
||||
}
|
||||
FreeToHeap(*pcBoxDataPtr);
|
||||
*pcBoxDataPtr = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,12 @@ typedef struct LocalMapObject { //todo move to local_map_object.c
|
||||
|
||||
typedef struct PartyMenuAppData PartyMenuAppData; //todo move to own file
|
||||
|
||||
typedef struct PCBoxAppData {
|
||||
struct SaveBlock2 *save;
|
||||
void *unk04;
|
||||
BOOL unk08;
|
||||
} PCBoxAppData; //todo move to own file
|
||||
|
||||
struct FieldSystem //todo move to field_system.c
|
||||
{
|
||||
u32 *unk00;
|
||||
@@ -52,7 +58,7 @@ struct FieldSystem //todo move to field_system.c
|
||||
u8 padding5[0x14];
|
||||
u32 unk78;
|
||||
u8 padding6[0x1C];
|
||||
void *unk98;
|
||||
u32 *unk98;
|
||||
u8 padding7[0xC];
|
||||
struct UnkStruct_02046444 * unkA8;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user