diff --git a/asm/include/overlay_01_021F944C.inc b/asm/include/overlay_01_021F944C.inc index 0ff6e0716..8f6c2f4cd 100644 --- a/asm/include/overlay_01_021F944C.inc +++ b/asm/include/overlay_01_021F944C.inc @@ -46,7 +46,7 @@ .public sub_0205E38C .public sub_0205E420 .public MapObjectManager_GetNextObjectWithFlagFromIndex -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObjectManager_GetObjectCount .public MapObjectManager_GetPriority .public sub_0205F1A0 diff --git a/asm/include/overlay_01_021FD1B8.inc b/asm/include/overlay_01_021FD1B8.inc index d53c740f7..76aee661a 100644 --- a/asm/include/overlay_01_021FD1B8.inc +++ b/asm/include/overlay_01_021FD1B8.inc @@ -1,7 +1,7 @@ #include #pragma once .public GF_AssertFail -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0A8 .public MapObject_GetID .public MapObject_GetMapID diff --git a/asm/include/overlay_01_021FD41C.inc b/asm/include/overlay_01_021FD41C.inc index be4e0136b..7d65b0b60 100644 --- a/asm/include/overlay_01_021FD41C.inc +++ b/asm/include/overlay_01_021FD41C.inc @@ -3,7 +3,7 @@ .public SysTask_CreateOnMainQueue .public SysTask_Destroy .public GF_RTC_GetTimeOfDay -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0F8 .public MapObjectManager_GetPriority .public MapObject_TestFlagsBits diff --git a/asm/include/overlay_01_021FDA14.inc b/asm/include/overlay_01_021FDA14.inc index 74c7948ff..6462b8398 100644 --- a/asm/include/overlay_01_021FDA14.inc +++ b/asm/include/overlay_01_021FDA14.inc @@ -13,7 +13,7 @@ .public sub_02023F70 .public sub_02023FC0 .public PlayerAvatar_GetMapObject -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0A8 .public MapObject_GetID .public MapObject_GetMapID diff --git a/asm/include/overlay_01_021FE200.inc b/asm/include/overlay_01_021FE200.inc index 7329f2cc6..91b9e0702 100644 --- a/asm/include/overlay_01_021FE200.inc +++ b/asm/include/overlay_01_021FE200.inc @@ -1,7 +1,7 @@ #include #pragma once .public GF_AssertFail -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObject_TestFlagsBits .public MapObject_GetFacingDirection .public MapObject_GetPreviousFacingDirection diff --git a/asm/include/overlay_01_021FE780.inc b/asm/include/overlay_01_021FE780.inc index 7abc347a7..404bc0af5 100644 --- a/asm/include/overlay_01_021FE780.inc +++ b/asm/include/overlay_01_021FE780.inc @@ -1,7 +1,7 @@ #include #pragma once .public sub_02020DA4 -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0A8 .public MapObject_GetID .public MapObject_GetMapID diff --git a/asm/include/overlay_01_021FEA0C.inc b/asm/include/overlay_01_021FEA0C.inc index 7db75e392..9b63d8cda 100644 --- a/asm/include/overlay_01_021FEA0C.inc +++ b/asm/include/overlay_01_021FEA0C.inc @@ -2,7 +2,7 @@ #pragma once .public sub_02020DA4 .public GF_AssertFail -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObject_GetFieldSystem .public MapObject_GetPositionVec .public sub_0205F9A0 diff --git a/asm/include/overlay_01_021FEC38.inc b/asm/include/overlay_01_021FEC38.inc index 71cd9c3cf..f74191f3d 100644 --- a/asm/include/overlay_01_021FEC38.inc +++ b/asm/include/overlay_01_021FEC38.inc @@ -1,6 +1,6 @@ #include #pragma once -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObject_TestFlagsBits .public MapObject_GetPrevHeight .public sub_020611C8 diff --git a/asm/include/overlay_01_021FED9C.inc b/asm/include/overlay_01_021FED9C.inc index 133bd8737..354da785a 100644 --- a/asm/include/overlay_01_021FED9C.inc +++ b/asm/include/overlay_01_021FED9C.inc @@ -1,6 +1,6 @@ #include #pragma once -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObject_GetPrevHeight .public sub_020611C8 .public sub_02068D98 diff --git a/asm/include/overlay_01_021FEEEC.inc b/asm/include/overlay_01_021FEEEC.inc index e1fbfdc01..2e43df9dd 100644 --- a/asm/include/overlay_01_021FEEEC.inc +++ b/asm/include/overlay_01_021FEEEC.inc @@ -6,7 +6,7 @@ .public sub_02023F04 .public sub_02023F1C .public sub_02023F70 -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0F8 .public MapObject_TestFlagsBits .public MapObject_GetID diff --git a/asm/include/overlay_01_021FF464.inc b/asm/include/overlay_01_021FF464.inc index 6c6984893..5b70829bd 100644 --- a/asm/include/overlay_01_021FF464.inc +++ b/asm/include/overlay_01_021FF464.inc @@ -6,7 +6,7 @@ .public sub_02023F04 .public sub_02023F1C .public sub_02023F70 -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0F8 .public MapObject_TestFlagsBits .public MapObject_GetID diff --git a/asm/include/overlay_01_021FF6B0.inc b/asm/include/overlay_01_021FF6B0.inc index 0cc71b8f3..0ff6cc89e 100644 --- a/asm/include/overlay_01_021FF6B0.inc +++ b/asm/include/overlay_01_021FF6B0.inc @@ -4,7 +4,7 @@ .public sub_02023E50 .public sub_02023F04 .public sub_02023F70 -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObject_GetID .public MapObject_GetMapID .public MapObject_GetFieldSystem diff --git a/asm/include/overlay_01_021FF854.inc b/asm/include/overlay_01_021FF854.inc index eb23878a6..63d631327 100644 --- a/asm/include/overlay_01_021FF854.inc +++ b/asm/include/overlay_01_021FF854.inc @@ -6,7 +6,7 @@ .public sub_02023F04 .public sub_02023F1C .public sub_02023F70 -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0F8 .public MapObject_TestFlagsBits .public MapObject_GetID diff --git a/asm/include/overlay_01_02200040.inc b/asm/include/overlay_01_02200040.inc index 99fc79687..627a49616 100644 --- a/asm/include/overlay_01_02200040.inc +++ b/asm/include/overlay_01_02200040.inc @@ -4,7 +4,7 @@ .public sub_02023E50 .public sub_02023F04 .public sub_02023F70 -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObject_GetID .public MapObject_GetMapID .public MapObject_GetFieldSystem diff --git a/asm/include/overlay_01_022001E4.inc b/asm/include/overlay_01_022001E4.inc index a3b3da0e1..31d567d74 100644 --- a/asm/include/overlay_01_022001E4.inc +++ b/asm/include/overlay_01_022001E4.inc @@ -9,7 +9,7 @@ .public sub_0205F0A8 .public MapObject_GetID .public MapObject_GetMapID -.public sub_0205F538 +.public MapObject_GetPriority .public MapObject_GetPositionVec .public MapObject_GetFacingVec .public sub_02068D74 diff --git a/asm/include/overlay_01_022006A8.inc b/asm/include/overlay_01_022006A8.inc index aeeb587b6..91289ceb9 100644 --- a/asm/include/overlay_01_022006A8.inc +++ b/asm/include/overlay_01_022006A8.inc @@ -2,7 +2,7 @@ #pragma once .public sub_02023DA4 .public sub_02023E50 -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0A8 .public MapObject_GetID .public MapObject_GetMapID diff --git a/asm/include/overlay_01_02200858.inc b/asm/include/overlay_01_02200858.inc index cc09af276..bc1d7984b 100644 --- a/asm/include/overlay_01_02200858.inc +++ b/asm/include/overlay_01_02200858.inc @@ -7,7 +7,7 @@ .public sub_0205B73C .public PlayerAvatar_GetFacingDirection .public PlayerAvatar_GetMapObject -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0A8 .public MapObject_GetID .public MapObject_GetMapID diff --git a/asm/include/overlay_01_022031C0.inc b/asm/include/overlay_01_022031C0.inc index b1056458d..36c1d9738 100644 --- a/asm/include/overlay_01_022031C0.inc +++ b/asm/include/overlay_01_022031C0.inc @@ -5,7 +5,7 @@ .public sub_02023E78 .public sub_02023FB0 .public GF_AssertFail -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public sub_0205F0F8 .public MapObject_GetID .public MapObject_GetMapID diff --git a/asm/include/overlay_01_02203A18.inc b/asm/include/overlay_01_02203A18.inc index a9a3aab2c..339144cc3 100644 --- a/asm/include/overlay_01_02203A18.inc +++ b/asm/include/overlay_01_02203A18.inc @@ -20,7 +20,7 @@ .public sub_0205F0A8 .public MapObject_GetID .public MapObject_GetMapID -.public sub_0205F538 +.public MapObject_GetPriority .public MapObject_GetPositionVec .public MapObject_GetFacingVec .public sub_0205F990 diff --git a/asm/include/overlay_01_02203E40.inc b/asm/include/overlay_01_02203E40.inc index 3cef59ac6..fe65ebf3c 100644 --- a/asm/include/overlay_01_02203E40.inc +++ b/asm/include/overlay_01_02203E40.inc @@ -2,7 +2,7 @@ #pragma once .public GF3dRender_DrawModel .public Camera_GetLookAtCamPos -.public sub_0205F09C +.public MapObject_GetPriorityPlusValue .public MapObject_GetPositionVec .public sub_02068D74 .public sub_02068D90 diff --git a/asm/include/unk_02062108.inc b/asm/include/unk_02062108.inc index fb0c71cd5..ad149cc5b 100644 --- a/asm/include/unk_02062108.inc +++ b/asm/include/unk_02062108.inc @@ -21,7 +21,7 @@ .public MapObject_SetMovementCommand .public MapObject_GetMovementCommand .public MapObject_SetMovementStep -.public MapObject_IncMovementStep +.public MapObject_IncrementMovementStep .public MapObject_GetMovementStep .public MapObject_CheckVisible .public MapObject_SetFacingVec diff --git a/asm/include/unk_020632B0.inc b/asm/include/unk_020632B0.inc index 50c916cca..56a3d2a1e 100644 --- a/asm/include/unk_020632B0.inc +++ b/asm/include/unk_020632B0.inc @@ -45,7 +45,7 @@ .public sub_0205F3E8 .public sub_0205F40C .public sub_0205F484 -.public MapObject_IncMovementStep +.public MapObject_IncrementMovementStep .public MapObject_GetFieldSystem .public MapObject_IsSingleMovementActive .public MapObject_CheckVisible diff --git a/asm/overlay_01_021F944C.s b/asm/overlay_01_021F944C.s index 69093b2ce..aba40a10f 100644 --- a/asm/overlay_01_021F944C.s +++ b/asm/overlay_01_021F944C.s @@ -3193,7 +3193,7 @@ _021FAAAA: bne _021FAB4A add r0, r6, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue str r0, [sp, #0xc] add r0, r6, #0 mov r1, #1 diff --git a/asm/overlay_01_021FD1B8.s b/asm/overlay_01_021FD1B8.s index 59cd72f73..e3c601a05 100644 --- a/asm/overlay_01_021FD1B8.s +++ b/asm/overlay_01_021FD1B8.s @@ -211,7 +211,7 @@ ov01_021FD2EC: ; 0x021FD2EC mov r1, #2 str r4, [sp, #0xc] str r5, [sp, #0x10] - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #8 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FD41C.s b/asm/overlay_01_021FD41C.s index 0132e8014..3765d6518 100644 --- a/asm/overlay_01_021FD41C.s +++ b/asm/overlay_01_021FD41C.s @@ -333,7 +333,7 @@ ov01_021FD640: ; 0x021FD640 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] @@ -365,7 +365,7 @@ ov01_021FD684: ; 0x021FD684 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] @@ -673,7 +673,7 @@ ov01_021FD8E8: ; 0x021FD8E8 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FDA14.s b/asm/overlay_01_021FDA14.s index a1ab2ba67..9632ed467 100644 --- a/asm/overlay_01_021FDA14.s +++ b/asm/overlay_01_021FDA14.s @@ -90,7 +90,7 @@ ov01_021FDA74: ; 0x021FDA74 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #8 str r1, [sp] str r0, [sp, #4] @@ -740,7 +740,7 @@ ov01_021FDF88: ; 0x021FDF88 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #8 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FE200.s b/asm/overlay_01_021FE200.s index a5812f6fc..d8d1a268c 100644 --- a/asm/overlay_01_021FE200.s +++ b/asm/overlay_01_021FE200.s @@ -327,7 +327,7 @@ ov01_021FE3F8: ; 0x021FE3F8 str r0, [sp, #0x18] add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r7, r0, #0 add r0, r5, #0 bl ov01_021F146C diff --git a/asm/overlay_01_021FE780.s b/asm/overlay_01_021FE780.s index d7bc301a3..e91c20472 100644 --- a/asm/overlay_01_021FE780.s +++ b/asm/overlay_01_021FE780.s @@ -120,7 +120,7 @@ _021FE826: _021FE842: add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x20 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FEA0C.s b/asm/overlay_01_021FEA0C.s index f0bdbaa52..e6b089862 100644 --- a/asm/overlay_01_021FEA0C.s +++ b/asm/overlay_01_021FEA0C.s @@ -172,7 +172,7 @@ _021FEB06: _021FEB0E: add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x18 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FEC38.s b/asm/overlay_01_021FEC38.s index 29d3d2ab0..573fa4bb1 100644 --- a/asm/overlay_01_021FEC38.s +++ b/asm/overlay_01_021FEC38.s @@ -113,7 +113,7 @@ ov01_021FECA0: ; 0x021FECA0 str r0, [sp, #0x14] add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #8 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FED9C.s b/asm/overlay_01_021FED9C.s index 022223f44..5b4bfd8ee 100644 --- a/asm/overlay_01_021FED9C.s +++ b/asm/overlay_01_021FED9C.s @@ -104,7 +104,7 @@ ov01_021FEE04: ; 0x021FEE04 str r0, [sp, #0x14] add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #8 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FEEEC.s b/asm/overlay_01_021FEEEC.s index 247a3793a..d853970bd 100644 --- a/asm/overlay_01_021FEEEC.s +++ b/asm/overlay_01_021FEEEC.s @@ -227,7 +227,7 @@ ov01_021FF070: ; 0x021FF070 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #8 str r1, [sp] str r0, [sp, #4] @@ -295,7 +295,7 @@ _021FF134: bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0xc str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FF464.s b/asm/overlay_01_021FF464.s index 1ead72813..d68640614 100644 --- a/asm/overlay_01_021FF464.s +++ b/asm/overlay_01_021FF464.s @@ -118,7 +118,7 @@ ov01_021FF4FC: ; 0x021FF4FC add r0, r5, #0 mov r1, #2 str r5, [sp, #0x20] - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FF6B0.s b/asm/overlay_01_021FF6B0.s index 57d0841d7..a6c95f0eb 100644 --- a/asm/overlay_01_021FF6B0.s +++ b/asm/overlay_01_021FF6B0.s @@ -125,7 +125,7 @@ ov01_021FF74C: ; 0x021FF74C bl sub_020611C8 add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_021FF854.s b/asm/overlay_01_021FF854.s index 2ae35e53c..31a2bf209 100644 --- a/asm/overlay_01_021FF854.s +++ b/asm/overlay_01_021FF854.s @@ -133,7 +133,7 @@ ov01_021FF8F0: ; 0x021FF8F0 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #8 str r1, [sp] str r0, [sp, #4] @@ -201,7 +201,7 @@ _021FF9B4: bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0xc str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_02200040.s b/asm/overlay_01_02200040.s index 0bbde9bc6..f938c43cf 100644 --- a/asm/overlay_01_02200040.s +++ b/asm/overlay_01_02200040.s @@ -125,7 +125,7 @@ ov01_022000DC: ; 0x022000DC bl sub_020611C8 add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_022001E4.s b/asm/overlay_01_022001E4.s index 27f6edc60..3114e2e76 100644 --- a/asm/overlay_01_022001E4.s +++ b/asm/overlay_01_022001E4.s @@ -534,7 +534,7 @@ ov01_02200540: ; 0x02200540 add r2, r0, #0 bl VEC_Add add r0, r5, #0 - bl sub_0205F538 + bl MapObject_GetPriority add r1, r0, #1 add r0, sp, #0x20 str r0, [sp] diff --git a/asm/overlay_01_022006A8.s b/asm/overlay_01_022006A8.s index b7eac0ca4..e60765e2c 100644 --- a/asm/overlay_01_022006A8.s +++ b/asm/overlay_01_022006A8.s @@ -110,7 +110,7 @@ ov01_02200730: ; 0x02200730 add r0, r5, #0 mov r1, #2 str r5, [sp, #0x20] - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_02200858.s b/asm/overlay_01_02200858.s index 0cdae19b9..157827747 100644 --- a/asm/overlay_01_02200858.s +++ b/asm/overlay_01_02200858.s @@ -90,7 +90,7 @@ ov01_022008B4: ; 0x022008B4 add r0, r4, #0 mov r1, #2 str r5, [sp, #0x1c] - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x14 str r1, [sp] str r0, [sp, #4] diff --git a/asm/overlay_01_022031C0.s b/asm/overlay_01_022031C0.s index 32f0834dd..1b6a91672 100644 --- a/asm/overlay_01_022031C0.s +++ b/asm/overlay_01_022031C0.s @@ -159,7 +159,7 @@ ov01_0220329C: ; 0x0220329C bl MapObject_GetPositionVec add r0, r6, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue cmp r5, #0 add r1, sp, #8 bne _0220330A diff --git a/asm/overlay_01_02203A18.s b/asm/overlay_01_02203A18.s index 4db0cbc01..613cfc71b 100644 --- a/asm/overlay_01_02203A18.s +++ b/asm/overlay_01_02203A18.s @@ -77,7 +77,7 @@ _02203A6E: add r2, r0, #0 bl VEC_Add add r0, r5, #0 - bl sub_0205F538 + bl MapObject_GetPriority add r1, r0, #1 add r0, sp, #0x20 str r0, [sp] diff --git a/asm/overlay_01_02203E40.s b/asm/overlay_01_02203E40.s index 8e60d68ad..8b6f0f229 100644 --- a/asm/overlay_01_02203E40.s +++ b/asm/overlay_01_02203E40.s @@ -115,7 +115,7 @@ ov01_02203EA0: ; 0x02203EA0 bl MapObject_GetPositionVec add r0, r5, #0 mov r1, #2 - bl sub_0205F09C + bl MapObject_GetPriorityPlusValue add r1, sp, #0x2c str r1, [sp] str r0, [sp, #4] diff --git a/asm/unk_02062108.s b/asm/unk_02062108.s index 05005d531..323999d62 100644 --- a/asm/unk_02062108.s +++ b/asm/unk_02062108.s @@ -550,7 +550,7 @@ sub_0206247C: ; 0x0206247C add r0, r4, #0 bl sub_02060F78 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep pop {r4, pc} .balign 4, 0 thumb_func_end sub_0206247C @@ -620,7 +620,7 @@ sub_020624CC: ; 0x020624CC mov r1, #4 bl MapObject_SetFlagsBits add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep pop {r3, r4, r5, r6, r7, pc} .balign 4, 0 thumb_func_end sub_020624CC @@ -658,7 +658,7 @@ _02062540: mov r1, #0 bl sub_0205F328 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r3, r4, r5, pc} .balign 4, 0 @@ -1061,7 +1061,7 @@ sub_020627B0: ; 0x020627B0 add r0, r5, #0 bl sub_02060F78 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep pop {r3, r4, r5, r6, r7, pc} thumb_func_end sub_020627B0 @@ -1087,7 +1087,7 @@ _020627FE: mov r1, #0 bl sub_0205F328 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} thumb_func_end MapObjectMovementCmd040_Step1 @@ -1353,7 +1353,7 @@ _02062992: add r0, r5, #0 bl sub_0205F328 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep add r0, r5, #0 bl MapObject_CheckVisible cmp r0, #0 @@ -1464,7 +1464,7 @@ _02062A68: mov r1, #0 bl sub_0205F328 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep add r0, r5, #0 bl MapObject_CheckVisible cmp r0, #0 @@ -1882,7 +1882,7 @@ sub_02062D54: ; 0x02062D54 bl sub_0205F3C0 str r4, [r0] add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep pop {r3, r4, r5, pc} .balign 4, 0 thumb_func_end sub_02062D54 @@ -1901,7 +1901,7 @@ MapObjectMovementCmd064_Step1: ; 0x02062D6C pop {r4, pc} _02062D82: add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} thumb_func_end MapObjectMovementCmd064_Step1 @@ -1982,7 +1982,7 @@ MapObjectMovementCmd067_Step0: ; 0x02062DE0 mov r1, #0 bl sub_0205F328 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} .balign 4, 0 @@ -2020,7 +2020,7 @@ MapObjectMovementCmd067_Step1: ; 0x02062E04 pop {r4, r5, pc} _02062E40: add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 add sp, #0xc pop {r4, r5, pc} @@ -2041,7 +2041,7 @@ MapObjectMovementCmd068_Step0: ; 0x02062E4C mov r1, #0 bl sub_0205F328 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} nop @@ -2080,7 +2080,7 @@ _02062E92: pop {r4, r5, pc} _02062EB2: add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 add sp, #0xc pop {r4, r5, pc} @@ -2095,7 +2095,7 @@ MapObjectMovementCmd069_Step0: ; 0x02062EC0 lsl r1, r1, #8 bl MapObject_SetFlagsBits add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} .balign 4, 0 @@ -2109,7 +2109,7 @@ MapObjectMovementCmd070_Step0: ; 0x02062ED8 lsl r1, r1, #8 bl MapObject_ClearFlagsBits add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} .balign 4, 0 @@ -2122,7 +2122,7 @@ MapObjectMovementCmd071_Step0: ; 0x02062EF0 mov r1, #0x80 bl MapObject_SetFlagsBits add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} thumb_func_end MapObjectMovementCmd071_Step0 @@ -2134,7 +2134,7 @@ MapObjectMovementCmd072_Step0: ; 0x02062F04 mov r1, #0x80 bl MapObject_ClearFlagsBits add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} thumb_func_end MapObjectMovementCmd072_Step0 @@ -2147,7 +2147,7 @@ MapObjectMovementCmd073_Step0: ; 0x02062F18 lsl r1, r1, #8 bl MapObject_SetFlagsBits add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} .balign 4, 0 @@ -2161,7 +2161,7 @@ MapObjectMovementCmd074_Step0: ; 0x02062F30 lsl r1, r1, #8 bl MapObject_ClearFlagsBits add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} .balign 4, 0 @@ -2182,7 +2182,7 @@ sub_02062F48: ; 0x02062F48 bl ov01_02200540 str r0, [r4, #4] add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep pop {r4, r5, r6, pc} thumb_func_end sub_02062F48 @@ -2199,7 +2199,7 @@ MapObjectMovementCmd075_Step1: ; 0x02062F6C ldr r0, [r4, #4] bl sub_02068B48 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r3, r4, r5, pc} _02062F90: @@ -2250,7 +2250,7 @@ sub_02062FAC: ; 0x02062FAC mov r1, #4 bl MapObject_SetFlagsBits add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep pop {r3, r4, r5, r6, r7, pc} .balign 4, 0 thumb_func_end sub_02062FAC @@ -2295,7 +2295,7 @@ _02063026: mov r1, #0 bl sub_0205F328 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, r5, r6, pc} thumb_func_end sub_02062FEC @@ -2490,7 +2490,7 @@ MapObjectMovementCmd100_Step0: ; 0x02063154 mov r1, #9 bl sub_0205F328 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #0 pop {r4, pc} thumb_func_end MapObjectMovementCmd100_Step0 @@ -2512,7 +2512,7 @@ MapObjectMovementCmd100_Step1: ; 0x02063170 mov r1, #0 bl sub_0205F328 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep _02063198: mov r0, #0 pop {r4, pc} @@ -2548,7 +2548,7 @@ _020631B6: lsl r1, r1, #0x14 bl MapObject_ClearFlagsBits add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #0 add sp, #0xc pop {r3, r4, pc} @@ -2596,7 +2596,7 @@ _02063228: add r0, r5, #0 bl sub_02066438 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 add sp, #0xc pop {r4, r5, pc} @@ -2615,7 +2615,7 @@ MapObjectMovementCmd102_Step0: ; 0x02063258 mov r1, #0 bl sub_0205F328 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #0 pop {r4, pc} thumb_func_end MapObjectMovementCmd102_Step0 @@ -2630,7 +2630,7 @@ MapObjectMovementCmd104_Step0: ; 0x02063274 mov r1, #1 bl sub_0205F328 add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #0 pop {r4, pc} thumb_func_end MapObjectMovementCmd104_Step0 @@ -2649,7 +2649,7 @@ MapObjectMovementCmd102_Step1: ; 0x02063290 pop {r4, pc} _020632A6: add r0, r4, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep mov r0, #1 pop {r4, pc} thumb_func_end MapObjectMovementCmd102_Step1 diff --git a/asm/unk_020632B0.s b/asm/unk_020632B0.s index 6dbb4688c..3d4f0a245 100644 --- a/asm/unk_020632B0.s +++ b/asm/unk_020632B0.s @@ -161,7 +161,7 @@ _020633B2: ldr r0, [sp] bl sub_0205F328 ldr r0, [sp] - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep ldr r0, [sp] bl MapObject_CheckVisible cmp r0, #0 @@ -431,7 +431,7 @@ _02063624: mov r1, #0 bl sub_0205F328 add r0, r5, #0 - bl MapObject_IncMovementStep + bl MapObject_IncrementMovementStep add r0, r5, #0 bl MapObject_CheckVisible cmp r0, #0 diff --git a/include/map_object.h b/include/map_object.h index 47b7bca5d..03bfeadd6 100644 --- a/include/map_object.h +++ b/include/map_object.h @@ -77,8 +77,8 @@ struct LocalMapObject { // declared field_system.h /*0x088*/ VecFx32 unk88; /*0x094*/ VecFx32 unk94; /*0x0A0*/ u32 unkA0; - /*0x0A4*/ int movementCmd; - /*0x0A8*/ int movementStep; + /*0x0A4*/ u32 movementCmd; + /*0x0A8*/ u32 movementStep; /*0x0AC*/ u16 unkAC; /*0x0AE*/ u16 unkAE; /*0x0B0*/ SysTask *unkB0; @@ -182,7 +182,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_0205F09C(LocalMapObject *object, u32 param1); +u32 MapObject_GetPriorityPlusValue(LocalMapObject *object, u32 value); BOOL sub_0205F0A8(LocalMapObject *object, u32 objectId, u32 mapId); BOOL sub_0205F0F8(LocalMapObject *object, u32 spriteId, u32 objectId, u32 mapId); u32 MapObjectManager_GetObjectCount(MapObjectManager *manager); @@ -229,7 +229,7 @@ void MapObject_SetXRange(LocalMapObject *object, s32 xRange); s32 MapObject_GetXRange(LocalMapObject *object); void MapObject_SetYRange(LocalMapObject *object, s32 yRange); s32 MapObject_GetYRange(LocalMapObject *object); -void sub_0205F328(LocalMapObject *obj, u32 param1); +void sub_0205F328(LocalMapObject *object, u32 param1); u32 sub_0205F330(LocalMapObject *object); MapObjectManager *MapObject_GetManager(LocalMapObject *object); u8 *sub_0205F370(LocalMapObject *object, s32 size); @@ -242,6 +242,23 @@ u8 *sub_0205F3E8(LocalMapObject *object, s32 size); u8 *sub_0205F40C(LocalMapObject *object); void sub_0205F41C(LocalMapObject *object); void sub_0205F430(LocalMapObject *object); +void sub_0205F47C(LocalMapObject *object, LocalMapObject_UnkCallback callback); +void sub_0205F484(LocalMapObject *object); +void sub_0205F4C0(LocalMapObject *object); +void MapObject_SetMovementCommand(LocalMapObject *object, u32 command); +u32 MapObject_GetMovementCommand(LocalMapObject *object); +void MapObject_SetMovementStep(LocalMapObject *object, u32 step); +void MapObject_IncrementMovementStep(LocalMapObject *object); +u32 MapObject_GetMovementStep(LocalMapObject *object); +void sub_0205F4FC(LocalMapObject *object, u16 param1); +u16 sub_0205F504(LocalMapObject *object); +void sub_0205F50C(LocalMapObject *object, u16 param1); +u16 sub_0205F514(LocalMapObject *object); +void sub_0205F51C(LocalMapObject *object, u16 param1); +u16 sub_0205F524(LocalMapObject *object); +FieldSystem *MapObject_GetFieldSystem(LocalMapObject *object); +u32 MapObject_GetPriority(LocalMapObject *object); +u32 sub_0205F544(LocalMapObject *object); // FIXME: Functions beyond here aren't organized according to the corresponding c file void sub_0205FC94(LocalMapObject *object, u32 movement); @@ -291,8 +308,6 @@ fx32 MapObject_GetPosVecYCoord(LocalMapObject *object); u32 MapObject_GetInitialY(LocalMapObject *object); u32 MapObject_GetInitialHeight(LocalMapObject *object); u32 MapObject_GetInitialX(LocalMapObject *object); -void sub_0205F4AC(LocalMapObject *object); -void sub_0205F4C0(LocalMapObject *object); BOOL MapObject_CheckFlag14(LocalMapObject *object); void MapObject_SetCurrentY(LocalMapObject *object, u32 y); void MapObject_SetCurrentHeight(LocalMapObject *object, u32 height); @@ -311,16 +326,9 @@ s16 ObjectEvent_GetYRange(ObjectEvent *); void MapObject_SetPreviousY(LocalMapObject *object, u32 previous_y); void MapObject_SetPreviousHeight(LocalMapObject *object, u32 previous_height); void MapObject_SetPreviousX(LocalMapObject *object, u32 previous_x); -u32 sub_0205F544(LocalMapObject *object); int MapObject_CheckFlag25(LocalMapObject *object); void MapObject_SetFlag25(LocalMapObject *object, BOOL set); void sub_0205FD20(LocalMapObject *object); -void sub_0205F450(LocalMapObject *object); -void sub_0205F468(LocalMapObject *object, LocalMapObject_UnkCallback callback); -void sub_0205F47C(LocalMapObject *object, LocalMapObject_UnkCallback callback); -void sub_0205F490(LocalMapObject *object, LocalMapObject_UnkCallback callback); -void sub_0205F498(LocalMapObject *object); -void sub_0205F4A4(LocalMapObject *object, LocalMapObject_UnkCallback callback); void sub_0205F4B8(LocalMapObject *object, LocalMapObject_UnkCallback callback); ObjectEvent *ObjectEvent_GetById(u16 id, int num_templates, ObjectEvent *templates); BOOL FieldSystem_FlagCheck(FieldSystem *, u16); @@ -328,8 +336,6 @@ u16 ObjectEvent_GetXCoord(ObjectEvent *template); u32 ObjectEvent_GetHeight(ObjectEvent *template); u16 ObjectEvent_GetYCoord(ObjectEvent *template); UnkLMOCallbackStruct *sub_0205FB00(u32 movement); -void *sub_0205F538(LocalMapObject *object); -void sub_0205F470(LocalMapObject *object); void MapObject_SetFlag14(LocalMapObject *object); LocalMapObject_UnkCallback sub_0205FB18(UnkLMOCallbackStruct *unk); LocalMapObject_UnkCallback sub_0205FB1C(UnkLMOCallbackStruct *unk); @@ -341,7 +347,6 @@ LocalMapObject_UnkCallback sub_0205FB30(UnkLMOCallbackStruct2 *unk); LocalMapObject_UnkCallback sub_0205FB34(UnkLMOCallbackStruct2 *unk); UnkLMOCallbackStruct2 *sub_0205FB38(u32 spriteId); u16 ObjectEvent_GetFlagID(ObjectEvent *); -FieldSystem *MapObject_GetFieldSystem(LocalMapObject *object); void sub_0205FCC4(LocalMapObject *object); void sub_0205FCC8(LocalMapObject *object); void sub_0205FCCC(LocalMapObject *object); @@ -349,18 +354,6 @@ void sub_0205FCD0(LocalMapObject *object); BOOL sub_0205F73C(LocalMapObject *object); BOOL sub_0205F5D4(MapObjectManager *manager); SysTask *sub_0205F340(LocalMapObject *object); -void sub_0205F484(LocalMapObject *object); -void MapObject_SetMovementCommand(LocalMapObject *object, u32 command); -u32 MapObject_GetMovementCommand(LocalMapObject *object); -void MapObject_SetMovementStep(LocalMapObject *object, u32 step); -void MapObject_IncMovementStep(LocalMapObject *object); -u32 MapObject_GetMovementStep(LocalMapObject *object); -void sub_0205F4FC(LocalMapObject *object, u16 a1); -u16 sub_0205F504(LocalMapObject *object); -void sub_0205F50C(LocalMapObject *object, u16 a1); -u16 sub_0205F514(LocalMapObject *object); -void sub_0205F51C(LocalMapObject *object, u16 a1); -u16 sub_0205F524(LocalMapObject *object); void sub_0205F568(MapObjectManager *manager); u32 sub_0205F5E8(LocalMapObject *object, u32 bits); void sub_0205F5F8(MapObjectManager *manager, BOOL clear); diff --git a/src/field/overlay_01_021FFECC.c b/src/field/overlay_01_021FFECC.c index b434a057a..a6f11afa1 100644 --- a/src/field/overlay_01_021FFECC.c +++ b/src/field/overlay_01_021FFECC.c @@ -70,7 +70,7 @@ void ov01_021FFF5C(LocalMapObject *mapObject, int a1) { temp2.unkC = mapObject; temp2.unk10 = ov01_021FFF50(val1, a1); - int val3 = sub_0205F09C(mapObject, 2); + int val3 = MapObject_GetPriorityPlusValue(mapObject, 2); ov01_021F1620(fieldSystem, &ov01_02209280, &temp, 0, &temp2, val3); } diff --git a/src/map_object.c b/src/map_object.c index 00428967d..eb29cadcd 100644 --- a/src/map_object.c +++ b/src/map_object.c @@ -73,6 +73,14 @@ static void sub_0205F414(LocalMapObject *object, LocalMapObject_UnkCallback call static void sub_0205F428(LocalMapObject *object, LocalMapObject_UnkCallback callback); static void sub_0205F43C(LocalMapObject *object, LocalMapObject_UnkCallback callback); static void sub_0205F444(LocalMapObject *object); +static void sub_0205F450(LocalMapObject *object); +static void sub_0205F468(LocalMapObject *object, LocalMapObject_UnkCallback callback); +static void sub_0205F470(LocalMapObject *object); +static void sub_0205F490(LocalMapObject *object, LocalMapObject_UnkCallback callback); +static void sub_0205F498(LocalMapObject *object); +static void sub_0205F4A4(LocalMapObject *object, LocalMapObject_UnkCallback callback); +static void sub_0205F4AC(LocalMapObject *object); +static void sub_0205F4B8(LocalMapObject *object, LocalMapObject_UnkCallback callback); MapObjectManager *MapObjectManager_Init(FieldSystem *fieldSystem, u32 objectCount, u32 priority) { MapObjectManager *ret = MapObjectManager_New(objectCount); @@ -791,8 +799,8 @@ static void sub_0205F058(LocalMapObject *object, u32 mapNo, ObjectEvent *objectE MapObject_SetMapID(object, mapNo); } -u32 sub_0205F09C(LocalMapObject *object, u32 param1) { - return (u32)(sub_0205F538(object) + param1); +u32 MapObject_GetPriorityPlusValue(LocalMapObject *object, u32 value) { + return (u32)((void *)MapObject_GetPriority(object) + value); // MUST be cast to void * to match } BOOL sub_0205F0A8(LocalMapObject *object, u32 objectId, u32 mapId) { @@ -1220,16 +1228,16 @@ static void sub_0205F444(LocalMapObject *object) { object->unkC0(object); } -void sub_0205F450(LocalMapObject *object) { +static void sub_0205F450(LocalMapObject *object) { UnkLMOCallbackStruct *unk = sub_0205FB00(MapObject_GetMovement(object)); unk->unk10(object); } -void sub_0205F468(LocalMapObject *object, LocalMapObject_UnkCallback callback) { +static void sub_0205F468(LocalMapObject *object, LocalMapObject_UnkCallback callback) { object->unkC4 = callback; } -void sub_0205F470(LocalMapObject *object) { +static void sub_0205F470(LocalMapObject *object) { object->unkC4(object); } @@ -1241,23 +1249,23 @@ void sub_0205F484(LocalMapObject *object) { object->unkC8(object); } -void sub_0205F490(LocalMapObject *object, LocalMapObject_UnkCallback callback) { +static void sub_0205F490(LocalMapObject *object, LocalMapObject_UnkCallback callback) { object->unkCC = callback; } -void sub_0205F498(LocalMapObject *object) { +static void sub_0205F498(LocalMapObject *object) { object->unkCC(object); } -void sub_0205F4A4(LocalMapObject *object, LocalMapObject_UnkCallback callback) { +static void sub_0205F4A4(LocalMapObject *object, LocalMapObject_UnkCallback callback) { object->unkD0 = callback; } -void sub_0205F4AC(LocalMapObject *object) { +static void sub_0205F4AC(LocalMapObject *object) { object->unkD0(object); } -void sub_0205F4B8(LocalMapObject *object, LocalMapObject_UnkCallback callback) { +static void sub_0205F4B8(LocalMapObject *object, LocalMapObject_UnkCallback callback) { object->unkD4 = callback; } @@ -1277,7 +1285,7 @@ void MapObject_SetMovementStep(LocalMapObject *object, u32 step) { object->movementStep = step; } -void MapObject_IncMovementStep(LocalMapObject *object) { +void MapObject_IncrementMovementStep(LocalMapObject *object) { object->movementStep++; } @@ -1285,24 +1293,24 @@ u32 MapObject_GetMovementStep(LocalMapObject *object) { return object->movementStep; } -void sub_0205F4FC(LocalMapObject *object, u16 a1) { - object->unkAC = a1; +void sub_0205F4FC(LocalMapObject *object, u16 param1) { + object->unkAC = param1; } u16 sub_0205F504(LocalMapObject *object) { return object->unkAC; } -void sub_0205F50C(LocalMapObject *object, u16 a1) { - object->unkAE = a1; +void sub_0205F50C(LocalMapObject *object, u16 param1) { + object->unkAE = param1; } u16 sub_0205F514(LocalMapObject *object) { return object->unkAE; } -void sub_0205F51C(LocalMapObject *object, u16 a1) { - object->unk128 = a1; +void sub_0205F51C(LocalMapObject *object, u16 param1) { + object->unk128 = param1; } u16 sub_0205F524(LocalMapObject *object) { @@ -1313,8 +1321,8 @@ FieldSystem *MapObject_GetFieldSystem(LocalMapObject *object) { return MapObjectManager_GetFieldSystem(MapObject_GetManagerFromManager(object)); } -void *sub_0205F538(LocalMapObject *object) { // TODO: this is not void - return (void *)MapObjectManager_GetPriority(MapObject_GetManager(object)); +u32 MapObject_GetPriority(LocalMapObject *object) { + return MapObjectManager_GetPriority(MapObject_GetManager(object)); } u32 sub_0205F544(LocalMapObject *object) { @@ -1322,6 +1330,7 @@ u32 sub_0205F544(LocalMapObject *object) { return MapObject_GetEventFlag(object); } +// todo: enum void sub_0205F55C(MapObjectManager *manager) { MapObjectManager_SetFlagsBits(manager, (1 << 2) | (1 << 1)); }