Bring all movement function names up-to-date with pokeruby

This commit is contained in:
Marcus Huderle 2018-06-13 17:51:26 -05:00
parent aa9a45c16f
commit 4d13e3394a
35 changed files with 5867 additions and 4059 deletions

View File

@ -14294,7 +14294,7 @@ sub_81963F0: @ 81963F0
lsls r0, 2
ldr r1, =gEventObjects
adds r0, r1
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
bl sub_80D338C
bl UnfreezeEventObjects
bl ScriptContext2_Disable

View File

@ -27222,7 +27222,7 @@ _081A896E:
lsls r0, 2
ldr r1, =gEventObjects
adds r0, r1
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
bl sub_80D338C
pop {r4}
pop {r0}

View File

@ -189,7 +189,7 @@ sub_809C014: @ 809C014
strh r1, [r0]
ldr r0, =gSelectedEventObject
strb r1, [r0]
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r6, r0, 24
mov r4, sp
@ -2452,7 +2452,7 @@ _0809D276:
GetEventObjectScriptPointerForComparison: @ 809D280
push {r4,r5,lr}
sub sp, 0x8
bl player_get_direction_upper_nybble
bl GetPlayerMovementDirection
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
@ -2481,7 +2481,7 @@ GetEventObjectScriptPointerForComparison: @ 809D280
sub_809D2BC: @ 809D2BC
push {r4,lr}
sub sp, 0x8
bl player_get_direction_upper_nybble
bl GetPlayerMovementDirection
mov r4, sp
mov r0, sp
bl player_get_pos_to_and_height

View File

@ -931,7 +931,7 @@ _08154624:
_08154632:
adds r0, r5, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
ldrh r1, [r5, 0x2E]
lsls r1, 24
lsrs r1, 24
@ -1262,7 +1262,7 @@ _081548B4:
_081548D4:
adds r0, r5, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
ldrh r1, [r5, 0x2E]
lsls r1, 24
lsrs r1, 24
@ -1523,7 +1523,7 @@ _08154AB2:
lsls r1, 29
lsrs r1, 31
adds r0, r4, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
_08154AF2:
add sp, 0x4
pop {r3}
@ -1729,7 +1729,7 @@ sub_8154C7C: @ 8154C7C
_08154C92:
adds r0, r1, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
pop {r0}
bx r0
thumb_func_end sub_8154C7C
@ -1758,7 +1758,7 @@ sub_8154CA0: @ 8154CA0
lsls r1, 29
lsrs r1, 31
adds r0, r4, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
movs r1, 0x30
ldrsh r0, [r4, r1]
cmp r0, 0x38
@ -1910,7 +1910,7 @@ _08154DCA:
strh r0, [r4, 0x22]
adds r0, r4, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
_08154E0A:
add sp, 0x4
pop {r4}
@ -2162,7 +2162,7 @@ _08154FFC:
strb r0, [r1]
adds r0, r4, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
ldr r1, [r5, 0x10]
ldr r0, [r4, 0x34]
cmp r1, r0
@ -2381,7 +2381,7 @@ _081551A0:
strb r0, [r1]
adds r0, r4, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
_081551E4:
add sp, 0x4
pop {r4,r5}
@ -2789,7 +2789,7 @@ sub_815550C: @ 815550C
push {r4,lr}
adds r4, r0, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
adds r0, r4, 0
adds r0, 0x3F
ldrb r1, [r0]
@ -3493,7 +3493,7 @@ _08155A46:
strb r0, [r1]
adds r0, r4, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
_08155A76:
add sp, 0x4
pop {r4-r6}
@ -3567,7 +3567,7 @@ sub_8155AEC: @ 8155AEC
strh r1, [r4, 0x22]
adds r0, r4, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
ldrh r1, [r4, 0x3E]
ldr r0, =0x00001004
ands r0, r1
@ -4460,7 +4460,7 @@ sub_8156194: @ 8156194
_081561B2:
adds r0, r4, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
ldrh r0, [r4, 0x2E]
lsls r0, 24
lsrs r0, 24
@ -4492,7 +4492,7 @@ sub_81561D0: @ 81561D0
_081561EE:
adds r0, r2, 0
movs r1, 0
bl sub_80979D4
bl UpdateEventObjectSpriteVisibility
_081561F6:
pop {r0}
bx r0

View File

@ -5,9 +5,9 @@
.text
thumb_func_start EventObjectCB_NoMovement2
@ void EventObjectCB_NoMovement2(struct obj *object)
EventObjectCB_NoMovement2: @ 808A998
thumb_func_start MovementType_Player
@ void MovementType_Player(struct obj *object)
MovementType_Player: @ 808A998
push {lr}
adds r1, r0, 0
movs r0, 0x2E
@ -18,11 +18,11 @@ EventObjectCB_NoMovement2: @ 808A998
ldr r2, =gEventObjects
adds r0, r2
ldr r2, =EventObjectCB2_NoMovement2
bl EventObjectStep
bl UpdateEventObjectCurrentMovement
pop {r0}
bx r0
.pool
thumb_func_end EventObjectCB_NoMovement2
thumb_func_end MovementType_Player
thumb_func_start EventObjectCB2_NoMovement2
EventObjectCB2_NoMovement2: @ 808A9BC
@ -93,17 +93,17 @@ TryInterruptEventObjectSpecialAnim: @ 808AA38
lsls r1, 24
lsrs r5, r1, 24
adds r6, r5, 0
bl EventObjectIsSpecialAnimOrDirectionSequenceAnimActive
bl EventObjectIsMovementOverridden
lsls r0, 24
cmp r0, 0
beq _0808AA92
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
bne _0808AA92
adds r0, r4, 0
bl EventObjectGetSpecialAnim
bl EventObjectGetHeldMovementActionId
lsls r0, 24
movs r1, 0xE7
lsls r1, 24
@ -123,7 +123,7 @@ _0808AA74:
beq _0808AA84
_0808AA7C:
adds r0, r4, 0
bl EventObjectClearAnim
bl EventObjectClearHeldMovement
b _0808AA92
_0808AA84:
adds r0, r6, 0
@ -302,7 +302,7 @@ ForcedMovement_None: @ 808AB94
ldrb r1, [r0, 0x18]
lsls r1, 28
lsrs r1, 28
bl EventObjectSetDirection
bl SetEventObjectDirection
ldrb r1, [r4]
movs r0, 0xBF
ands r0, r1
@ -697,7 +697,7 @@ CheckMovementInputNotOnBike: @ 808AE98
b _0808AED2
.pool
_0808AEB0:
bl player_get_direction_upper_nybble
bl GetPlayerMovementDirection
lsls r0, 24
lsrs r0, 24
cmp r4, r0
@ -725,7 +725,7 @@ _0808AED2:
@ void PlayerNotOnBikeNotMoving(u8 direction, u8 heldKeys)
PlayerNotOnBikeNotMoving: @ 808AEDC
push {lr}
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl PlayerFaceDirection
@ -963,7 +963,7 @@ CheckForEventObjectCollision: @ 808B094
adds r1, r5, 0
adds r2, r4, 0
adds r3, r6, 0
bl npc_block_way
bl GetCollisionAtCoords
lsls r0, 24
lsrs r0, 24
mov r1, sp
@ -1061,7 +1061,7 @@ sub_808B164: @ 808B164
adds r1, r5, 0
adds r2, r4, 0
adds r3, r6, 0
bl npc_block_way
bl GetCollisionAtCoords
lsls r0, 24
lsrs r0, 24
mov r1, sp
@ -1211,7 +1211,7 @@ sub_808B238: @ 808B238
ldrsh r2, [r5, r0]
adds r0, r4, 0
adds r3, r7, 0
bl npc_block_way
bl GetCollisionAtCoords
lsls r0, 24
cmp r0, 0
bne _0808B2D8
@ -1698,7 +1698,7 @@ PlayerIsAnimActive: @ 808B63C
lsls r0, 2
ldr r1, =gEventObjects
adds r0, r1
bl EventObjectIsSpecialAnimOrDirectionSequenceAnimActive
bl EventObjectIsMovementOverridden
lsls r0, 24
lsrs r0, 24
pop {r1}
@ -1717,7 +1717,7 @@ PlayerCheckIfAnimFinishedOrInactive: @ 808B660
lsls r0, 2
ldr r1, =gEventObjects
adds r0, r1
bl EventObjectCheckIfSpecialAnimFinishedOrInactive
bl EventObjectCheckHeldMovementStatus
lsls r0, 24
lsrs r0, 24
pop {r1}
@ -1740,8 +1740,8 @@ player_set_x22: @ 808B684
.pool
thumb_func_end player_set_x22
thumb_func_start player_get_x22
player_get_x22: @ 808B6A0
thumb_func_start PlayerGetCopyableMovement
PlayerGetCopyableMovement: @ 808B6A0
ldr r2, =gEventObjects
ldr r0, =gPlayerAvatar
ldrb r1, [r0, 0x5]
@ -1753,7 +1753,7 @@ player_get_x22: @ 808B6A0
ldrb r0, [r0]
bx lr
.pool
thumb_func_end player_get_x22
thumb_func_end PlayerGetCopyableMovement
thumb_func_start sub_808B6BC
sub_808B6BC: @ 808B6BC
@ -1768,7 +1768,7 @@ sub_808B6BC: @ 808B6BC
lsls r0, 2
ldr r2, =gEventObjects
adds r0, r2
bl EventObjectForceSetSpecialAnim
bl EventObjectForceSetHeldMovement
pop {r0}
bx r0
.pool
@ -1796,7 +1796,7 @@ PlayerSetAnimId: @ 808B6E4
ldr r1, =gEventObjects
adds r0, r1
adds r1, r5, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
_0808B712:
pop {r4,r5}
pop {r0}
@ -1810,7 +1810,7 @@ PlayerGoSpeed1: @ 808B720
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetGoSpeed0AnimId
bl GetWalkNormalMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1825,7 +1825,7 @@ PlayerGoSpeed2: @ 808B738
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetGoSpeed1AnimId
bl GetWalkFastMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1840,7 +1840,7 @@ PlayerGoSpeed3: @ 808B750
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetGoSpeed2AnimId
bl GetRideWaterCurrentMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1855,7 +1855,7 @@ PlayerGoSpeed4: @ 808B768
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetGoSpeed3AnimId
bl GetWalkFastestMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1870,7 +1870,7 @@ PlayerRun: @ 808B780
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetRunAnimId
bl GetPlayerRunMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1889,7 +1889,7 @@ PlayerOnBikeCollide: @ 808B798
adds r0, r4, 0
bl PlayCollisionSoundIfNotFacingWarp
adds r0, r4, 0
bl GetStepInPlaceDelay16AnimId
bl GetWalkInPlaceNormalMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1905,7 +1905,7 @@ PlayerOnBikeCollideWithFarawayIslandMew: @ 808B7BC
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetStepInPlaceDelay16AnimId
bl GetWalkInPlaceNormalMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1924,7 +1924,7 @@ PlayerNotOnBikeCollide: @ 808B7D4
adds r0, r4, 0
bl PlayCollisionSoundIfNotFacingWarp
adds r0, r4, 0
bl GetStepInPlaceDelay32AnimId
bl GetWalkInPlaceSlowMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1940,7 +1940,7 @@ PlayerNotOnBikeCollideWithFarawayIslandMew: @ 808B7F8
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetStepInPlaceDelay32AnimId
bl GetWalkInPlaceSlowMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -1955,7 +1955,7 @@ PlayerFaceDirection: @ 808B810
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetFaceDirectionAnimId
bl GetFaceDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
@ -1970,7 +1970,7 @@ PlayerTurnInPlace: @ 808B828
push {lr}
lsls r0, 24
lsrs r0, 24
bl GetStepInPlaceDelay8AnimId
bl GetWalkInPlaceFastMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
@ -1989,7 +1989,7 @@ PlayerJumpLedge: @ 808B840
movs r0, 0xA
bl PlaySE
adds r0, r4, 0
bl GetJumpLedgeAnimId
bl GetJump2MovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x8
@ -2022,7 +2022,7 @@ _0808B872:
ldrb r0, [r0, 0x18]
lsls r0, 28
lsrs r0, 28
bl GetFaceDirectionAnimId
bl GetFaceDirectionMovementAction
lsls r0, 24
lsrs r0, 24
bl sub_808B6BC
@ -2038,7 +2038,7 @@ PlayerIdleWheelie: @ 808B8A8
push {lr}
lsls r0, 24
lsrs r0, 24
bl sub_8093648
bl GetAcroWheelieFaceDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
@ -2052,7 +2052,7 @@ PlayerStartWheelie: @ 808B8C0
push {lr}
lsls r0, 24
lsrs r0, 24
bl sub_8093674
bl GetAcroPopWheelieFaceDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
@ -2066,7 +2066,7 @@ PlayerEndWheelie: @ 808B8D8
push {lr}
lsls r0, 24
lsrs r0, 24
bl sub_80936A0
bl GetAcroEndWheelieFaceDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
@ -2084,7 +2084,7 @@ PlayerStandingHoppingWheelie: @ 808B8F0
movs r0, 0x22
bl PlaySE
adds r0, r4, 0
bl sub_80936CC
bl GetAcroWheelieHopFaceDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
@ -2103,7 +2103,7 @@ PlayerMovingHoppingWheelie: @ 808B914
movs r0, 0x22
bl PlaySE
adds r0, r4, 0
bl sub_80936F8
bl GetAcroWheelieHopDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -2122,7 +2122,7 @@ PlayerLedgeHoppingWheelie: @ 808B938
movs r0, 0x22
bl PlaySE
adds r0, r4, 0
bl sub_8093724
bl GetAcroWheelieJumpDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x8
@ -2141,7 +2141,7 @@ PlayerAcroTurnJump: @ 808B95C
movs r0, 0x22
bl PlaySE
adds r0, r4, 0
bl sub_80934E8
bl GetJumpInPlaceTurnAroundMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
@ -2160,7 +2160,7 @@ sub_808B980: @ 808B980
movs r0, 0x7
bl PlaySE
adds r0, r4, 0
bl sub_8093750
bl GetAcroWheelieInPlaceDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -2175,7 +2175,7 @@ sub_808B9A4: @ 808B9A4
push {lr}
lsls r0, 24
lsrs r0, 24
bl sub_809377C
bl GetAcroPopWheelieMoveDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -2189,7 +2189,7 @@ sub_808B9BC: @ 808B9BC
push {lr}
lsls r0, 24
lsrs r0, 24
bl sub_80937A8
bl GetAcroWheelieMoveDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -2203,7 +2203,7 @@ npc_use_some_d2s: @ 808B9D4
push {lr}
lsls r0, 24
lsrs r0, 24
bl d2s_08064034
bl GetAcroEndWheelieMoveDirectionMovementAction
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
@ -2291,7 +2291,7 @@ GetXYCoordsOneStepInFrontOfPlayer: @ 808BA68
adds r0, r3
ldrh r0, [r0, 0x12]
strh r0, [r5]
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
adds r1, r4, 0
@ -2462,9 +2462,9 @@ _0808BC30:
bx r1
thumb_func_end plaer_get_pos_including_state_based_drift
thumb_func_start player_get_direction_lower_nybble
@ u8 player_get_direction_lower_nybble()
player_get_direction_lower_nybble: @ 808BC38
thumb_func_start GetPlayerFacingDirection
@ u8 GetPlayerFacingDirection()
GetPlayerFacingDirection: @ 808BC38
ldr r2, =gEventObjects
ldr r0, =gPlayerAvatar
ldrb r1, [r0, 0x5]
@ -2477,11 +2477,11 @@ player_get_direction_lower_nybble: @ 808BC38
lsrs r0, 28
bx lr
.pool
thumb_func_end player_get_direction_lower_nybble
thumb_func_end GetPlayerFacingDirection
thumb_func_start player_get_direction_upper_nybble
@ u8 player_get_direction_upper_nybble()
player_get_direction_upper_nybble: @ 808BC58
thumb_func_start GetPlayerMovementDirection
@ u8 GetPlayerMovementDirection()
GetPlayerMovementDirection: @ 808BC58
ldr r2, =gEventObjects
ldr r0, =gPlayerAvatar
ldrb r1, [r0, 0x5]
@ -2493,7 +2493,7 @@ player_get_direction_upper_nybble: @ 808BC58
lsrs r0, 4
bx lr
.pool
thumb_func_end player_get_direction_upper_nybble
thumb_func_end GetPlayerMovementDirection
thumb_func_start PlayerGetZCoord
@ u8 PlayerGetZCoord()
@ -2586,7 +2586,7 @@ sub_808BCF4: @ 808BCF4
lsls r1, 28
lsrs r1, 28
adds r0, r4, 0
bl EventObjectSetDirection
bl SetEventObjectDirection
movs r0, 0x6
bl TestPlayerAvatarFlags
lsls r0, 24
@ -2780,7 +2780,7 @@ _0808BE46:
@ bool8 IsPlayerSurfingNorth()
IsPlayerSurfingNorth: @ 808BE50
push {lr}
bl player_get_direction_upper_nybble
bl GetPlayerMovementDirection
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
@ -2833,7 +2833,7 @@ IsPlayerFacingSurfableFishableWater: @ 808BE74
lsls r3, 28
lsrs r3, 28
adds r0, r4, 0
bl npc_block_way
bl GetCollisionAtCoords
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
@ -3202,7 +3202,7 @@ sub_808C15C: @ 808C15C
ldr r0, =gSprites
adds r4, r0
adds r0, r5, 0
bl sub_8092A0C
bl GetFishingDirectionAnimNum
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -3244,7 +3244,7 @@ sub_808C1B4: @ 808C1B4
mov r8, r0
add r4, r8
adds r0, r5, 0
bl sub_80929BC
bl GetAcroWheelieDirectionAnimNum
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -3292,7 +3292,7 @@ sub_808C228: @ 808C228
ldr r0, =gSprites
adds r4, r0
adds r0, r5, 0
bl EventObjectDirectionToImageAnimId
bl GetFaceDirectionAnimNum
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -3474,49 +3474,49 @@ do_boulder_dust: @ 808C3C4
adds r5, r1, 0
adds r4, r2, 0
adds r0, r5, 0
bl EventObjectIsSpecialAnimActive
bl EventObjectIsHeldMovementActive
lsls r0, 24
cmp r0, 0
beq _0808C3DE
adds r0, r5, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
_0808C3DE:
adds r0, r4, 0
bl EventObjectIsSpecialAnimActive
bl EventObjectIsHeldMovementActive
lsls r0, 24
cmp r0, 0
beq _0808C3F0
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
_0808C3F0:
adds r0, r5, 0
bl EventObjectIsSpecialAnimOrDirectionSequenceAnimActive
bl EventObjectIsMovementOverridden
lsls r0, 24
cmp r0, 0
bne _0808C472
adds r0, r4, 0
bl EventObjectIsSpecialAnimOrDirectionSequenceAnimActive
bl EventObjectIsMovementOverridden
lsls r0, 24
cmp r0, 0
bne _0808C472
adds r0, r5, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
ldrb r0, [r6, 0xC]
bl GetStepInPlaceDelay16AnimId
bl GetWalkInPlaceNormalMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
ldrb r0, [r6, 0xC]
bl GetSimpleGoAnimId
bl GetWalkSlowMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
ldr r2, =gFieldEffectArguments
movs r1, 0x10
ldrsh r0, [r4, r1]
@ -3558,19 +3558,19 @@ sub_808C484: @ 808C484
adds r4, r1, 0
adds r5, r2, 0
adds r0, r4, 0
bl EventObjectCheckIfSpecialAnimFinishedOrInactive
bl EventObjectCheckHeldMovementStatus
lsls r0, 24
cmp r0, 0
beq _0808C4C6
adds r0, r5, 0
bl EventObjectCheckIfSpecialAnimFinishedOrInactive
bl EventObjectCheckHeldMovementStatus
lsls r0, 24
cmp r0, 0
beq _0808C4C6
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
adds r0, r5, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
ldr r1, =gPlayerAvatar
movs r0, 0
strb r0, [r1, 0x6]
@ -3648,7 +3648,7 @@ sub_808C544: @ 808C544
movs r0, 0x1
strb r0, [r5, 0x6]
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _0808C5A0
@ -3657,12 +3657,12 @@ sub_808C544: @ 808C544
ldrb r0, [r4, 0x18]
lsls r0, 28
lsrs r0, 28
bl sub_80934BC
bl GetJumpInPlaceMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
ldrh r0, [r6, 0xA]
adds r0, 0x1
strh r0, [r6, 0xA]
@ -3772,7 +3772,7 @@ sub_808C644: @ 808C644
movs r2, 0x4
bl memcpy
adds r0, r5, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _0808C6AC
@ -3782,12 +3782,12 @@ sub_808C644: @ 808C644
add r0, sp
ldrb r6, [r0]
adds r0, r6, 0
bl GetFaceDirectionAnimId
bl GetFaceDirectionMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
ldrb r0, [r4, 0xA]
cmp r6, r0
bne _0808C68A
@ -3831,7 +3831,7 @@ sub_808C6BC: @ 808C6BC
movs r2, 0x5
bl memcpy
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _0808C6EC
@ -3840,7 +3840,7 @@ sub_808C6BC: @ 808C6BC
add r0, sp
ldrb r1, [r0]
adds r0, r4, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
movs r0, 0x1
strh r0, [r5, 0x8]
_0808C6EC:
@ -3858,7 +3858,7 @@ sub_808C6FC: @ 808C6FC
adds r4, r0, 0
adds r5, r1, 0
adds r0, r5, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _0808C740
@ -3866,12 +3866,12 @@ sub_808C6FC: @ 808C6FC
bl GetOppositeDirection
lsls r0, 24
lsrs r0, 24
bl GetSimpleGoAnimId
bl GetWalkSlowMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
bl ScriptContext2_Disable
ldr r1, =gPlayerAvatar
movs r0, 0
@ -3939,12 +3939,12 @@ taskFF_0805D1D4: @ 808C7A8
ldr r1, =gEventObjects
adds r5, r0, r1
adds r0, r5, 0
bl EventObjectIsSpecialAnimOrDirectionSequenceAnimActive
bl EventObjectIsMovementOverridden
lsls r0, 24
cmp r0, 0
beq _0808C7D4
adds r0, r5, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _0808C7FC
@ -3958,12 +3958,12 @@ _0808C7D4:
lsls r4, 3
adds r4, r0
ldrb r0, [r4, 0x8]
bl sub_8093540
bl GetJumpSpecialMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
ldr r0, =sub_808C814
str r0, [r4]
_0808C7FC:
@ -3986,7 +3986,7 @@ sub_808C814: @ 808C814
ldr r1, =gEventObjects
adds r4, r0, r1
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _0808C87A
@ -4000,12 +4000,12 @@ sub_808C814: @ 808C814
ldrb r0, [r4, 0x18]
lsls r0, 28
lsrs r0, 28
bl GetFaceDirectionAnimId
bl GetFaceDirectionMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
movs r0, 0
strb r0, [r6, 0x6]
bl ScriptContext2_Disable
@ -4142,7 +4142,7 @@ fish1: @ 808C918
lsls r4, 2
adds r4, r3
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimActive
bl EventObjectClearHeldMovementIfActive
ldrb r0, [r4, 0x1]
movs r1, 0x8
orrs r0, r1
@ -4373,10 +4373,10 @@ _0808CB32:
lsls r4, 2
ldr r0, =gSprites
adds r4, r0
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl sub_8092A2C
bl GetFishingBiteDirectionAnimNum
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -4671,10 +4671,10 @@ fishB: @ 808CD94
lsls r4, 2
ldr r0, =gSprites
adds r4, r0
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl sub_8092A1C
bl GetFishingNoCatchDirectionAnimNum
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -4719,10 +4719,10 @@ fishC: @ 808CE04
lsls r4, 2
ldr r0, =gSprites
adds r4, r0
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl sub_8092A1C
bl GetFishingNoCatchDirectionAnimNum
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
@ -4956,7 +4956,7 @@ _0808CFF0:
bhi _0808D022
movs r0, 0x8
strh r0, [r4, 0x24]
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
cmp r0, 0x3
@ -5066,7 +5066,7 @@ _0808D0E8:
b _0808D18A
_0808D0EE:
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _0808D18A
@ -5257,12 +5257,12 @@ _0808D25E:
ldrsh r0, [r5, r3]
adds r0, r1
ldrb r0, [r0]
bl GetFaceDirectionAnimId
bl GetFaceDirectionMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl EventObjectForceSetSpecialAnim
bl EventObjectForceSetHeldMovement
movs r0, 0
mov r9, r0
strh r6, [r5, 0x2]
@ -5414,7 +5414,7 @@ sub_808D38C: @ 808D38C
ble _0808D3E4
_0808D3A8:
adds r0, r5, 0
bl EventObjectCheckIfSpecialAnimFinishedOrInactive
bl EventObjectCheckHeldMovementStatus
lsls r0, 24
cmp r0, 0
beq _0808D3E4
@ -5424,12 +5424,12 @@ _0808D3A8:
lsrs r0, 28
adds r0, r4
ldrb r0, [r0]
bl GetFaceDirectionAnimId
bl GetFaceDirectionMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl EventObjectForceSetSpecialAnim
bl EventObjectForceSetHeldMovement
movs r0, 0
strh r0, [r6]
ldrb r0, [r5, 0x18]

View File

@ -8413,7 +8413,7 @@ _080AF4A4:
ldr r1, =gEventObjects
adds r0, r1
movs r1, 0x8
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
movs r0, 0x2
strh r0, [r5, 0x8]
b _080AF54A
@ -8443,7 +8443,7 @@ _080AF4DC:
lsls r0, 2
ldr r1, =gEventObjects
adds r0, r1
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
movs r0, 0x3
strh r0, [r5, 0x8]
b _080AF54A
@ -8532,15 +8532,15 @@ _080AF5A2:
lsls r4, 2
ldr r0, =gEventObjects
adds r4, r0
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl GetGoSpeed0AnimId
bl GetWalkNormalMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
movs r0, 0x2
strh r0, [r5, 0x8]
b _080AF60A
@ -9183,7 +9183,7 @@ _080AFB26:
lsls r0, 2
ldr r4, =gEventObjects
adds r0, r4
bl EventObjectClearAnimIfSpecialAnimActive
bl EventObjectClearHeldMovementIfActive
movs r0, 0xFF
movs r1, 0
movs r2, 0
@ -9196,7 +9196,7 @@ _080AFB26:
lsls r0, 2
adds r0, r4
movs r1, 0x9
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
movs r0, 0x2
strh r0, [r5, 0x8]
b _080AFBE8
@ -9227,7 +9227,7 @@ _080AFB6C:
lsls r0, 2
ldr r1, =gEventObjects
adds r0, r1
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
movs r0, 0
bl sub_80AF0F4
movs r0, 0x3

View File

@ -766,7 +766,7 @@ SpawnLinkPartnerEventObject: @ 81382A0
lsls r0, 24
lsrs r0, 24
mov r10, r0
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
adds r1, r0, 0
@ -1989,7 +1989,7 @@ PCTurnOnEffect_0: @ 8138D10
cmp r0, 0x6
bne _08138D7C
strh r5, [r4, 0xE]
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
adds r1, r0, 0
@ -2134,7 +2134,7 @@ PCTurnOffEffect: @ 8138E2C
movs r6, 0
movs r5, 0
movs r4, 0
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
adds r1, r0, 0

View File

@ -567,7 +567,7 @@ sub_80FA004: @ 80FA004
ldrh r0, [r0]
cmp r0, 0x1
beq _080FA0AE
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
@ -1493,7 +1493,7 @@ sub_80FA794: @ 80FA794
lsls r1, 16
lsrs r4, r1, 16
adds r6, r4, 0
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
@ -1815,7 +1815,7 @@ sub_80FAA7C: @ 80FAA7C
movs r3, 0
ldrsh r0, [r4, r3]
str r0, [r1, 0x18]
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
@ -2315,29 +2315,29 @@ sub_80FAEF0: @ 80FAEF0
ldr r1, =gEventObjects
adds r4, r0, r1
adds r0, r4, 0
bl EventObjectIsSpecialAnimOrDirectionSequenceAnimActive
bl EventObjectIsMovementOverridden
lsls r0, 24
cmp r0, 0
beq _080FAF1C
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _080FAF4E
_080FAF1C:
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl sub_808C228
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl GetStepInPlaceDelay16AnimId
bl GetWalkInPlaceNormalMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
@ -2365,7 +2365,7 @@ sub_80FAF64: @ 80FAF64
ldr r1, =gEventObjects
adds r5, r0, r1
adds r0, r5, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
beq _080FAFC8
@ -2381,15 +2381,15 @@ sub_80FAF64: @ 80FAF64
asrs r0, 16
cmp r0, 0x9
bgt _080FAFC4
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
bl GetStepInPlaceDelay16AnimId
bl GetWalkInPlaceNormalMovementAction
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
b _080FAFC8
.pool
_080FAFC4:

View File

@ -13609,13 +13609,13 @@ sub_8019AD8: @ 8019AD8
ldr r1, =gEventObjects
adds r4, r0, r1
adds r0, r4, 0
bl EventObjectIsSpecialAnimOrDirectionSequenceAnimActive
bl EventObjectIsMovementOverridden
lsls r0, 24
cmp r0, 0
bne _08019B30
ldrb r1, [r5]
adds r0, r4, 0
bl EventObjectSetSpecialAnim
bl EventObjectSetHeldMovement
lsls r0, 24
cmp r0, 0
bne _08019B30
@ -13655,7 +13655,7 @@ sub_8019B3C: @ 8019B3C
ldr r1, =gEventObjects
adds r4, r0, r1
adds r0, r4, 0
bl EventObjectClearAnimIfSpecialAnimFinished
bl EventObjectClearHeldMovementIfFinished
lsls r0, 24
cmp r0, 0
bne _08019B84
@ -13668,7 +13668,7 @@ _08019B84:
cmp r0, 0
bne _08019B96
adds r0, r4, 0
bl npc_sync_anim_pause_bits
bl UnfreezeEventObject
b _08019B9C
_08019B96:
adds r0, r4, 0
@ -14619,7 +14619,7 @@ sub_801A2A8: @ 801A2A8
b _0801A396
_0801A2C4:
ldr r4, =gUnknown_082F076A
bl player_get_direction_lower_nybble
bl GetPlayerFacingDirection
lsls r0, 24
lsrs r0, 24
adds r0, r4

View File

@ -38,7 +38,7 @@ gFieldEffectScriptPointers:: @ 82DB9D4
.4byte gFieldEffectScript_Unknown30
.4byte gFieldEffectScript_UseFly
.4byte gFieldEffectScript_FlyIn
.4byte gFieldEffectScript_ExclamationMarkIcon2
.4byte gFieldEffectScript_QuestionMarkIcon
.4byte gFieldEffectScript_FeetInFlowingWater
.4byte gFieldEffectScript_BikeTireTracks
.4byte gFieldEffectScript_SandDisguisePlaceholder
@ -74,7 +74,7 @@ gFieldEffectScriptPointers:: @ 82DB9D4
.4byte gFieldEffectScript_Unknown66
gFieldEffectScript_ExclamationMarkIcon1:: @ 82DBAE0
field_eff_callnative FldEff_ExclamationMarkIcon1
field_eff_callnative FldEff_ExclamationMarkIcon
field_eff_end
gFieldEffectScript_UseCutOnTallGrass:: @ 82DBAE6
@ -206,8 +206,8 @@ gFieldEffectScript_FlyIn:: @ 82DBBE9
field_eff_callnative FldEff_FlyIn
field_eff_end
gFieldEffectScript_ExclamationMarkIcon2:: @ 82DBBEF
field_eff_callnative FldEff_ExclamationMarkIcon2
gFieldEffectScript_QuestionMarkIcon:: @ 82DBBEF
field_eff_callnative FldEff_QuestionMarkIcon
field_eff_end
gFieldEffectScript_FeetInFlowingWater:: @ 82DBBF5

View File

@ -212,7 +212,7 @@ LavaridgeTown_Movement_1EA6F8: @ 81EA6F8
step_end
LavaridgeTown_EventScript_1EA6FA:: @ 81EA6FA
specialvar VAR_RESULT, player_get_direction_lower_nybble
specialvar VAR_RESULT, GetPlayerFacingDirection
compare VAR_RESULT, 1
goto_eq LavaridgeTown_EventScript_1EA70B
end

View File

@ -297,7 +297,7 @@ gSpecials:: @ 81DBA64
def_special WaitWeather
def_special sub_8139238
def_special sub_8139248
def_special player_get_direction_lower_nybble
def_special GetPlayerFacingDirection
def_special sub_81392AC
def_special sub_81392D4
def_special sub_81392F8

View File

@ -4,9 +4,255 @@
#define NUM_OBJECT_GRAPHICS_INFO 239
#define SPRITE_VAR 240
// Exported struct declarations
enum
{
MOVEMENT_TYPE_NONE,
MOVEMENT_TYPE_LOOK_AROUND,
MOVEMENT_TYPE_WANDER_AROUND,
MOVEMENT_TYPE_WANDER_UP_AND_DOWN,
MOVEMENT_TYPE_WANDER_DOWN_AND_UP,
MOVEMENT_TYPE_WANDER_LEFT_AND_RIGHT,
MOVEMENT_TYPE_WANDER_RIGHT_AND_LEFT,
MOVEMENT_TYPE_FACE_UP,
MOVEMENT_TYPE_FACE_DOWN,
MOVEMENT_TYPE_FACE_LEFT,
MOVEMENT_TYPE_FACE_RIGHT,
MOVEMENT_TYPE_PLAYER,
MOVEMENT_TYPE_BERRY_TREE_GROWTH,
MOVEMENT_TYPE_FACE_DOWN_AND_UP,
MOVEMENT_TYPE_FACE_LEFT_AND_RIGHT,
MOVEMENT_TYPE_FACE_UP_AND_LEFT,
MOVEMENT_TYPE_FACE_UP_AND_RIGHT,
MOVEMENT_TYPE_FACE_DOWN_AND_LEFT,
MOVEMENT_TYPE_FACE_DOWN_AND_RIGHT,
MOVEMENT_TYPE_FACE_DOWN_UP_AND_LEFT,
MOVEMENT_TYPE_FACE_DOWN_UP_AND_RIGHT,
MOVEMENT_TYPE_FACE_UP_LEFT_AND_RIGHT,
MOVEMENT_TYPE_FACE_DOWN_LEFT_AND_RIGHT,
MOVEMENT_TYPE_ROTATE_COUNTERCLOCKWISE,
MOVEMENT_TYPE_ROTATE_CLOCKWISE,
MOVEMENT_TYPE_WALK_UP_AND_DOWN,
MOVEMENT_TYPE_WALK_DOWN_AND_UP,
MOVEMENT_TYPE_WALK_LEFT_AND_RIGHT,
MOVEMENT_TYPE_WALK_RIGHT_AND_LEFT,
MOVEMENT_TYPE_WALK_SEQUENCE_UP_RIGHT_LEFT_DOWN,
MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_LEFT_DOWN_UP,
MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_UP_RIGHT_LEFT,
MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_DOWN_UP_RIGHT,
MOVEMENT_TYPE_WALK_SEQUENCE_UP_LEFT_RIGHT_DOWN,
MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_RIGHT_DOWN_UP,
MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_UP_LEFT_RIGHT,
MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_DOWN_UP_LEFT,
MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_DOWN_RIGHT,
MOVEMENT_TYPE_WALK_SEQUENCE_UP_DOWN_RIGHT_LEFT,
MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_LEFT_UP_DOWN,
MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_RIGHT_LEFT_UP,
MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_UP_DOWN_LEFT,
MOVEMENT_TYPE_WALK_SEQUENCE_UP_DOWN_LEFT_RIGHT,
MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_RIGHT_UP_DOWN,
MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_RIGHT_UP,
MOVEMENT_TYPE_WALK_SEQUENCE_UP_LEFT_DOWN_RIGHT,
MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_RIGHT_UP_LEFT,
MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_DOWN_RIGHT_UP,
MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_UP_LEFT_DOWN,
MOVEMENT_TYPE_WALK_SEQUENCE_UP_RIGHT_DOWN_LEFT,
MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_UP_RIGHT,
MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_RIGHT_DOWN,
MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_DOWN_LEFT_UP,
MOVEMENT_TYPE_COPY_PLAYER,
MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE,
MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE,
MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE,
MOVEMENT_TYPE_TREE_DISGUISE,
MOVEMENT_TYPE_MOUNTAIN_DISGUISE,
MOVEMENT_TYPE_COPY_PLAYER_IN_GRASS,
MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS,
MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS,
MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS,
MOVEMENT_TYPE_HIDDEN,
MOVEMENT_TYPE_WALK_IN_PLACE_DOWN,
MOVEMENT_TYPE_WALK_IN_PLACE_UP,
MOVEMENT_TYPE_WALK_IN_PLACE_LEFT,
MOVEMENT_TYPE_WALK_IN_PLACE_RIGHT,
MOVEMENT_TYPE_JOG_IN_PLACE_DOWN,
MOVEMENT_TYPE_JOG_IN_PLACE_UP,
MOVEMENT_TYPE_JOG_IN_PLACE_LEFT,
MOVEMENT_TYPE_JOG_IN_PLACE_RIGHT,
MOVEMENT_TYPE_RUN_IN_PLACE_DOWN,
MOVEMENT_TYPE_RUN_IN_PLACE_UP,
MOVEMENT_TYPE_RUN_IN_PLACE_LEFT,
MOVEMENT_TYPE_RUN_IN_PLACE_RIGHT,
MOVEMENT_TYPE_INVISIBLE,
MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_DOWN,
MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_UP,
MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_LEFT,
MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_RIGHT,
};
enum SpinnerRunnerFollowPatterns {
enum
{
MOVEMENT_ACTION_FACE_DOWN,
MOVEMENT_ACTION_FACE_UP,
MOVEMENT_ACTION_FACE_LEFT,
MOVEMENT_ACTION_FACE_RIGHT,
MOVEMENT_ACTION_WALK_SLOW_DOWN,
MOVEMENT_ACTION_WALK_SLOW_UP,
MOVEMENT_ACTION_WALK_SLOW_LEFT,
MOVEMENT_ACTION_WALK_SLOW_RIGHT,
MOVEMENT_ACTION_WALK_NORMAL_DOWN,
MOVEMENT_ACTION_WALK_NORMAL_UP,
MOVEMENT_ACTION_WALK_NORMAL_LEFT,
MOVEMENT_ACTION_WALK_NORMAL_RIGHT,
MOVEMENT_ACTION_JUMP_2_DOWN,
MOVEMENT_ACTION_JUMP_2_UP,
MOVEMENT_ACTION_JUMP_2_LEFT,
MOVEMENT_ACTION_JUMP_2_RIGHT,
MOVEMENT_ACTION_DELAY_1,
MOVEMENT_ACTION_DELAY_2,
MOVEMENT_ACTION_DELAY_4,
MOVEMENT_ACTION_DELAY_8,
MOVEMENT_ACTION_DELAY_16,
MOVEMENT_ACTION_WALK_FAST_DOWN,
MOVEMENT_ACTION_WALK_FAST_UP,
MOVEMENT_ACTION_WALK_FAST_LEFT,
MOVEMENT_ACTION_WALK_FAST_RIGHT,
MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_DOWN,
MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_UP,
MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_LEFT,
MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_RIGHT,
MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_DOWN,
MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_UP,
MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_LEFT,
MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_RIGHT,
MOVEMENT_ACTION_WALK_IN_PLACE_FAST_DOWN,
MOVEMENT_ACTION_WALK_IN_PLACE_FAST_UP,
MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT,
MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT,
MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_DOWN,
MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_UP,
MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_LEFT,
MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_RIGHT,
MOVEMENT_ACTION_RIDE_WATER_CURRENT_DOWN,
MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP,
MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT,
MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT,
MOVEMENT_ACTION_WALK_FASTEST_DOWN,
MOVEMENT_ACTION_WALK_FASTEST_UP,
MOVEMENT_ACTION_WALK_FASTEST_LEFT,
MOVEMENT_ACTION_WALK_FASTEST_RIGHT,
MOVEMENT_ACTION_SLIDE_DOWN,
MOVEMENT_ACTION_SLIDE_UP,
MOVEMENT_ACTION_SLIDE_LEFT,
MOVEMENT_ACTION_SLIDE_RIGHT,
MOVEMENT_ACTION_PLAYER_RUN_DOWN,
MOVEMENT_ACTION_PLAYER_RUN_UP,
MOVEMENT_ACTION_PLAYER_RUN_LEFT,
MOVEMENT_ACTION_PLAYER_RUN_RIGHT,
MOVEMENT_ACTION_START_ANIM_IN_DIRECTION,
MOVEMENT_ACTION_JUMP_SPECIAL_DOWN,
MOVEMENT_ACTION_JUMP_SPECIAL_UP,
MOVEMENT_ACTION_JUMP_SPECIAL_LEFT,
MOVEMENT_ACTION_JUMP_SPECIAL_RIGHT,
MOVEMENT_ACTION_FACE_PLAYER,
MOVEMENT_ACTION_FACE_AWAY_PLAYER,
MOVEMENT_ACTION_LOCK_FACING_DIRECTION,
MOVEMENT_ACTION_UNLOCK_FACING_DIRECTION,
MOVEMENT_ACTION_JUMP_DOWN,
MOVEMENT_ACTION_JUMP_UP,
MOVEMENT_ACTION_JUMP_LEFT,
MOVEMENT_ACTION_JUMP_RIGHT,
MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN,
MOVEMENT_ACTION_JUMP_IN_PLACE_UP,
MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT,
MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT,
MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN_UP,
MOVEMENT_ACTION_JUMP_IN_PLACE_UP_DOWN,
MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT_RIGHT,
MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT_LEFT,
MOVEMENT_ACTION_FACE_ORIGINAL_DIRECTION,
MOVEMENT_ACTION_NURSE_JOY_BOW_DOWN,
MOVEMENT_ACTION_ENABLE_JUMP_LANDING_GROUND_EFFECT,
MOVEMENT_ACTION_DISABLE_JUMP_LANDING_GROUND_EFFECT,
MOVEMENT_ACTION_DISABLE_ANIMATION,
MOVEMENT_ACTION_RESTORE_ANIMATION,
MOVEMENT_ACTION_SET_INVISIBLE,
MOVEMENT_ACTION_SET_VISIBLE,
MOVEMENT_ACTION_EMOTE_EXCLAMATION_MARK,
MOVEMENT_ACTION_EMOTE_QUESTION_MARK,
MOVEMENT_ACTION_EMOTE_HEART,
MOVEMENT_ACTION_REVEAL_TRAINER,
MOVEMENT_ACTION_ROCK_SMASH_BREAK,
MOVEMENT_ACTION_CUT_TREE,
MOVEMENT_ACTION_SET_FIXED_PRIORITY,
MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY,
MOVEMENT_ACTION_INIT_AFFINE_ANIM,
MOVEMENT_ACTION_CLEAR_AFFINE_ANIM,
MOVEMENT_ACTION_UNKNOWN1,
MOVEMENT_ACTION_UNKNOWN2,
MOVEMENT_ACTION_WALK_DOWN_START_AFFINE,
MOVEMENT_ACTION_WALK_DOWN_AFFINE,
MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN,
MOVEMENT_ACTION_ACRO_WHEELIE_FACE_UP,
MOVEMENT_ACTION_ACRO_WHEELIE_FACE_LEFT,
MOVEMENT_ACTION_ACRO_WHEELIE_FACE_RIGHT,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_DOWN,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_UP,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_LEFT,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_RIGHT,
MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_DOWN,
MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_UP,
MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_LEFT,
MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_RIGHT,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_DOWN,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_UP,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_LEFT,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_RIGHT,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_DOWN,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_UP,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_LEFT,
MOVEMENT_ACTION_ACRO_WHEELIE_HOP_RIGHT,
MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_DOWN,
MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_UP,
MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_LEFT,
MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_RIGHT,
MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_DOWN,
MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_UP,
MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_LEFT,
MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_RIGHT,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_DOWN,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_UP,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_LEFT,
MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_RIGHT,
MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_DOWN,
MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_UP,
MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_LEFT,
MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_RIGHT,
MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_DOWN,
MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_UP,
MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_LEFT,
MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_RIGHT,
MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_LEFT,
MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_RIGHT,
MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_LEFT,
MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_RIGHT,
MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_LEFT,
MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_RIGHT,
MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_LEFT,
MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_RIGHT,
MOVEMENT_ACTION_STORE_AND_LOCK_ANIM,
MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM,
MOVEMENT_ACTION_WALK_LEFT_AFFINE,
MOVEMENT_ACTION_WALK_RIGHT_AFFINE,
MOVEMENT_ACTION_LEVITATE,
MOVEMENT_ACTION_STOP_LEVITATE,
MOVEMENT_ACTION_DESTROY_EXTRA_TASK_IF_AT_TOP,
MOVEMENT_ACTION_FIGURE_8,
MOVEMENT_ACTION_FLY_UP,
MOVEMENT_ACTION_FLY_DOWN,
};
enum SpinnerRunnerFollowPatterns
{
RUNFOLLOW_ANY,
RUNFOLLOW_NORTH_SOUTH,
RUNFOLLOW_EAST_WEST,
@ -46,57 +292,49 @@ struct UnkStruct_085094AC {
#define GROUND_EFFECT_FLAG_HOT_SPRINGS (1 << 18)
#define GROUND_EFFECT_FLAG_SEAWEED (1 << 19)
#define null_object_step(name, retval) \
bool8 EventObjectCB2_##name(struct EventObject *, struct Sprite *);\
void EventObjectCB_##name(struct Sprite *sprite)\
#define movement_type_def(setup, table) \
static u8 setup##_callback(struct EventObject *, struct Sprite *);\
void setup(struct Sprite *sprite)\
{\
EventObjectStep(&gEventObjects[sprite->data[0]], sprite, EventObjectCB2_##name);\
UpdateEventObjectCurrentMovement(&gEventObjects[sprite->data[0]], sprite, setup##_callback);\
}\
bool8 EventObjectCB2_##name(struct EventObject *eventObject, struct Sprite *sprite)\
static u8 setup##_callback(struct EventObject *eventObject, struct Sprite *sprite)\
{\
return (retval);\
return table[sprite->data[1]](eventObject, sprite);\
}
#define field_object_step(name, table) \
extern bool8 (*const (table)[])(struct EventObject *, struct Sprite *);\
bool8 EventObjectCB2_##name(struct EventObject *, struct Sprite *);\
void EventObjectCB_##name(struct Sprite *sprite)\
#define movement_type_empty_callback(setup) \
static u8 setup##_callback(struct EventObject *, struct Sprite *);\
void setup(struct Sprite *sprite)\
{\
EventObjectStep(&gEventObjects[sprite->data[0]], sprite, EventObjectCB2_##name);\
UpdateEventObjectCurrentMovement(&gEventObjects[sprite->data[0]], sprite, setup##_callback);\
}\
bool8 EventObjectCB2_##name(struct EventObject *eventObject, struct Sprite *sprite)\
static u8 setup##_callback(struct EventObject *eventObject, struct Sprite *sprite)\
{\
return (table)[sprite->data[1]](eventObject, sprite);\
return 0;\
}
#define field_object_path(idx, table, sub, path, catch, coord)\
field_object_step(GoInDirectionSequence##idx, table)\
extern const u8 path[4];\
bool8 sub(struct EventObject *eventObject, struct Sprite *sprite)\
{\
u8 route[sizeof(path)];\
memcpy(route, path, sizeof(path));\
if (eventObject->directionSequenceIndex == (catch) && eventObject->initialCoords.coord == eventObject->currentCoords.coord)\
{\
eventObject->directionSequenceIndex = (catch) + 1;\
}\
return MoveEventObjectInNextDirectionInSequence(eventObject, sprite, route);\
}\
struct PairedPalettes {
struct PairedPalettes
{
u16 tag;
const u16 *data;
};
struct LockedAnimEventObjects
{
u8 eventObjectIds[NUM_EVENT_OBJECTS];
u8 count;
};
extern const struct SpriteFrameImage gEventObjectPicTable_PechaBerryTree[];
void sub_808D438(void);
u8 get_go_image_anim_num(u8);
u8 GetMoveDirectionAnimNum(u8);
u8 GetEventObjectIdByLocalIdAndMap(u8, u8, u8);
bool8 TryGetEventObjectIdByLocalIdAndMap(u8, u8, u8, u8 *);
u8 GetEventObjectIdByXY(s16, s16);
void EventObjectSetDirection(struct EventObject *, u8);
u8 sub_808D4F4(void);
void SetEventObjectDirection(struct EventObject *, u8);
u8 GetFirstInactiveEventObjectId(void);
void RemoveEventObjectByLocalIdAndMap(u8, u8, u8);
void npc_load_two_palettes__no_record(u16, u8);
void npc_load_two_palettes__and_record(u16, u8);
@ -105,11 +343,11 @@ void pal_patch_for_npc(u16, u8);
void sub_808E16C(s16, s16);
void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat);
void sub_8092FF0(s16, s16, s16 *, s16 *);
u8 EventObjectDirectionToImageAnimId(u8);
u8 GetFaceDirectionAnimNum(u8);
void sub_80930E0(s16 *, s16 *, s16, s16);
void EventObjectClearAnim(struct EventObject *);
void EventObjectClearAnimIfSpecialAnimActive(struct EventObject *);
void SpawnEventObjectsInView(s16, s16);
void EventObjectClearHeldMovement(struct EventObject *);
void EventObjectClearHeldMovementIfActive(struct EventObject *);
void TrySpawnEventObjects(s16, s16);
u8 sprite_new(u8, u8, s16, s16, u8, u8);
u8 AddPseudoEventObject(u16, void (*)(struct Sprite *), s16, s16, u8);
u8 show_sprite(u8, u8, u8);
@ -128,50 +366,50 @@ void sub_808E7E4(u8, u8, u8);
void sub_808E78C(u8, u8, u8, u8);
void sub_808E75C(s16, s16);
void EventObjectGetLocalIdAndMap(struct EventObject *eventObject, void *localId, void *mapNum, void *mapGroup);
void npc_coords_shift(struct EventObject *, s16, s16);
void ShiftEventObjectCoords(struct EventObject *, s16, s16);
void sub_808EB08(struct EventObject *, s16, s16);
void sub_808F254(u8, u8, u8);
void EventObjectStep(struct EventObject *, struct Sprite *, bool8(struct EventObject *, struct Sprite *));
void UpdateEventObjectCurrentMovement(struct EventObject *, struct Sprite *, bool8(struct EventObject *, struct Sprite *));
u8 EventObjectFaceOppositeDirection(struct EventObject *, u8);
u8 GetOppositeDirection(u8);
u8 GetStepInPlaceDelay4AnimId(u32);
u8 GetStepInPlaceDelay8AnimId(u32);
u8 GetStepInPlaceDelay16AnimId(u32);
u8 GetStepInPlaceDelay32AnimId(u32);
u8 npc_block_way(struct EventObject *, s16, s16, u32);
u8 GetWalkInPlaceFastestMovementAction(u32);
u8 GetWalkInPlaceFastMovementAction(u32);
u8 GetWalkInPlaceNormalMovementAction(u32);
u8 GetWalkInPlaceSlowMovementAction(u32);
u8 GetCollisionAtCoords(struct EventObject *, s16, s16, u32);
void MoveCoords(u8, s16 *, s16 *);
bool8 EventObjectIsSpecialAnimActive(struct EventObject *);
u8 EventObjectClearAnimIfSpecialAnimFinished(struct EventObject *);
bool8 EventObjectIsHeldMovementActive(struct EventObject *);
u8 EventObjectClearHeldMovementIfFinished(struct EventObject *);
u8 GetEventObjectIdByXYZ(u16 x, u16 y, u8 z);
void npc_set_running_behaviour_etc(struct EventObject *eventObject, u8 movementType);
u8 npc_running_behaviour_by_direction(u8 direction);
void SetTrainerMovementType(struct EventObject *eventObject, u8 movementType);
u8 GetTrainerFacingDirectionMovementType(u8 direction);
const u8 *GetEventObjectScriptPointerByEventObjectId(u8 eventObjectId);
u8 sub_8092C8C(struct EventObject *eventObject, s16 x, s16 y, u8 direction);
u8 GetFaceDirectionAnimId(u32);
u8 GetGoSpeed0AnimId(u32);
u8 GetGoSpeed1AnimId(u32);
u8 GetGoSpeed3AnimId(u32);
u8 sub_80934BC(u32);
bool8 EventObjectSetSpecialAnim(struct EventObject *eventObject, u8 specialAnimId);
bool8 EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct EventObject *eventObject);
u8 EventObjectCheckIfSpecialAnimFinishedOrInactive(struct EventObject *eventObject);
void sub_808F23C(const struct EventObject *eventObject, u8 movementType);
void sub_808F208(const struct EventObject *eventObject);
void npc_coords_shift_still(struct EventObject *pObject);
u8 GetCollisionFlagsAtCoords(struct EventObject *eventObject, s16 x, s16 y, u8 direction);
u8 GetFaceDirectionMovementAction(u32);
u8 GetWalkNormalMovementAction(u32);
u8 GetWalkFastMovementAction(u32);
u8 GetWalkFastestMovementAction(u32);
u8 GetJumpInPlaceMovementAction(u32);
bool8 EventObjectSetHeldMovement(struct EventObject *eventObject, u8 specialAnimId);
bool8 EventObjectIsMovementOverridden(struct EventObject *eventObject);
u8 EventObjectCheckHeldMovementStatus(struct EventObject *eventObject);
void TryOverrideTemplateCoordsForEventObject(const struct EventObject *eventObject, u8 movementType);
void OverrideTemplateCoordsForEventObject(const struct EventObject *eventObject);
void ShiftStillEventObjectCoords(struct EventObject *pObject);
void EventObjectMoveDestCoords(struct EventObject *pObject, u32 unk_19, s16 *pInt, s16 *pInt1);
u8 AddCameraObject(u8 linkedSpriteId);
void UpdateEventObjectsForCameraUpdate(s16 x, s16 y);
u8 GetSimpleGoAnimId(u32);
u8 sub_8093514(u32);
u8 GetWalkSlowMovementAction(u32);
u8 GetJumpMovementAction(u32);
bool8 AreZCoordsCompatible(u8, u8);
u8 ZCoordToPriority(u8);
void EventObjectUpdateZCoord(struct EventObject *pObject);
void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8);
bool8 IsZCoordMismatchAt(u8, s16, s16);
void sub_8097AC8(struct Sprite *);
void npc_sync_anim_pause_bits(struct EventObject *);
void UpdateEventObjectSpriteSubpriorityAndVisibility(struct Sprite *);
void UnfreezeEventObject(struct EventObject *);
void oamt_npc_ministep_reset(struct Sprite *, u8, u8);
u8 sub_8097F78(struct EventObject *);
u8 FindLockedEventObjectIndex(struct EventObject *);
bool8 obj_npc_ministep(struct Sprite *sprite);
bool8 sub_80976EC(struct Sprite *sprite);
void sub_80976DC(struct Sprite *, u8);
@ -179,262 +417,236 @@ void sub_809783C(struct Sprite *, u8, u8, u8);
void DoShadowFieldEffect(struct EventObject *);
u8 sub_809785C(struct Sprite *);
u8 sub_80978E4(struct Sprite *);
void obj_anim_image_set_and_seek(struct Sprite *, u8, u8);
bool8 sub_80979BC(struct Sprite *);
void SetAndStartSpriteAnim(struct Sprite *, u8, u8);
bool8 SpriteAnimEnded(struct Sprite *);
void sub_8097750(struct Sprite *);
bool8 sub_8097758(struct Sprite *);
void sub_8097FA4(struct EventObject *);
void sub_8098044(u8);
void CreateLevitateMovementTask(struct EventObject *);
void DestroyExtraMovementTask(u8);
void UnfreezeEventObjects(void);
void FreezeEventObjectsExceptOne(u8 eventObjectId);
void sub_8097B78(u8, u8);
void sub_8098074(u8 var1, u8 var2);
void FreezeEventObjects(void);
bool8 FreezeEventObject(struct EventObject *eventObject);
u8 get_go_fast_image_anim_num(u8);
u8 get_go_faster_image_anim_num(u8);
u8 get_go_fastest_image_anim_num(u8);
u8 GetMoveDirectionFastAnimNum(u8);
u8 GetMoveDirectionFasterAnimNum(u8);
u8 GetMoveDirectionFastestAnimNum(u8);
void EventObjectCB_NoMovement1(struct Sprite *);
void EventObjectCB_LookRandomDirections(struct Sprite *);
void EventObjectCB_GoRandomDirections(struct Sprite *);
void EventObjectCB_RandomlyGoNorthOrSouth(struct Sprite *);
void EventObjectCB_RandomlyGoNorthOrSouth(struct Sprite *);
void EventObjectCB_RandomlyGoEastOrWest(struct Sprite *);
void EventObjectCB_RandomlyGoEastOrWest(struct Sprite *);
void EventObjectCB_FaceFixedDirection(struct Sprite *);
void EventObjectCB_FaceFixedDirection(struct Sprite *);
void EventObjectCB_FaceFixedDirection(struct Sprite *);
void EventObjectCB_FaceFixedDirection(struct Sprite *);
void EventObjectCB_NoMovement2(struct Sprite *);
void EventObjectCB_BerryTree(struct Sprite *);
void EventObjectCB_RandomlyLookNorthOrSouth(struct Sprite *);
void EventObjectCB_RandomlyLookEastOrWest(struct Sprite *);
void EventObjectCB_RandomlyLookNorthOrWest(struct Sprite *);
void EventObjectCB_RandomlyLookNorthOrEast(struct Sprite *);
void EventObjectCB_RandomlyLookSouthOrWest(struct Sprite *);
void EventObjectCB_RandomlyLookSouthOrEast(struct Sprite *);
void EventObjectCB_RandomlyLookNorthOrSouthOrWest(struct Sprite *);
void EventObjectCB_RandomlyLookNorthOrSouthOrEast(struct Sprite *);
void EventObjectCB_RandomlyLookNorthOrEastOrWest(struct Sprite *);
void EventObjectCB_RandomlyLookSouthOrEastOrWest(struct Sprite *);
void EventObjectCB_LookAroundCounterclockwise(struct Sprite *);
void EventObjectCB_LookAroundClockwise(struct Sprite *);
void EventObjectCB_AlternatelyGoInOppositeDirections(struct Sprite *);
void EventObjectCB_AlternatelyGoInOppositeDirections(struct Sprite *);
void EventObjectCB_AlternatelyGoInOppositeDirections(struct Sprite *);
void EventObjectCB_AlternatelyGoInOppositeDirections(struct Sprite *);
void EventObjectCB_GoInDirectionSequence1(struct Sprite *);
void EventObjectCB_GoInDirectionSequence2(struct Sprite *);
void EventObjectCB_GoInDirectionSequence3(struct Sprite *);
void EventObjectCB_GoInDirectionSequence4(struct Sprite *);
void EventObjectCB_GoInDirectionSequence5(struct Sprite *);
void EventObjectCB_GoInDirectionSequence6(struct Sprite *);
void EventObjectCB_GoInDirectionSequence7(struct Sprite *);
void EventObjectCB_GoInDirectionSequence8(struct Sprite *);
void EventObjectCB_GoInDirectionSequence9(struct Sprite *);
void EventObjectCB_GoInDirectionSequence10(struct Sprite *);
void EventObjectCB_GoInDirectionSequence11(struct Sprite *);
void EventObjectCB_GoInDirectionSequence12(struct Sprite *);
void EventObjectCB_GoInDirectionSequence13(struct Sprite *);
void EventObjectCB_GoInDirectionSequence14(struct Sprite *);
void EventObjectCB_GoInDirectionSequence15(struct Sprite *);
void EventObjectCB_GoInDirectionSequence16(struct Sprite *);
void EventObjectCB_GoInDirectionSequence17(struct Sprite *);
void EventObjectCB_GoInDirectionSequence18(struct Sprite *);
void EventObjectCB_GoInDirectionSequence19(struct Sprite *);
void EventObjectCB_GoInDirectionSequence20(struct Sprite *);
void EventObjectCB_GoInDirectionSequence21(struct Sprite *);
void EventObjectCB_GoInDirectionSequence22(struct Sprite *);
void EventObjectCB_GoInDirectionSequence23(struct Sprite *);
void EventObjectCB_GoInDirectionSequence24(struct Sprite *);
void EventObjectCB_CopyPlayer1(struct Sprite *);
void EventObjectCB_CopyPlayer1(struct Sprite *);
void EventObjectCB_CopyPlayer1(struct Sprite *);
void EventObjectCB_CopyPlayer1(struct Sprite *);
void EventObjectCB_TreeDisguise(struct Sprite *);
void EventObjectCB_MountainDisguise(struct Sprite *);
void EventObjectCB_CopyPlayer2(struct Sprite *);
void EventObjectCB_CopyPlayer2(struct Sprite *);
void EventObjectCB_CopyPlayer2(struct Sprite *);
void EventObjectCB_CopyPlayer2(struct Sprite *);
void EventObjectCB_Hidden1(struct Sprite *);
void EventObjectCB_WalkInPlace1(struct Sprite *);
void EventObjectCB_WalkInPlace1(struct Sprite *);
void EventObjectCB_WalkInPlace1(struct Sprite *);
void EventObjectCB_WalkInPlace1(struct Sprite *);
void EventObjectCB_WalkInPlace2(struct Sprite *);
void EventObjectCB_WalkInPlace2(struct Sprite *);
void EventObjectCB_WalkInPlace2(struct Sprite *);
void EventObjectCB_WalkInPlace2(struct Sprite *);
void EventObjectCB_WalkInPlace3(struct Sprite *);
void EventObjectCB_WalkInPlace3(struct Sprite *);
void EventObjectCB_WalkInPlace3(struct Sprite *);
void EventObjectCB_WalkInPlace3(struct Sprite *);
void EventObjectCB_Hidden2(struct Sprite *);
void EventObjectCB_WalkInPlace4(struct Sprite *);
void EventObjectCB_WalkInPlace4(struct Sprite *);
void EventObjectCB_WalkInPlace4(struct Sprite *);
void EventObjectCB_WalkInPlace4(struct Sprite *);
void MovementType_None(struct Sprite *);
void MovementType_LookAround(struct Sprite *);
void MovementType_WanderAround(struct Sprite *);
void MovementType_WanderUpAndDown(struct Sprite *);
void MovementType_WanderLeftAndRight(struct Sprite *);
void MovementType_FaceDirection(struct Sprite *);
void MovementType_Player(struct Sprite *);
void MovementType_BerryTreeGrowth(struct Sprite *);
void MovementType_FaceDownAndUp(struct Sprite *);
void MovementType_FaceLeftAndRight(struct Sprite *);
void MovementType_FaceUpAndLeft(struct Sprite *);
void MovementType_FaceUpAndRight(struct Sprite *);
void MovementType_FaceDownAndLeft(struct Sprite *);
void MovementType_FaceDownAndRight(struct Sprite *);
void MovementType_FaceDownUpAndLeft(struct Sprite *);
void MovementType_FaceDownUpAndRight(struct Sprite *);
void MovementType_FaceUpRightAndLeft(struct Sprite *);
void MovementType_FaceDownRightAndLeft(struct Sprite *);
void MovementType_RotateCounterclockwise(struct Sprite *);
void MovementType_RotateClockwise(struct Sprite *);
void MovementType_WalkBackAndForth(struct Sprite *);
void MovementType_WalkSequenceUpRightLeftDown(struct Sprite *);
void MovementType_WalkSequenceRightLeftDownUp(struct Sprite *);
void MovementType_WalkSequenceDownUpRightLeft(struct Sprite *);
void MovementType_WalkSequenceLeftDownUpRight(struct Sprite *);
void MovementType_WalkSequenceUpLeftRightDown(struct Sprite *);
void MovementType_WalkSequenceLeftRightDownUp(struct Sprite *);
void MovementType_WalkSequenceDownUpLeftRight(struct Sprite *);
void MovementType_WalkSequenceRightDownUpLeft(struct Sprite *);
void MovementType_WalkSequenceLeftUpDownRight(struct Sprite *);
void MovementType_WalkSequenceUpDownRightLeft(struct Sprite *);
void MovementType_WalkSequenceRightLeftUpDown(struct Sprite *);
void MovementType_WalkSequenceDownRightLeftUp(struct Sprite *);
void MovementType_WalkSequenceRightUpDownLeft(struct Sprite *);
void MovementType_WalkSequenceUpDownLeftRight(struct Sprite *);
void MovementType_WalkSequenceLeftRightUpDown(struct Sprite *);
void MovementType_WalkSequenceDownLeftRightUp(struct Sprite *);
void MovementType_WalkSequenceUpLeftDownRight(struct Sprite *);
void MovementType_WalkSequenceDownRightUpLeft(struct Sprite *);
void MovementType_WalkSequenceLeftDownRightUp(struct Sprite *);
void MovementType_WalkSequenceRightUpLeftDown(struct Sprite *);
void MovementType_WalkSequenceUpRightDownLeft(struct Sprite *);
void MovementType_WalkSequenceDownLeftUpRight(struct Sprite *);
void MovementType_WalkSequenceLeftUpRightDown(struct Sprite *);
void MovementType_WalkSequenceRightDownLeftUp(struct Sprite *);
void MovementType_CopyPlayer(struct Sprite *);
void MovementType_TreeDisguise(struct Sprite *);
void MovementType_MountainDisguise(struct Sprite *);
void MovementType_CopyPlayerInGrass(struct Sprite *);
void MovementType_Hidden(struct Sprite *);
void MovementType_WalkInPlace(struct Sprite *);
void MovementType_JogInPlace(struct Sprite *);
void MovementType_RunInPlace(struct Sprite *);
void MovementType_Invisible(struct Sprite *);
void MovementType_WalkSlowlyInPlace(struct Sprite *);
u8 GetSlideMovementAction(u32);
u8 GetJumpInPlaceMovementAction(u32);
u8 GetJumpMovementAction(u32);
u8 GetJump2MovementAction(u32);
u8 sub_808F44C(struct EventObject *, struct Sprite *);
u8 sub_808F460(struct EventObject *, struct Sprite *);
u8 sub_808F48C(struct EventObject *, struct Sprite *);
u8 sub_808F4C8(struct EventObject *, struct Sprite *);
u8 sub_808F4E8(struct EventObject *, struct Sprite *);
u8 sub_808F534(struct EventObject *, struct Sprite *);
u8 sub_808F564(struct EventObject *, struct Sprite *);
u8 GetRegularRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetNorthSouthRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetEastWestRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetNorthEastRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetNorthWestRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetSouthEastRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetSouthWestRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetNonEastRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetNonWestRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetNonSouthRunningPastFacingDirection(s16, s16, s16, s16);
u8 GetNonNorthRunningPastFacingDirection(s16, s16, s16, s16);
u8 sub_808F988(struct EventObject *, struct Sprite *);
u8 sub_808F99C(struct EventObject *, struct Sprite *);
u8 sub_808F9C8(struct EventObject *, struct Sprite *);
u8 sub_808FA0C(struct EventObject *, struct Sprite *);
u8 sub_808FA3C(struct EventObject *, struct Sprite *);
u8 sub_808FAC8(struct EventObject *, struct Sprite *);
u8 sub_808FADC(struct EventObject *, struct Sprite *);
u8 sub_808FB08(struct EventObject *, struct Sprite *);
u8 sub_808FB44(struct EventObject *, struct Sprite *);
u8 sub_808FB64(struct EventObject *, struct Sprite *);
u8 sub_808FBB0(struct EventObject *, struct Sprite *);
u8 sub_808FBE0(struct EventObject *, struct Sprite *);
u8 sub_808FC4C(struct EventObject *, struct Sprite *);
u8 sub_808FC60(struct EventObject *, struct Sprite *);
u8 sub_808FC8C(struct EventObject *, struct Sprite *);
u8 sub_808FCC8(struct EventObject *, struct Sprite *);
u8 sub_808FCE8(struct EventObject *, struct Sprite *);
u8 sub_808FD34(struct EventObject *, struct Sprite *);
u8 sub_808FD64(struct EventObject *, struct Sprite *);
u8 sub_808FDD0(struct EventObject *, struct Sprite *);
u8 sub_808FDFC(struct EventObject *, struct Sprite *);
u8 sub_808FE1C(struct EventObject *, struct Sprite *);
u8 do_berry_tree_growth_sparkle_1(struct EventObject *, struct Sprite *);
u8 sub_808FF48(struct EventObject *, struct Sprite *);
u8 do_berry_tree_growth_sparkle_2(struct EventObject *, struct Sprite *);
u8 sub_808FFB4(struct EventObject *, struct Sprite *);
u8 sub_8090004(struct EventObject *, struct Sprite *);
u8 sub_8090094(struct EventObject *, struct Sprite *);
u8 sub_80900A8(struct EventObject *, struct Sprite *);
u8 sub_80900D4(struct EventObject *, struct Sprite *);
u8 sub_8090118(struct EventObject *, struct Sprite *);
u8 sub_8090148(struct EventObject *, struct Sprite *);
u8 sub_80901D4(struct EventObject *, struct Sprite *);
u8 sub_80901E8(struct EventObject *, struct Sprite *);
u8 sub_8090214(struct EventObject *, struct Sprite *);
u8 sub_8090258(struct EventObject *, struct Sprite *);
u8 sub_8090288(struct EventObject *, struct Sprite *);
u8 sub_8090314(struct EventObject *, struct Sprite *);
u8 sub_8090328(struct EventObject *, struct Sprite *);
u8 sub_8090354(struct EventObject *, struct Sprite *);
u8 sub_8090398(struct EventObject *, struct Sprite *);
u8 sub_80903C8(struct EventObject *, struct Sprite *);
u8 sub_8090454(struct EventObject *, struct Sprite *);
u8 sub_8090468(struct EventObject *, struct Sprite *);
u8 sub_8090494(struct EventObject *, struct Sprite *);
u8 sub_80904D8(struct EventObject *, struct Sprite *);
u8 sub_8090508(struct EventObject *, struct Sprite *);
u8 sub_8090594(struct EventObject *, struct Sprite *);
u8 sub_80905A8(struct EventObject *, struct Sprite *);
u8 sub_80905D4(struct EventObject *, struct Sprite *);
u8 sub_8090618(struct EventObject *, struct Sprite *);
u8 sub_8090648(struct EventObject *, struct Sprite *);
u8 sub_80906D4(struct EventObject *, struct Sprite *);
u8 sub_80906E8(struct EventObject *, struct Sprite *);
u8 sub_8090714(struct EventObject *, struct Sprite *);
u8 sub_8090758(struct EventObject *, struct Sprite *);
u8 sub_8090788(struct EventObject *, struct Sprite *);
u8 sub_8090814(struct EventObject *, struct Sprite *);
u8 sub_8090828(struct EventObject *, struct Sprite *);
u8 sub_8090854(struct EventObject *, struct Sprite *);
u8 sub_8090898(struct EventObject *, struct Sprite *);
u8 sub_80908C8(struct EventObject *, struct Sprite *);
u8 sub_8090954(struct EventObject *, struct Sprite *);
u8 sub_8090968(struct EventObject *, struct Sprite *);
u8 sub_8090994(struct EventObject *, struct Sprite *);
u8 sub_80909D8(struct EventObject *, struct Sprite *);
u8 sub_8090A08(struct EventObject *, struct Sprite *);
u8 sub_8090A94(struct EventObject *, struct Sprite *);
u8 sub_8090AA8(struct EventObject *, struct Sprite *);
u8 sub_8090AD4(struct EventObject *, struct Sprite *);
u8 sub_8090B18(struct EventObject *, struct Sprite *);
u8 sub_8090B48(struct EventObject *, struct Sprite *);
u8 sub_8090BD4(struct EventObject *, struct Sprite *);
u8 sub_8090BE8(struct EventObject *, struct Sprite *);
u8 sub_8090C14(struct EventObject *, struct Sprite *);
u8 sub_8090C58(struct EventObject *, struct Sprite *);
u8 sub_8090C88(struct EventObject *, struct Sprite *);
u8 sub_8090D14(struct EventObject *, struct Sprite *);
u8 sub_8090D40(struct EventObject *, struct Sprite *);
u8 sub_8090D64(struct EventObject *, struct Sprite *);
u8 sub_8090D90(struct EventObject *, struct Sprite *);
u8 sub_8090E18(struct EventObject *, struct Sprite *);
u8 sub_8090E44(struct EventObject *, struct Sprite *);
u8 sub_8090E68(struct EventObject *, struct Sprite *);
u8 sub_8090E94(struct EventObject *, struct Sprite *);
u8 sub_8090F1C(struct EventObject *, struct Sprite *);
u8 sub_8090F30(struct EventObject *, struct Sprite *);
u8 sub_8090F68(struct EventObject *, struct Sprite *);
u8 sub_8091020(struct EventObject *, struct Sprite *);
u8 sub_8091048(struct EventObject *, struct Sprite *);
u8 sub_809117C(struct EventObject *, struct Sprite *);
u8 sub_8091110(struct EventObject *, struct Sprite *);
u8 sub_8091208(struct EventObject *, struct Sprite *);
u8 sub_8091294(struct EventObject *, struct Sprite *);
u8 sub_8091320(struct EventObject *, struct Sprite *);
u8 sub_80913AC(struct EventObject *, struct Sprite *);
u8 sub_8091438(struct EventObject *, struct Sprite *);
u8 sub_80914C4(struct EventObject *, struct Sprite *);
u8 sub_8091550(struct EventObject *, struct Sprite *);
u8 sub_80915DC(struct EventObject *, struct Sprite *);
u8 sub_8091668(struct EventObject *, struct Sprite *);
u8 sub_80916F4(struct EventObject *, struct Sprite *);
u8 sub_8091780(struct EventObject *, struct Sprite *);
u8 sub_809180C(struct EventObject *, struct Sprite *);
u8 sub_8091898(struct EventObject *, struct Sprite *);
u8 sub_8091924(struct EventObject *, struct Sprite *);
u8 sub_80919B0(struct EventObject *, struct Sprite *);
u8 sub_8091A3C(struct EventObject *, struct Sprite *);
u8 sub_8091AC8(struct EventObject *, struct Sprite *);
u8 sub_8091B54(struct EventObject *, struct Sprite *);
u8 sub_8091BE0(struct EventObject *, struct Sprite *);
u8 sub_8091C6C(struct EventObject *, struct Sprite *);
u8 sub_8091CF8(struct EventObject *, struct Sprite *);
u8 sub_8091D84(struct EventObject *, struct Sprite *);
u8 sub_8091E10(struct EventObject *, struct Sprite *);
u8 mss_npc_reset_oampriv3_1_unk2_unk3(struct EventObject *, struct Sprite *);
u8 sub_8091EC0(struct EventObject *, struct Sprite *);
u8 sub_8091F20(struct EventObject *, struct Sprite *);
bool8 sub_8091F48(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 sub_8091F4C(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 sub_8091F94(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 sub_80920A4(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 sub_809215C(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 sub_8092214(struct EventObject *, struct Sprite *, u8, bool8(u8));
u8 MovementType_WanderAround_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_WanderAround_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WanderAround_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_WanderAround_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_WanderAround_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_WanderAround_Step5(struct EventObject *, struct Sprite *);
u8 MovementType_WanderAround_Step6(struct EventObject *, struct Sprite *);
u8 GetVectorDirection(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_SouthNorth(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_WestEast(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_WestNorth(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_EastNorth(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_WestSouth(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_EastSouth(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_SouthNorthWest(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_SouthNorthEast(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_NorthWestEast(s16, s16, s16, s16);
u8 GetLimitedVectorDirection_SouthWestEast(s16, s16, s16, s16);
u8 MovementType_LookAround_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_LookAround_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_LookAround_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_LookAround_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_LookAround_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_WanderUpAndDown_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_WanderUpAndDown_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WanderUpAndDown_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_WanderUpAndDown_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_WanderUpAndDown_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_WanderUpAndDown_Step5(struct EventObject *, struct Sprite *);
u8 MovementType_WanderUpAndDown_Step6(struct EventObject *, struct Sprite *);
u8 MovementType_WanderLeftAndRight_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_WanderLeftAndRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WanderLeftAndRight_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_WanderLeftAndRight_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_WanderLeftAndRight_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_WanderLeftAndRight_Step5(struct EventObject *, struct Sprite *);
u8 MovementType_WanderLeftAndRight_Step6(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDirection_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDirection_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDirection_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_BerryTreeGrowth_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_BerryTreeGrowth_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_BerryTreeGrowth_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_BerryTreeGrowth_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_BerryTreeGrowth_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndUp_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndUp_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndUp_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndUp_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndUp_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceLeftAndRight_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceLeftAndRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceLeftAndRight_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceLeftAndRight_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceLeftAndRight_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndLeft_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndLeft_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndLeft_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndLeft_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndRight_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndRight_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndRight_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpAndRight_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndLeft_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndLeft_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndLeft_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndLeft_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndRight_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndRight_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndRight_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownAndRight_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndLeft_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndLeft_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndLeft_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndLeft_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndRight_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndRight_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndRight_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownUpAndRight_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpLeftAndRight_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpLeftAndRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpLeftAndRight_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpLeftAndRight_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceUpLeftAndRight_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownLeftAndRight_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownLeftAndRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownLeftAndRight_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownLeftAndRight_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_FaceDownLeftAndRight_Step4(struct EventObject *, struct Sprite *);
u8 MovementType_RotateCounterclockwise_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_RotateCounterclockwise_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_RotateCounterclockwise_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_RotateCounterclockwise_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_RotateClockwise_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_RotateClockwise_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_RotateClockwise_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_RotateClockwise_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_WalkBackAndForth_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_WalkBackAndForth_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkBackAndForth_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_WalkBackAndForth_Step3(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequence_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequence_Step2(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceUpRightLeftDown_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceRightLeftDownUp_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceDownUpRightLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceLeftDownUpRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceUpLeftRightDown_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceLeftRightDownUp_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceDownUpLeftRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceRightDownUpLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceLeftUpDownRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceUpDownRightLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceRightLeftUpDown_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceDownRightLeftUp_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceRightUpDownLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceUpDownLeftRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceLeftRightUpDown_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceDownLeftRightUp_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceUpLeftDownRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceDownRightUpLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceLeftDownRightUp_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceRightUpLeftDown_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceUpRightDownLeft_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceDownLeftUpRight_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceLeftUpRightDown_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSequenceRightDownLeftUp_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_CopyPlayer_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_CopyPlayer_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_CopyPlayer_Step2(struct EventObject *, struct Sprite *);
bool8 CopyablePlayerMovement_None(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 CopyablePlayerMovement_FaceDirection(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 CopyablePlayerMovement_GoSpeed0(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 CopyablePlayerMovement_GoSpeed1(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 CopyablePlayerMovement_GoSpeed2(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 CopyablePlayerMovement_Slide(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 cph_IM_DIFFERENT(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 sub_8092314(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 oac_hopping(struct EventObject *, struct Sprite *, u8, bool8(u8));
u8 mss_08062EA4(struct EventObject *, struct Sprite *);
u8 sub_80926AC(struct EventObject *, struct Sprite *);
u8 sub_8092718(struct EventObject *, struct Sprite *);
u8 sub_80926B8(struct EventObject *, struct Sprite *);
u8 sub_8092788(struct EventObject *, struct Sprite *);
u8 sub_80927F8(struct EventObject *, struct Sprite *);
u8 sub_8092868(struct EventObject *, struct Sprite *);
u8 sub_80928D8(struct EventObject *, struct Sprite *);
u8 sub_809290C(struct EventObject *, struct Sprite *);
u8 sub_809292C(struct EventObject *, struct Sprite *);
// Exported data declarations
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
bool8 CopyablePlayerMovement_GoSpeed4(struct EventObject *, struct Sprite *, u8, bool8(u8));
bool8 CopyablePlayerMovement_Jump(struct EventObject *, struct Sprite *, u8, bool8(u8));
u8 MovementType_CopyPlayerInGrass_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_Hidden_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_WalkInPlace_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_MoveInPlace_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_WalkSlowlyInPlace_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_JogInPlace_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_RunInPlace_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_Invisible_Step0(struct EventObject *, struct Sprite *);
u8 MovementType_Invisible_Step1(struct EventObject *, struct Sprite *);
u8 MovementType_Invisible_Step2(struct EventObject *, struct Sprite *);
#endif //GUARD_FIELD_EVENT_OBJ_H

View File

@ -11,7 +11,7 @@ extern const struct OamData gNewGameBirchOamAttributes;
enum FieldEffectScriptIdx
{
FLDEFF_EXCLAMATION_MARK_ICON_1,
FLDEFF_EXCLAMATION_MARK_ICON,
FLDEFF_USE_CUT_ON_GRASS,
FLDEFF_USE_CUT_ON_TREE,
FLDEFF_SHADOW,
@ -44,7 +44,7 @@ enum FieldEffectScriptIdx
FLDEFF_NPCFLY_OUT,
FLDEFF_USE_FLY,
FLDEFF_FLY_IN,
FLDEFF_EXCLAMATION_MARK_ICON_2,
FLDEFF_QUESTION_MARK_ICON,
FLDEFF_FEET_IN_FLOWING_WATER,
FLDEFF_BIKE_TIRE_TRACKS,
FLDEFF_SAND_DISGUISE,

View File

@ -8,9 +8,9 @@ u8 GetPlayerAvatarGenderByGraphicsId(u8);
bool8 TestPlayerAvatarFlags(u8);
u8 GetPlayerAvatarObjectId(void);
void PlayerGetDestCoords(s16 *, s16 *);
u8 player_get_direction_lower_nybble(void);
u8 player_get_direction_upper_nybble(void);
u8 player_get_x22(void);
u8 GetPlayerFacingDirection(void);
u8 GetPlayerMovementDirection(void);
u8 PlayerGetCopyableMovement(void);
void PlayerGoSpeed1(u8);
void PlayerGoSpeed2(u8);
void PlayerGoSpeed3(u8);
@ -43,6 +43,6 @@ void sub_808C114(void);
u8 GetPlayerAvatarGraphicsIdByCurrentState(void);
void SetPlayerAvatarStateMask(u8 a);
u8 GetPlayerAvatarGraphicsIdByStateId(u8 a);
u8 sub_8093540(u32);
u8 GetJumpSpecialMovementAction(u32);
#endif // GUARD_FIELD_PLAYER_AVATAR_H

View File

@ -141,6 +141,6 @@ bool32 sub_8087598(void);
bool32 sub_80875C8(void);
bool32 sub_8087634(void);
bool32 sub_808766C(void);
void ZeroAllLinkPlayerEventObjects(void);
void ClearLinkPlayerEventObjects(void);
#endif // GUARD_OVERWORLD_H

View File

@ -20,8 +20,8 @@ bool8 CheckForTrainersWantingBattle(void);
void sub_80B4578(struct EventObject *var);
void EndTrainerApproach(void);
void sub_80B45D0(void);
u8 FldEff_ExclamationMarkIcon1(void);
u8 FldEff_ExclamationMarkIcon2(void);
u8 FldEff_ExclamationMarkIcon(void);
u8 FldEff_QuestionMarkIcon(void);
u8 FldEff_HeartIcon(void);
u8 GetCurrentApproachingTrainerEventObjectId(void);
u8 GetChosenApproachingTrainerEventObjectId(u8 arrayId);

View File

@ -1203,7 +1203,7 @@ void sub_80B16D8(void)
{
struct EventObject *eventObject = &gEventObjects[gSelectedEventObject];
npc_set_running_behaviour_etc(eventObject, npc_running_behaviour_by_direction(eventObject->facingDirection));
SetTrainerMovementType(eventObject, GetTrainerFacingDirectionMovementType(eventObject->facingDirection));
}
u8 GetTrainerBattleMode(void)

View File

@ -12,7 +12,7 @@ extern u8 EventObjectGetBerryTreeId(u8 eventObjectId);
extern void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup);
extern void CB2_ChooseBerry(void);
extern const u8* GetEventObjectScriptPointerForComparison(void);
extern bool8 sub_8092E9C(u8, u8, u8);
extern bool8 IsBerryTreeSparkling(u8, u8, u8);
extern u16 gSpecialVar_ItemId;
@ -1166,7 +1166,7 @@ void EventObjectInteractionGetBerryTreeData(void)
unk = gSpecialVar_LastTalked;
num = gSaveBlock1Ptr->location.mapNum;
group = gSaveBlock1Ptr->location.mapGroup;
if (sub_8092E9C(unk, num, group))
if (IsBerryTreeSparkling(unk, num, group))
gSpecialVar_0x8004 = 0xFF;
else
gSpecialVar_0x8004 = GetStageByBerryTreeId(id);

View File

@ -152,7 +152,7 @@ static void MovePlayerOnMachBike(u8 direction, u16 newKeys, u16 heldKeys)
static u8 GetMachBikeTransition(u8 *dirTraveling)
{
// if the dir updated before this function, get the relevent new direction to check later.
u8 direction = player_get_direction_upper_nybble();
u8 direction = GetPlayerMovementDirection();
// is the player standing still?
if (*dirTraveling == 0)
@ -296,7 +296,7 @@ static u8 CheckMovementInputAcroBike(u8 *newDirection, u16 newKeys, u16 heldKeys
static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys)
{
u8 direction = player_get_direction_upper_nybble();
u8 direction = GetPlayerMovementDirection();
gPlayerAvatar.bikeFrameCounter = 0;
if (*newDirection == DIR_NONE)
@ -349,7 +349,7 @@ static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys
Bike_SetBikeStill();
return ACRO_TRANS_TURN_DIRECTION;
}
direction = player_get_direction_upper_nybble();
direction = GetPlayerMovementDirection();
if (*newDirection == AcroBike_GetJumpDirection())
{
Bike_SetBikeStill(); // Bike_SetBikeStill sets speed to standing, but the next line immediately overrides it. could have just reset acroBikeState to 0 here instead of wasting a jump.
@ -378,7 +378,7 @@ static u8 AcroBikeHandleInputWheelieStanding(u8 *newDirection, u16 newKeys, u16
u8 direction;
struct EventObject *playerEventObj;
direction = player_get_direction_upper_nybble();
direction = GetPlayerMovementDirection();
playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
gPlayerAvatar.runningState = NOT_MOVING;
@ -425,7 +425,7 @@ static u8 AcroBikeHandleInputBunnyHop(u8 *newDirection, u16 newKeys, u16 heldKey
u8 direction;
struct EventObject *playerEventObj;
direction = player_get_direction_upper_nybble();
direction = GetPlayerMovementDirection();
playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!(heldKeys & B_BUTTON))
{
@ -472,7 +472,7 @@ static u8 AcroBikeHandleInputWheelieMoving(u8 *newDirection, u16 newKeys, u16 he
u8 direction;
struct EventObject *playerEventObj;
direction = player_get_direction_lower_nybble();
direction = GetPlayerFacingDirection();
playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!(heldKeys & B_BUTTON))
{
@ -527,7 +527,7 @@ static u8 AcroBikeHandleInputSidewaysJump(u8 *ptr, u16 newKeys, u16 heldKeys)
struct EventObject *playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
playerEventObj->facingDirectionLocked = 0;
EventObjectSetDirection(playerEventObj, playerEventObj->facingDirection);
SetEventObjectDirection(playerEventObj, playerEventObj->facingDirection);
gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
return CheckMovementInputAcroBike(ptr, newKeys, heldKeys);
}
@ -672,7 +672,7 @@ static void AcroBikeTransition_SideJump(u8 direction)
playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
PlaySE(SE_JITE_PYOKO);
playerEventObj->facingDirectionLocked = 1;
PlayerSetAnimId(sub_8093514(direction), 2);
PlayerSetAnimId(GetJumpMovementAction(direction), 2);
}
static void AcroBikeTransition_TurnJump(u8 direction)
@ -1062,7 +1062,7 @@ void Bike_HandleBumpySlopeJump(void)
if (MetatileBehavior_IsBumpySlope(tileBehavior))
{
gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING;
sub_808C1B4(player_get_direction_upper_nybble());
sub_808C1B4(GetPlayerMovementDirection());
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,443 +1,443 @@
#ifndef GUARD_MOVEMENT_TYPE_FUNC_TABLES_H
#define GUARD_MOVEMENT_TYPE_FUNC_TABLES_H
u8 (*const gUnknown_0850D6F4[])(struct EventObject *, struct Sprite *) = {
sub_808F44C,
sub_808F460,
sub_808F48C,
sub_808F4C8,
sub_808F4E8,
sub_808F534,
sub_808F564,
u8 (*const gMovementTypeFuncs_WanderAround[])(struct EventObject *, struct Sprite *) = {
MovementType_WanderAround_Step0,
MovementType_WanderAround_Step1,
MovementType_WanderAround_Step2,
MovementType_WanderAround_Step3,
MovementType_WanderAround_Step4,
MovementType_WanderAround_Step5,
MovementType_WanderAround_Step6,
};
const u8 gUnknown_0850D710[] = {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST};
const u8 gStandardDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST};
u8 (*const gUnknown_0850D714[])(s16, s16, s16, s16) = {
GetRegularRunningPastFacingDirection,
GetNorthSouthRunningPastFacingDirection,
GetEastWestRunningPastFacingDirection,
GetNorthEastRunningPastFacingDirection,
GetNorthWestRunningPastFacingDirection,
GetSouthEastRunningPastFacingDirection,
GetSouthWestRunningPastFacingDirection,
GetNonEastRunningPastFacingDirection,
GetNonWestRunningPastFacingDirection,
GetNonSouthRunningPastFacingDirection,
GetNonNorthRunningPastFacingDirection,
u8 (*const gGetVectorDirectionFuncs[])(s16, s16, s16, s16) = {
GetVectorDirection,
GetLimitedVectorDirection_SouthNorth,
GetLimitedVectorDirection_WestEast,
GetLimitedVectorDirection_WestNorth,
GetLimitedVectorDirection_EastNorth,
GetLimitedVectorDirection_WestSouth,
GetLimitedVectorDirection_EastSouth,
GetLimitedVectorDirection_SouthNorthWest,
GetLimitedVectorDirection_SouthNorthEast,
GetLimitedVectorDirection_NorthWestEast,
GetLimitedVectorDirection_SouthWestEast,
};
u8 (*const gUnknown_0850D740[])(struct EventObject *, struct Sprite *) = {
sub_808F988,
sub_808F99C,
sub_808F9C8,
sub_808FA0C,
sub_808FA3C,
u8 (*const gMovementTypeFuncs_LookAround[])(struct EventObject *, struct Sprite *) = {
MovementType_LookAround_Step0,
MovementType_LookAround_Step1,
MovementType_LookAround_Step2,
MovementType_LookAround_Step3,
MovementType_LookAround_Step4,
};
u8 (*const gUnknown_0850D754[])(struct EventObject *, struct Sprite *) = {
sub_808FAC8,
sub_808FADC,
sub_808FB08,
sub_808FB44,
sub_808FB64,
sub_808FBB0,
sub_808FBE0,
u8 (*const gMovementTypeFuncs_WanderUpAndDown[])(struct EventObject *, struct Sprite *) = {
MovementType_WanderUpAndDown_Step0,
MovementType_WanderUpAndDown_Step1,
MovementType_WanderUpAndDown_Step2,
MovementType_WanderUpAndDown_Step3,
MovementType_WanderUpAndDown_Step4,
MovementType_WanderUpAndDown_Step5,
MovementType_WanderUpAndDown_Step6,
};
const u8 gUnknown_0850D770[] = {DIR_SOUTH, DIR_NORTH};
const u8 gUpAndDownDirections[] = {DIR_SOUTH, DIR_NORTH};
u8 (*const gUnknown_0850D774[])(struct EventObject *, struct Sprite *) = {
sub_808FC4C,
sub_808FC60,
sub_808FC8C,
sub_808FCC8,
sub_808FCE8,
sub_808FD34,
sub_808FD64,
u8 (*const gMovementTypeFuncs_WanderLeftAndRight[])(struct EventObject *, struct Sprite *) = {
MovementType_WanderLeftAndRight_Step0,
MovementType_WanderLeftAndRight_Step1,
MovementType_WanderLeftAndRight_Step2,
MovementType_WanderLeftAndRight_Step3,
MovementType_WanderLeftAndRight_Step4,
MovementType_WanderLeftAndRight_Step5,
MovementType_WanderLeftAndRight_Step6,
};
const u8 gUnknown_0850D790[] = {DIR_WEST, DIR_EAST};
const u8 gLeftAndRightDirections[] = {DIR_WEST, DIR_EAST};
u8 (*const gUnknown_0850D794[])(struct EventObject *, struct Sprite *) = {
sub_808FDD0,
sub_808FDFC,
sub_808FE1C,
u8 (*const gMovementTypeFuncs_FaceDirection[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceDirection_Step0,
MovementType_FaceDirection_Step1,
MovementType_FaceDirection_Step2,
};
u8 (*const gUnknown_0850D7A0[])(struct EventObject *, struct Sprite *) = {
do_berry_tree_growth_sparkle_1,
sub_808FF48,
do_berry_tree_growth_sparkle_2,
sub_808FFB4,
sub_8090004,
u8 (*const gMovementTypeFuncs_BerryTreeGrowth[])(struct EventObject *, struct Sprite *) = {
MovementType_BerryTreeGrowth_Step0,
MovementType_BerryTreeGrowth_Step1,
MovementType_BerryTreeGrowth_Step2,
MovementType_BerryTreeGrowth_Step3,
MovementType_BerryTreeGrowth_Step4,
};
u8 (*const gUnknown_0850D7B4[])(struct EventObject *, struct Sprite *) = {
sub_8090094,
sub_80900A8,
sub_80900D4,
sub_8090118,
sub_8090148,
u8 (*const gMovementTypeFuncs_FaceDownAndUp[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceDownAndUp_Step0,
MovementType_FaceDownAndUp_Step1,
MovementType_FaceDownAndUp_Step2,
MovementType_FaceDownAndUp_Step3,
MovementType_FaceDownAndUp_Step4,
};
u8 (*const gUnknown_0850D7C8[])(struct EventObject *, struct Sprite *) = {
sub_80901D4,
sub_80901E8,
sub_8090214,
sub_8090258,
sub_8090288,
u8 (*const gMovementTypeFuncs_FaceLeftAndRight[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceLeftAndRight_Step0,
MovementType_FaceLeftAndRight_Step1,
MovementType_FaceLeftAndRight_Step2,
MovementType_FaceLeftAndRight_Step3,
MovementType_FaceLeftAndRight_Step4,
};
u8 (*const gUnknown_0850D7DC[])(struct EventObject *, struct Sprite *) = {
sub_8090314,
sub_8090328,
sub_8090354,
sub_8090398,
sub_80903C8,
u8 (*const gMovementTypeFuncs_FaceUpAndLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceUpAndLeft_Step0,
MovementType_FaceUpAndLeft_Step1,
MovementType_FaceUpAndLeft_Step2,
MovementType_FaceUpAndLeft_Step3,
MovementType_FaceUpAndLeft_Step4,
};
const u8 gUnknown_0850D7F0[] = {DIR_NORTH, DIR_WEST};
const u8 gUpAndLeftDirections[] = {DIR_NORTH, DIR_WEST};
u8 (*const gUnknown_0850D7F4[])(struct EventObject *, struct Sprite *) = {
sub_8090454,
sub_8090468,
sub_8090494,
sub_80904D8,
sub_8090508,
u8 (*const gMovementTypeFuncs_FaceUpAndRight[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceUpAndRight_Step0,
MovementType_FaceUpAndRight_Step1,
MovementType_FaceUpAndRight_Step2,
MovementType_FaceUpAndRight_Step3,
MovementType_FaceUpAndRight_Step4,
};
const u8 gUnknown_0850D808[] = {DIR_NORTH, DIR_EAST};
const u8 gUpAndRightDirections[] = {DIR_NORTH, DIR_EAST};
u8 (*const gUnknown_0850D80C[])(struct EventObject *, struct Sprite *) = {
sub_8090594,
sub_80905A8,
sub_80905D4,
sub_8090618,
sub_8090648,
u8 (*const gMovementTypeFuncs_FaceDownAndLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceDownAndLeft_Step0,
MovementType_FaceDownAndLeft_Step1,
MovementType_FaceDownAndLeft_Step2,
MovementType_FaceDownAndLeft_Step3,
MovementType_FaceDownAndLeft_Step4,
};
const u8 gUnknown_0850D820[] = {DIR_SOUTH, DIR_WEST};
const u8 gDownAndLeftDirections[] = {DIR_SOUTH, DIR_WEST};
u8 (*const gUnknown_0850D824[])(struct EventObject *, struct Sprite *) = {
sub_80906D4,
sub_80906E8,
sub_8090714,
sub_8090758,
sub_8090788,
u8 (*const gMovementTypeFuncs_FaceDownAndRight[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceDownAndRight_Step0,
MovementType_FaceDownAndRight_Step1,
MovementType_FaceDownAndRight_Step2,
MovementType_FaceDownAndRight_Step3,
MovementType_FaceDownAndRight_Step4,
};
const u8 gUnknown_0850D838[] = {DIR_SOUTH, DIR_EAST};
const u8 gDownAndRightDirections[] = {DIR_SOUTH, DIR_EAST};
u8 (*const gUnknown_0850D83C[])(struct EventObject *, struct Sprite *) = {
sub_8090814,
sub_8090828,
sub_8090854,
sub_8090898,
sub_80908C8,
u8 (*const gMovementTypeFuncs_FaceDownUpAndLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceDownUpAndLeft_Step0,
MovementType_FaceDownUpAndLeft_Step1,
MovementType_FaceDownUpAndLeft_Step2,
MovementType_FaceDownUpAndLeft_Step3,
MovementType_FaceDownUpAndLeft_Step4,
};
const u8 gUnknown_0850D850[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_SOUTH};
const u8 gDownUpAndLeftDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_SOUTH};
u8 (*const gUnknown_0850D854[])(struct EventObject *, struct Sprite *) = {
sub_8090954,
sub_8090968,
sub_8090994,
sub_80909D8,
sub_8090A08,
u8 (*const gMovementTypeFuncs_FaceDownUpAndRight[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceDownUpAndRight_Step0,
MovementType_FaceDownUpAndRight_Step1,
MovementType_FaceDownUpAndRight_Step2,
MovementType_FaceDownUpAndRight_Step3,
MovementType_FaceDownUpAndRight_Step4,
};
const u8 gUnknown_0850D868[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_SOUTH};
const u8 gDownUpAndRightDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_SOUTH};
u8 (*const gUnknown_0850D86C[])(struct EventObject *, struct Sprite *) = {
sub_8090A94,
sub_8090AA8,
sub_8090AD4,
sub_8090B18,
sub_8090B48,
u8 (*const gMovementTypeFuncs_FaceUpLeftAndRight[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceUpLeftAndRight_Step0,
MovementType_FaceUpLeftAndRight_Step1,
MovementType_FaceUpLeftAndRight_Step2,
MovementType_FaceUpLeftAndRight_Step3,
MovementType_FaceUpLeftAndRight_Step4,
};
const u8 gUnknown_0850D880[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_NORTH};
const u8 gUpLeftAndRightDirections[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_NORTH};
u8 (*const gUnknown_0850D884[])(struct EventObject *, struct Sprite *) = {
sub_8090BD4,
sub_8090BE8,
sub_8090C14,
sub_8090C58,
sub_8090C88,
u8 (*const gMovementTypeFuncs_FaceDownLeftAndRight[])(struct EventObject *, struct Sprite *) = {
MovementType_FaceDownLeftAndRight_Step0,
MovementType_FaceDownLeftAndRight_Step1,
MovementType_FaceDownLeftAndRight_Step2,
MovementType_FaceDownLeftAndRight_Step3,
MovementType_FaceDownLeftAndRight_Step4,
};
const u8 gUnknown_0850D898[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_SOUTH};
const u8 gDownLeftAndRightDirections[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_SOUTH};
u8 (*const gUnknown_0850D89C[])(struct EventObject *, struct Sprite *) = {
sub_8090D14,
sub_8090D40,
sub_8090D64,
sub_8090D90,
u8 (*const gMovementTypeFuncs_RotateCounterclockwise[])(struct EventObject *, struct Sprite *) = {
MovementType_RotateCounterclockwise_Step0,
MovementType_RotateCounterclockwise_Step1,
MovementType_RotateCounterclockwise_Step2,
MovementType_RotateCounterclockwise_Step3,
};
const u8 gUnknown_0850D8AC[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
const u8 gCounterclockwiseDirections[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
u8 (*const gUnknown_0850D8B4[])(struct EventObject *, struct Sprite *) = {
sub_8090E18,
sub_8090E44,
sub_8090E68,
sub_8090E94,
u8 (*const gMovementTypeFuncs_RotateClockwise[])(struct EventObject *, struct Sprite *) = {
MovementType_RotateClockwise_Step0,
MovementType_RotateClockwise_Step1,
MovementType_RotateClockwise_Step2,
MovementType_RotateClockwise_Step3,
};
const u8 gUnknown_0850D8C4[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
const u8 gClockwiseDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
u8 (*const gUnknown_0850D8CC[])(struct EventObject *, struct Sprite *) = {
sub_8090F1C,
sub_8090F30,
sub_8090F68,
sub_8091020,
u8 (*const gMovementTypeFuncs_WalkBackAndForth[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkBackAndForth_Step0,
MovementType_WalkBackAndForth_Step1,
MovementType_WalkBackAndForth_Step2,
MovementType_WalkBackAndForth_Step3,
};
u8 (*const gUnknown_0850D8DC[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_809117C,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceUpRightLeftDown[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceUpRightLeftDown_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D8E8[] = {DIR_NORTH, DIR_EAST, DIR_WEST, DIR_SOUTH};
const u8 gUpRightLeftDownDirections[] = {DIR_NORTH, DIR_EAST, DIR_WEST, DIR_SOUTH};
u8 (*const gUnknown_0850D8EC[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091208,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceRightLeftDownUp[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceRightLeftDownUp_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D8F8[] = {DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
const u8 gRightLeftDownUpDirections[] = {DIR_EAST, DIR_WEST, DIR_SOUTH, DIR_NORTH};
u8 (*const gUnknown_0850D8FC[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091294,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceDownUpRightLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceDownUpRightLeft_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D908[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_WEST};
const u8 gDownUpRightLeftDirections[] = {DIR_SOUTH, DIR_NORTH, DIR_EAST, DIR_WEST};
u8 (*const gUnknown_0850D90C[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091320,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceLeftDownUpRight[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceLeftDownUpRight_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D918[] = {DIR_WEST, DIR_SOUTH, DIR_NORTH, DIR_EAST};
const u8 gLeftDownUpRightDirections[] = {DIR_WEST, DIR_SOUTH, DIR_NORTH, DIR_EAST};
u8 (*const gUnknown_0850D91C[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_80913AC,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceUpLeftRightDown[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceUpLeftRightDown_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D928[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_SOUTH};
const u8 gUpLeftRightDownDirections[] = {DIR_NORTH, DIR_WEST, DIR_EAST, DIR_SOUTH};
u8 (*const gUnknown_0850D92C[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091438,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceLeftRightDownUp[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceLeftRightDownUp_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D938[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_NORTH};
const u8 gLeftRightDownUpDirections[] = {DIR_WEST, DIR_EAST, DIR_SOUTH, DIR_NORTH};
u8 (*const gUnknown_0850D93C[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_80914C4,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceDownUpLeftRight[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceDownUpLeftRight_Step1,
MovementType_WalkSequence_Step2,
};
u8 (*const gUnknown_0850D948[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091550,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceRightDownUpLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceRightDownUpLeft_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D954[] = {DIR_EAST, DIR_SOUTH, DIR_NORTH, DIR_WEST};
const u8 gRightDownUpLeftDirections[] = {DIR_EAST, DIR_SOUTH, DIR_NORTH, DIR_WEST};
u8 (*const gUnknown_0850D958[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_80915DC,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceLeftUpDownRight[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceLeftUpDownRight_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D964[] = {DIR_WEST, DIR_NORTH, DIR_SOUTH, DIR_EAST};
const u8 gLeftUpDownRightDirections[] = {DIR_WEST, DIR_NORTH, DIR_SOUTH, DIR_EAST};
u8 (*const gUnknown_0850D968[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091668,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceUpDownRightLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceUpDownRightLeft_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D974[] = {DIR_NORTH, DIR_SOUTH, DIR_EAST, DIR_WEST};
const u8 gUpDownRightLeftDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_EAST, DIR_WEST};
u8 (*const gUnknown_0850D978[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_80916F4,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceRightLeftUpDown[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceRightLeftUpDown_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D984[] = {DIR_EAST, DIR_WEST, DIR_NORTH, DIR_SOUTH};
const u8 gRightLeftUpDownDirections[] = {DIR_EAST, DIR_WEST, DIR_NORTH, DIR_SOUTH};
u8 (*const gUnknown_0850D988[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091780,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceDownRightLeftUp[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceDownRightLeftUp_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D994[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_NORTH};
const u8 gDownRightLeftUpDirections[] = {DIR_SOUTH, DIR_EAST, DIR_WEST, DIR_NORTH};
u8 (*const gUnknown_0850D998[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_809180C,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceRightUpDownLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceRightUpDownLeft_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D9A4[] = {DIR_EAST, DIR_NORTH, DIR_SOUTH, DIR_WEST};
const u8 gRightUpDownLeftDirections[] = {DIR_EAST, DIR_NORTH, DIR_SOUTH, DIR_WEST};
u8 (*const gUnknown_0850D9A8[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091898,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceUpDownLeftRight[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceUpDownLeftRight_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D9B4[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST};
const u8 gUpDownLeftRightDirections[] = {DIR_NORTH, DIR_SOUTH, DIR_WEST, DIR_EAST};
u8 (*const gUnknown_0850D9B8[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091924,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceLeftRightUpDown[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceLeftRightUpDown_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D9C4[] = {DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
const u8 gLeftRightUpDownDirections[] = {DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH};
u8 (*const gUnknown_0850D9C8[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_80919B0,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceDownLeftRightUp[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceDownLeftRightUp_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D9D4[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH};
const u8 gDownLeftRightUpDirections[] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH};
u8 (*const gUnknown_0850D9D8[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091A3C,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceUpLeftDownRight[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceUpLeftDownRight_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D9E4[] = {DIR_NORTH, DIR_WEST, DIR_SOUTH, DIR_EAST};
const u8 gUpLeftDownRightDirections[] = {DIR_NORTH, DIR_WEST, DIR_SOUTH, DIR_EAST};
u8 (*const gUnknown_0850D9E8[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091AC8,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceDownRightUpLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceDownRightUpLeft_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850D9F4[] = {DIR_SOUTH, DIR_EAST, DIR_NORTH, DIR_WEST};
const u8 gDownRightUpLeftDirections[] = {DIR_SOUTH, DIR_EAST, DIR_NORTH, DIR_WEST};
u8 (*const gUnknown_0850D9F8[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091B54,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceLeftDownRightUp[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceLeftDownRightUp_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850DA04[] = {DIR_WEST, DIR_SOUTH, DIR_EAST, DIR_NORTH};
const u8 gLeftDownRightUpDirections[] = {DIR_WEST, DIR_SOUTH, DIR_EAST, DIR_NORTH};
u8 (*const gUnknown_0850DA08[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091BE0,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceRightUpLeftDown[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceRightUpLeftDown_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850DA14[] = {DIR_EAST, DIR_NORTH, DIR_WEST, DIR_SOUTH};
const u8 gRightUpLeftDownDirections[] = {DIR_EAST, DIR_NORTH, DIR_WEST, DIR_SOUTH};
u8 (*const gUnknown_0850DA18[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091C6C,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceUpRightDownLeft[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceUpRightDownLeft_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850DA24[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST};
const u8 gUpRightDownLeftDirections[] = {DIR_NORTH, DIR_EAST, DIR_SOUTH, DIR_WEST};
u8 (*const gUnknown_0850DA28[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091CF8,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceDownLeftUpRight[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceDownLeftUpRight_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850DA34[] = {DIR_SOUTH, DIR_WEST, DIR_NORTH, DIR_EAST};
const u8 gDownLeftUpRightDirections[] = {DIR_SOUTH, DIR_WEST, DIR_NORTH, DIR_EAST};
u8 (*const gUnknown_0850DA38[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091D84,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceLeftUpRightDown[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceLeftUpRightDown_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850DA44[] = {DIR_WEST, DIR_NORTH, DIR_EAST, DIR_SOUTH};
const u8 gLeftUpRightDownDirections[] = {DIR_WEST, DIR_NORTH, DIR_EAST, DIR_SOUTH};
u8 (*const gUnknown_0850DA48[])(struct EventObject *, struct Sprite *) = {
sub_8091048,
sub_8091E10,
sub_8091110,
u8 (*const gMovementTypeFuncs_WalkSequenceRightDownLeftUp[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSequence_Step0,
MovementType_WalkSequenceRightDownLeftUp_Step1,
MovementType_WalkSequence_Step2,
};
const u8 gUnknown_0850DA54[] = {DIR_EAST, DIR_SOUTH, DIR_WEST, DIR_NORTH};
const u8 gRightDownLeftUpDirections[] = {DIR_EAST, DIR_SOUTH, DIR_WEST, DIR_NORTH};
u8 (*const gUnknown_0850DA58[])(struct EventObject *, struct Sprite *) = {
mss_npc_reset_oampriv3_1_unk2_unk3,
sub_8091EC0,
sub_8091F20,
u8 (*const gMovementTypeFuncs_CopyPlayer[])(struct EventObject *, struct Sprite *) = {
MovementType_CopyPlayer_Step0,
MovementType_CopyPlayer_Step1,
MovementType_CopyPlayer_Step2,
};
bool8 (*const gUnknown_0850DA64[])(struct EventObject *, struct Sprite *, u8, bool8(u8)) = {
sub_8091F48,
sub_8091F4C,
sub_8091F94,
sub_80920A4,
sub_809215C,
sub_8092214,
bool8 (*const gCopyPlayerMovementFuncs[])(struct EventObject *, struct Sprite *, u8, bool8(u8)) = {
CopyablePlayerMovement_None,
CopyablePlayerMovement_FaceDirection,
CopyablePlayerMovement_GoSpeed0,
CopyablePlayerMovement_GoSpeed1,
CopyablePlayerMovement_GoSpeed2,
CopyablePlayerMovement_Slide,
cph_IM_DIFFERENT,
sub_8092314,
oac_hopping,
sub_8091F48,
sub_8091F48,
CopyablePlayerMovement_GoSpeed4,
CopyablePlayerMovement_Jump,
CopyablePlayerMovement_None,
CopyablePlayerMovement_None,
};
u8 (*const gUnknown_0850DA90[])(struct EventObject *, struct Sprite *) = {
mss_npc_reset_oampriv3_1_unk2_unk3,
mss_08062EA4,
sub_8091F20,
u8 (*const gMovementTypeFuncs_CopyPlayerInGrass[])(struct EventObject *, struct Sprite *) = {
MovementType_CopyPlayer_Step0,
MovementType_CopyPlayerInGrass_Step1,
MovementType_CopyPlayer_Step2,
};
u8 (*const gUnknown_0850DA9C[])(struct EventObject *, struct Sprite *) = {
sub_80926AC,
u8 (*const gMovementTypeFuncs_Hidden[])(struct EventObject *, struct Sprite *) = {
MovementType_Hidden_Step0,
};
u8 (*const gUnknown_0850DAA0[])(struct EventObject *, struct Sprite *) = {
sub_8092718,
sub_80926B8,
u8 (*const gMovementTypeFuncs_WalkInPlace[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkInPlace_Step0,
MovementType_MoveInPlace_Step1,
};
u8 (*const gUnknown_0850DAA8[])(struct EventObject *, struct Sprite *) = {
sub_8092788,
sub_80926B8,
u8 (*const gMovementTypeFuncs_WalkSlowlyInPlace[])(struct EventObject *, struct Sprite *) = {
MovementType_WalkSlowlyInPlace_Step0,
MovementType_MoveInPlace_Step1,
};
u8 (*const gUnknown_0850DAB0[])(struct EventObject *, struct Sprite *) = {
sub_80927F8,
sub_80926B8,
u8 (*const gMovementTypeFuncs_JogInPlace[])(struct EventObject *, struct Sprite *) = {
MovementType_JogInPlace_Step0,
MovementType_MoveInPlace_Step1,
};
u8 (*const gUnknown_0850DAB8[])(struct EventObject *, struct Sprite *) = {
sub_8092868,
sub_80926B8,
u8 (*const gMovementTypeFuncs_RunInPlace[])(struct EventObject *, struct Sprite *) = {
MovementType_RunInPlace_Step0,
MovementType_MoveInPlace_Step1,
};
u8 (*const gUnknown_0850DAC0[])(struct EventObject *, struct Sprite *) = {
sub_80928D8,
sub_809290C,
sub_809292C,
u8 (*const gMovementTypeFuncs_Invisible[])(struct EventObject *, struct Sprite *) = {
MovementType_Invisible_Step0,
MovementType_Invisible_Step1,
MovementType_Invisible_Step2,
};
#endif //GUARD_MOVEMENT_TYPE_FUNC_TABLES_H

View File

@ -2247,7 +2247,7 @@ bool8 sub_81299AC(u8 taskId)
void SetUpPuttingAwayDecorationPlayerAvatar(void)
{
player_get_direction_lower_nybble();
GetPlayerFacingDirection();
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.spriteId].data[0];
sub_812A39C();
gUnknown_03005DD0.spriteId = CreateSprite(&gUnknown_085A7404, 0x78, 0x50, 0);

View File

@ -90,7 +90,7 @@ void LockSelectedEventObject(void)
void sub_80984F4(void)
{
u8 objectId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0);
EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[objectId]);
EventObjectClearHeldMovementIfFinished(&gEventObjects[objectId]);
sub_80D338C();
UnfreezeEventObjects();
}
@ -100,9 +100,9 @@ void sub_8098524(void)
u8 objectId;
if (gEventObjects[gSelectedEventObject].active)
EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[gSelectedEventObject]);
EventObjectClearHeldMovementIfFinished(&gEventObjects[gSelectedEventObject]);
objectId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0);
EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[objectId]);
EventObjectClearHeldMovementIfFinished(&gEventObjects[objectId]);
sub_80D338C();
UnfreezeEventObjects();
}
@ -114,7 +114,7 @@ void sub_8098574(void)
void sub_809859C(void)
{
EventObjectClearAnimIfSpecialAnimActive(&gEventObjects[gSelectedEventObject]);
EventObjectClearHeldMovementIfActive(&gEventObjects[gSelectedEventObject]);
}
static void sub_80985BC(u8 taskId)

File diff suppressed because it is too large Load Diff

View File

@ -477,7 +477,7 @@ static void CameraPanningCB_PanAhead(void)
gUnknown_03000E2C = 0;
}
var = player_get_direction_upper_nybble();
var = GetPlayerMovementDirection();
if (var == 2)
{
if (gUnknown_03000E2A > -8)

View File

@ -1246,7 +1246,7 @@ bool8 sub_80B6BCC(struct Task *task) // gUnknown_0855C3C8[0]
CameraObjectReset2();
gEventObjects[gPlayerAvatar.eventObjectId].invisible = 1;
gPlayerAvatar.preventStep = TRUE;
EventObjectSetSpecialAnim(playerObject, GetFaceDirectionAnimId(player_get_direction_lower_nybble()));
EventObjectSetHeldMovement(playerObject, GetFaceDirectionMovementAction(GetPlayerFacingDirection()));
task->data[4] = playerSprite->subspriteMode;
playerObject->fixedPriority = 1;
playerSprite->oam.priority = 1;
@ -1393,9 +1393,9 @@ bool8 sub_80B6EE0(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(eventObject) || EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (!EventObjectIsMovementOverridden(eventObject) || EventObjectClearHeldMovementIfFinished(eventObject))
{
EventObjectSetSpecialAnim(eventObject, GetFaceDirectionAnimId(player_get_direction_lower_nybble()));
EventObjectSetHeldMovement(eventObject, GetFaceDirectionMovementAction(GetPlayerFacingDirection()));
task->data[0]++;
task->data[2] = 0;
task->data[3] = 0;
@ -1512,7 +1512,7 @@ bool8 sub_80B7114(struct Task *task)
u8 behavior;
CameraObjectReset2();
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
EventObjectSetSpecialAnim(eventObject, GetFaceDirectionAnimId(DIR_EAST));
EventObjectSetHeldMovement(eventObject, GetFaceDirectionMovementAction(DIR_EAST));
PlayerGetDestCoords(&x, &y);
behavior = MapGridGetMetatileBehaviorAt(x, y);
task->data[0]++;
@ -1606,11 +1606,11 @@ bool8 sub_80B72F4(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (EventObjectClearHeldMovementIfFinished(eventObject))
{
CameraObjectReset1();
ScriptContext2_Disable();
EventObjectSetSpecialAnim(eventObject, GetGoSpeed0AnimId(DIR_EAST));
EventObjectSetHeldMovement(eventObject, GetWalkNormalMovementAction(DIR_EAST));
DestroyTask(FindTaskIdByFunc(sub_80B70DC));
}
return FALSE;
@ -1643,9 +1643,9 @@ bool8 sub_80B73D0(struct Task *task, struct EventObject *eventObject)
bool8 waterfall_1_do_anim_probably(struct Task *task, struct EventObject *eventObject)
{
ScriptContext2_Enable();
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(eventObject))
if (!EventObjectIsMovementOverridden(eventObject))
{
EventObjectClearAnimIfSpecialAnimFinished(eventObject);
EventObjectClearHeldMovementIfFinished(eventObject);
gFieldEffectArguments[0] = task->data[1];
FieldEffectStart(FLDEFF_FIELD_MOVE_SHOW_MON_INIT);
task->data[0]++;
@ -1665,14 +1665,14 @@ bool8 waterfall_2_wait_anim_finish_probably(struct Task *task, struct EventObjec
bool8 sub_80B7450(struct Task *task, struct EventObject *eventObject)
{
EventObjectSetSpecialAnim(eventObject, GetSimpleGoAnimId(DIR_NORTH));
EventObjectSetHeldMovement(eventObject, GetWalkSlowMovementAction(DIR_NORTH));
task->data[0]++;
return FALSE;
}
bool8 sub_80B7478(struct Task *task, struct EventObject *eventObject)
{
if (!EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (!EventObjectClearHeldMovementIfFinished(eventObject))
{
return FALSE;
}
@ -1899,14 +1899,14 @@ bool8 sub_80B7968(struct Task *task, struct EventObject *eventObject, struct Spr
eventObject->invisible = 0;
CameraObjectReset1();
PlaySE(SE_W091);
EventObjectSetSpecialAnim(eventObject, sub_8093514(DIR_EAST));
EventObjectSetHeldMovement(eventObject, GetJumpMovementAction(DIR_EAST));
}
return FALSE;
}
bool8 sub_80B79BC(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite)
{
if (EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (EventObjectClearHeldMovementIfFinished(eventObject))
{
gPlayerAvatar.preventStep = FALSE;
ScriptContext2_Disable();
@ -1960,7 +1960,7 @@ bool8 sub_80B7AE8(struct Task *task, struct EventObject *eventObject, struct Spr
bool8 sub_80B7B18(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite)
{
if (EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (EventObjectClearHeldMovementIfFinished(eventObject))
{
if (task->data[1] > 3)
{
@ -1973,7 +1973,7 @@ bool8 sub_80B7B18(struct Task *task, struct EventObject *eventObject, struct Spr
} else
{
task->data[1]++;
EventObjectSetSpecialAnim(eventObject, GetStepInPlaceDelay4AnimId(eventObject->facingDirection));
EventObjectSetHeldMovement(eventObject, GetWalkInPlaceFastestMovementAction(eventObject->facingDirection));
PlaySE(SE_FU_ZUZUZU);
}
}
@ -2050,7 +2050,7 @@ void sub_80B7D14(struct Task *task)
{
task->data[0]++;
task->data[14] = 64;
task->data[15] = player_get_direction_lower_nybble();
task->data[15] = GetPlayerFacingDirection();
}
void sub_80B7D34(struct Task *task)
@ -2063,11 +2063,11 @@ void sub_80B7D34(struct Task *task)
sub_80AF0B4();
}
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(eventObject) || EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (!EventObjectIsMovementOverridden(eventObject) || EventObjectClearHeldMovementIfFinished(eventObject))
{
if (task->data[14] == 0 && !gPaletteFade.active && sub_80859A0() == TRUE)
{
EventObjectSetDirection(eventObject, task->data[15]);
SetEventObjectDirection(eventObject, task->data[15]);
sub_8084E14();
warp_in();
gFieldCallback = mapldr_080859D4;
@ -2075,7 +2075,7 @@ void sub_80B7D34(struct Task *task)
DestroyTask(FindTaskIdByFunc(sub_80B7CE4));
} else if (task->data[1] == 0 || (--task->data[1]) == 0)
{
EventObjectSetSpecialAnim(eventObject, GetFaceDirectionAnimId(spinDirections[eventObject->facingDirection]));
EventObjectSetHeldMovement(eventObject, GetFaceDirectionMovementAction(spinDirections[eventObject->facingDirection]));
if (task->data[2] < 12)
{
task->data[2]++;
@ -2113,7 +2113,7 @@ void sub_80B7EC4(struct Task *task)
if (IsWeatherNotFadingIn())
{
task->data[0]++;
task->data[15] = player_get_direction_lower_nybble();
task->data[15] = GetPlayerFacingDirection();
}
}
@ -2123,11 +2123,11 @@ void sub_80B7EE8(struct Task *task)
struct EventObject *eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (task->data[1] == 0 || (--task->data[1]) == 0)
{
if (EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(eventObject) && !EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (EventObjectIsMovementOverridden(eventObject) && !EventObjectClearHeldMovementIfFinished(eventObject))
{
return;
}
if (task->data[2] >= 32 && task->data[15] == player_get_direction_lower_nybble())
if (task->data[2] >= 32 && task->data[15] == GetPlayerFacingDirection())
{
eventObject->invisible = 0;
ScriptContext2_Disable();
@ -2135,7 +2135,7 @@ void sub_80B7EE8(struct Task *task)
DestroyTask(FindTaskIdByFunc(sub_80B7E94));
return;
}
EventObjectSetSpecialAnim(eventObject, GetFaceDirectionAnimId(spinDirections[eventObject->facingDirection]));
EventObjectSetHeldMovement(eventObject, GetFaceDirectionMovementAction(spinDirections[eventObject->facingDirection]));
if (task->data[2] < 32)
{
task->data[2]++;
@ -2174,7 +2174,7 @@ static void TeleportFieldEffectTask1(struct Task *task)
ScriptContext2_Enable();
FreezeEventObjects();
CameraObjectReset2();
task->data[15] = player_get_direction_lower_nybble();
task->data[15] = GetPlayerFacingDirection();
task->data[0]++;
}
@ -2286,7 +2286,7 @@ void sub_80B8280(struct Task *task)
task->data[1] = 8;
task->data[2] = 1;
task->data[14] = sprite->subspriteMode;
task->data[15] = player_get_direction_lower_nybble();
task->data[15] = GetPlayerFacingDirection();
PlaySE(SE_TK_WARPIN);
}
}
@ -2904,10 +2904,10 @@ void sub_80B8E14(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(eventObject) || EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (!EventObjectIsMovementOverridden(eventObject) || EventObjectClearHeldMovementIfFinished(eventObject))
{
sub_808C114();
EventObjectSetSpecialAnim(eventObject, 0x39);
EventObjectSetHeldMovement(eventObject, 0x39);
task->data[0]++;
}
}
@ -2916,7 +2916,7 @@ void sub_80B8E60(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (EventObjectCheckIfSpecialAnimFinishedOrInactive(eventObject))
if (EventObjectCheckHeldMovementStatus(eventObject))
{
gFieldEffectArguments[0] = task->data[15] | 0x80000000;
FieldEffectStart(FLDEFF_FIELD_MOVE_SHOW_MON_INIT);
@ -2931,8 +2931,8 @@ void sub_80B8EA8(struct Task *task)
{
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
EventObjectSetGraphicsId(eventObject, GetPlayerAvatarGraphicsIdByStateId(3));
EventObjectClearAnimIfSpecialAnimFinished(eventObject);
EventObjectSetSpecialAnim(eventObject, sub_8093540(eventObject->movementDirection));
EventObjectClearHeldMovementIfFinished(eventObject);
EventObjectSetHeldMovement(eventObject, GetJumpSpecialMovementAction(eventObject->movementDirection));
gFieldEffectArguments[0] = task->data[1];
gFieldEffectArguments[1] = task->data[2];
gFieldEffectArguments[2] = gPlayerAvatar.eventObjectId;
@ -2945,11 +2945,11 @@ void sub_80B8F24(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (EventObjectClearHeldMovementIfFinished(eventObject))
{
gPlayerAvatar.preventStep = FALSE;
gPlayerAvatar.flags &= 0xdf;
EventObjectSetSpecialAnim(eventObject, GetFaceDirectionAnimId(eventObject->movementDirection));
EventObjectSetHeldMovement(eventObject, GetFaceDirectionMovementAction(eventObject->movementDirection));
sub_81555AC(eventObject->fieldEffectSpriteId, 1);
UnfreezeEventObjects();
ScriptContext2_Disable();
@ -3206,13 +3206,13 @@ void sub_80B9204(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(eventObject) || EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (!EventObjectIsMovementOverridden(eventObject) || EventObjectClearHeldMovementIfFinished(eventObject))
{
task->data[15] = gPlayerAvatar.flags;
gPlayerAvatar.preventStep = TRUE;
SetPlayerAvatarStateMask(1);
sub_808C114();
EventObjectSetSpecialAnim(eventObject, 0x39);
EventObjectSetHeldMovement(eventObject, 0x39);
task->data[0]++;
}
}
@ -3221,7 +3221,7 @@ void sub_80B925C(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (EventObjectClearHeldMovementIfFinished(eventObject))
{
task->data[0]++;
gFieldEffectArguments[0] = task->data[1];
@ -3252,7 +3252,7 @@ void sub_80B92F8(struct Task *task)
task->data[0]++;
task->data[2] = 16;
SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT);
EventObjectSetSpecialAnim(&gEventObjects[gPlayerAvatar.eventObjectId], 0x02);
EventObjectSetHeldMovement(&gEventObjects[gPlayerAvatar.eventObjectId], 0x02);
}
}
@ -3260,7 +3260,7 @@ void sub_80B933C(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if ((task->data[2] == 0 || (--task->data[2]) == 0) && EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if ((task->data[2] == 0 || (--task->data[2]) == 0) && EventObjectClearHeldMovementIfFinished(eventObject))
{
task->data[0]++;
PlaySE(SE_W019);
@ -3277,7 +3277,7 @@ void sub_80B9390(struct Task *task)
EventObjectSetGraphicsId(eventObject, GetPlayerAvatarGraphicsIdByStateId(0x03));
StartSpriteAnim(&gSprites[eventObject->spriteId], 0x16);
eventObject->inanimate = 1;
EventObjectSetSpecialAnim(eventObject, 0x48);
EventObjectSetHeldMovement(eventObject, 0x48);
if (task->data[15] & 0x08)
{
DestroySprite(&gSprites[eventObject->fieldEffectSpriteId]);
@ -3293,7 +3293,7 @@ void sub_80B9418(struct Task *task)
if ((++task->data[2]) >= 10)
{
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
EventObjectClearAnimIfSpecialAnimActive(eventObject);
EventObjectClearHeldMovementIfActive(eventObject);
eventObject->inanimate = 0;
eventObject->hasShadow = 0;
sub_80B9560(task->data[1], eventObject->spriteId);
@ -3503,7 +3503,7 @@ void sub_80B9804(struct Task *task)
{
struct EventObject *eventObject;
eventObject = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(eventObject) || EventObjectClearAnimIfSpecialAnimFinished(eventObject))
if (!EventObjectIsMovementOverridden(eventObject) || EventObjectClearHeldMovementIfFinished(eventObject))
{
task->data[0]++;
task->data[2] = 17;
@ -3587,14 +3587,14 @@ void sub_80B9978(struct Task *task)
sprite->pos2.y = 0;
sprite->coordOffsetEnabled = 1;
sub_808C114();
EventObjectSetSpecialAnim(eventObject, 0x39);
EventObjectSetHeldMovement(eventObject, 0x39);
task->data[0]++;
}
}
void sub_80B99F0(struct Task *task)
{
if (EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[gPlayerAvatar.eventObjectId]))
if (EventObjectClearHeldMovementIfFinished(&gEventObjects[gPlayerAvatar.eventObjectId]))
{
task->data[0]++;
sub_80B9794(task->data[1]);
@ -3848,7 +3848,7 @@ bool8 sub_80B9E28(struct Sprite* sprite)
yPos = object->currentCoords.y - 7;
xPos = (gFieldEffectArguments[3] - xPos) * 16;
yPos = (gFieldEffectArguments[4] - yPos) * 16;
npc_coords_shift(object, gFieldEffectArguments[3] + 7, gFieldEffectArguments[4] + 7);
ShiftEventObjectCoords(object, gFieldEffectArguments[3] + 7, gFieldEffectArguments[4] + 7);
taskId = CreateTask(sub_80B9EDC, 0x50);
gTasks[taskId].data[1] = object->spriteId;
gTasks[taskId].data[2] = gSprites[object->spriteId].pos1.x + xPos;
@ -3886,7 +3886,7 @@ void sub_80B9EDC(u8 taskId)
struct EventObject *object = &gEventObjects[data[9]];
sprite->pos1.x = data[2];
sprite->pos1.y = data[3];
npc_coords_shift_still(object);
ShiftStillEventObjectCoords(object);
object->triggerGroundEffectsOnStop = TRUE;
FieldEffectActiveListRemove(0x42);
DestroyTask(taskId);

View File

@ -335,11 +335,11 @@ void sub_80FB6EC(void)
if (VarGet(0x40B4) == 2)
{
StartSpriteAnim(&gSprites[spriteId], EventObjectDirectionToImageAnimId(4));
StartSpriteAnim(&gSprites[spriteId], GetFaceDirectionAnimNum(4));
}
else
{
StartSpriteAnim(&gSprites[spriteId], EventObjectDirectionToImageAnimId(3));
StartSpriteAnim(&gSprites[spriteId], GetFaceDirectionAnimNum(3));
}
}

View File

@ -337,7 +337,7 @@ void sub_80FD504(u8 taskId)
}
else
{
playerDir = player_get_direction_lower_nybble();
playerDir = GetPlayerFacingDirection();
for (i = 0; i < 4; i++)
{
if (playerDir == gUnknown_085920E4[i])
@ -579,15 +579,15 @@ u8 sub_80FD9B0(s16 itemX, s16 itemY)
void sub_80FDA24(u8 direction)
{
EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]);
EventObjectClearAnim(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]);
npc_sync_anim_pause_bits(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]);
EventObjectClearHeldMovementIfFinished(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]);
EventObjectClearHeldMovement(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]);
UnfreezeEventObject(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]);
PlayerTurnInPlace(direction);
}
void sub_80FDA94(u8 taskId)
{
if (EventObjectCheckIfSpecialAnimFinishedOrInactive(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE)
if (EventObjectCheckHeldMovementStatus(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE)
DisplayItemMessageOnField(taskId, gText_ItemFinderNearby, sub_80FD5CC);
}
@ -595,7 +595,7 @@ void sub_80FDADC(u8 taskId)
{
s16 *data = gTasks[taskId].data;
if (EventObjectCheckIfSpecialAnimFinishedOrInactive(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE
if (EventObjectCheckHeldMovementStatus(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE
|| data[2] == FALSE)
{
sub_80FDA24(gUnknown_085920E4[data[5]]);

View File

@ -169,7 +169,7 @@ extern const u8* sub_809C2C8(struct MapPosition *a1, u8, u8);
extern u8 *sub_809D0F4(void*);
extern u8 sub_808BD6C(u8);
extern u8 sub_808BD7C(u8);
extern void sub_80979D4(struct Sprite*, u8);
extern void UpdateEventObjectSpriteVisibility(struct Sprite*, u8);
// this file's functions
static void Overworld_ResetStateAfterWhiteOut(void);
@ -912,7 +912,7 @@ void player_avatar_init_params_reset(void)
void walkrun_find_lowest_active_bit_in_bitfield(void)
{
sUnknown_02032300.player_field_1 = player_get_direction_lower_nybble();
sUnknown_02032300.player_field_1 = GetPlayerFacingDirection();
if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_MACH_BIKE))
sUnknown_02032300.player_field_0 = 2;
@ -2170,7 +2170,7 @@ static void sub_80869DC(void)
gUnknown_03005DEC = 0;
gUnknown_03005DE8 = 0;
sub_808D438();
SpawnEventObjectsInView(0, 0);
TrySpawnEventObjects(0, 0);
mapheader_run_first_tag4_script_list_match();
}
@ -2187,7 +2187,7 @@ static void mli4_mapscripts_and_other(void)
InitPlayerAvatar(x, y, player->player_field_1, gSaveBlock2Ptr->playerGender);
SetPlayerAvatarTransitionFlags(player->player_field_0);
player_avatar_init_params_reset();
SpawnEventObjectsInView(0, 0);
TrySpawnEventObjects(0, 0);
mapheader_run_first_tag4_script_list_match();
}
@ -2894,7 +2894,7 @@ static void ZeroLinkPlayerEventObject(struct LinkPlayerEventObject *linkPlayerEv
memset(linkPlayerEventObj, 0, sizeof(struct LinkPlayerEventObject));
}
void ZeroAllLinkPlayerEventObjects(void)
void ClearLinkPlayerEventObjects(void)
{
memset(gLinkPlayerEventObjects, 0, sizeof(gLinkPlayerEventObjects));
}
@ -2906,7 +2906,7 @@ static void ZeroEventObject(struct EventObject *eventObj)
static void SpawnLinkPlayerEventObject(u8 linkPlayerId, s16 x, s16 y, u8 a4)
{
u8 eventObjId = sub_808D4F4();
u8 eventObjId = GetFirstInactiveEventObjectId();
struct LinkPlayerEventObject *linkPlayerEventObj = &gLinkPlayerEventObjects[linkPlayerId];
struct EventObject *eventObj = &gEventObjects[eventObjId];
@ -3059,7 +3059,7 @@ static u8 sub_8087A20(struct LinkPlayerEventObject *linkPlayerEventObj, struct E
else
{
eventObj->directionSequenceIndex = 16;
npc_coords_shift(eventObj, x, y);
ShiftEventObjectCoords(eventObj, x, y);
EventObjectUpdateZCoord(eventObj);
return 1;
}
@ -3083,7 +3083,7 @@ static void sub_8087AA8(struct LinkPlayerEventObject *linkPlayerEventObj, struct
MoveCoords(eventObj->range.as_byte, &eventObj->initialCoords.x, &eventObj->initialCoords.y);
if (!eventObj->directionSequenceIndex)
{
npc_coords_shift_still(eventObj);
ShiftStillEventObjectCoords(eventObj);
linkPlayerEventObj->mode = 2;
}
}
@ -3166,11 +3166,11 @@ static void SpriteCB_LinkPlayer(struct Sprite *sprite)
sprite->oam.priority = ZCoordToPriority(eventObj->previousElevation);
if (!linkPlayerEventObj->mode)
StartSpriteAnim(sprite, EventObjectDirectionToImageAnimId(eventObj->range.as_byte));
StartSpriteAnim(sprite, GetFaceDirectionAnimNum(eventObj->range.as_byte));
else
StartSpriteAnimIfDifferent(sprite, get_go_image_anim_num(eventObj->range.as_byte));
StartSpriteAnimIfDifferent(sprite, GetMoveDirectionAnimNum(eventObj->range.as_byte));
sub_80979D4(sprite, 0);
UpdateEventObjectSpriteVisibility(sprite, 0);
if (eventObj->triggerGroundEffectsOnMove)
{
sprite->invisible = ((sprite->data[7] & 4) >> 2);

View File

@ -61,8 +61,8 @@ static void task08_080C9820(u8 taskId)
ScriptContext2_Enable();
gPlayerAvatar.preventStep = TRUE;
eventObjId = gPlayerAvatar.eventObjectId;
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(&gEventObjects[eventObjId])
|| EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[eventObjId]))
if (!EventObjectIsMovementOverridden(&gEventObjects[eventObjId])
|| EventObjectClearHeldMovementIfFinished(&gEventObjects[eventObjId]))
{
if (gMapHeader.mapType == MAP_TYPE_UNDERWATER)
{
@ -72,7 +72,7 @@ static void task08_080C9820(u8 taskId)
else
{
sub_808C114();
EventObjectSetSpecialAnim(&gEventObjects[eventObjId], 0x39);
EventObjectSetHeldMovement(&gEventObjects[eventObjId], 0x39);
gTasks[taskId].func = sub_813552C;
}
}
@ -80,7 +80,7 @@ static void task08_080C9820(u8 taskId)
static void sub_813552C(u8 taskId)
{
if (EventObjectCheckIfSpecialAnimFinishedOrInactive(&gEventObjects[gPlayerAvatar.eventObjectId]) == TRUE)
if (EventObjectCheckHeldMovementStatus(&gEventObjects[gPlayerAvatar.eventObjectId]) == TRUE)
{
FieldEffectStart(FLDEFF_FIELD_MOVE_SHOW_MON_INIT);
gTasks[taskId].func = sub_8135578;
@ -91,7 +91,7 @@ static void sub_8135578(u8 taskId)
{
if (!FieldEffectActiveListContains(6))
{
gFieldEffectArguments[1] = player_get_direction_lower_nybble();
gFieldEffectArguments[1] = GetPlayerFacingDirection();
if (gFieldEffectArguments[1] == 1)
gFieldEffectArguments[2] = 0;
if (gFieldEffectArguments[1] == 2)

View File

@ -1157,7 +1157,7 @@ bool8 ScrCmd_faceplayer(struct ScriptContext *ctx)
if (gEventObjects[gSelectedEventObject].active)
{
EventObjectFaceOppositeDirection(&gEventObjects[gSelectedEventObject],
player_get_direction_lower_nybble());
GetPlayerFacingDirection());
}
return FALSE;
}
@ -1244,7 +1244,7 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx)
HideFieldMessageBox();
objectId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0);
EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[objectId]);
EventObjectClearHeldMovementIfFinished(&gEventObjects[objectId]);
sub_80D338C();
UnfreezeEventObjects();
return FALSE;
@ -1256,9 +1256,9 @@ bool8 ScrCmd_release(struct ScriptContext *ctx)
HideFieldMessageBox();
if (gEventObjects[gSelectedEventObject].active)
EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[gSelectedEventObject]);
EventObjectClearHeldMovementIfFinished(&gEventObjects[gSelectedEventObject]);
objectId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0);
EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[objectId]);
EventObjectClearHeldMovementIfFinished(&gEventObjects[objectId]);
sub_80D338C();
UnfreezeEventObjects();
return FALSE;
@ -2238,7 +2238,7 @@ bool8 ScrCmd_warpD1(struct ScriptContext *ctx)
u16 y = VarGet(ScriptReadHalfword(ctx));
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
sub_808D074(player_get_direction_lower_nybble());
sub_808D074(GetPlayerFacingDirection());
sub_80B0244();
player_avatar_init_params_reset();
return TRUE;

View File

@ -189,7 +189,7 @@ static void UnfreezeObjects(u8 taskId)
for (i = 0; i < 16; i++, pEventObjId++)
{
if (*pEventObjId != 0xFF)
npc_sync_anim_pause_bits(&gEventObjects[*pEventObjId]);
UnfreezeEventObject(&gEventObjects[*pEventObjId]);
}
}
@ -210,8 +210,8 @@ static void sub_80A2490(u8 taskId, u8 b, u8 eventObjId, const u8 *d)
{
u8 var;
if (EventObjectIsSpecialAnimActive(&gEventObjects[eventObjId])
&& !EventObjectClearAnimIfSpecialAnimFinished(&gEventObjects[eventObjId]))
if (EventObjectIsHeldMovementActive(&gEventObjects[eventObjId])
&& !EventObjectClearHeldMovementIfFinished(&gEventObjects[eventObjId]))
return;
var = *d;
@ -222,7 +222,7 @@ static void sub_80A2490(u8 taskId, u8 b, u8 eventObjId, const u8 *d)
}
else
{
if (!EventObjectSetSpecialAnim(&gEventObjects[eventObjId], var))
if (!EventObjectSetHeldMovement(&gEventObjects[eventObjId], var))
{
d++;
npc_obj_offscreen_culling_and_flag_update(b, d);

View File

@ -362,7 +362,7 @@ static u8 CheckPathBetweenTrainerAndPlayer(struct EventObject *trainerObj, u8 ap
MoveCoords(direction, &x, &y);
for (i = 0; i < approachDistance - 1; i++, MoveCoords(direction, &x, &y))
{
collision = sub_8092C8C(trainerObj, x, y, direction);
collision = GetCollisionFlagsAtCoords(trainerObj, x, y, direction);
if (collision != 0 && (collision & COLLISION_MASK))
return 0;
}
@ -373,7 +373,7 @@ static u8 CheckPathBetweenTrainerAndPlayer(struct EventObject *trainerObj, u8 ap
trainerObj->range.as_nybbles.x = 0;
trainerObj->range.as_nybbles.y = 0;
collision = npc_block_way(trainerObj, x, y, direction);
collision = GetCollisionAtCoords(trainerObj, x, y, direction);
trainerObj->range.as_nybbles.x = unk19_temp;
trainerObj->range.as_nybbles.y = unk19b_temp;
@ -439,16 +439,16 @@ static bool8 sub_80B417C(u8 taskId, struct Task *task, struct EventObject *train
u8 direction;
EventObjectGetLocalIdAndMap(trainerObj, &gFieldEffectArguments[0], &gFieldEffectArguments[1], &gFieldEffectArguments[2]);
FieldEffectStart(FLDEFF_EXCLAMATION_MARK_ICON_1);
direction = GetFaceDirectionAnimId(trainerObj->facingDirection);
EventObjectSetSpecialAnim(trainerObj, direction);
FieldEffectStart(FLDEFF_EXCLAMATION_MARK_ICON);
direction = GetFaceDirectionMovementAction(trainerObj->facingDirection);
EventObjectSetHeldMovement(trainerObj, direction);
task->tFuncId++;
return TRUE;
}
static bool8 sub_80B41C0(u8 taskId, struct Task *task, struct EventObject *trainerObj)
{
if (FieldEffectActiveListContains(FLDEFF_EXCLAMATION_MARK_ICON_1))
if (FieldEffectActiveListContains(FLDEFF_EXCLAMATION_MARK_ICON))
{
return FALSE;
}
@ -465,16 +465,16 @@ static bool8 sub_80B41C0(u8 taskId, struct Task *task, struct EventObject *train
static bool8 sub_80B4200(u8 taskId, struct Task *task, struct EventObject *trainerObj)
{
if (!(EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)) || EventObjectClearAnimIfSpecialAnimFinished(trainerObj))
if (!(EventObjectIsMovementOverridden(trainerObj)) || EventObjectClearHeldMovementIfFinished(trainerObj))
{
if (task->tTrainerRange)
{
EventObjectSetSpecialAnim(trainerObj, GetGoSpeed0AnimId(trainerObj->facingDirection));
EventObjectSetHeldMovement(trainerObj, GetWalkNormalMovementAction(trainerObj->facingDirection));
task->tTrainerRange--;
}
else
{
EventObjectSetSpecialAnim(trainerObj, 0x3E);
EventObjectSetHeldMovement(trainerObj, 0x3E);
task->tFuncId++;
}
}
@ -485,19 +485,19 @@ static bool8 sub_80B425C(u8 taskId, struct Task *task, struct EventObject *train
{
struct EventObject *playerObj;
if (EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj) && !EventObjectClearAnimIfSpecialAnimFinished(trainerObj))
if (EventObjectIsMovementOverridden(trainerObj) && !EventObjectClearHeldMovementIfFinished(trainerObj))
return FALSE;
npc_set_running_behaviour_etc(trainerObj, npc_running_behaviour_by_direction(trainerObj->facingDirection));
sub_808F23C(trainerObj, npc_running_behaviour_by_direction(trainerObj->facingDirection));
sub_808F208(trainerObj);
SetTrainerMovementType(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection));
TryOverrideTemplateCoordsForEventObject(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection));
OverrideTemplateCoordsForEventObject(trainerObj);
playerObj = &gEventObjects[gPlayerAvatar.eventObjectId];
if (EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(playerObj) && !EventObjectClearAnimIfSpecialAnimFinished(playerObj))
if (EventObjectIsMovementOverridden(playerObj) && !EventObjectClearHeldMovementIfFinished(playerObj))
return FALSE;
sub_808BCE8();
EventObjectSetSpecialAnim(&gEventObjects[gPlayerAvatar.eventObjectId], GetFaceDirectionAnimId(GetOppositeDirection(trainerObj->facingDirection)));
EventObjectSetHeldMovement(&gEventObjects[gPlayerAvatar.eventObjectId], GetFaceDirectionMovementAction(GetOppositeDirection(trainerObj->facingDirection)));
task->tFuncId++;
return FALSE;
}
@ -506,18 +506,18 @@ static bool8 sub_80B4318(u8 taskId, struct Task *task, struct EventObject *train
{
struct EventObject *playerObj = &gEventObjects[gPlayerAvatar.eventObjectId];
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(playerObj)
|| EventObjectClearAnimIfSpecialAnimFinished(playerObj))
if (!EventObjectIsMovementOverridden(playerObj)
|| EventObjectClearHeldMovementIfFinished(playerObj))
SwitchTaskToFollowupFunc(taskId);
return FALSE;
}
static bool8 sub_80B435C(u8 taskId, struct Task *task, struct EventObject *trainerObj)
{
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)
|| EventObjectClearAnimIfSpecialAnimFinished(trainerObj))
if (!EventObjectIsMovementOverridden(trainerObj)
|| EventObjectClearHeldMovementIfFinished(trainerObj))
{
EventObjectSetSpecialAnim(trainerObj, 0x59);
EventObjectSetHeldMovement(trainerObj, 0x59);
task->tFuncId++;
}
return FALSE;
@ -525,7 +525,7 @@ static bool8 sub_80B435C(u8 taskId, struct Task *task, struct EventObject *train
static bool8 sub_80B4390(u8 taskId, struct Task *task, struct EventObject *trainerObj)
{
if (EventObjectClearAnimIfSpecialAnimFinished(trainerObj))
if (EventObjectClearHeldMovementIfFinished(trainerObj))
task->tFuncId = 3;
return FALSE;
@ -533,10 +533,10 @@ static bool8 sub_80B4390(u8 taskId, struct Task *task, struct EventObject *train
static bool8 sub_80B43AC(u8 taskId, struct Task *task, struct EventObject *trainerObj)
{
if (!EventObjectIsSpecialAnimOrDirectionSequenceAnimActive(trainerObj)
|| EventObjectClearAnimIfSpecialAnimFinished(trainerObj))
if (!EventObjectIsMovementOverridden(trainerObj)
|| EventObjectClearHeldMovementIfFinished(trainerObj))
{
EventObjectSetSpecialAnim(trainerObj, 0x3E);
EventObjectSetHeldMovement(trainerObj, 0x3E);
task->tFuncId++;
}
return FALSE;
@ -544,7 +544,7 @@ static bool8 sub_80B43AC(u8 taskId, struct Task *task, struct EventObject *train
static bool8 sub_80B43E0(u8 taskId, struct Task *task, struct EventObject *trainerObj)
{
if (EventObjectCheckIfSpecialAnimFinishedOrInactive(trainerObj))
if (EventObjectCheckHeldMovementStatus(trainerObj))
{
gFieldEffectArguments[0] = trainerObj->currentCoords.x;
gFieldEffectArguments[1] = trainerObj->currentCoords.y;
@ -567,8 +567,8 @@ static bool8 sub_80B4438(u8 taskId, struct Task *task, struct EventObject *train
sprite = &gSprites[trainerObj->spriteId];
sprite->oam.priority = 2;
EventObjectClearAnimIfSpecialAnimFinished(trainerObj);
EventObjectSetSpecialAnim(trainerObj, sub_80934BC(trainerObj->facingDirection));
EventObjectClearHeldMovementIfFinished(trainerObj);
EventObjectSetHeldMovement(trainerObj, GetJumpInPlaceMovementAction(trainerObj->facingDirection));
task->tFuncId++;
}
@ -597,14 +597,14 @@ static void sub_80B44C8(u8 taskId)
LoadWordFromTwoHalfwords(&task->data[1], (u32 *)&eventObj);
if (!task->data[7])
{
EventObjectClearAnim(eventObj);
EventObjectClearHeldMovement(eventObj);
task->data[7]++;
}
sTrainerSeeFuncList2[task->data[0]](taskId, task, eventObj);
if (task->data[0] == 3 && !FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH))
{
npc_set_running_behaviour_etc(eventObj, npc_running_behaviour_by_direction(eventObj->facingDirection));
sub_808F23C(eventObj, npc_running_behaviour_by_direction(eventObj->facingDirection));
SetTrainerMovementType(eventObj, GetTrainerFacingDirectionMovementType(eventObj->facingDirection));
TryOverrideTemplateCoordsForEventObject(eventObj, GetTrainerFacingDirectionMovementType(eventObj->facingDirection));
DestroyTask(taskId);
}
else
@ -659,22 +659,22 @@ void sub_80B45D0(void)
#define sData4 data[4]
#define sFldEffId data[7]
u8 FldEff_ExclamationMarkIcon1(void)
u8 FldEff_ExclamationMarkIcon(void)
{
u8 spriteId = CreateSpriteAtEnd(&sSpriteTemplate_ExclamationQuestionMark, 0, 0, 0x53);
if (spriteId != MAX_SPRITES)
SetIconSpriteData(&gSprites[spriteId], FLDEFF_EXCLAMATION_MARK_ICON_1, 0);
SetIconSpriteData(&gSprites[spriteId], FLDEFF_EXCLAMATION_MARK_ICON, 0);
return 0;
}
u8 FldEff_ExclamationMarkIcon2(void)
u8 FldEff_QuestionMarkIcon(void)
{
u8 spriteId = CreateSpriteAtEnd(&sSpriteTemplate_ExclamationQuestionMark, 0, 0, 0x52);
if (spriteId != MAX_SPRITES)
SetIconSpriteData(&gSprites[spriteId], FLDEFF_EXCLAMATION_MARK_ICON_2, 1);
SetIconSpriteData(&gSprites[spriteId], FLDEFF_QUESTION_MARK_ICON, 1);
return 0;
}
@ -764,14 +764,14 @@ void sub_80B4808(void)
if (gUnknown_030060AC == 1)
{
trainerObj = &gEventObjects[gApproachingTrainers[gUnknown_03006080].eventObjectId];
gUnknown_03006084[0] = GetFaceDirectionAnimId(GetOppositeDirection(trainerObj->facingDirection));
gUnknown_03006084[0] = GetFaceDirectionMovementAction(GetOppositeDirection(trainerObj->facingDirection));
gUnknown_03006084[1] = 0xFE;
ScriptMovement_StartObjectMovementScript(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gUnknown_03006084);
}
else
{
trainerObj = &gEventObjects[gPlayerAvatar.eventObjectId];
gUnknown_03006084[0] = GetFaceDirectionAnimId(trainerObj->facingDirection);
gUnknown_03006084[0] = GetFaceDirectionMovementAction(trainerObj->facingDirection);
gUnknown_03006084[1] = 0xFE;
ScriptMovement_StartObjectMovementScript(0xFF, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gUnknown_03006084);
}

View File

@ -234,7 +234,7 @@ gUnknown_020375B4: @ 20375B4
gUnknown_020375B6: @ 20375B6
.space 0x2
gUnknown_020375B8: @ 20375B8
gLockedAnimEventObjects: @ 20375B8
.space 0x4
.include "src/field_message_box.o"