src/movement.c file

Enums

enum CollisionType { CollisionType0, CollisionType1, CollisionType2, CollisionType3, CollisionType4, CollisionType5, CollisionType6, CollisionType7, CollisionType8, CollisionType9, CollisionType10, CollisionType11, CollisionType12 }
The type of the movement/collision? that is done.
enum TileFilled { FilledNone = 0, FilledAll = 1, FilledNorthWest = 2, FilledNorthEast = 3, FilledSouthWest = 4, FilledSouthEast = 5, FilledSouth = 6, FilledNorth = 7, FilledWest = 8, FilledEast = 9 }
The collision function that is evaluated for a tile depending on the x/y position of the entity in the tile.

Functions

auto sub_080AF0C8(Entity*) -> bool32
auto MoveNorth(Entity*, s32, s32, u32) -> bool32
auto MoveNorthEast(Entity*, s32, s32, u32) -> bool32
auto MoveEast(Entity*, s32, s32, u32) -> bool32
auto MoveSouthEast(Entity*, s32, s32, u32) -> bool32
auto MoveSouth(Entity*, s32, s32, u32) -> bool32
auto MoveSouthWest(Entity*, s32, s32, u32) -> bool32
auto MoveWest(Entity*, s32, s32, u32) -> bool32
auto MoveNorthWest(Entity*, s32, s32, u32) -> bool32
auto TileCollisionFunction0(s32 x, s32 y) -> bool32
Empty.
auto TileCollisionFunction1(s32 x, s32 y) -> bool32
Fully filled.
auto TileCollisionFunction2(s32 x, s32 y) -> bool32
Diagonal North West filled.
auto TileCollisionFunction3(s32 x, s32 y) -> bool32
Diagonal North East filled.
auto TileCollisionFunction4(s32 x, s32 y) -> bool32
Diagonal South West filled.
auto TileCollisionFunction5(s32 x, s32 y) -> bool32
Diagonal South East filled.
auto TileCollisionFunction6(s32 x, s32 y) -> bool32
3/8 South filled
auto TileCollisionFunction7(s32 x, s32 y) -> bool32
3/8 North filled
auto TileCollisionFunction8(s32 x, s32 y) -> bool32
3/8 West filled
auto TileCollisionFunction9(s32 x, s32 y) -> bool32
3/8 East filled
auto IsTileCollision(const u8* collisionData, s32 x, s32 y, u32 collisionType) -> bool32
void CalculateEntityTileCollisions(Entity* this, u32 direction, u32 collisionType)
Calculates the collisions with the tiles around the entity and stores the result in Entity.collisions.
auto ProcessMovementInternal(Entity* this, s32 radius, s32 direction, u32 collisionType) -> bool32
auto ProcessMovement0(Entity* this) -> bool32
auto ProcessMovement1(Entity* this) -> bool32
auto ProcessMovement2(Entity* this) -> bool32
auto ProcessMovement10(Entity* this) -> bool32
auto ProcessMovement12(Entity* this) -> bool32
auto ProcessMovement0_custom(Entity* this, u32 direction, u32 speed) -> bool32
auto ProcessMovement3(Entity* this) -> bool32
auto ProcessMovement4(Entity* this) -> bool32
auto ProcessMovement5(Entity* this) -> bool32
void Knockback1(Entity* this)
void Knockback2(Entity* this)
auto ProcessMovement6(Entity* this) -> bool32
auto ProcessMovement6_custom(Entity* this, u32 direction, u32 speed) -> bool32
void ProcessMovementInternal2(Entity* this, u32 direction, u32 speed)
void sub_080AF250(s32 param_1)
void sub_080AF284(void)
void sub_080AF2E4(void)

Variables

const u16 gUnk_08133918

Function documentation

bool32 IsTileCollision(const u8* collisionData, s32 x, s32 y, u32 collisionType)

Parameters
collisionData
x x world coordinate
y y world coordinate
collisionType
Returns bool32

void CalculateEntityTileCollisions(Entity* this, u32 direction, u32 collisionType)

Calculates the collisions with the tiles around the entity and stores the result in Entity.collisions.

Parameters
this
direction
collisionType