include/collision.h file

Enums

enum (anonymous) { COL_LANTERN = 0x7, COL_SMALL_GUST = 0x13, COL_BOOMERANG = 0x14, COL_ARROW = 0x15, COL_BIG_GUST = 0x1b, COL_PACCI = 0x1d, COL_SWORD_BEAM = 0x21 }
Collisions.
enum Collisions { COL_NONE = 0x0, COL_NORTH_WEST = 0x2, COL_NORTH_EAST = 0x4, COL_NORTH_FULL = 0x6, COL_NORTH_ANY = 0xe, COL_SOUTH_WEST = 0x20, COL_SOUTH_EAST = 0x40, COL_SOUTH_FULL = 0x60, COL_SOUTH_ANY = 0xe0, COL_WEST_SOUTH = 0x200, COL_WEST_NORTH = 0x400, COL_WEST_FULL = 0x600, COL_WEST_ANY = 0xe00, COL_EAST_SOUTH = 0x2000, COL_EAST_NORTH = 0x4000, COL_EAST_FULL = 0x6000, COL_EAST_ANY = 0xe000 }
enum CollisionResult { RESULT_NO_COLLISION = 0, RESULT_COLLISION = 1, RESULT_COLLISION_WITHOUT_SET = 2 }

Functions

auto IsTileCollision(const u8* collisionData, s32 x, s32 y, u32 collisionType) -> bool32
auto IsColliding(Entity* this, Entity* that) -> bool32
auto IsCollidingPlayer(Entity* this) -> 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 sub_080176E4(Entity* this) -> u32

Variables

const u8 gMapTileTypeToActTile

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