From 046e4e062d5c2f2b27a75004666c2bed9effed98 Mon Sep 17 00:00:00 2001 From: red031000 Date: Sat, 28 Sep 2024 12:54:16 +0100 Subject: [PATCH] a little map_object decomp --- arm9/asm/map_object_s.s | 176 ++------------------------- arm9/asm/unk_02055068.s | 2 +- arm9/asm/unk_0205C598.s | 4 +- arm9/global.inc | 4 +- arm9/overlays/05/asm/ov05_021D80E8.s | 10 +- arm9/overlays/05/asm/ov05_021E1374.s | 6 +- arm9/src/map_object.c | 95 +++++++++++++-- include/map_object.h | 2 + 8 files changed, 106 insertions(+), 193 deletions(-) diff --git a/arm9/asm/map_object_s.s b/arm9/asm/map_object_s.s index d24b50ca6..7bd294462 100644 --- a/arm9/asm/map_object_s.s +++ b/arm9/asm/map_object_s.s @@ -3,168 +3,10 @@ .extern UNK_020F6364 .extern sub_02057EE0 - .extern sub_02057F18 .extern sub_0205815C - .extern sub_0205818C .text - thumb_func_start sub_020581B4 -sub_020581B4: ; 0x020581B4 - push {r4, lr} - add r4, r0, #0x0 - bl MapObject_GetManager - bl sub_020587E0 - cmp r0, #0x0 - beq _020581F6 - add r0, r4, #0x0 - bl sub_0205818C - add r0, r4, #0x0 - mov r1, #0x0 - bl sub_02058544 - add r0, r4, #0x0 - mov r1, #0x0 - bl ov05_021F2E0C - add r0, r4, #0x0 - bl MapObject_CheckFlag14 - cmp r0, #0x0 - bne _020581F6 - add r0, r4, #0x0 - bl sub_02057F18 - add r0, r4, #0x0 - bl sub_0205868C - add r0, r4, #0x0 - bl sub_02058878 -_020581F6: - pop {r4, pc} - - thumb_func_start MapObject_ScriptIdIsFFFF -MapObject_ScriptIdIsFFFF: ; 0x020581F8 - push {r3, lr} - bl MapObject_GetScript - lsl r0, r0, #0x10 - lsr r1, r0, #0x10 - ldr r0, _02058210 ; =0x0000FFFF - cmp r1, r0 - bne _0205820C - mov r0, #0x1 - pop {r3, pc} -_0205820C: - mov r0, #0x0 - pop {r3, pc} - .balign 4 -_02058210: .word 0x0000FFFF - - thumb_func_start sub_02058214 -sub_02058214: ; 0x02058214 - push {r4-r6, lr} - add r5, r0, #0x0 - add r4, r1, #0x0 - add r6, r2, #0x0 - bl MapObject_CheckFlag25 - cmp r0, #0x1 - beq _02058228 - bl GF_AssertFail -_02058228: - add r0, r5, #0x0 - mov r1, #0x0 - bl MapObject_SetFlag25 - add r0, r5, #0x0 - add r1, r6, #0x0 - bl sub_0205844C - add r0, r4, #0x0 - bl ObjectEvent_GetScript - add r1, r0, #0x0 - add r0, r5, #0x0 - bl MapObject_SetScript - add r0, r4, #0x0 - bl ObjectEvent_GetFlagID - add r1, r0, #0x0 - add r0, r5, #0x0 - bl MapObject_SetFlagID - pop {r4-r6, pc} - .balign 4 - - thumb_func_start sub_02058258 -sub_02058258: ; 0x02058258 - push {r4-r6, lr} - add r6, r2, #0x0 - add r5, r0, #0x0 - add r0, r6, #0x0 - add r4, r1, #0x0 - bl ObjectEvent_ScriptIDIsUnset - cmp r0, #0x1 - beq _0205826E - bl GF_AssertFail -_0205826E: - add r0, r5, #0x0 - mov r1, #0x1 - bl MapObject_SetFlag25 - add r0, r6, #0x0 - bl ObjectEvent_GetScript - add r1, r0, #0x0 - add r0, r5, #0x0 - bl MapObject_SetScript - add r0, r6, #0x0 - bl ObjectEvent_GetFlagID_AssertScriptIDIsUnset - add r1, r0, #0x0 - add r0, r5, #0x0 - bl MapObject_SetFlagID - add r0, r5, #0x0 - add r1, r4, #0x0 - bl sub_0205844C - pop {r4-r6, pc} - - thumb_func_start sub_0205829C -sub_0205829C: ; 0x0205829C - push {r4, lr} - add r4, r1, #0x0 - bl sub_02058744 - add r0, r0, r4 - pop {r4, pc} - - thumb_func_start sub_020582A8 -sub_020582A8: ; 0x020582A8 - push {r4-r6, lr} - add r6, r1, #0x0 - mov r1, #0x1 - add r5, r0, #0x0 - add r4, r2, #0x0 - bl MapObject_TestFlagsBits - cmp r0, #0x0 - bne _020582BE - mov r0, #0x0 - pop {r4-r6, pc} -_020582BE: - add r0, r5, #0x0 - bl MapObject_GetID - cmp r6, r0 - beq _020582CC - mov r0, #0x0 - pop {r4-r6, pc} -_020582CC: - add r0, r5, #0x0 - bl sub_02058450 - cmp r4, r0 - beq _020582F2 - add r0, r5, #0x0 - bl MapObject_CheckFlag25 - cmp r0, #0x0 - bne _020582E4 - mov r0, #0x0 - pop {r4-r6, pc} -_020582E4: - add r0, r5, #0x0 - bl sub_02058750 - cmp r4, r0 - beq _020582F2 - mov r0, #0x0 - pop {r4-r6, pc} -_020582F2: - mov r0, #0x1 - pop {r4-r6, pc} - .balign 4 - thumb_func_start sub_020582F8 sub_020582F8: ; 0x020582F8 push {r3-r7, lr} @@ -503,13 +345,13 @@ MapObject_GetFlagID: ; 0x02058490 ldr r0, [r0, #0x1c] bx lr - thumb_func_start MapObject_SetScript -MapObject_SetScript: ; 0x02058494 + thumb_func_start MapObject_SetScriptID +MapObject_SetScriptID: ; 0x02058494 str r1, [r0, #0x20] bx lr - thumb_func_start MapObject_GetScript -MapObject_GetScript: ; 0x02058498 + thumb_func_start MapObject_GetScriptID +MapObject_GetScriptID: ; 0x02058498 ldr r0, [r0, #0x20] bx lr @@ -1200,8 +1042,8 @@ sub_0205886C: ; 0x0205886C nop _02058874: .word MapObject_ClearFlagsBits - thumb_func_start sub_02058878 -sub_02058878: ; 0x02058878 + thumb_func_start MapObject_SetFlag14 +MapObject_SetFlag14: ; 0x02058878 ldr r3, _02058880 ; =MapObject_SetFlagsBits mov r1, #0x1 lsl r1, r1, #0xe @@ -1865,8 +1707,8 @@ ObjectEvent_SetScript: ; 0x02058C20 strh r1, [r0, #0xa] bx lr - thumb_func_start ObjectEvent_GetScript -ObjectEvent_GetScript: ; 0x02058C24 + thumb_func_start ObjectEvent_GetScriptID +ObjectEvent_GetScriptID: ; 0x02058C24 ldrh r0, [r0, #0xa] bx lr @@ -2016,7 +1858,7 @@ _02058CD4: thumb_func_start ObjectEvent_ScriptIDIsUnset ObjectEvent_ScriptIDIsUnset: ; 0x02058CE0 push {r3, lr} - bl ObjectEvent_GetScript + bl ObjectEvent_GetScriptID lsl r0, r0, #0x10 lsr r1, r0, #0x10 ldr r0, _02058CF8 ; =0x0000FFFF diff --git a/arm9/asm/unk_02055068.s b/arm9/asm/unk_02055068.s index 4c0ac6587..33ed11e9f 100644 --- a/arm9/asm/unk_02055068.s +++ b/arm9/asm/unk_02055068.s @@ -221,7 +221,7 @@ _02055228: bl MapObject_SetFlagID add r0, r5, #0x0 mov r1, #0x0 - bl MapObject_SetScript + bl MapObject_SetScriptID mov r1, #0x0 add r0, r5, #0x0 add r2, r1, #0x0 diff --git a/arm9/asm/unk_0205C598.s b/arm9/asm/unk_0205C598.s index 5d6f41dbf..4893eddd7 100644 --- a/arm9/asm/unk_0205C598.s +++ b/arm9/asm/unk_0205C598.s @@ -233,7 +233,7 @@ sub_0205C73C: ; 0x0205C73C str r2, [r5, #0x0] str r3, [r5, #0x4] add r0, r4, #0x0 - bl MapObject_GetScript + bl MapObject_GetScriptID str r0, [r5, #0x8] lsl r0, r0, #0x10 lsr r0, r0, #0x10 @@ -573,7 +573,7 @@ _0205C9D0: thumb_func_start sub_0205C9D8 sub_0205C9D8: ; 0x0205C9D8 push {r3, lr} - bl MapObject_GetScript + bl MapObject_GetScriptID lsl r0, r0, #0x10 lsr r0, r0, #0x10 bl sub_020395F4 diff --git a/arm9/global.inc b/arm9/global.inc index e4e9d1d2e..68f289676 100644 --- a/arm9/global.inc +++ b/arm9/global.inc @@ -4031,8 +4031,8 @@ .extern MapObject_SetType .extern MapObject_GetType .extern MapObject_SetFlagID -.extern MapObject_SetScript -.extern MapObject_GetScript +.extern MapObject_SetScriptID +.extern MapObject_GetScriptID .extern MapObject_GetInitialFacingDirection .extern MapObject_SetFacingDirectionDirect .extern sub_020584AC diff --git a/arm9/overlays/05/asm/ov05_021D80E8.s b/arm9/overlays/05/asm/ov05_021D80E8.s index 1d0d1b4e8..c2cf15ff8 100644 --- a/arm9/overlays/05/asm/ov05_021D80E8.s +++ b/arm9/overlays/05/asm/ov05_021D80E8.s @@ -466,7 +466,7 @@ _021D8486: beq _021D84A8 ldr r5, [sp, #4] add r0, r5, #0 - bl MapObject_GetScript + bl MapObject_GetScriptID add r1, r0, #0 lsl r1, r1, #0x10 add r0, r4, #0 @@ -599,7 +599,7 @@ ov05_021D859C: ; 0x021D859C bne _021D85C4 ldr r4, [sp] add r0, r4, #0 - bl MapObject_GetScript + bl MapObject_GetScriptID add r1, r0, #0 lsl r1, r1, #0x10 add r0, r5, #0 @@ -747,7 +747,7 @@ _021D86AE: _021D86E4: ldr r4, [sp] add r0, r4, #0 - bl MapObject_GetScript + bl MapObject_GetScriptID add r1, r0, #0 lsl r1, r1, #0x10 add r0, r5, #0 @@ -852,7 +852,7 @@ _021D87B6: bl sub_02031C10 ldr r4, [sp] add r0, r4, #0 - bl MapObject_GetScript + bl MapObject_GetScriptID add r1, r0, #0 lsl r1, r1, #0x10 add r0, r5, #0 @@ -939,7 +939,7 @@ _021D886E: beq _021D8890 ldr r5, [sp] add r0, r5, #0 - bl MapObject_GetScript + bl MapObject_GetScriptID add r1, r0, #0 lsl r1, r1, #0x10 add r0, r4, #0 diff --git a/arm9/overlays/05/asm/ov05_021E1374.s b/arm9/overlays/05/asm/ov05_021E1374.s index 394bfbf5c..efb1bf65e 100644 --- a/arm9/overlays/05/asm/ov05_021E1374.s +++ b/arm9/overlays/05/asm/ov05_021E1374.s @@ -628,7 +628,7 @@ _021E1844: .word ov05_021F6910 thumb_func_start ov05_021E1848 ov05_021E1848: ; 0x021E1848 push {r3, lr} - bl MapObject_GetScript + bl MapObject_GetScriptID lsl r0, r0, #0x10 lsr r0, r0, #0x10 bl sub_020395F4 @@ -909,7 +909,7 @@ ov05_021E1A30: ; 0x021E1A30 bl sub_02034B64 add r7, r0, #0 add r0, r4, #0 - bl MapObject_GetScript + bl MapObject_GetScriptID lsl r0, r0, #0x10 lsr r0, r0, #0x10 str r0, [sp, #0xc] @@ -961,7 +961,7 @@ _021E1A98: ; jump table .short _021E1AAA - _021E1A98 - 2 ; case 8 _021E1AAA: add r0, r5, #0 - bl MapObject_GetScript + bl MapObject_GetScriptID add r6, r0, #0 lsl r0, r6, #0x10 lsr r0, r0, #0x10 diff --git a/arm9/src/map_object.c b/arm9/src/map_object.c index 6098a00df..f934170bb 100644 --- a/arm9/src/map_object.c +++ b/arm9/src/map_object.c @@ -28,8 +28,12 @@ static void sub_02058148(LocalMapObject *object); /*static*/ void sub_0205815C(LocalMapObject *object); static void MapObject_NoOp(LocalMapObject *object); static u32 FieldSystem_ResolveObjectSpriteID(FieldSystem *fieldSystem, s32 spriteId); -/*static*/ void sub_0205818C(LocalMapObject *object); +static void sub_0205818C(LocalMapObject *object); static void sub_020581A4(LocalMapObject *object); +static void sub_020581B4(LocalMapObject *object); +static BOOL MapObject_ScriptIDIsFFFF(LocalMapObject *object); +static void sub_02058214(LocalMapObject *object, ObjectEvent *objectEvent, u32 mapNo); +static void sub_02058258(LocalMapObject *object, u32 mapNo, ObjectEvent *objectEvent); extern void MapObjectManager_SetFieldSystemPtr(MapObjectManager *manager, FieldSystem *fieldSystem); extern void MapObjectManager_SetObjectCount(MapObjectManager *manager, u32 objectCount); @@ -44,13 +48,10 @@ extern BOOL MapObject_TestFlagsBits(LocalMapObject *object, MapObjectFlagBits fl extern void MapObjectManager_SetObjects(MapObjectManager *manager, LocalMapObject *objects); extern u32 ObjectEvent_GetID(ObjectEvent *objectEvent); extern BOOL ObjectEvent_ScriptIDIsUnset(ObjectEvent *objectEvent); -extern void sub_02058214(LocalMapObject *object, ObjectEvent *objectEvent, u32 mapNo); extern u16 ObjectEvent_GetFlagID_AssertScriptIDIsUnset(ObjectEvent *objectEvent); -extern void sub_02058258(LocalMapObject *object, u32 mapNo, ObjectEvent *objectEvent); extern FieldSystem *MapObjectManager_GetFieldSystemPtr(MapObjectManager *manager); extern void sub_02057E90(LocalMapObject *object, MapObjectManager *manager); extern void sub_0205844C(LocalMapObject *object, u32 mapNo); -extern void sub_020581B4(LocalMapObject *object); extern void MapObject_SetFlagsBits(LocalMapObject *object, MapObjectFlagBits bits); extern MapObjectManager *MapObjectManager_Get(MapObjectManager *manager); extern void sub_0205836C(MapObjectManager *manager); @@ -103,7 +104,7 @@ extern u32 MapObject_GetID(LocalMapObject *object); extern u32 MapObject_GetSpriteID(LocalMapObject *object); extern u32 MapObject_GetMovement(LocalMapObject *object); extern u32 MapObject_GetType(LocalMapObject *object); -extern u32 MapObject_GetScript(LocalMapObject *object); +extern u32 MapObject_GetScriptID(LocalMapObject *object); extern u32 MapObject_GetInitialFacingDirection(LocalMapObject *object); extern u32 MapObject_GetFacingDirection(LocalMapObject *object); extern u32 MapObject_GetNextFacingDirection(LocalMapObject *object); @@ -129,7 +130,7 @@ extern void sub_0205844C(LocalMapObject *object, u32 param1); extern void MapObject_SetMovement(LocalMapObject *object, u32 movement); extern void MapObject_SetType(LocalMapObject *object, u32 type); extern void MapObject_SetFlagID(LocalMapObject *object, u32 flagId); -extern void MapObject_SetScript(LocalMapObject *object, u32 script); +extern void MapObject_SetScriptID(LocalMapObject *object, u32 script); extern void MapObject_SetInitialFacingDirection(LocalMapObject *object, u32 initialDirection); extern void MapObject_SetFacingDirectionDirect(LocalMapObject *object, u32 direction); extern void MapObject_SetNextFacingDirection(LocalMapObject *object, u32 nextDirection); @@ -159,7 +160,7 @@ extern void sub_02058554(LocalMapObject *object, SysTask *task); extern u16 ObjectEvent_GetSpriteID(ObjectEvent *objectEvent); extern u16 ObjectEvent_GetMovement(ObjectEvent *objectEvent); extern u16 ObjectEvent_GetType(ObjectEvent *objectEvent); -extern u16 ObjectEvent_GetScript(ObjectEvent *objectEvent); +extern u16 ObjectEvent_GetScriptID(ObjectEvent *objectEvent); extern u16 ObjectEvent_GetInitialFacingDirection(ObjectEvent *objectEvent); extern u32 ObjectEvent_GetParam(ObjectEvent *objectEvent, u32 param); extern u32 ObjectEvent_GetXRange(ObjectEvent *objectEvent); @@ -167,7 +168,6 @@ extern u32 ObjectEvent_GetYRange(ObjectEvent *objectEvent); extern u16 ObjectEvent_GetXCoord(ObjectEvent *objectEvent); extern u16 ObjectEvent_GetYCoord(ObjectEvent *objectEvent); extern u32 ObjectEvent_GetHeight(ObjectEvent *objectEvent); -extern BOOL MapObject_ScriptIdIsFFFF(LocalMapObject *object); extern void MapObject_SetFlag25(LocalMapObject *object, BOOL flag); extern UnkLMOCallbackStruct *sub_02058D14(u32 movement); extern LocalMapObject_UnkCallback sub_02058D2C(UnkLMOCallbackStruct *callbackStruct); @@ -191,6 +191,11 @@ extern const LocalMapObject *MapObjectManager_GetConstObjects(MapObjectManager * extern u16 FieldSystem_VarGetObjectEventGraphicsId(FieldSystem *fieldSystem, u16 spriteId); extern u32 sub_02059D1C(LocalMapObject *object); extern void sub_02058EE8(LocalMapObject *object); +extern void sub_02058544(LocalMapObject *object, u32 param1); +extern void ov05_021F2E0C(LocalMapObject *object, BOOL set); +extern void sub_0205868C(LocalMapObject *object); +extern void MapObject_SetFlag14(LocalMapObject *object); +extern void *sub_02058744(LocalMapObject *object); MapObjectManager *MapObjectManager_Init(FieldSystem *fieldSystem, u32 objectCount, u32 priority) { MapObjectManager *ret = MapObjectManager_New(objectCount); @@ -457,7 +462,7 @@ static void SavedMapObject_InitFromLocalMapObject(FieldSystem *fieldSystem, Loca savedObject->movement = MapObject_GetMovement(localObject); savedObject->type = MapObject_GetType(localObject); savedObject->flagId = MapObject_GetFlagID(localObject); - savedObject->script = MapObject_GetScript(localObject); + savedObject->script = MapObject_GetScriptID(localObject); savedObject->initialFacing = MapObject_GetInitialFacingDirection(localObject); savedObject->currentFacing = MapObject_GetFacingDirection(localObject); savedObject->nextFacing = MapObject_GetNextFacingDirection(localObject); @@ -496,7 +501,7 @@ static void LocalMapObject_InitFromSavedMapObject(LocalMapObject *localObject, S MapObject_SetMovement(localObject, savedObject->movement); MapObject_SetType(localObject, savedObject->type); MapObject_SetFlagID(localObject, savedObject->flagId); - MapObject_SetScript(localObject, savedObject->script); + MapObject_SetScriptID(localObject, savedObject->script); MapObject_SetInitialFacingDirection(localObject, savedObject->initialFacing); MapObject_SetFacingDirectionDirect(localObject, savedObject->currentFacing); MapObject_SetNextFacingDirection(localObject, savedObject->nextFacing); @@ -641,7 +646,7 @@ static void MapObject_InitFromObjectEvent(LocalMapObject *object, ObjectEvent *o MapObject_SetMovement(object, ObjectEvent_GetMovement(objectEvent)); MapObject_SetType(object, ObjectEvent_GetType(objectEvent)); MapObject_SetFlagID(object, ObjectEvent_GetFlagID(objectEvent)); - MapObject_SetScript(object, ObjectEvent_GetScript(objectEvent)); + MapObject_SetScriptID(object, ObjectEvent_GetScriptID(objectEvent)); MapObject_SetInitialFacingDirection(object, ObjectEvent_GetInitialFacingDirection(objectEvent)); MapObject_SetParam(object, ObjectEvent_GetParam(objectEvent, 0), 0); MapObject_SetParam(object, ObjectEvent_GetParam(objectEvent, 1), 1); @@ -678,7 +683,7 @@ static void MapObject_SetPositionVecFromObjectEvent(LocalMapObject *object, Obje static void sub_02057E90(LocalMapObject *object, MapObjectManager *manager) { //setup facing and flags? also sets manager? MapObject_SetFlagsBits(object, (MapObjectFlagBits)(MAPOBJECTFLAG_UNK12 | MAPOBJECTFLAG_UNK11 | MAPOBJECTFLAG_ACTIVE)); - if (MapObject_ScriptIdIsFFFF(object) == TRUE) { + if (MapObject_ScriptIDIsFFFF(object) == TRUE) { MapObject_SetFlag25(object, TRUE); } MapObject_SetManager(object, manager); @@ -829,7 +834,7 @@ static u32 FieldSystem_ResolveObjectSpriteID(FieldSystem *fieldSystem, s32 sprit return spriteId; } -/*static*/ void sub_0205818C(LocalMapObject *object) { +static void sub_0205818C(LocalMapObject *object) { if (MapObject_GetFlagsBits(object, MAPOBJECTFLAG_UNK12) != 0) { sub_02059D1C(object); } @@ -839,3 +844,67 @@ static void sub_020581A4(LocalMapObject *object) { sub_02057EE0(object); sub_02058EE8(object); } + +static void sub_020581B4(LocalMapObject *object) { + if (!sub_020587E0(MapObject_GetManager(object))) { + return; + } + + sub_0205818C(object); + sub_02058544(object, 0); + ov05_021F2E0C(object, FALSE); + if (!MapObject_CheckFlag14(object)) { + sub_02057F18(object); + sub_0205868C(object); + MapObject_SetFlag14(object); + } +} + +static BOOL MapObject_ScriptIDIsFFFF(LocalMapObject *object) { + u16 script = MapObject_GetScriptID(object); + return script == 0xFFFF; +} + +static void sub_02058214(LocalMapObject *object, ObjectEvent *objectEvent, u32 mapNo) { + GF_ASSERT(MapObject_CheckFlag25(object) == TRUE); + + MapObject_SetFlag25(object, FALSE); + sub_0205844C(object, mapNo); + MapObject_SetScriptID(object, ObjectEvent_GetScriptID(objectEvent)); + MapObject_SetFlagID(object, ObjectEvent_GetFlagID(objectEvent)); +} + +static void sub_02058258(LocalMapObject *object, u32 mapNo, ObjectEvent *objectEvent) { + GF_ASSERT(ObjectEvent_ScriptIDIsUnset(objectEvent) == TRUE); + + MapObject_SetFlag25(object, TRUE); + MapObject_SetScriptID(object, ObjectEvent_GetScriptID(objectEvent)); + MapObject_SetFlagID(object, ObjectEvent_GetFlagID_AssertScriptIDIsUnset(objectEvent)); + sub_0205844C(object, mapNo); +} + +u32 sub_0205829C(LocalMapObject *object, u32 param1) { + return (u32)(sub_02058744(object) + param1); +} + +BOOL sub_020582A8(LocalMapObject *object, u32 mapId, u32 flagId) { + if (!MapObject_TestFlagsBits(object, MAPOBJECTFLAG_ACTIVE)) { + return FALSE; + } + + if (MapObject_GetID(object) != mapId) { + return FALSE; + } + + if (sub_02058450(object) != flagId) { + if (!MapObject_CheckFlag25(object)) { + return FALSE; + } + + if (sub_02058750(object) != flagId) { + return FALSE; + } + } + + return TRUE; +} diff --git a/include/map_object.h b/include/map_object.h index dbbd4ae61..164c29038 100644 --- a/include/map_object.h +++ b/include/map_object.h @@ -127,5 +127,7 @@ void MapObject_CreateFromMultipleObjectEvents(MapObjectManager *manager, u32 map LocalMapObject *MapObjectManager_GetFirstActiveObjectByID(MapObjectManager *manager, u32 id); LocalMapObject *MapObjectManager_GetFirstActiveObjectWithMovement(MapObjectManager *manager, u32 movement); BOOL MapObjectManager_GetNextObjectWithFlagFromIndex(MapObjectManager *manager, LocalMapObject **objectDest, s32 *index, MapObjectFlagBits flag); +u32 sub_0205829C(LocalMapObject *object, u32 param1); +BOOL sub_020582A8(LocalMapObject *object, u32 mapId, u32 flagId); #endif //POKEDIAMOND_MAP_OBJECT_H