mirror of https://github.com/zeldaret/tmc.git
				
				
				
			sort out most of functions.h
This commit is contained in:
		
							parent
							
								
									65b80571b2
								
							
						
					
					
						commit
						a633efd88c
					
				| 
						 | 
				
			
			@ -18,7 +18,7 @@ script_080106BE:
 | 
			
		|||
	MessageNoOverlap 0x3c07
 | 
			
		||||
	Jump script_08010726
 | 
			
		||||
script_080106E0:
 | 
			
		||||
	Call sub_08062EB8
 | 
			
		||||
	Call RemoveAllBakedGoods
 | 
			
		||||
	CallWithArg sub_0807F78C, 0x00000000
 | 
			
		||||
	WaitUntilTextboxCloses
 | 
			
		||||
	CheckTextboxResult
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
#include "global.h"
 | 
			
		||||
 | 
			
		||||
extern u32 Random(void);
 | 
			
		||||
extern u32 GetRandomByWeight(const u8*);
 | 
			
		||||
extern void CloneTile(u32, u32, u32);
 | 
			
		||||
extern u32 GetTileTypeByEntity(struct Entity_*);
 | 
			
		||||
extern u32 GetTileTypeByPos(s32 x, s32 y, u32 layer);
 | 
			
		||||
| 
						 | 
				
			
			@ -34,5 +35,16 @@ extern u32 ResolveCollisionLayer(struct Entity_*);
 | 
			
		|||
extern void sub_0800417E(struct Entity_*, u32);
 | 
			
		||||
extern u32 sub_0800442E(struct Entity_*);
 | 
			
		||||
extern u32 sub_08007DD6(u32, const u16*);
 | 
			
		||||
extern void SoundReqClipped(struct Entity_*, u32);
 | 
			
		||||
extern u32 sub_0800132C(struct Entity_*, struct Entity_*);
 | 
			
		||||
extern u32 sub_080B1B44(u32, u32);
 | 
			
		||||
extern u32 sub_080B1A48(u32, u32, u32);
 | 
			
		||||
extern u32 sub_080B1B18(s32, s32, u32);
 | 
			
		||||
extern u32 sub_080B1AE0(u16, u8);
 | 
			
		||||
extern u32 GetTileUnderEntity(struct Entity_*);
 | 
			
		||||
extern u32 sub_0800445C(struct Entity_*);
 | 
			
		||||
extern u32 sub_080B1AF0(struct Entity_*, s32, s32);
 | 
			
		||||
extern u32 GetRelativeCollisionTile(struct Entity_*, u32, u32);
 | 
			
		||||
extern bool32 sub_080B1B54(u32);
 | 
			
		||||
 | 
			
		||||
#endif // ASM_H
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,6 +27,8 @@ typedef enum {
 | 
			
		|||
} Collisions;
 | 
			
		||||
 | 
			
		||||
bool32 IsTileCollision(const u8*, s32, s32, u32);
 | 
			
		||||
bool32 IsColliding(Entity*, Entity*);
 | 
			
		||||
bool32 IsCollidingPlayer(Entity*);
 | 
			
		||||
void CalculateEntityTileCollisions(Entity*, u32, u32);
 | 
			
		||||
bool32 ProcessMovementInternal(Entity*, s32, s32, u32);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,19 +13,34 @@
 | 
			
		|||
#include "projectile.h"
 | 
			
		||||
 | 
			
		||||
bool32 EnemyInit(Entity* this);
 | 
			
		||||
extern u32 GetNextFunction(Entity*);
 | 
			
		||||
extern void EnemyFunctionHandler(Entity*, EntityActionArray);
 | 
			
		||||
extern void GenericKnockback(Entity*);
 | 
			
		||||
extern Entity* CreateDeathFx(Entity*, u32, u32);
 | 
			
		||||
u32 GetNextFunction(Entity*);
 | 
			
		||||
void EnemyFunctionHandler(Entity*, EntityActionArray);
 | 
			
		||||
void EnemyFunctionHandlerAfterCollision(Entity*, void (*const[])());
 | 
			
		||||
void GenericKnockback(Entity*);
 | 
			
		||||
Entity* CreateDeathFx(Entity*, u32, u32);
 | 
			
		||||
void sub_0804A720(Entity*);
 | 
			
		||||
bool32 sub_08049FDC(Entity*, u32);
 | 
			
		||||
 | 
			
		||||
extern Entity* Create0x68FX(Entity*, u32);
 | 
			
		||||
extern void SetChildOffset(Entity*, s32, s32, s32);
 | 
			
		||||
extern Entity* CreateProjectileWithParent(Entity*, u8, u8);
 | 
			
		||||
Entity* Create0x68FX(Entity*, u32);
 | 
			
		||||
void SetChildOffset(Entity*, s32, s32, s32);
 | 
			
		||||
Entity* CreateProjectileWithParent(Entity*, u8, u8);
 | 
			
		||||
 | 
			
		||||
extern void GenericDeath(Entity*);
 | 
			
		||||
extern void sub_08002724(void*, u8*);
 | 
			
		||||
extern void sub_080026C4(u8*, u8*, u8*, u32);
 | 
			
		||||
extern void sub_080026F2(u8*, void*, u8*, u32);
 | 
			
		||||
void GenericDeath(Entity*);
 | 
			
		||||
void sub_08002724(void*, u8*);
 | 
			
		||||
void sub_080026C4(u8*, u8*, u8*, u32);
 | 
			
		||||
void sub_080026F2(u8*, void*, u8*, u32);
 | 
			
		||||
bool32 sub_08049FA0(Entity*);
 | 
			
		||||
u32 sub_08049EE4(Entity*);
 | 
			
		||||
bool32 sub_08049F84(Entity*, s32);
 | 
			
		||||
Entity* sub_08049DF4(u32);
 | 
			
		||||
u32 sub_0804A044(Entity*, Entity*, u32);
 | 
			
		||||
s32 sub_080012DC(Entity*);
 | 
			
		||||
u32 sub_080044EC(Entity*, u32);
 | 
			
		||||
void sub_0804AA1C(Entity*);
 | 
			
		||||
bool32 sub_08049F1C(Entity*, Entity*, s32);
 | 
			
		||||
bool32 PlayerInRange(Entity*, u32, s32);
 | 
			
		||||
void sub_0804A4E4(Entity*, Entity*);
 | 
			
		||||
void GenericKnockback2(Entity*);
 | 
			
		||||
 | 
			
		||||
typedef enum {
 | 
			
		||||
    /*0x00*/ OCTOROK,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -265,6 +265,7 @@ void SetExtraSpriteFrame(Entity*, u32, u32);
 | 
			
		|||
void SetSpriteSubEntryOffsetData1(Entity*, u32, u32);
 | 
			
		||||
void SetSpriteSubEntryOffsetData2(Entity*, u32, u32);
 | 
			
		||||
u8* GetSpriteSubEntryOffsetDataPointer(u32, u32);
 | 
			
		||||
bool32 SetAffineInfo(Entity*, u32, u32, u32);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Return the direction pointing from one Entity to another.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,57 +13,28 @@
 | 
			
		|||
#include "map.h"
 | 
			
		||||
 | 
			
		||||
// Identified - to be sorted into header files
 | 
			
		||||
extern void CalculateEntityTileCollisions(Entity*, u32, u32);
 | 
			
		||||
extern u32 CheckOnScreen(Entity*);
 | 
			
		||||
extern u32 CheckRegionOnScreen(u32, u32, u32, u32);
 | 
			
		||||
extern void CopyOAM(void);
 | 
			
		||||
extern void CreateChestSpawner(Entity*);
 | 
			
		||||
extern Entity* CreateGroundItem(Entity*, u32, u32);
 | 
			
		||||
extern Entity* CreateGroundItemWithFlags(Entity*, u32, u32, u32);
 | 
			
		||||
extern void CreateItemOnGround(Entity*);
 | 
			
		||||
extern Entity* CreateLargeWaterTrace(Entity*);
 | 
			
		||||
extern void CreateMagicSparkles(u32, u32, u32);
 | 
			
		||||
extern void CreateMinishEntrance(u32 tile);
 | 
			
		||||
extern Entity* CreatePlayerItemWithParent(ItemBehavior*, u32);
 | 
			
		||||
extern u32 CreateRandomItemDrop(Entity*, u32);
 | 
			
		||||
extern void CreateSparkle(Entity*);
 | 
			
		||||
extern void DoPlayerAction(Entity*);
 | 
			
		||||
extern void DrawDirect(u32, u32);
 | 
			
		||||
extern void DrawEntities(void);
 | 
			
		||||
extern void DrawUIElements(void);
 | 
			
		||||
extern void EnemyFunctionHandlerAfterCollision(Entity*, void (*const[])());
 | 
			
		||||
extern bool32 EntityWithinDistance(Entity*, s32, s32, s32);
 | 
			
		||||
extern void FlushSprites(void);
 | 
			
		||||
extern void GenericKnockback2(Entity*);
 | 
			
		||||
extern LayerStruct* GetLayerByIndex(u32);
 | 
			
		||||
extern u32 GetRandomByWeight(const u8*);
 | 
			
		||||
extern u32 GetTileIndex(u32, u32);
 | 
			
		||||
extern u32 GiveItem(u32, u32);
 | 
			
		||||
extern void HandlePlayerLife(Entity*);
 | 
			
		||||
extern bool32 HasSwordEquipped();
 | 
			
		||||
extern bool32 IsColliding(Entity*, Entity*);
 | 
			
		||||
extern bool32 IsCollidingPlayer(Entity*);
 | 
			
		||||
extern bool32 IsProjectileOffScreen(Entity*);
 | 
			
		||||
extern bool32 IsTileCollision(const u8*, s32, s32, u32);
 | 
			
		||||
extern void LinearMoveAngle(Entity*, u32, u32);
 | 
			
		||||
extern void LinearMoveDirection(Entity*, u32, u32);
 | 
			
		||||
extern bool32 LoadFixedGFX(Entity*, u32);
 | 
			
		||||
extern void LoadResources(void);
 | 
			
		||||
extern bool32 LoadSwapGFX(Entity*, u16, u32);
 | 
			
		||||
extern void MenuFadeIn(u32, u32);
 | 
			
		||||
extern void ModBombs(s32);
 | 
			
		||||
extern bool32 PlayerInRange(Entity*, u32, s32);
 | 
			
		||||
extern bool32 ProcessMovement1(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement12(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement2(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement3(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement4(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement5(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement6(Entity*);
 | 
			
		||||
extern bool32 ProcessMovementInternal(Entity*, s32, s32, u32);
 | 
			
		||||
extern void SetDirtTile(u32);
 | 
			
		||||
/** @see Item */
 | 
			
		||||
extern void SetInventoryValue(u32, u32);
 | 
			
		||||
/**
 | 
			
		||||
 * @brief Sets multiple tiles at once
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			@ -72,26 +43,21 @@ extern void SetInventoryValue(u32, u32);
 | 
			
		|||
 * @param layer the tile layer
 | 
			
		||||
 */
 | 
			
		||||
extern void SetMultipleTiles(u16* tileData, u32 basePosition, u32 layer);
 | 
			
		||||
extern void SoundReqClipped(Entity*, u32);
 | 
			
		||||
extern void TryLoadPrologueHyruleTown(void);
 | 
			
		||||
extern void UnloadGFXSlots(Entity*);
 | 
			
		||||
extern void UnloadOBJPalette(Entity*);
 | 
			
		||||
extern void UpdateDisplayControls(void);
 | 
			
		||||
extern void UpdateItemAnim(ItemBehavior*);
 | 
			
		||||
 | 
			
		||||
// Unidentified
 | 
			
		||||
extern void sub_08000148(u32, u32, u32);
 | 
			
		||||
extern u32 sub_080B1A0C(Entity*, s32, s32);
 | 
			
		||||
extern u32 sub_080B1A48(u32, u32, u32);
 | 
			
		||||
extern u32 GetRelativeCollisionTile(Entity*, u32, u32);
 | 
			
		||||
extern u32 GetTileUnderEntity(Entity*);
 | 
			
		||||
extern u32 sub_080B1AE0(u16, u8);
 | 
			
		||||
extern u32 sub_080B1AF0(Entity*, s32, s32);
 | 
			
		||||
extern u32 sub_080B1B18(s32, s32, u32);
 | 
			
		||||
extern u32 sub_080B1B44(u32, u32);
 | 
			
		||||
extern s32 sub_080012DC(Entity*);
 | 
			
		||||
extern void sub_08001318(Entity*);
 | 
			
		||||
extern u32 sub_0800132C(Entity*, Entity*);
 | 
			
		||||
extern void sub_080027EA(Entity*, u32, u32);
 | 
			
		||||
extern void sub_080028E0(Entity*);
 | 
			
		||||
extern u32 sub_080040A2(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			@ -110,40 +76,20 @@ extern void sub_08004542(Entity*);
 | 
			
		|||
extern void sub_080085B0(Entity*);
 | 
			
		||||
extern void sub_08008796(Entity*, u32, u32, u32);
 | 
			
		||||
extern void sub_08016AD2(Entity*);
 | 
			
		||||
extern void sub_080171F0(void);
 | 
			
		||||
extern u32 sub_0801766C(Entity*);
 | 
			
		||||
extern void sub_0801AF18(const u8*, u32, u32);
 | 
			
		||||
extern void sub_0801AFE4(void);
 | 
			
		||||
extern void UpdateUIElements(void);
 | 
			
		||||
extern void sub_0801C25C(void);
 | 
			
		||||
extern void sub_0801E104(void);
 | 
			
		||||
extern void sub_08027870(Entity*);
 | 
			
		||||
extern void sub_08030118(u32);
 | 
			
		||||
extern u32 sub_08031E04(Entity*);
 | 
			
		||||
extern void sub_08031E48(Entity*, Entity*);
 | 
			
		||||
extern void sub_08032290(Entity*);
 | 
			
		||||
extern u32 sub_080322A4(Entity*);
 | 
			
		||||
extern void sub_080322E8(Entity*);
 | 
			
		||||
extern void sub_08032338(Entity*);
 | 
			
		||||
extern void sub_0803C0AC(Entity*);
 | 
			
		||||
extern void sub_08049CF4(Entity*);
 | 
			
		||||
extern Entity* sub_08049DF4(u32);
 | 
			
		||||
extern u32 sub_08049EE4(Entity*);
 | 
			
		||||
extern bool32 sub_08049F1C(Entity*, Entity*, s32);
 | 
			
		||||
extern bool32 sub_08049F84(Entity*, s32);
 | 
			
		||||
extern bool32 sub_08049FA0(Entity*);
 | 
			
		||||
extern bool32 sub_08049FDC(Entity*, u32);
 | 
			
		||||
extern u32 sub_0804A024(Entity*, u32, u32);
 | 
			
		||||
extern u32 sub_0804A044(Entity*, Entity*, u32);
 | 
			
		||||
extern void sub_0804A4E4(Entity*, Entity*);
 | 
			
		||||
extern void sub_0804A720(Entity*);
 | 
			
		||||
extern void sub_0804AA1C(Entity*);
 | 
			
		||||
extern void sub_0804C128(void);
 | 
			
		||||
extern u32 sub_080542AC(u32);
 | 
			
		||||
extern void sub_08054564();
 | 
			
		||||
extern void sub_08054570(void);
 | 
			
		||||
extern s32 sub_08056338(void);
 | 
			
		||||
extern void sub_08057044(u32, struct_020227E8*, u32);
 | 
			
		||||
extern void sub_080575C8(u32);
 | 
			
		||||
extern void sub_08057688(void);
 | 
			
		||||
extern void sub_080580B0(u32);
 | 
			
		||||
| 
						 | 
				
			
			@ -152,80 +98,11 @@ extern void sub_08059278(void);
 | 
			
		|||
extern void sub_0805B4D0(u32);
 | 
			
		||||
extern void sub_0805BC4C(void);
 | 
			
		||||
extern void sub_0805EC60(Entity*);
 | 
			
		||||
extern void SetAffineInfo(Entity*, u32, u32, u32);
 | 
			
		||||
extern void InitPlayerMacro(u32*);
 | 
			
		||||
extern u32* sub_0805F25C(u32);
 | 
			
		||||
extern u32 sub_0805F7A0(u32);
 | 
			
		||||
extern void sub_0805F8E4(u32 r0, WStruct* r1);
 | 
			
		||||
extern u32 sub_0805F8F8(u32);
 | 
			
		||||
extern void sub_080600F0(Entity*);
 | 
			
		||||
extern void sub_08060158(Entity*);
 | 
			
		||||
extern void sub_0806D02C(Entity*);
 | 
			
		||||
extern void sub_0806D0B0(Entity*);
 | 
			
		||||
extern void sub_0806F4E8(Entity*);
 | 
			
		||||
extern bool32 sub_0806F520(Entity*);
 | 
			
		||||
extern u32 sub_0806F5B0(u32);
 | 
			
		||||
extern u32 sub_0806F824(Entity*, Entity*, s32, s32);
 | 
			
		||||
extern u32 sub_0806F948(Entity*);
 | 
			
		||||
extern void sub_0806FBB4(Entity*);
 | 
			
		||||
extern bool32 sub_0806FC80(Entity*, Entity*, s32);
 | 
			
		||||
extern void sub_0806FCF4(Entity*, s32, s32, s32);
 | 
			
		||||
extern void sub_0806FD3C(Entity*);
 | 
			
		||||
extern bool32 sub_0806FDA0(Entity*);
 | 
			
		||||
extern void sub_0806FEBC(Entity*, u32, Entity*);
 | 
			
		||||
extern void sub_080751E8(u32, u32, void*);
 | 
			
		||||
extern void sub_08077B98(ItemBehavior*);
 | 
			
		||||
extern void sub_08077BB8(ItemBehavior*);
 | 
			
		||||
extern Entity* sub_08077C0C(ItemBehavior*, u32);
 | 
			
		||||
extern Entity* sub_08077C94(ItemBehavior*, u32);
 | 
			
		||||
extern void sub_08077D38(ItemBehavior*, u32);
 | 
			
		||||
extern void sub_08077DF4(ItemBehavior*, u32);
 | 
			
		||||
extern void sub_08077E3C(ItemBehavior*, u32);
 | 
			
		||||
extern void sub_08077E54(ItemBehavior*);
 | 
			
		||||
extern void DeletePlayerItem(ItemBehavior*, u32);
 | 
			
		||||
extern bool32 sub_08077EC8(ItemBehavior*);
 | 
			
		||||
extern bool32 sub_08077EFC(ItemBehavior*);
 | 
			
		||||
extern bool32 sub_08077F10(ItemBehavior*);
 | 
			
		||||
extern bool32 sub_08077F24(ItemBehavior*, u32);
 | 
			
		||||
extern void PlayerCancelHoldItem(ItemBehavior*, u32);
 | 
			
		||||
extern bool32 sub_08077FEC(u32);
 | 
			
		||||
extern void sub_08078180(void);
 | 
			
		||||
extern void sub_080784C8();
 | 
			
		||||
extern void sub_08078790(Entity*, u32);
 | 
			
		||||
extern void sub_080787CC(Entity*);
 | 
			
		||||
extern s32 sub_08078800(Entity*);
 | 
			
		||||
extern void sub_08078850(Entity*, u32, u32, void*);
 | 
			
		||||
extern s32 sub_0807887C(Entity*, u32, u32);
 | 
			
		||||
extern void sub_080788E0(Entity*);
 | 
			
		||||
extern s32 sub_08078904();
 | 
			
		||||
extern void RegisterCarryEntity(Entity*);
 | 
			
		||||
extern void FreeCarryEntity(Entity*);
 | 
			
		||||
extern void sub_08078AC0(u32, u32, u32);
 | 
			
		||||
extern void sub_08078B48(void);
 | 
			
		||||
extern void sub_08078E84(Entity*, Entity*);
 | 
			
		||||
extern void sub_08078FB0(Entity*);
 | 
			
		||||
extern void PlayerDropHeldObject();
 | 
			
		||||
extern void PlayerResetStateFromFusion();
 | 
			
		||||
extern void sub_080792BC(s32, u32, u32);
 | 
			
		||||
extern u32 sub_0807953C(void);
 | 
			
		||||
extern void sub_08079BD8(Entity*);
 | 
			
		||||
extern u32 sub_08079D48();
 | 
			
		||||
extern void sub_08079D84(void);
 | 
			
		||||
extern bool32 PlayerCanBeMoved(void);
 | 
			
		||||
extern u32 sub_08079FC4(u32);
 | 
			
		||||
extern void sub_0807A050(void);
 | 
			
		||||
extern void sub_0807A5B8(u32);
 | 
			
		||||
extern void sub_0807A8D8(Entity*);
 | 
			
		||||
extern void sub_0807AA80(Entity*);
 | 
			
		||||
extern void sub_0807AABC(Entity*);
 | 
			
		||||
extern void sub_0807ACCC(Entity*);
 | 
			
		||||
extern u32 sub_0807B014();
 | 
			
		||||
extern void sub_0807B0C8(void);
 | 
			
		||||
extern void sub_0807B7D8(u32, u32, u32);
 | 
			
		||||
extern void sub_0807B9B8(u32, u32, u32);
 | 
			
		||||
extern void RestorePrevTileEntity(u32, u32);
 | 
			
		||||
extern void sub_0807BB68(s16*, u32, u32);
 | 
			
		||||
extern bool32 sub_0807BD14(Entity*, u32);
 | 
			
		||||
extern bool32 sub_080806BC(u32, u32, u32, u32);
 | 
			
		||||
extern void sub_0808091C(const ScreenTransitionData*, u32);
 | 
			
		||||
extern void sub_080809D4(void);
 | 
			
		||||
| 
						 | 
				
			
			@ -233,23 +110,8 @@ extern void sub_08080CB4(Entity*);
 | 
			
		|||
extern u32 sub_0808288C(Entity*, u32, u32, u32);
 | 
			
		||||
extern bool32 sub_08083734(Entity*, u32);
 | 
			
		||||
extern void sub_08095C48(Entity*);
 | 
			
		||||
extern void sub_0809E918(Entity*);
 | 
			
		||||
extern void sub_0809E96C(Entity*);
 | 
			
		||||
extern u32 sub_0809E9A0(void);
 | 
			
		||||
extern void sub_0809EABC(Entity*);
 | 
			
		||||
extern void sub_0809EAD8(Entity*);
 | 
			
		||||
extern void sub_0809EB30(Entity*);
 | 
			
		||||
extern void sub_080A1ED0(u32, u32, u32);
 | 
			
		||||
extern Entity* sub_080A2A3C(Entity*, u32, u32, u32);
 | 
			
		||||
extern Entity* sub_080A2AD4(Entity*);
 | 
			
		||||
extern void sub_080A2AF4(Entity*, s32, s32);
 | 
			
		||||
extern void UpdateRailMovement(Entity*, u16**, u16*);
 | 
			
		||||
extern void sub_080A57F4(void);
 | 
			
		||||
extern void sub_080A71C4(u32, u32, u32, u32);
 | 
			
		||||
extern void InitItemGetSequence(u32, u32, u32);
 | 
			
		||||
extern void sub_080ADD70(void);
 | 
			
		||||
extern bool32 sub_080AE4CC(Entity*, u32, u32, u32);
 | 
			
		||||
extern void sub_080AE58C(Entity*, u32, u32);
 | 
			
		||||
extern void sub_080AF284(void);
 | 
			
		||||
extern bool32 sub_080B1B54(u32);
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,4 +17,6 @@ typedef struct {
 | 
			
		|||
extern LayerStruct gMapTop;
 | 
			
		||||
extern LayerStruct gMapBottom;
 | 
			
		||||
 | 
			
		||||
LayerStruct* GetLayerByIndex(u32);
 | 
			
		||||
 | 
			
		||||
#endif // MAP_H
 | 
			
		||||
| 
						 | 
				
			
			@ -136,4 +136,6 @@ void MessageClose(void);
 | 
			
		|||
 | 
			
		||||
void DispMessageFrame(u16*, s32, s32, u32);
 | 
			
		||||
 | 
			
		||||
void sub_08057044(u32, struct_020227E8*, u32);
 | 
			
		||||
 | 
			
		||||
#endif // MESSAGE_H
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,12 +14,16 @@
 | 
			
		|||
#include "entity.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
 | 
			
		||||
extern void sub_080787C0(Entity*);
 | 
			
		||||
extern void sub_080787B4(Entity*);
 | 
			
		||||
extern void sub_0808C650(Entity*, u32);
 | 
			
		||||
extern u32 sub_0808C67C(void);
 | 
			
		||||
extern void sub_0808C688(void);
 | 
			
		||||
extern void SyncPlayerToPlatform(Entity*, bool32);
 | 
			
		||||
void sub_080787C0(Entity*);
 | 
			
		||||
void sub_080787B4(Entity*);
 | 
			
		||||
void sub_0808C650(Entity*, u32);
 | 
			
		||||
u32 sub_0808C67C(void);
 | 
			
		||||
void sub_0808C688(void);
 | 
			
		||||
void SyncPlayerToPlatform(Entity*, bool32);
 | 
			
		||||
void UpdateRailMovement(Entity*, u16**, u16*);
 | 
			
		||||
void sub_080A2AF4(Entity*, s32, s32);
 | 
			
		||||
Entity* CreateLargeWaterTrace(Entity*);
 | 
			
		||||
void CreateSparkle(Entity*);
 | 
			
		||||
 | 
			
		||||
void CreateDust(Entity* parent);
 | 
			
		||||
void CreateDustAt(s32, s32, u32);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,10 @@ void sub_0806FA90(Entity*, Entity*, s32, s32);
 | 
			
		|||
void SortEntityAbove(Entity* below_ent, Entity* above_ent);
 | 
			
		||||
void SortEntityBelow(Entity* above_ent, Entity* below_ent);
 | 
			
		||||
 | 
			
		||||
void LinearMoveDirection(Entity* ent, u32 a, u32 b);
 | 
			
		||||
void LinearMoveAngle(Entity* ent, u32 a, u32 b);
 | 
			
		||||
 | 
			
		||||
bool32 EntityWithinDistance(Entity*, s32, s32, s32);
 | 
			
		||||
u32 sub_0806FCA0(Entity*, Entity*);
 | 
			
		||||
u32 sub_0806F58C(Entity*, Entity*);
 | 
			
		||||
u32 PointInsideRadius(s32 x, s32 y, s32 radius);
 | 
			
		||||
| 
						 | 
				
			
			@ -28,6 +32,25 @@ bool32 sub_0806FD54(Entity*);
 | 
			
		|||
u32 sub_0806FCAC(Entity*, Entity*);
 | 
			
		||||
u32 sub_0806F854(Entity*, s32, s32);
 | 
			
		||||
u32 sub_0806F730(Entity*);
 | 
			
		||||
bool32 sub_0806F520(Entity*);
 | 
			
		||||
void sub_0806F4E8(Entity*);
 | 
			
		||||
bool32 sub_0806FC80(Entity*, Entity*, s32);
 | 
			
		||||
u32 sub_0806F5B0(u32);
 | 
			
		||||
u32 sub_0806F824(Entity*, Entity*, s32, s32);
 | 
			
		||||
u32 sub_0806F948(Entity*);
 | 
			
		||||
void sub_0806FBB4(Entity*);
 | 
			
		||||
void sub_0806FCF4(Entity*, s32, s32, s32);
 | 
			
		||||
void sub_0806FD3C(Entity*);
 | 
			
		||||
bool32 sub_0806FDA0(Entity*);
 | 
			
		||||
void sub_0806FEBC(Entity*, u32, Entity*);
 | 
			
		||||
extern bool32 ProcessMovement1(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement12(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement2(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement3(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement4(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement5(Entity*);
 | 
			
		||||
extern bool32 ProcessMovement6(Entity*);
 | 
			
		||||
extern bool32 ProcessMovementInternal(Entity*, s32, s32, u32);
 | 
			
		||||
 | 
			
		||||
extern const s16 gSineTable[64];
 | 
			
		||||
extern const s16 gCosineTable[256];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -337,8 +337,11 @@ void CreateEzloHint(u32, u32);
 | 
			
		|||
u32 IsItemEquipped(u32);
 | 
			
		||||
/** @see Item */
 | 
			
		||||
u32 GetInventoryValue(u32);
 | 
			
		||||
/** @see Item */
 | 
			
		||||
void SetInventoryValue(u32, u32);
 | 
			
		||||
s32 ModHealth(s32 delta);
 | 
			
		||||
void ModRupees(s32 delta);
 | 
			
		||||
void ModBombs(s32 delta);
 | 
			
		||||
 | 
			
		||||
// playerUtils.c
 | 
			
		||||
void DeleteClones(void);
 | 
			
		||||
| 
						 | 
				
			
			@ -375,6 +378,65 @@ u32 sub_08078F74(Entity*);
 | 
			
		|||
void sub_0807879C(Entity*);
 | 
			
		||||
void PlayerSetNormalAndCollide(void);
 | 
			
		||||
bool32 PlayerTryDropObject(ItemBehavior* arg0, u32 unk);
 | 
			
		||||
void InitItemGetSequence(u32, u32, u32);
 | 
			
		||||
void sub_0807B7D8(u32, u32, u32);
 | 
			
		||||
void sub_08078850(Entity*, u32, u32, void*);
 | 
			
		||||
void sub_08079D84(void);
 | 
			
		||||
u32 sub_0807953C(void);
 | 
			
		||||
void sub_0807BB68(s16*, u32, u32);
 | 
			
		||||
void sub_0807B9B8(u32, u32, u32);
 | 
			
		||||
void sub_0807B7D8(u32, u32, u32);
 | 
			
		||||
void RestorePrevTileEntity(u32, u32);
 | 
			
		||||
void UpdateItemAnim(ItemBehavior*);
 | 
			
		||||
void PlayerCancelHoldItem(ItemBehavior*, u32);
 | 
			
		||||
void RegisterCarryEntity(Entity*);
 | 
			
		||||
void FreeCarryEntity(Entity*);
 | 
			
		||||
void PlayerDropHeldObject();
 | 
			
		||||
void PlayerResetStateFromFusion();
 | 
			
		||||
void DeletePlayerItem(ItemBehavior*, u32);
 | 
			
		||||
void sub_08077D38(ItemBehavior*, u32);
 | 
			
		||||
void sub_08077DF4(ItemBehavior*, u32);
 | 
			
		||||
void sub_08077E3C(ItemBehavior*, u32);
 | 
			
		||||
void sub_080751E8(u32, u32, void*);
 | 
			
		||||
void sub_08077B98(ItemBehavior*);
 | 
			
		||||
void sub_08077BB8(ItemBehavior*);
 | 
			
		||||
Entity* sub_08077C0C(ItemBehavior*, u32);
 | 
			
		||||
Entity* sub_08077C94(ItemBehavior*, u32);
 | 
			
		||||
bool32 PlayerCanBeMoved(void);
 | 
			
		||||
bool32 sub_08077EC8(ItemBehavior*);
 | 
			
		||||
bool32 sub_08077EFC(ItemBehavior*);
 | 
			
		||||
bool32 sub_08077F10(ItemBehavior*);
 | 
			
		||||
bool32 sub_08077F24(ItemBehavior*, u32);
 | 
			
		||||
bool32 sub_08077FEC(u32);
 | 
			
		||||
void sub_08078180(void);
 | 
			
		||||
void sub_080784C8();
 | 
			
		||||
void sub_08078790(Entity*, u32);
 | 
			
		||||
void sub_080787CC(Entity*);
 | 
			
		||||
s32 sub_08078800(Entity*);
 | 
			
		||||
s32 sub_0807887C(Entity*, u32, u32);
 | 
			
		||||
void sub_080788E0(Entity*);
 | 
			
		||||
s32 sub_08078904();
 | 
			
		||||
void sub_08078AC0(u32, u32, u32);
 | 
			
		||||
void sub_08078B48(void);
 | 
			
		||||
void sub_08078E84(Entity*, Entity*);
 | 
			
		||||
void sub_08078FB0(Entity*);
 | 
			
		||||
void sub_080792BC(s32, u32, u32);
 | 
			
		||||
u32 sub_0807953C(void);
 | 
			
		||||
void sub_08079BD8(Entity*);
 | 
			
		||||
u32 sub_08079D48();
 | 
			
		||||
void sub_08079D84(void);
 | 
			
		||||
u32 sub_08079FC4(u32);
 | 
			
		||||
void sub_0807A050(void);
 | 
			
		||||
void sub_0807A5B8(u32);
 | 
			
		||||
void sub_0807A8D8(Entity*);
 | 
			
		||||
void sub_0807AA80(Entity*);
 | 
			
		||||
void sub_0807AABC(Entity*);
 | 
			
		||||
void sub_0807ACCC(Entity*);
 | 
			
		||||
u32 sub_0807B014();
 | 
			
		||||
void sub_0807B0C8(void);
 | 
			
		||||
bool32 sub_0807BD14(Entity*, u32);
 | 
			
		||||
Entity* CreatePlayerItemWithParent(ItemBehavior*, u32);
 | 
			
		||||
bool32 HasSwordEquipped();
 | 
			
		||||
 | 
			
		||||
// player.s
 | 
			
		||||
extern u32 PlayerCheckNEastTile();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,8 @@
 | 
			
		|||
#ifndef PROJECTILE_H
 | 
			
		||||
#define PROJECTILE_H
 | 
			
		||||
 | 
			
		||||
extern Entity* CreateProjectile(u32);
 | 
			
		||||
Entity* CreateProjectile(u32);
 | 
			
		||||
bool32 IsProjectileOffScreen(Entity*);
 | 
			
		||||
 | 
			
		||||
void DarkNutSwordSlash(Entity*);
 | 
			
		||||
void RockProjectile(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -225,6 +225,8 @@ void* GetCurrentRoomProperty(u32);
 | 
			
		|||
void LoadRoomTileEntities();
 | 
			
		||||
void LoadRoomEntityList(EntityData* listPtr);
 | 
			
		||||
 | 
			
		||||
bool32 LoadFixedGFX(Entity*, u32);
 | 
			
		||||
void UnloadGFXSlots(Entity*);
 | 
			
		||||
void sub_0804B3C4(void*);
 | 
			
		||||
void sub_0804B0B0(u32 arg0, u32 arg1);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,7 @@
 | 
			
		|||
#include "map.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
 | 
			
		||||
extern Entity* gUnk_020000B0;
 | 
			
		||||
extern Entity* (*const gUnk_080D3BE8[])(void);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
#include "enemy.h"
 | 
			
		||||
 | 
			
		||||
/** Unsets bitfield 0x80 before calling GetNextFunction, so that the enemyFunction 1 is not called. */
 | 
			
		||||
void EnemyFunctionHandlerAfterCollision(Entity* entity, void (*fntable[])()) {
 | 
			
		||||
void EnemyFunctionHandlerAfterCollision(Entity* entity, void (*const fntable[])()) {
 | 
			
		||||
    u32 idx;
 | 
			
		||||
    entity->contactFlags &= ~0x80;
 | 
			
		||||
    idx = GetNextFunction(entity);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,6 +11,13 @@
 | 
			
		|||
extern Entity* gUnk_020000B0;
 | 
			
		||||
extern void (*const gUnk_080012C8[])(Entity*);
 | 
			
		||||
 | 
			
		||||
static void sub_08031E48(Entity* this, Entity* child);
 | 
			
		||||
static void sub_08032290(Entity* this);
 | 
			
		||||
static bool32 sub_080322A4(Entity* this);
 | 
			
		||||
static void sub_08032338(Entity* this);
 | 
			
		||||
static void sub_080322E8(Entity* this);
 | 
			
		||||
static bool32 sub_08031E04(Entity* this);
 | 
			
		||||
 | 
			
		||||
void AcroBandit_OnTick(Entity* this);
 | 
			
		||||
void AcroBandit_OnCollision(Entity* this);
 | 
			
		||||
void AcroBandit_OnKnockback(Entity* this);
 | 
			
		||||
| 
						 | 
				
			
			@ -319,7 +326,7 @@ void AcroBandit_Type0Action8(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool32 sub_08031E04(Entity* this) {
 | 
			
		||||
static bool32 sub_08031E04(Entity* this) {
 | 
			
		||||
    static const s8 gUnk_080CE5C0[] = { -32, 0, 0, 32, 32, 0, 0, 0 };
 | 
			
		||||
    Entity* ent;
 | 
			
		||||
    const s8* tmp;
 | 
			
		||||
| 
						 | 
				
			
			@ -332,7 +339,7 @@ bool32 sub_08031E04(Entity* this) {
 | 
			
		|||
    return EntityWithinDistance(this, ent->x.HALF.HI + tmp[0], ent->y.HALF.HI + tmp[1], 0x50);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08031E48(Entity* this, Entity* child) {
 | 
			
		||||
static void sub_08031E48(Entity* this, Entity* child) {
 | 
			
		||||
    CopyPosition(this, child);
 | 
			
		||||
    child->field_0x6c.HALF.LO = this->field_0x6c.HALF.LO;
 | 
			
		||||
    child->field_0x70.HALF.LO = this->field_0x70.HALF.LO;
 | 
			
		||||
| 
						 | 
				
			
			@ -534,13 +541,13 @@ void AcroBandit_Type1Action9(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08032290(Entity* this) {
 | 
			
		||||
static void sub_08032290(Entity* this) {
 | 
			
		||||
    this->action = 6;
 | 
			
		||||
    this->timer = 12;
 | 
			
		||||
    InitializeAnimation(this, 11);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool32 sub_080322A4(Entity* this) {
 | 
			
		||||
static bool32 sub_080322A4(Entity* this) {
 | 
			
		||||
    if (this->child != NULL && (this->child->z.HALF.HI + 8) >= this->z.HALF.HI) {
 | 
			
		||||
        if (this->z.HALF.HI) {
 | 
			
		||||
            this->action = 5;
 | 
			
		||||
| 
						 | 
				
			
			@ -555,7 +562,7 @@ bool32 sub_080322A4(Entity* this) {
 | 
			
		|||
    return FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080322E8(Entity* this) {
 | 
			
		||||
static void sub_080322E8(Entity* this) {
 | 
			
		||||
    if (this->field_0x78.HALF.LO) {
 | 
			
		||||
        if (--this->field_0x78.HALF.LO == 0) {
 | 
			
		||||
            u32 flipX = this->spriteSettings.flipX;
 | 
			
		||||
| 
						 | 
				
			
			@ -573,7 +580,7 @@ void sub_080322E8(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08032338(Entity* this) {
 | 
			
		||||
static void sub_08032338(Entity* this) {
 | 
			
		||||
    if ((((Entity*)this->field_0x7c.WORD)->timer += 15) != 80)
 | 
			
		||||
        this->field_0x6c.HALF.LO = 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,7 @@
 | 
			
		|||
#include "sound.h"
 | 
			
		||||
#include "entity.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
 | 
			
		||||
void BladeTrap(Entity* this) {
 | 
			
		||||
    if (this->action == 0) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,6 @@
 | 
			
		|||
#include "enemy.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -447,7 +447,8 @@ void sub_08049998(Enemy64Entity* this, u32 param_2) {
 | 
			
		|||
void sub_080499F0(Enemy64Entity* this) {
 | 
			
		||||
    u32 tmp;
 | 
			
		||||
 | 
			
		||||
    if ((((super->action != 0) && (gPlayerEntity.z.HALF.HI == 0)) && (PlayerCanBeMoved())) && ((this->unk_7c & 1) == 0)) {
 | 
			
		||||
    if ((((super->action != 0) && (gPlayerEntity.z.HALF.HI == 0)) && (PlayerCanBeMoved())) &&
 | 
			
		||||
        ((this->unk_7c & 1) == 0)) {
 | 
			
		||||
        if (EntityWithinDistance(&gPlayerEntity, super->x.HALF.HI, super->y.HALF.HI, 0x24) &&
 | 
			
		||||
            ((this->unk_7c & 2) == 0)) {
 | 
			
		||||
            tmp = sub_080045DA((s32)gPlayerEntity.x.HALF.HI - super->x.HALF.HI,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@
 | 
			
		|||
#include "enemy.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern u32 sub_0804A024(Entity*, u32, u32);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,8 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
 | 
			
		||||
extern void GenericKnockback2(Entity*);
 | 
			
		||||
extern void Keese_StartFly(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,8 @@
 | 
			
		|||
 | 
			
		||||
#include "global.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const LakituActionFuncs[])(Entity*);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,9 +9,11 @@
 | 
			
		|||
#include "asm.h"
 | 
			
		||||
#include "entity.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "effects.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const LakituCloud_Functions[6])(Entity*);
 | 
			
		||||
extern void (*const gUnk_080D0430[3])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
 | 
			
		||||
extern u32 sub_080B1B18(s32, s32, u32);
 | 
			
		||||
extern u32 sub_080B1AB4(s32, s32, u32);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,6 @@
 | 
			
		|||
#include "message.h"
 | 
			
		||||
#include "save.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
 | 
			
		||||
extern bool32 ItemIsShield(u32);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
 | 
			
		||||
void sub_08045374(Entity*);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,6 @@
 | 
			
		|||
#include "global.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    /*0x00*/ Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
 | 
			
		||||
void Octorok_Pause(Entity*);
 | 
			
		||||
bool32 Octorok_FacesPlayer(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#include "entity.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
#include "map.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
 | 
			
		||||
void (*const OctorokGolden_Functions[])(Entity*);
 | 
			
		||||
void (*const gUnk_080CF484[])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			@ -10,6 +11,7 @@ const u8 gUnk_080CF498[];
 | 
			
		|||
 | 
			
		||||
void sub_08037E14(Entity* this);
 | 
			
		||||
bool32 sub_08037E90(Entity* this);
 | 
			
		||||
static void sub_08037D54(Entity* this);
 | 
			
		||||
 | 
			
		||||
void OctorokGolden(Entity* this) {
 | 
			
		||||
    u32 index;
 | 
			
		||||
| 
						 | 
				
			
			@ -68,7 +70,7 @@ void sub_08037D0C(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08037D54(Entity* this) {
 | 
			
		||||
static void sub_08037D54(Entity* this) {
 | 
			
		||||
    UpdateAnimationVariableFrames(this, 2);
 | 
			
		||||
 | 
			
		||||
    if (this->frame & 0x1) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,8 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const Peahat_Functions[])(Entity*);
 | 
			
		||||
extern void (*const gPeahatPropellerFunctions[])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,6 @@
 | 
			
		|||
#include "collision.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "game.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "save.h"
 | 
			
		||||
#include "playeritem.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,6 @@
 | 
			
		|||
#include "enemy.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
 | 
			
		||||
extern u8 gUnk_080B37A0[];
 | 
			
		||||
extern u8 gUnk_080B3E80[];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const RockChuchu_Functions[])(Entity*);
 | 
			
		||||
extern void (*const gUnk_080CB960[])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,10 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const Rollobite_Functions[])(Entity*);
 | 
			
		||||
extern void (*const gRollobiteActions[])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const Rope_Functions[6])(Entity*);
 | 
			
		||||
extern void (*const gUnk_080CE460[4])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,8 +7,9 @@
 | 
			
		|||
 | 
			
		||||
#include "global.h"
 | 
			
		||||
#include "entity.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const gUnk_080012C8[])(Entity*);
 | 
			
		||||
extern void (*const RopeGolden_Functions[6])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,14 +6,12 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "global.h"
 | 
			
		||||
#include "asm.h"
 | 
			
		||||
#include "sound.h"
 | 
			
		||||
#include "entity.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "save.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
 | 
			
		||||
extern void sub_080293DC(Entity*);
 | 
			
		||||
extern void sub_080296D8(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,6 @@
 | 
			
		|||
#include "collision.h"
 | 
			
		||||
#include "entity.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,8 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern u32 sub_0804A024(Entity*, u32, u32);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,8 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    s8 h, v;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
 | 
			
		||||
void sub_08023E10(Entity*);
 | 
			
		||||
void sub_08023E54(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
 | 
			
		||||
extern void sub_080317F8(Entity*);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,6 @@
 | 
			
		|||
#include "collision.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const Spark_Functions[])(Entity*);
 | 
			
		||||
extern void (*const gUnk_080CD24C[])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,9 @@
 | 
			
		|||
#define NENT_DEPRECATED
 | 
			
		||||
#include "entity.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "physics.h"
 | 
			
		||||
#include "player.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,6 @@
 | 
			
		|||
 | 
			
		||||
static bool32 ShouldSpawnTreeItem(Entity*);
 | 
			
		||||
 | 
			
		||||
extern u32 GetRandomByWeight(const u8*);
 | 
			
		||||
extern void sub_08049CF4(Entity*);
 | 
			
		||||
 | 
			
		||||
const u8 gTreeItemDropTables[][16] = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,71 +29,72 @@ typedef struct VaatiArm_HeapStruct {
 | 
			
		|||
    VaatiArm_HeapStruct1 s1[5];
 | 
			
		||||
} VaatiArm_HeapStruct;
 | 
			
		||||
 | 
			
		||||
u32 sub_080437DC(Entity*);
 | 
			
		||||
u32 sub_08043C98(Entity*);
 | 
			
		||||
void VaatiArm_OnTick(Entity*);
 | 
			
		||||
void VaatiArm_OnCollision(Entity*);
 | 
			
		||||
void sub_080425B4(Entity*);
 | 
			
		||||
void sub_08042818(Entity*);
 | 
			
		||||
void sub_08042870(Entity*);
 | 
			
		||||
void sub_08042A3C(Entity*);
 | 
			
		||||
void sub_08042C14(Entity*);
 | 
			
		||||
void sub_0804325C(Entity*);
 | 
			
		||||
void sub_08043420(Entity*);
 | 
			
		||||
void sub_08043680(Entity*);
 | 
			
		||||
void VaatiArm_OnGrabbed(Entity*);
 | 
			
		||||
void sub_08042654(Entity*);
 | 
			
		||||
void sub_0804259C(Entity*);
 | 
			
		||||
void sub_08043A10(Entity*);
 | 
			
		||||
void sub_08043ABC(Entity*);
 | 
			
		||||
void sub_08043BC8(Entity*);
 | 
			
		||||
void sub_08043EB8(Entity*);
 | 
			
		||||
void sub_08044000(Entity*);
 | 
			
		||||
void sub_08044078(Entity*);
 | 
			
		||||
void sub_080440CC(Entity*);
 | 
			
		||||
void sub_08043CD4(Entity*);
 | 
			
		||||
void sub_08042894(Entity*);
 | 
			
		||||
void sub_080428AC(Entity*);
 | 
			
		||||
void sub_080428FC(Entity*);
 | 
			
		||||
void sub_08042944(Entity*);
 | 
			
		||||
void sub_08042970(Entity*);
 | 
			
		||||
void sub_080429D4(Entity*);
 | 
			
		||||
void sub_080429FC(Entity*);
 | 
			
		||||
void sub_08043BF0(Entity*);
 | 
			
		||||
void sub_08042A6C(Entity*);
 | 
			
		||||
void sub_08042A88(Entity*);
 | 
			
		||||
void sub_08042AEC(Entity*);
 | 
			
		||||
void sub_08042B20(Entity*);
 | 
			
		||||
void sub_08043C40(Entity*, VaatiArm_HeapStruct1*);
 | 
			
		||||
void sub_08043A78(Entity*);
 | 
			
		||||
void sub_08042C34(Entity*);
 | 
			
		||||
void sub_08042D24(Entity*);
 | 
			
		||||
void sub_08042D6C(Entity*);
 | 
			
		||||
void sub_08042E30(Entity*);
 | 
			
		||||
void sub_08042EF4(Entity*);
 | 
			
		||||
void sub_08042FD8(Entity*);
 | 
			
		||||
void sub_08043048(Entity*);
 | 
			
		||||
void sub_080430D0(Entity*);
 | 
			
		||||
void sub_08043130(Entity*);
 | 
			
		||||
void sub_080431E8(Entity*);
 | 
			
		||||
void sub_08043B9C(Entity*);
 | 
			
		||||
static u32 sub_080437DC(Entity*);
 | 
			
		||||
static u32 sub_08043C98(Entity*);
 | 
			
		||||
static void VaatiArm_OnTick(Entity*);
 | 
			
		||||
static void VaatiArm_OnCollision(Entity*);
 | 
			
		||||
static void sub_080425B4(Entity*);
 | 
			
		||||
static void sub_08042818(Entity*);
 | 
			
		||||
static void sub_08042870(Entity*);
 | 
			
		||||
static void sub_08042A3C(Entity*);
 | 
			
		||||
static void sub_08042C14(Entity*);
 | 
			
		||||
static void sub_0804325C(Entity*);
 | 
			
		||||
static void sub_08043420(Entity*);
 | 
			
		||||
static void sub_08043680(Entity*);
 | 
			
		||||
static void VaatiArm_OnGrabbed(Entity*);
 | 
			
		||||
static void sub_08042654(Entity*);
 | 
			
		||||
static void sub_0804259C(Entity*);
 | 
			
		||||
static void sub_08043A10(Entity*);
 | 
			
		||||
static void sub_08043ABC(Entity*);
 | 
			
		||||
static void sub_08043BC8(Entity*);
 | 
			
		||||
static void sub_08043EB8(Entity*);
 | 
			
		||||
static void sub_08044000(Entity*);
 | 
			
		||||
static void sub_08044078(Entity*);
 | 
			
		||||
static void sub_080440CC(Entity*);
 | 
			
		||||
static void sub_08043CD4(Entity*);
 | 
			
		||||
static void sub_08042894(Entity*);
 | 
			
		||||
static void sub_080428AC(Entity*);
 | 
			
		||||
static void sub_080428FC(Entity*);
 | 
			
		||||
static void sub_08042944(Entity*);
 | 
			
		||||
static void sub_08042970(Entity*);
 | 
			
		||||
static void sub_080429D4(Entity*);
 | 
			
		||||
static void sub_080429FC(Entity*);
 | 
			
		||||
static void sub_08043BF0(Entity*);
 | 
			
		||||
static void sub_08042A6C(Entity*);
 | 
			
		||||
static void sub_08042A88(Entity*);
 | 
			
		||||
static void sub_08042AEC(Entity*);
 | 
			
		||||
static void sub_08042B20(Entity*);
 | 
			
		||||
static void sub_08043C40(Entity*, VaatiArm_HeapStruct1*);
 | 
			
		||||
static void sub_08043A78(Entity*);
 | 
			
		||||
static void sub_08042C34(Entity*);
 | 
			
		||||
static void sub_08042D24(Entity*);
 | 
			
		||||
static void sub_08042D6C(Entity*);
 | 
			
		||||
static void sub_08042E30(Entity*);
 | 
			
		||||
static void sub_08042EF4(Entity*);
 | 
			
		||||
static void sub_08042FD8(Entity*);
 | 
			
		||||
static void sub_08043048(Entity*);
 | 
			
		||||
static void sub_080430D0(Entity*);
 | 
			
		||||
static void sub_08043130(Entity*);
 | 
			
		||||
static void sub_080431E8(Entity*);
 | 
			
		||||
static void sub_08043B9C(Entity*);
 | 
			
		||||
static void sub_08043DB0(Entity*);
 | 
			
		||||
static void sub_08043B7C(Entity*);
 | 
			
		||||
static void sub_08043D08(Entity*);
 | 
			
		||||
static void sub_080432A8(Entity*);
 | 
			
		||||
static void sub_0804334C(Entity*);
 | 
			
		||||
static void sub_08043440(Entity*);
 | 
			
		||||
static void sub_08043490(Entity*);
 | 
			
		||||
static void sub_08043520(Entity*);
 | 
			
		||||
static void sub_0804355C(Entity*);
 | 
			
		||||
static void sub_08043580(Entity*);
 | 
			
		||||
static void sub_080435F4(Entity*);
 | 
			
		||||
static void sub_08043698(Entity*);
 | 
			
		||||
static void sub_080436C0(Entity*);
 | 
			
		||||
static void sub_08043700(Entity*);
 | 
			
		||||
static void sub_08043738(Entity*);
 | 
			
		||||
static void sub_08043770(Entity*);
 | 
			
		||||
 | 
			
		||||
void sub_0804AA1C(Entity*);
 | 
			
		||||
void sub_08043DB0(Entity*);
 | 
			
		||||
void sub_08043B7C(Entity*);
 | 
			
		||||
void sub_08043D08(Entity*);
 | 
			
		||||
void sub_080432A8(Entity*);
 | 
			
		||||
void sub_0804334C(Entity*);
 | 
			
		||||
void sub_08043440(Entity*);
 | 
			
		||||
void sub_08043490(Entity*);
 | 
			
		||||
void sub_08043520(Entity*);
 | 
			
		||||
void sub_0804355C(Entity*);
 | 
			
		||||
void sub_08043580(Entity*);
 | 
			
		||||
void sub_080435F4(Entity*);
 | 
			
		||||
void sub_08043698(Entity*);
 | 
			
		||||
void sub_080436C0(Entity*);
 | 
			
		||||
void sub_08043700(Entity*);
 | 
			
		||||
void sub_08043738(Entity*);
 | 
			
		||||
void sub_08043770(Entity*);
 | 
			
		||||
 | 
			
		||||
void (*const VaatiArm_Functions[])(Entity*) = {
 | 
			
		||||
    VaatiArm_OnTick, VaatiArm_OnCollision, GenericKnockback, GenericDeath, GenericConfused, VaatiArm_OnGrabbed,
 | 
			
		||||
| 
						 | 
				
			
			@ -175,22 +176,22 @@ void VaatiArm(Entity* this) {
 | 
			
		|||
    VaatiArm_Functions[GetNextFunction(this)](this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VaatiArm_OnTick(Entity* this) {
 | 
			
		||||
static void VaatiArm_OnTick(Entity* this) {
 | 
			
		||||
    gUnk_080D1248[this->type](this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VaatiArm_OnCollision(Entity* this) {
 | 
			
		||||
static void VaatiArm_OnCollision(Entity* this) {
 | 
			
		||||
    EnemyFunctionHandlerAfterCollision(this, VaatiArm_Functions);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VaatiArm_OnGrabbed(Entity* this) {
 | 
			
		||||
static void VaatiArm_OnGrabbed(Entity* this) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0804259C(Entity* this) {
 | 
			
		||||
static void sub_0804259C(Entity* this) {
 | 
			
		||||
    gUnk_080D125C[this->action](this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080425B4(Entity* this) {
 | 
			
		||||
static void sub_080425B4(Entity* this) {
 | 
			
		||||
    if (sub_080437DC(this)) {
 | 
			
		||||
        this->field_0x7c.BYTES.byte0 = 0;
 | 
			
		||||
        this->field_0x7c.BYTES.byte1 = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -219,7 +220,7 @@ void sub_080425B4(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042654(Entity* this) {
 | 
			
		||||
static void sub_08042654(Entity* this) {
 | 
			
		||||
    u32 uVar8;
 | 
			
		||||
    int index;
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
| 
						 | 
				
			
			@ -289,7 +290,7 @@ void sub_08042654(Entity* this) {
 | 
			
		|||
    sub_08043A10(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042818(Entity* this) {
 | 
			
		||||
static void sub_08042818(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
 | 
			
		||||
    sub_08043CD4(this);
 | 
			
		||||
| 
						 | 
				
			
			@ -307,18 +308,18 @@ void sub_08042818(Entity* this) {
 | 
			
		|||
    sub_08043A10(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042870(Entity* this) {
 | 
			
		||||
static void sub_08042870(Entity* this) {
 | 
			
		||||
    sub_08043CD4(this);
 | 
			
		||||
    gUnk_080D1290[this->subAction](this);
 | 
			
		||||
    sub_08043A10(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042894(Entity* this) {
 | 
			
		||||
static void sub_08042894(Entity* this) {
 | 
			
		||||
    this->subAction = 1;
 | 
			
		||||
    ((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk08 = gUnk_080D12AC[this->type2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080428AC(Entity* this) {
 | 
			
		||||
static void sub_080428AC(Entity* this) {
 | 
			
		||||
    u8 bVar1;
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar3;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -340,7 +341,7 @@ void sub_080428AC(Entity* this) {
 | 
			
		|||
    sub_08043BF0(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080428FC(Entity* this) {
 | 
			
		||||
static void sub_080428FC(Entity* this) {
 | 
			
		||||
    u32 uVar2;
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -357,7 +358,7 @@ void sub_080428FC(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042944(Entity* this) {
 | 
			
		||||
static void sub_08042944(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar1;
 | 
			
		||||
 | 
			
		||||
    pVVar1 = &((VaatiArm_HeapStruct*)this->myHeap)->s1[0];
 | 
			
		||||
| 
						 | 
				
			
			@ -370,7 +371,7 @@ void sub_08042944(Entity* this) {
 | 
			
		|||
    sub_08043BF0(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042970(Entity* this) {
 | 
			
		||||
static void sub_08042970(Entity* this) {
 | 
			
		||||
    u32 uVar2;
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar3;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -390,7 +391,7 @@ void sub_08042970(Entity* this) {
 | 
			
		|||
    sub_08043BF0(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080429D4(Entity* this) {
 | 
			
		||||
static void sub_080429D4(Entity* this) {
 | 
			
		||||
    s16 sVar2;
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar3;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -402,7 +403,7 @@ void sub_080429D4(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080429FC(Entity* this) {
 | 
			
		||||
static void sub_080429FC(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar1;
 | 
			
		||||
 | 
			
		||||
    pVVar1 = &((VaatiArm_HeapStruct*)this->myHeap)->s1[0];
 | 
			
		||||
| 
						 | 
				
			
			@ -415,7 +416,7 @@ void sub_080429FC(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042A3C(Entity* this) {
 | 
			
		||||
static void sub_08042A3C(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
 | 
			
		||||
    gUnk_080D12B8[this->subAction](this);
 | 
			
		||||
| 
						 | 
				
			
			@ -424,14 +425,14 @@ void sub_08042A3C(Entity* this) {
 | 
			
		|||
    entity->z.HALF.HI += this->field_0x78.HALF.LO;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042A6C(Entity* this) {
 | 
			
		||||
static void sub_08042A6C(Entity* this) {
 | 
			
		||||
    this->subAction = 1;
 | 
			
		||||
    this->field_0x78.HALF.LO = 0;
 | 
			
		||||
    this->field_0x7c.BYTES.byte2 = 1;
 | 
			
		||||
    ((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk0a = 0x200;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042A88(Entity* this) {
 | 
			
		||||
static void sub_08042A88(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar4;
 | 
			
		||||
 | 
			
		||||
    pVVar4 = &((VaatiArm_HeapStruct*)this->myHeap)->s1[0];
 | 
			
		||||
| 
						 | 
				
			
			@ -452,7 +453,7 @@ void sub_08042A88(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042AEC(Entity* this) {
 | 
			
		||||
static void sub_08042AEC(Entity* this) {
 | 
			
		||||
    if (--this->timer == 0) {
 | 
			
		||||
        this->subAction = 3;
 | 
			
		||||
        this->timer = 4;
 | 
			
		||||
| 
						 | 
				
			
			@ -462,7 +463,7 @@ void sub_08042AEC(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042B20(Entity* this) {
 | 
			
		||||
static void sub_08042B20(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
    Entity* object;
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
| 
						 | 
				
			
			@ -510,12 +511,12 @@ void sub_08042B20(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042C14(Entity* this) {
 | 
			
		||||
static void sub_08042C14(Entity* this) {
 | 
			
		||||
    gUnk_080D12D0[this->subAction](this);
 | 
			
		||||
    sub_08043A78(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042C34(Entity* this) {
 | 
			
		||||
static void sub_08042C34(Entity* this) {
 | 
			
		||||
    u32 random;
 | 
			
		||||
    int y;
 | 
			
		||||
    u32 i;
 | 
			
		||||
| 
						 | 
				
			
			@ -572,7 +573,7 @@ void sub_08042C34(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042D24(Entity* this) {
 | 
			
		||||
static void sub_08042D24(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
 | 
			
		||||
    if (--this->timer == 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -588,7 +589,7 @@ void sub_08042D24(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042D6C(Entity* this) {
 | 
			
		||||
static void sub_08042D6C(Entity* this) {
 | 
			
		||||
    Entity* object;
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    u32 i;
 | 
			
		||||
| 
						 | 
				
			
			@ -622,7 +623,7 @@ void sub_08042D6C(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042E30(Entity* this) {
 | 
			
		||||
static void sub_08042E30(Entity* this) {
 | 
			
		||||
    short sVar3;
 | 
			
		||||
    u32 uVar6;
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar9;
 | 
			
		||||
| 
						 | 
				
			
			@ -660,7 +661,7 @@ void sub_08042E30(Entity* this) {
 | 
			
		|||
    UpdateAnimationSingleFrame(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042EF4(Entity* this) {
 | 
			
		||||
static void sub_08042EF4(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    u32 temp;
 | 
			
		||||
| 
						 | 
				
			
			@ -700,7 +701,7 @@ void sub_08042EF4(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08042FD8(Entity* this) {
 | 
			
		||||
static void sub_08042FD8(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
 | 
			
		||||
    UpdateAnimationSingleFrame(this);
 | 
			
		||||
| 
						 | 
				
			
			@ -727,7 +728,7 @@ void sub_08042FD8(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043048(Entity* this) {
 | 
			
		||||
static void sub_08043048(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
    u32 i;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -754,7 +755,7 @@ void sub_08043048(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080430D0(Entity* this) {
 | 
			
		||||
static void sub_080430D0(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
 | 
			
		||||
    if (sub_08043C98(this) == 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -775,7 +776,7 @@ void sub_080430D0(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043130(Entity* this) {
 | 
			
		||||
static void sub_08043130(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    u32 i;
 | 
			
		||||
| 
						 | 
				
			
			@ -817,7 +818,7 @@ void sub_08043130(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080431E8(Entity* this) {
 | 
			
		||||
static void sub_080431E8(Entity* this) {
 | 
			
		||||
    u32 i;
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -838,7 +839,7 @@ void sub_080431E8(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0804325C(Entity* this) {
 | 
			
		||||
static void sub_0804325C(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
 | 
			
		||||
    sub_08043CD4(this);
 | 
			
		||||
| 
						 | 
				
			
			@ -855,9 +856,9 @@ void sub_0804325C(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ASM_FUNC("asm/non_matching/vaati/sub_080432A8.inc", void sub_080432A8(Entity* this))
 | 
			
		||||
static ASM_FUNC("asm/non_matching/vaati/sub_080432A8.inc", void sub_080432A8(Entity* this))
 | 
			
		||||
 | 
			
		||||
NONMATCH("asm/non_matching/vaati/sub_0804334C.inc", void sub_0804334C(Entity* this)) {
 | 
			
		||||
    static NONMATCH("asm/non_matching/vaati/sub_0804334C.inc", void sub_0804334C(Entity* this)) {
 | 
			
		||||
    int bVar1;
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    VaatiArm_HeapStruct1* s;
 | 
			
		||||
| 
						 | 
				
			
			@ -904,12 +905,12 @@ NONMATCH("asm/non_matching/vaati/sub_0804334C.inc", void sub_0804334C(Entity* th
 | 
			
		|||
}
 | 
			
		||||
END_NONMATCH
 | 
			
		||||
 | 
			
		||||
void sub_08043420(Entity* this) {
 | 
			
		||||
static void sub_08043420(Entity* this) {
 | 
			
		||||
    gUnk_080D1320[this->subAction](this);
 | 
			
		||||
    sub_08043ABC(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043440(Entity* this) {
 | 
			
		||||
static void sub_08043440(Entity* this) {
 | 
			
		||||
    u32 i;
 | 
			
		||||
    int iVar4;
 | 
			
		||||
    u8* ptr;
 | 
			
		||||
| 
						 | 
				
			
			@ -942,7 +943,7 @@ void sub_08043440(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043490(Entity* this) {
 | 
			
		||||
static void sub_08043490(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    Entity* entity2;
 | 
			
		||||
    Entity* entity3;
 | 
			
		||||
| 
						 | 
				
			
			@ -970,7 +971,7 @@ void sub_08043490(Entity* this) {
 | 
			
		|||
    UpdateAnimationSingleFrame(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043520(Entity* this) {
 | 
			
		||||
static void sub_08043520(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
 | 
			
		||||
    entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
 | 
			
		||||
| 
						 | 
				
			
			@ -982,7 +983,7 @@ void sub_08043520(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0804355C(Entity* this) {
 | 
			
		||||
static void sub_0804355C(Entity* this) {
 | 
			
		||||
    sub_08043DB0(this);
 | 
			
		||||
    if (--this->field_0x7a.HWORD == 0) {
 | 
			
		||||
        this->subAction = 4;
 | 
			
		||||
| 
						 | 
				
			
			@ -990,7 +991,7 @@ void sub_0804355C(Entity* this) {
 | 
			
		|||
    UpdateAnimationSingleFrame(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043580(Entity* this) {
 | 
			
		||||
static void sub_08043580(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    u32 i;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1013,7 +1014,7 @@ void sub_08043580(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080435F4(Entity* this) {
 | 
			
		||||
static void sub_080435F4(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    u32 i;
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
| 
						 | 
				
			
			@ -1038,11 +1039,11 @@ void sub_080435F4(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043680(Entity* this) {
 | 
			
		||||
static void sub_08043680(Entity* this) {
 | 
			
		||||
    gUnk_080D1348[this->subAction](this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043698(Entity* this) {
 | 
			
		||||
static void sub_08043698(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    u32 i;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1067,19 +1068,19 @@ static inline void deleteThing(Entity* this, const u32 index) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080436C0(Entity* this) {
 | 
			
		||||
static void sub_080436C0(Entity* this) {
 | 
			
		||||
    deleteThing(this, 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043700(Entity* this) {
 | 
			
		||||
static void sub_08043700(Entity* this) {
 | 
			
		||||
    deleteThing(this, 2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043738(Entity* this) {
 | 
			
		||||
static void sub_08043738(Entity* this) {
 | 
			
		||||
    deleteThing(this, 3);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043770(Entity* this) {
 | 
			
		||||
static void sub_08043770(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
 | 
			
		||||
    if (--this->timer == 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1101,7 +1102,7 @@ void sub_08043770(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
u32 sub_080437DC(Entity* this) {
 | 
			
		||||
static u32 sub_080437DC(Entity* this) {
 | 
			
		||||
    u16 temp;
 | 
			
		||||
    VaatiArm_HeapStruct* heapStruct;
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
| 
						 | 
				
			
			@ -1159,9 +1160,9 @@ u32 sub_080437DC(Entity* this) {
 | 
			
		|||
    return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ASM_FUNC("asm/non_matching/vaati/sub_0804393C.inc", void sub_0804393C(Entity* this))
 | 
			
		||||
static ASM_FUNC("asm/non_matching/vaati/sub_0804393C.inc", void sub_0804393C(Entity* this))
 | 
			
		||||
 | 
			
		||||
void sub_08043A10(Entity* this) {
 | 
			
		||||
    static void sub_08043A10(Entity* this) {
 | 
			
		||||
    sub_08043B7C(this);
 | 
			
		||||
    sub_0804393C(((VaatiArm_HeapStruct*)this->myHeap)->entities[4]);
 | 
			
		||||
    ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->y.HALF.HI -= 8;
 | 
			
		||||
| 
						 | 
				
			
			@ -1177,7 +1178,7 @@ void sub_08043A10(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043A78(Entity* this) {
 | 
			
		||||
static void sub_08043A78(Entity* this) {
 | 
			
		||||
    this->field_0x7c.BYTES.byte0 = 0;
 | 
			
		||||
    sub_08043B7C(this);
 | 
			
		||||
    sub_0804393C(((VaatiArm_HeapStruct*)this->myHeap)->entities[2]);
 | 
			
		||||
| 
						 | 
				
			
			@ -1187,7 +1188,7 @@ void sub_08043A78(Entity* this) {
 | 
			
		|||
    ((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->spriteOffsetY--;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043ABC(Entity* this) {
 | 
			
		||||
static void sub_08043ABC(Entity* this) {
 | 
			
		||||
    this->field_0x7c.BYTES.byte0 = 0;
 | 
			
		||||
    sub_08043B7C(this);
 | 
			
		||||
    sub_0804393C(((VaatiArm_HeapStruct*)this->myHeap)->entities[3]);
 | 
			
		||||
| 
						 | 
				
			
			@ -1198,22 +1199,22 @@ void sub_08043ABC(Entity* this) {
 | 
			
		|||
    ((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->spriteOffsetY--;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ASM_FUNC("asm/non_matching/vaati/sub_08043B08.inc", void sub_08043B08(Entity* this))
 | 
			
		||||
static ASM_FUNC("asm/non_matching/vaati/sub_08043B08.inc", void sub_08043B08(Entity* this))
 | 
			
		||||
 | 
			
		||||
void sub_08043B7C(Entity* this) {
 | 
			
		||||
    static void sub_08043B7C(Entity* this) {
 | 
			
		||||
    sub_08043B08(((VaatiArm_HeapStruct*)this->myHeap)->entities[1]);
 | 
			
		||||
    sub_08043B08(((VaatiArm_HeapStruct*)this->myHeap)->entities[2]);
 | 
			
		||||
    sub_08043B08(((VaatiArm_HeapStruct*)this->myHeap)->entities[3]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043B9C(Entity* this) {
 | 
			
		||||
static void sub_08043B9C(Entity* this) {
 | 
			
		||||
    u32 index = ((((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk00.HALF.HI + 4) & 0xff) >> 3;
 | 
			
		||||
    if (gUnk_080D13B7[index] != this->frameIndex - 1) {
 | 
			
		||||
        InitAnimationForceUpdate(this, gUnk_080D13B7[index]);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043BC8(Entity* this) {
 | 
			
		||||
static void sub_08043BC8(Entity* this) {
 | 
			
		||||
    VaatiArm_HeapStruct1* pVVar2;
 | 
			
		||||
    const Coords* ptr;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1226,7 +1227,7 @@ void sub_08043BC8(Entity* this) {
 | 
			
		|||
    pVVar2->unk0e = 0x28;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043BF0(Entity* this) {
 | 
			
		||||
static void sub_08043BF0(Entity* this) {
 | 
			
		||||
    u8 bVar1;
 | 
			
		||||
    u32 uVar2;
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
| 
						 | 
				
			
			@ -1250,7 +1251,7 @@ void sub_08043BF0(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043C40(Entity* this, VaatiArm_HeapStruct1* heapStruct) {
 | 
			
		||||
static void sub_08043C40(Entity* this, VaatiArm_HeapStruct1* heapStruct) {
 | 
			
		||||
    u8* iVar3;
 | 
			
		||||
    int offset;
 | 
			
		||||
    const u8* puVar6;
 | 
			
		||||
| 
						 | 
				
			
			@ -1281,7 +1282,7 @@ void sub_08043C40(Entity* this, VaatiArm_HeapStruct1* heapStruct) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
u32 sub_08043C98(Entity* this) {
 | 
			
		||||
static u32 sub_08043C98(Entity* this) {
 | 
			
		||||
#if defined EU || defined JP
 | 
			
		||||
    Entity* e1 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
 | 
			
		||||
    if ((e1->contactFlags == 0x9d)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1303,7 +1304,7 @@ u32 sub_08043C98(Entity* this) {
 | 
			
		|||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043CD4(Entity* this) {
 | 
			
		||||
static void sub_08043CD4(Entity* this) {
 | 
			
		||||
    u32 i;
 | 
			
		||||
    for (i = 0; i < 5; i++) {
 | 
			
		||||
        if (((VaatiArm_HeapStruct*)this->myHeap)->entities[i]->contactFlags == 0x9d) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1314,7 +1315,7 @@ void sub_08043CD4(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043D08(Entity* this) {
 | 
			
		||||
static void sub_08043D08(Entity* this) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    Entity* fx;
 | 
			
		||||
    u32 i;
 | 
			
		||||
| 
						 | 
				
			
			@ -1341,7 +1342,7 @@ void sub_08043D08(Entity* this) {
 | 
			
		|||
    EnqueueSFX(SFX_HIT);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043DB0(Entity* this) {
 | 
			
		||||
static void sub_08043DB0(Entity* this) {
 | 
			
		||||
    s32 cVar1;
 | 
			
		||||
    Entity* pEVar2;
 | 
			
		||||
    Entity* pEVar3;
 | 
			
		||||
| 
						 | 
				
			
			@ -1381,7 +1382,7 @@ void sub_08043DB0(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08043EB8(Entity* this) {
 | 
			
		||||
static void sub_08043EB8(Entity* this) {
 | 
			
		||||
    u32 i;
 | 
			
		||||
    Entity* pEVar4;
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
| 
						 | 
				
			
			@ -1421,7 +1422,8 @@ void sub_08043EB8(Entity* this) {
 | 
			
		|||
        ptr->unk0c = gUnk_080D1419[i];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
NONMATCH("asm/non_matching/vaati/sub_08044000.inc", void sub_08044000(Entity* this)) {
 | 
			
		||||
 | 
			
		||||
static NONMATCH("asm/non_matching/vaati/sub_08044000.inc", void sub_08044000(Entity* this)) {
 | 
			
		||||
    Entity* entity;
 | 
			
		||||
    u32 i;
 | 
			
		||||
    VaatiArm_HeapStruct1* ptr;
 | 
			
		||||
| 
						 | 
				
			
			@ -1442,7 +1444,7 @@ NONMATCH("asm/non_matching/vaati/sub_08044000.inc", void sub_08044000(Entity* th
 | 
			
		|||
}
 | 
			
		||||
END_NONMATCH
 | 
			
		||||
 | 
			
		||||
void sub_08044078(Entity* this) {
 | 
			
		||||
static void sub_08044078(Entity* this) {
 | 
			
		||||
    if (this->action == 0) {
 | 
			
		||||
        this->action = 1;
 | 
			
		||||
        if (this->type != 3 ||
 | 
			
		||||
| 
						 | 
				
			
			@ -1456,7 +1458,7 @@ void sub_08044078(Entity* this) {
 | 
			
		|||
    GetNextFrame(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080440CC(Entity* this) {
 | 
			
		||||
static void sub_080440CC(Entity* this) {
 | 
			
		||||
    if (this->action == 0) {
 | 
			
		||||
        this->action = 1;
 | 
			
		||||
        if ((gRoomTransition.field_0x38 & 1) != 0 &&
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,6 +18,8 @@ extern Entity* gPlayerClones[3];
 | 
			
		|||
extern u16 gUnk_080B2CD8[];
 | 
			
		||||
 | 
			
		||||
void ram_IntrMain(void);
 | 
			
		||||
static void sub_080171F0(void);
 | 
			
		||||
static void HandlePlayerLife(Entity* this);
 | 
			
		||||
 | 
			
		||||
struct {
 | 
			
		||||
    u8 ready;
 | 
			
		||||
| 
						 | 
				
			
			@ -223,7 +225,7 @@ void PlayerUpdate(Entity* this) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
// Responsible for some life things like low health beep and initiating the death sequence
 | 
			
		||||
void HandlePlayerLife(Entity* this) {
 | 
			
		||||
static void HandlePlayerLife(Entity* this) {
 | 
			
		||||
    u32 temp;
 | 
			
		||||
 | 
			
		||||
    gUnk_0200AF00.unk_2f = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -308,7 +310,7 @@ void HandlePlayerLife(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080171F0(void) {
 | 
			
		||||
static void sub_080171F0(void) {
 | 
			
		||||
    if (gPlayerState.mobility != 0)
 | 
			
		||||
        ResetPlayerItem();
 | 
			
		||||
    if (gPlayerState.field_0x14 != 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@
 | 
			
		|||
#include "object.h"
 | 
			
		||||
#include "game.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "message.h"
 | 
			
		||||
 | 
			
		||||
extern const struct {
 | 
			
		||||
    u8 filler[7];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,14 +5,13 @@
 | 
			
		|||
#include "item.h"
 | 
			
		||||
 | 
			
		||||
extern void (*gUnk_081140D4[])(Entity*);
 | 
			
		||||
 | 
			
		||||
extern u16 gUnk_081140CC[];
 | 
			
		||||
extern u8 gMapDataTopSpecial[];
 | 
			
		||||
 | 
			
		||||
void sub_0806D520(Entity*, u32);
 | 
			
		||||
 | 
			
		||||
void sub_0806D41C(Entity* this);
 | 
			
		||||
 | 
			
		||||
extern u8 gMapDataTopSpecial[];
 | 
			
		||||
static void sub_0806D02C(Entity* this);
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    u8 filler[0x40];
 | 
			
		||||
| 
						 | 
				
			
			@ -96,7 +95,7 @@ Entity* sub_0806D00C(Entity* this) {
 | 
			
		|||
    return entity;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0806D02C(Entity* this) {
 | 
			
		||||
static void sub_0806D02C(Entity* this) {
 | 
			
		||||
    s32 tmp1;
 | 
			
		||||
    s32 tmp2;
 | 
			
		||||
    sub_0806D164(this);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
#include "save.h"
 | 
			
		||||
#include "message.h"
 | 
			
		||||
#include "npc.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
 | 
			
		||||
extern void sub_08067C44(Entity*);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,6 +12,8 @@ extern Dialog gUnk_08109DC8[];
 | 
			
		|||
extern u16 gUnk_0810A35A[];
 | 
			
		||||
extern u16 gUnk_0810A362[];
 | 
			
		||||
 | 
			
		||||
static void sub_080600F0(Entity* this);
 | 
			
		||||
 | 
			
		||||
void ForestMinish(Entity* this) {
 | 
			
		||||
    switch (this->action) {
 | 
			
		||||
        case 0:
 | 
			
		||||
| 
						 | 
				
			
			@ -66,7 +68,7 @@ void ForestMinish_Head(Entity* this) {
 | 
			
		|||
    sub_0807000C(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_080600F0(Entity* this) {
 | 
			
		||||
static void sub_080600F0(Entity* this) {
 | 
			
		||||
    u32 uVar1;
 | 
			
		||||
    u32 uVar2;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,6 @@
 | 
			
		|||
#include "player.h"
 | 
			
		||||
#include "flags.h"
 | 
			
		||||
#include "npc.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
 | 
			
		||||
extern u32 gUnk_08113F44;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
#include "npc.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
 | 
			
		||||
extern void sub_08068780(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
#include "entity.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "sound.h"
 | 
			
		||||
#include "script.h"
 | 
			
		||||
 | 
			
		||||
extern SpriteLoadData gUnk_0810C48C;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
#include "message.h"
 | 
			
		||||
#include "npc.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    u8 unk_0;  // u8
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,6 +5,7 @@
 | 
			
		|||
#include "screen.h"
 | 
			
		||||
#include "common.h"
 | 
			
		||||
#include "flags.h"
 | 
			
		||||
#include "message.h"
 | 
			
		||||
 | 
			
		||||
#ifdef EU
 | 
			
		||||
void sub_0806EABC(Entity* this);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,3 @@
 | 
			
		|||
#include "functions.h"
 | 
			
		||||
#include "npc.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -7,7 +6,6 @@ extern Hitbox gUnk_0810C428;
 | 
			
		|||
extern u8 gUnk_0810C430[4];
 | 
			
		||||
extern u8 gUnk_0810C435[];
 | 
			
		||||
extern u8 gUnk_0810C43D[];
 | 
			
		||||
extern u32 GetRandomByWeight(const u8*);
 | 
			
		||||
 | 
			
		||||
void Pita(Entity* this) {
 | 
			
		||||
    if (this->action == 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +23,7 @@ void Pita(Entity* this) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
/** Reset the players baked goods? */
 | 
			
		||||
void sub_08062EB8(void) {
 | 
			
		||||
void RemoveAllBakedGoods(void) {
 | 
			
		||||
    SetInventoryValue(ITEM_BRIOCHE, 0);
 | 
			
		||||
    SetInventoryValue(ITEM_CROISSANT, 0);
 | 
			
		||||
    SetInventoryValue(ITEM_PIE, 0);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
#include "item.h"
 | 
			
		||||
#include "message.h"
 | 
			
		||||
#include "game.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern u16 script_EzloTalkOcarina[];
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -211,10 +212,11 @@ void Bird_Type8(Entity* this) {
 | 
			
		|||
                this->speed = 0x300;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 && gPlayerEntity.action != PLAYER_SLEEP &&
 | 
			
		||||
                gPlayerEntity.action != PLAYER_BOUNCE && gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB &&
 | 
			
		||||
                gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE && PlayerCanBeMoved() &&
 | 
			
		||||
                (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) {
 | 
			
		||||
            if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 &&
 | 
			
		||||
                gPlayerEntity.action != PLAYER_SLEEP && gPlayerEntity.action != PLAYER_BOUNCE &&
 | 
			
		||||
                gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB &&
 | 
			
		||||
                gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE &&
 | 
			
		||||
                PlayerCanBeMoved() && (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) {
 | 
			
		||||
                s32 z = gPlayerEntity.z.HALF.HI - this->z.HALF.HI - 8;
 | 
			
		||||
                if ((u16)z < 0x20 && gPlayerEntity.health != 0) {
 | 
			
		||||
                    pEVar5 = CreateObject(0x95, 10, 0);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@
 | 
			
		|||
#include "message.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
#include "npc.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const BookActionFuncs[])(Entity*);
 | 
			
		||||
extern s8 const gUnk_08123D94[];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,6 +11,7 @@
 | 
			
		|||
#include "functions.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    /*0x00*/ Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,7 @@
 | 
			
		|||
#include "functions.h"
 | 
			
		||||
#include "sound.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,6 +12,7 @@
 | 
			
		|||
#include "hitbox.h"
 | 
			
		||||
#include "screen.h"
 | 
			
		||||
#include "message.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    /*0x00*/ Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@
 | 
			
		|||
#include "flags.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
static void sub_0808E6A0(Entity*);
 | 
			
		||||
static void sub_0808E6E4(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@
 | 
			
		|||
#include "itemMetaData.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
void sub_08081150(Entity*);
 | 
			
		||||
u8 sub_0808147C(u32);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,11 +6,16 @@
 | 
			
		|||
#include "flags.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const gUnk_081243B4[])(Entity*);
 | 
			
		||||
extern void (*const gUnk_081243BC[])(Entity*);
 | 
			
		||||
extern void (*const gUnk_081243C4[])(Entity*);
 | 
			
		||||
 | 
			
		||||
static void sub_0809EB30(Entity* this);
 | 
			
		||||
static void sub_0809EAD8(Entity* this);
 | 
			
		||||
static void sub_0809EABC(Entity* this);
 | 
			
		||||
 | 
			
		||||
void LightableSwitch(Entity* this) {
 | 
			
		||||
    gUnk_081243B4[this->type](this);
 | 
			
		||||
    sub_0809EB30(this);
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +52,7 @@ void sub_0809EA80(Entity* this) {
 | 
			
		|||
    sub_0809EABC(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0809EABC(Entity* this) {
 | 
			
		||||
static void sub_0809EABC(Entity* this) {
 | 
			
		||||
    bool32 anySet = 0;
 | 
			
		||||
 | 
			
		||||
    if (CheckFlags(this->field_0x86.HWORD)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -58,7 +63,7 @@ void sub_0809EABC(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0809EAD8(Entity* this) {
 | 
			
		||||
static void sub_0809EAD8(Entity* this) {
 | 
			
		||||
    u8 bVar1;
 | 
			
		||||
    Entity* pEVar2;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -72,7 +77,7 @@ void sub_0809EAD8(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0809EB30(Entity* this) {
 | 
			
		||||
static void sub_0809EB30(Entity* this) {
 | 
			
		||||
    u16 uVar1;
 | 
			
		||||
    u16* puVar2;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
#include "entity.h"
 | 
			
		||||
#include "asm.h"
 | 
			
		||||
 | 
			
		||||
void sub_0800445C(Entity*);
 | 
			
		||||
void MacroShoes_Init(Entity*);
 | 
			
		||||
void MacroShoes_Idle(Entity*);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@
 | 
			
		|||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    /*0x00*/ Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,7 @@
 | 
			
		|||
#include "item.h"
 | 
			
		||||
#include "flags.h"
 | 
			
		||||
#include "effects.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct _struct_gUnk_08123FB0 {
 | 
			
		||||
    void (*const funcEnt)(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@
 | 
			
		|||
#include "projectile.h"
 | 
			
		||||
#include "room.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,6 +11,7 @@
 | 
			
		|||
#include "functions.h"
 | 
			
		||||
#include "item.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    /*0x00*/ Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#include "global.h"
 | 
			
		||||
#include "entity.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern u8 gUnk_02027EB4[];
 | 
			
		||||
extern u8 gUnk_0200D654[];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,7 @@
 | 
			
		|||
#include "room.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "effects.h"
 | 
			
		||||
#include "object.h"
 | 
			
		||||
 | 
			
		||||
extern const s16 gUnk_080B4468[];
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -14,6 +15,10 @@ void sub_0809E86C(Entity* this);
 | 
			
		|||
void sub_0809E8BC(Entity* this);
 | 
			
		||||
void sub_0809E8EC(Entity* this);
 | 
			
		||||
 | 
			
		||||
static void sub_0809E96C(Entity* this);
 | 
			
		||||
static u32 sub_0809E9A0(void);
 | 
			
		||||
static void sub_0809E918(Entity* this);
 | 
			
		||||
 | 
			
		||||
void TreeHidingPortal(Entity* this) {
 | 
			
		||||
    static void (*const actionFuncs[])(Entity*) = {
 | 
			
		||||
        sub_0809E83C,
 | 
			
		||||
| 
						 | 
				
			
			@ -69,7 +74,7 @@ void sub_0809E8EC(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0809E918(Entity* this) {
 | 
			
		||||
static void sub_0809E918(Entity* this) {
 | 
			
		||||
    static const s16 gUnk_08124364[] = {
 | 
			
		||||
        0, -4, 8,  -4,  16, -4, 22, -4,  -8, -4,  -16, -4,  -22, -4,  0,  -12, 0,   4,   8,     -12,
 | 
			
		||||
        8, 4,  -8, -12, -8, 4,  8,  -16, -8, -16, 12,  -16, -12, -16, 16, -14, -16, -14, -1000, 0,
 | 
			
		||||
| 
						 | 
				
			
			@ -88,11 +93,11 @@ void sub_0809E918(Entity* this) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0809E96C(Entity* this) {
 | 
			
		||||
static void sub_0809E96C(Entity* this) {
 | 
			
		||||
    CreateMinishEntrance(COORD_TO_TILE_OFFSET(this, 0x20, 0x8));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
u32 sub_0809E9A0(void) {
 | 
			
		||||
static u32 sub_0809E9A0(void) {
 | 
			
		||||
    u32 rv;
 | 
			
		||||
    const s16* ptr;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@
 | 
			
		|||
#include "object.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    /*0x00*/ Entity base;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,7 @@
 | 
			
		|||
#include "player.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "sound.h"
 | 
			
		||||
#include "asm.h"
 | 
			
		||||
 | 
			
		||||
extern void sub_08078CD0(Entity*);
 | 
			
		||||
extern void sub_08018FA0(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,6 +15,8 @@
 | 
			
		|||
#include "item.h"
 | 
			
		||||
#include "message.h"
 | 
			
		||||
 | 
			
		||||
static void sub_08077E54(ItemBehavior* beh);
 | 
			
		||||
 | 
			
		||||
extern void sub_080752E8(ItemBehavior* behavior, u32 arg1); // item.c
 | 
			
		||||
extern void sub_0800857C(Entity*);
 | 
			
		||||
extern void SetDefaultPriorityForKind(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			@ -498,7 +500,7 @@ void sub_08077E3C(ItemBehavior* ent, u32 idx) {
 | 
			
		|||
    sub_08077E54(ent);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_08077E54(ItemBehavior* beh) {
 | 
			
		||||
static void sub_08077E54(ItemBehavior* beh) {
 | 
			
		||||
    beh->field_0x5[7] = gPlayerEntity.animIndex;
 | 
			
		||||
    beh->field_0x12[0] = gPlayerEntity.frameIndex;
 | 
			
		||||
    beh->field_0x5[8] = gPlayerEntity.frameDuration;
 | 
			
		||||
| 
						 | 
				
			
			@ -1276,7 +1278,8 @@ bool32 PlayerCanBeMoved(void) {
 | 
			
		|||
    if ((gPlayerState.flags &
 | 
			
		||||
         (PL_BUSY | PL_DROWNING | PL_CAPTURED | PL_USE_PORTAL | PL_HIDDEN | PL_FROZEN | PL_FALLING | PL_DISABLE_ITEMS |
 | 
			
		||||
          PL_PIT_IS_EXIT | PL_IN_MINECART | PL_MOLDWORM_CAPTURED | PL_IN_HOLE | PL_FLAGS2000000 | PL_CLIMBING)) != 0 ||
 | 
			
		||||
        gPlayerState.field_0x3c[0] != 0 || gPlayerEntity.action == PLAYER_FALL || gPlayerEntity.action == PLAYER_08071DB8) {
 | 
			
		||||
        gPlayerState.field_0x3c[0] != 0 || gPlayerEntity.action == PLAYER_FALL ||
 | 
			
		||||
        gPlayerEntity.action == PLAYER_08071DB8) {
 | 
			
		||||
        return FALSE;
 | 
			
		||||
    } else {
 | 
			
		||||
        return TRUE;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#include "entity.h"
 | 
			
		||||
#include "enemy.h"
 | 
			
		||||
#include "functions.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern void (*const DekuSeedProjectile_Functions[])(Entity*);
 | 
			
		||||
extern void (*const DekuSeedProjectile_Actions[])(Entity*);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
#include "functions.h"
 | 
			
		||||
#include "projectile.h"
 | 
			
		||||
#include "hitbox.h"
 | 
			
		||||
#include "collision.h"
 | 
			
		||||
 | 
			
		||||
extern u32 sub_080644C8(Entity*);
 | 
			
		||||
extern u8 gUnk_02027EB4[];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@
 | 
			
		|||
#include "object.h"
 | 
			
		||||
#include "game.h"
 | 
			
		||||
 | 
			
		||||
extern void sub_0804B058(EntityData* dat);
 | 
			
		||||
static void sub_0804B058(EntityData* dat);
 | 
			
		||||
extern void sub_0801AC98(void);
 | 
			
		||||
extern u32 sub_08049D1C(u32);
 | 
			
		||||
extern Entity* LoadRoomEntity(EntityData*);
 | 
			
		||||
| 
						 | 
				
			
			@ -179,7 +179,7 @@ void LoadRoom(void) {
 | 
			
		|||
    sub_0801AC98();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0804B058(EntityData* dat) {
 | 
			
		||||
static void sub_0804B058(EntityData* dat) {
 | 
			
		||||
    Entity* ent;
 | 
			
		||||
    u32 uVar2;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,6 +35,8 @@ void sub_080AF250();
 | 
			
		|||
void sub_0804C290();
 | 
			
		||||
void sub_0804C258();
 | 
			
		||||
 | 
			
		||||
static void sub_0804C128(void);
 | 
			
		||||
 | 
			
		||||
extern void** gCurrentRoomProperties;
 | 
			
		||||
 | 
			
		||||
u32 sub_unk3_ArmosInteriors_RuinsEntranceNorth(u32 arg0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1074,7 +1076,7 @@ extern u8 gUnk_080D9338[];
 | 
			
		|||
extern u8 gUnk_080D9340[];
 | 
			
		||||
extern TileEntity gUnk_080D9328[];
 | 
			
		||||
 | 
			
		||||
void sub_0804C128() {
 | 
			
		||||
static void sub_0804C128(void) {
 | 
			
		||||
    sub_080AF250(0);
 | 
			
		||||
    if (gRoomVars.field_0x0 != 0) {
 | 
			
		||||
        if ((gArea.unk_0c_1) == 0) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,6 +41,9 @@ u32 sub_0805EF8C(Token*);
 | 
			
		|||
u32 sub_0805EFB4(Token*);
 | 
			
		||||
u32 sub_0805F9A0(u32);
 | 
			
		||||
 | 
			
		||||
static u32 sub_0805F8F8(u32 idx);
 | 
			
		||||
static u32 sub_0805F7A0(u32 param_1);
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    u16 unk0;
 | 
			
		||||
    s8 unk2;
 | 
			
		||||
| 
						 | 
				
			
			@ -606,7 +609,7 @@ u32 sub_0805F76C(u8* param_1, WStruct* param_2) {
 | 
			
		|||
    return uVar1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
u32 sub_0805F7A0(u32 param_1) {
 | 
			
		||||
static u32 sub_0805F7A0(u32 param_1) {
 | 
			
		||||
    u32 uVar1;
 | 
			
		||||
    u32 uVar2;
 | 
			
		||||
    u32 uVar3;
 | 
			
		||||
| 
						 | 
				
			
			@ -707,7 +710,7 @@ void sub_0805F8E4(u32 r0, WStruct* r1) {
 | 
			
		|||
    r1->unk1 = old;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
u32 sub_0805F8F8(u32 idx) {
 | 
			
		||||
static u32 sub_0805F8F8(u32 idx) {
 | 
			
		||||
    u8* temp = &gUnk_0810942E[idx].filler0[10][10];
 | 
			
		||||
    return gUnk_0810926C[*temp];
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue