src/playerUtils.c file

Classes

struct PACKED
struct Unk_struct_in_08077EC8

Functions

static void sub_08077E54(ItemBehavior* beh)
void sub_0800857C(Entity*)
void InitDefaultPriority(Entity* e)
void sub_0809D738(Entity*)
auto Mod(s32, s32) -> s32
auto sub_08003FDE(Entity*, Entity*, u32, u32) -> u32
auto sub_080B1B84(u32, u32) -> u32
void UpdateScreenShake(void)
void sub_080790E4(Entity* this)
void sub_08079064(Entity*)
auto IsAbleToUseItem(PlayerEntity*) -> bool32
auto IsPreventedFromUsingItem() -> bool32
void CreateItemIfInputMatches(Item itemId, PlayerInputState input, bool32 forceCreate)
auto IsTryingToPickupObject(void) -> bool32
auto CreateItem(u32) -> ItemBehavior*
auto sub_080789A8(void) -> u32
auto CreateItem1(u32) -> ItemBehavior*
void DeleteItemBehavior(ItemBehavior*, u32)
auto sub_08079E90(u32) -> bool32
void PlayerMinishSetNormalAndCollide(void)
void sub_08078D60(void)
auto CreateItemGetPlayerItemWithParent(ItemBehavior*) -> void*
auto sub_08079FD4(Entity*, u32) -> u32
void LoadRoomGfx(void)
auto GetSurfaceCalcType(Entity*, s32, s32) -> SurfaceType
void sub_0807AAF8(Entity*, u32)
void sub_0807A750(u32, u32, const u8*, u32)
void UnregisterInteractTile(u32, u32)
auto sub_0807BF88(u32, u32, RoomResInfo*) -> bool32
void LoadRoomTileSet(void)
void ForceSetPlayerState(u32 framestate)
auto sub_080784E4(void) -> InteractableObject*
auto sub_08079778(void) -> u32
auto GetPlayerTilePos(void) -> u32
auto sub_0807BEEC(u32 param_1, u32 param_2, u32 param_3) -> u32
auto sub_0807B434(u32 position, u32 layer) -> bool32
void sub_0807B820(u32)
void sub_0807B8A8(u32)
void sub_0807B930(u32)
auto sub_0807B464(u32 param_1, u32 param_2) -> bool32
void sub_0807B55C(u32, u32, u16*)
void sub_0807B480(u32, u32)
auto sub_0807B600(u32) -> bool32
void CreateRandomWaterTrace(Entity* parent, int range)
void sub_08079520(Entity* this)
auto ToggleDiving(Entity*) -> bool32
auto sub_0806FC50(u32 param_1, u32 param_2) -> const u16*
auto sub_08079F48(u32 param_1, u32 param_2) -> bool32
void FillActTileForLayer(MapLayer* mapLayer)
void sub_0807BFA8(void)
void sub_0807C8B0(u16*, u32, u32)
void sub_0807C69C(u8*, u32, u32)
void sub_0807C460(void)
void sub_0807BBE4(void)
void CreateCollisionDataBorderAroundRoom(void)
void sub_0807C5F4(u16*, u16*)
void sub_0807C5B0(void)
auto sub_08004202(Entity*, u8*, u32) -> u32
auto sub_0806FC24(u32 param_1, u32 param_2) -> bool32
auto sub_0807A180(Entity*, Entity*, u32, u32) -> u32
void ClearBgAnimations(void)
void LoadBgAnimations(u16* param_1)
void UpdateActiveItems(PlayerEntity* this)
void CreateItemEquippedAtSlot(EquipSlot equipSlot)
auto CreateItemNone(Item) -> ItemBehavior*
auto CreateItem1(Item) -> ItemBehavior*
auto CreateItem2(Item) -> ItemBehavior*
auto CreateItem3(Item) -> ItemBehavior*
auto CreateItem4(Item) -> ItemBehavior*
auto CreateItem5(Item) -> ItemBehavior*
auto CreateItem(Item itemId) -> ItemBehavior*
void ResetLantern(void)
void PutAwayItems(void)
void ResetActiveItems()
void sub_08077B98(ItemBehavior* unk)
void sub_08077BB8(ItemBehavior* beh)
auto CreatePlayerItemForItemIfNotExists(ItemBehavior* this) -> Entity*
auto CreatePlayerItemIfNotExists(ItemBehavior* this, u32 index) -> Entity*
auto CreatePlayerItemWithParent(ItemBehavior* this, u32 id) -> Entity*
auto FindPlayerItemForItem(ItemBehavior* this, u32 index) -> Entity*
auto CreatePlayerItem(u32 id, u32 type, u32 type2, u32 unk) -> Entity*
auto sub_08077CF8(u32 id, u32 type, u32 type2, u32 unk) -> Entity*
void sub_08077D38(ItemBehavior* this, u32 index)
void SetItemAnim(ItemBehavior* this, u32 animIndex)
void UpdateItemAnim(ItemBehavior* this)
void sub_08077E3C(ItemBehavior* this, u32 index)
auto sub_08077EC8(ItemBehavior* this) -> bool32
auto IsItemActive(ItemBehavior* this) -> bool32
auto IsItemActivatedThisFrame(ItemBehavior* this) -> bool32
auto IsItemActiveByInput(ItemBehavior* this, PlayerInputState input) -> bool32
void PlayerCancelHoldItem(ItemBehavior* this, u32 index)
auto PlayerTryDropObject(ItemBehavior* this, u32 index) -> bool32
Check if player state believes the held item is valid? If it's not delete the item?
auto sub_08078008(ChargeState* state) -> bool32
auto sub_08078124(ChargeState* state) -> bool32
auto sub_08078140(ChargeState* state) -> bool32
auto sub_08078070(ChargeState* state) -> bool32
auto sub_080780E0(ChargeState* state) -> bool32
auto sub_08078108(ChargeState* state) -> bool32
void SurfaceAction_DoNothing(Entity*)
void SurfaceAction_Pit(Entity*)
void SurfaceAction_SlopeGndGndVertical(Entity*)
void SurfaceAction_SlopeGndGndHorizontal(Entity*)
void SurfaceAction_6(Entity*)
void SurfaceAction_7(Entity*)
void SurfaceAction_MinishDoorFront(Entity*)
void SurfaceAction_MinishDoorBack(Entity*)
void SurfaceAction_A(Entity*)
void SurfaceAction_B(Entity*)
void SurfaceAction_SlopeGndWater(Entity*)
void SurfaceAction_ConveyerNorth(Entity*)
void SurfaceAction_ConveyerSouth(Entity*)
void SurfaceAction_ConveyerWest(Entity*)
void SurfaceAction_ConveyerEast(Entity*)
void SurfaceAction_Swamp(Entity*)
void SurfaceAction_14(Entity*)
void SurfaceAction_CloneTile(Entity*)
void SurfaceAction_16(Entity*)
void SurfaceAction_Ice(Entity*)
void SurfaceAction_ShallowWater(Entity*)
void SurfaceAction_Water(Entity*)
void SurfaceAction_Button(Entity*)
void SurfaceAction_1B(Entity*)
void SurfaceAction_1C(Entity*)
void SurfaceAction_Ladder(Entity*)
void SurfaceAction_20(Entity*)
void SurfaceAction_22(Entity*)
void SurfaceAction_Dust(Entity*)
void SurfaceAction_26(Entity*)
void SurfaceAction_Hole(Entity*)
void SurfaceAction_AutoLadder(Entity*)
void SurfaceAction_ClimbWall(Entity*)
void SurfaceAction_2C(Entity*)
void sub_0807B114(PlayerEntity*)
void sub_0807B128(PlayerEntity*)
void sub_0807B1A8(PlayerEntity*)
void sub_0807B144(PlayerEntity*)
void nullsub_506(PlayerEntity*)
void sub_0807B178(PlayerEntity*)
void sub_0807B2F8(PlayerEntity*)
void sub_0807B1DC(PlayerEntity*)
void sub_0807B1EC(PlayerEntity*)
void sub_0807B21C(PlayerEntity*)
void sub_0807B264(PlayerEntity*)
void sub_0807B2B8(PlayerEntity*)
void sub_08077F84(void)
auto sub_08077FEC(u32 action) -> bool32
void DetermineRButtonInteraction(void)
auto sub_080782C0(void) -> bool32
void ResetPossibleInteraction(void)
static auto InlinePlayerStateCheck() -> bool32
void AddInteractableWhenBigObject(Entity* ent)
void AddInteractableWhenBigFuser(Entity* ent, KinstoneId kinstoneId)
void AddInteractableFuser(Entity* ent, KinstoneId kinstoneId)
void AddInteractableAsMinishObject(Entity* ent)
void AddInteractableAsMinishFuser(Entity* ent, KinstoneId kinstoneId)
void AddInteractableCheckableObject(Entity* ent)
void AddInteractablePedestal(Entity* ent)
void AddInteractableSmallKeyLock(Entity* ent)
auto AddInteractableShopItem(Entity* ent) -> s32
auto AddInteractableBossDoor(Entity* ent) -> s32
auto AddInteractableChest(Entity* ent) -> s32
void SetInteractableObjectCollision(Entity* arg0, u32 ignoreLayer, u32 interactDirections, const void* customHitbox)
auto AddInteractableObject(Entity* entity, InteractionType type, KinstoneId kinstoneId) -> s32
void RemoveInteractableObject(Entity* entity)
Clear entry for Entity.
auto GetInteractableObjectIndex(Entity* entity) -> s32
Find entry for Entity.
void RegisterCarryEntity(Entity* this)
void FreeCarryEntity(Entity* this)
void SetPlayerControl(PlayerControlMode mode)
void CreateEzloHint(u32 hintId, u32 hintHeight)
void sub_08078AC0(u32 param_1, u32 param_2, u32 param_3)
void SetPlayerItemGetState(Entity* item, u8 param_2, u8 param_3)
Set up player states for getting the item?
void PausePlayer(void)
void ClearPlayerState(void)
void UpdateCarriedObject(void)
void sub_08078CD0(PlayerEntity* this)
void sub_08078E84(Entity* param_1, Entity* param_2)
void ResetPlayerPosition(void)
auto CheckQueuedAction(void) -> bool32
void CheckPlayerVelocity(void)
void ResetPlayerVelocity(void)
auto sub_08078F74(Entity* this) -> bool32
void sub_08078FB0(Entity* this)
void PlayerDropHeldObject(void)
void PlayerResetStateFromFusion(void)
void SetPlayerActionNormal(void)
void ResetPlayerAnimationAndAction(void)
void PlayerSetNormalAndCollide(void)
void sub_080792BC(s32 speed, u32 direction, u32 field_0x38)
void sub_080792D8(void)
auto sub_080793E4(u32 param_1) -> bool32
void RespawnPlayer(void)
auto sub_0807953C(void) -> u32
auto sub_08079550(void) -> bool32
void sub_08079708(Entity* this)
void sub_08079744(Entity* this)
auto sub_080797C4(void) -> u32
void sub_080797EC(void)
void ResolvePlayerAnimation(void)
auto sub_08079B24(void) -> bool32
void sub_08079BD8(Entity* this)
auto sub_08079C30(Entity* player) -> bool32
auto sub_08079D48(void) -> bool32
void sub_08079D84(void)
void sub_08079DCC(void)
void UpdatePlayerMovement(void)
void sub_08079E58(s32 speed, u32 direction)
auto PlayerCanBeMoved(void) -> bool32
auto sub_08079FC4(u32 param_1) -> u32
void UpdatePlayerPalette(void)
auto GetPlayerPalette(bool32 affectedBy) -> u32
void DeleteClones(void)
auto HasSwordEquipped(void) -> bool32
void UpdateFloorType(void)
void EnablePlayerDraw(Entity* this)
auto sub_0807A2B8(void) -> bool32
auto sub_0807A2F8(u32 param_1) -> u32
void sub_0807A5B8(u32 direction)
auto GetActTileInFront(Entity* this) -> u32
void nullsub_505(void)
void sub_0807A8D8(Entity* this)
void sub_0807AA80(Entity* this)
void sub_0807AABC(Entity* this)
void sub_0807AB44(Entity* this, s32 xOffset, s32 yOffset)
auto sub_0807AC54(Entity* this) -> bool32
void PlayerSwimming(Entity* this)
void PlayerUpdateSwimming(Entity* this)
void UpdatePlayerSkills(void)
void PlayerShrinkByRay(void)
auto GetSwordBeam(void) -> u32
Returns which kind of sword projectile is created.
void sub_0807B068(Entity* entity)
void sub_0807B0C8(void)
void PlayerWarp(PlayerEntity* this)
void SetTileType(u32 tileType, u32 tilePos, u32 layer)
auto sub_0807B5B0(Entity* this) -> bool32
void sub_0807B778(u32 tilePos, u32 layer)
void sub_0807B7D8(u32 tileType, u32 tilePos, u32 layer)
void SetTileByIndex(u32 tileIndex, u32 tilePos, u32 layer)
void RestorePrevTileEntity(u32 tilePos, u32 layer)
void sub_0807BB68(const s16* param_1, u32 basePosition, u32 layer)
void sub_0807BB98(s32 basePosition, u32 layer, u32 width, u32 height)
auto sub_0807BD14(Entity* this, u32 scrollDirection) -> bool32
auto sub_0807BDB8(Entity* this, u32 param_2) -> u32
void sub_0807C4F8(void)
void InitializeCamera()
void sub_0807C810(void)
void CloneMapData(void)
This function is used to create a copy of the map data for temporary cutscene changes.
void sub_0807C898(void)
void LoadCompressedMapData(void* dest, u32 offset)
void sub_0807C998(u32* dest)
void sub_0807C9D8(u32* a1)
auto FinalizeSave(void) -> u32
auto GetInventoryValue(u32 item) -> u32
auto SetInventoryValue(u32 item, u32 value) -> u32
void EnableDungeonWarp(u32 warp)
auto IsDungeonWarpActive(u32 warp) -> u32
auto CheckLocalFlagByBank(u32 bank, u32 flag) -> u32
auto sub_0807CB24(s32 param_1, u32 param_2) -> bool32

Variables

u8 gMapData
const u8 gUnk_0800851C
const u8 gUnk_080084BC
const u8 gUnk_0800845C
const u8 gUnk_0800833C
ItemDefinition gItemDefinitions
ItemBehavior*(*const gCreateItemsFuncs
const u8 gMapTileTypeToCollisionData
u8 gUpdateVisibleTiles
const KeyValuePair gMapActTileToSurfaceType
u16 gUnk_080B77C0
const u8 gMapSpecialTileToCollisionData
u8 gUnk_080082DC
MapDataDefinition gUnk_02022830
u16* gUnk_0800823C
const u8 gUnk_0811BFE0
const u8 gUnk_08007DF4
InteractableObject gInteractableObjects
u32 gUsedPalettes
bool32(*const gPlayerChargeActions
const InteractableObject gNoInteraction
const s8 gPlayerInteractHitboxOffsetNormal
const s8 gPlayerInteractHitboxOffsetMinish
const u8 gUnk_0811C01C
const s8 gUnk_0811C070
const s8 gUnk_0811C090
const s8*const gUnk_0811C0B0
const s8 gUnk_0811C0B8
const s8 gUnk_0811C0C8
const s8 gUnk_0811C0D8
const s8*const gUnk_0811C0E8
const u16 gUnk_0811C0F8
const s8 gUnk_0811C100
const u16 gUnk_0811C108
const u16 gUnk_0811C110
const u8 gUnk_0811C118
void(*const gSurfaceActions
const KeyValuePair gUnk_0811C240
const KeyValuePair gUnk_0811C24A
const KeyValuePair gUnk_0811C254
const KeyValuePair gUnk_0811C25E
const KeyValuePair gUnk_0811C1F8
const KeyValuePair gUnk_0811C20A
const KeyValuePair gUnk_0811C21C
const KeyValuePair gUnk_0811C22E
const KeyValuePair*const gUnk_0811C1D8
const KeyValuePair*const gUnk_0811C1E8
const u16 gUnk_0811C1F8End
const u16 gUnk_0811C20AEnd
const u16 gUnk_0811C21CEnd
const u16 gUnk_0811C22EEnd
const u16 gUnk_0811C240End
const u16 gUnk_0811C24AEnd
const u16 gUnk_0811C254End
const u16 gUnk_0811C25EEnd
const KeyValuePair gUnk_0811C268
const u16 gUnk_0811C268EEnd
void(*const gUnk_0811C27C
void(*const gUnk_0811C284
void(*const gUnk_0811C298
const u16 gUnk_0811C2AC
const u16 gUnk_0811C2CC
const u16 gUnk_0811C2EC
const s16 gUnk_0811C456
const u16 gUnk_0811C466

Function documentation

u32 GetInventoryValue(u32 item)

u32 SetInventoryValue(u32 item, u32 value)