Jumping and climbing on the field. More...
Go to the source code of this file.
Macros | |
| #define | TILE_CELLS ((struct MapCell *)Ram_MapCellBuffer) |
| #define | TILE_CELLS_SOUTH ((struct MapCell *)(Ram_MapCellBuffer + 0x200)) |
| #define | TILE_CELLS_NORTH ((struct MapCell *)(Ram_MapCellBuffer - 0x200)) |
Functions | |
| s32 | Field_TryJumpForward (void) |
| Makes the leader jump two tiles forward, over the tile in front, when the map allows it (Map_CheckObjectStep). | |
| s32 | Field_ClimbDown (void) |
| Climbing down (the player presses down at a climbable wall). | |
| s32 | Field_ClimbUp (void) |
| Climbing up (the player presses up at a climbable wall). | |
Jumping and climbing on the field.
Part of psynergy_effects.c, compiled only through it.
Definition in file climbing.c.
| #define TILE_CELLS ((struct MapCell *)Ram_MapCellBuffer) |
Definition at line 9 of file climbing.c.
Referenced by Field_ClimbDown(), and Field_ClimbUp().
| #define TILE_CELLS_SOUTH ((struct MapCell *)(Ram_MapCellBuffer + 0x200)) |
Definition at line 10 of file climbing.c.
Referenced by Field_ClimbDown().
| #define TILE_CELLS_NORTH ((struct MapCell *)(Ram_MapCellBuffer - 0x200)) |
Definition at line 11 of file climbing.c.
Referenced by Field_ClimbUp().
| s32 Field_TryJumpForward | ( | void | ) |
Makes the leader jump two tiles forward, over the tile in front, when the map allows it (Map_CheckObjectStep).
On a platform object (sprite 207 or 205) the platform plays its animation 7 and the leader bobs down 2 pixels and back. Each jump adds two tiles to work->walkingDistance, as walking them would, and the leader keeps jumping while it lands on another jump spot (collision 0xf9). Returns 0 after a jump, -1 when the leader cannot jump.
Called by Field_RunPushTileEvent when the leader has pushed against a jump spot (0xf9 or 0xfe) for more than 12 frames, and by the gap jumps of Goma Cave's pillar and Kolima Forest's bend, which import it. Moves the leader, and takes the field over between FieldEvent_Begin and FieldEvent_End.
Definition at line 25 of file climbing.c.
Referenced by Event_JumpGapWest(), Field_RunPushTileEvent(), Field_TryJumpForward(), and KolimaForestBend_JumpSouth().
| s32 Field_ClimbDown | ( | void | ) |
Climbing down (the player presses down at a climbable wall).
On the ground, when the cell south of the leader's is the same climbable cell, the leader turns round, grabs the wall and climbs down onto it (climbing pose 13). While climbing, the leader lets go and drops to the ground. Returns 0, or -1 when there is nothing to climb or the way is blocked.
Called by Field_RunPushTileEvent for a climbing spot (0xfd) with Down held, and imported by the scenes with ladders and climbable walls (Babi's Lighthouse, Crossbone Isle, Tolbi's ship and others). Sets gGameState.movementMode: 1 while the leader is on the wall, 0 off it.
Definition at line 119 of file climbing.c.
Referenced by BabiLighthouse_ClimbDownOrAdvancePair(), BabiLighthouse_ClimbOrAdvancePair(), Event_PushFirstBlock(), Event_PushOrClimbDown(), Event_UseLadder(), Field_ClimbDown(), Field_RunPushTileEvent(), and TolbiShipMast_ClimbDownLadder().
| s32 Field_ClimbUp | ( | void | ) |
Climbing up (the player presses up at a climbable wall).
On the ground, when the cell north of the leader's is the same climbable cell, the leader jumps onto the wall and holds on (climbing pose 12). While climbing, the leader climbs over the top onto the ground. Returns 0, or -1 when there is nothing to climb or the way is blocked.
Called by Field_RunPushTileEvent for a climbing spot (0xfd) with Up held, and imported by the scenes with ladders and climbable walls (Babi's Lighthouse, Colosso, Crossbone Isle and others). Sets gGameState.movementMode as Field_ClimbDown does.
Definition at line 196 of file climbing.c.
Referenced by BabiLighthouse_ClimbOrAdvancePair(), Event_ClimbUp(), Event_PushFirstBlock(), Event_TalkToFreeClimbAttendant(), Event_TalkToWallAttendant(), Event_UseLadder(), Field_ClimbUp(), Field_RunPushTileEvent(), and TolbiShipMast_Initialize().