Merge pull request #478 from notyourav/msm

header cleanup
This commit is contained in:
notyourav
2022-03-30 00:56:23 -07:00
committed by GitHub
109 changed files with 509 additions and 467 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ _080549BC:
ldrb r0, [r6, #2]
ldrb r1, [r6, #3]
bl sub_08052FF4
bl sub_0807C740
bl InitializeCamera
ldr r1, _08054A00 @ =gUpdateVisibleTiles
movs r0, #1
strb r0, [r1]
+1 -1
View File
@@ -61,7 +61,7 @@ _08004458: .4byte sub_080043B0
sub_0800445C: @ 0x0800445C
push {r4, r5, lr}
adds r4, r0, #0
bl sub_08079F8C
bl PlayerCanBeMoved
cmp r0, #0
beq _08004482
ldr r5, _080044D8 @ =gPlayerEntity
@@ -14,7 +14,7 @@ script_0800E550:
PlaySound SFX_105
Wait 0x001e
EzloMessage 0x1622
Call sub_08053494
Call StartDarkNutTimer
SetLocalFlag 0x007e
script_0800E582:
EnablePlayerControl
+1 -1
View File
@@ -18,7 +18,7 @@ script_080106BE:
MessageNoOverlap 0x3c07
Jump script_08010726
script_080106E0:
Call sub_08062EB8
Call RemoveAllBakedGoods
CallWithArg sub_0807F78C, 0x00000000
WaitUntilTextboxCloses
CheckTextboxResult
+1 -1
View File
@@ -28,7 +28,7 @@ typedef struct {
u16 localFlagOffset;
u8 filler[4];
u16 lightLevel;
u8 unk_0b;
u8 lightType;
u8 unk_0c_0 : 1;
u8 unk_0c_1 : 3;
u8 unk_0c_4 : 4;
+12
View File
@@ -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
+2
View File
@@ -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);
+26 -11
View File
@@ -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,
+1
View File
@@ -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.
-138
View File
@@ -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 sub_08079F8C(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 sub_080A2CC0(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
+1 -1
View File
@@ -261,7 +261,7 @@ void sub_08052EA0(void);
void sub_08053250(void);
void sub_080533CC(void);
void sub_08053494(void);
void StartDarkNutTimer(void);
void sub_080534AC(void);
void InitBiggoronTimer(void);
+2
View File
@@ -17,4 +17,6 @@ typedef struct {
extern LayerStruct gMapTop;
extern LayerStruct gMapBottom;
LayerStruct* GetLayerByIndex(u32);
#endif // MAP_H
+2
View File
@@ -136,4 +136,6 @@ void MessageClose(void);
void DispMessageFrame(u16*, s32, s32, u32);
void sub_08057044(u32, struct_020227E8*, u32);
#endif // MESSAGE_H
+1 -1
View File
@@ -36,7 +36,7 @@ Entity* CreateNPC(u32 subtype, u32 form, u32 parameter);
u32 UpdateFuseInteraction(Entity*);
void NPCInit(Entity* ent);
void sub_0806F0A4(void);
void CollideFollowers(void);
// TODO move?
void sub_08078784(Entity* ent, u32 arg1);
+10 -6
View File
@@ -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 sub_080A2BE4(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);
+23
View File
@@ -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];
+65 -3
View File
@@ -20,7 +20,7 @@ enum PlayerActions {
PLAYER_EMPTYBOTTLE,
PLAYER_FROZEN,
PLAYER_0807204C,
PLAYER_080720DC,
PLAYER_ROOM_EXIT,
PLAYER_PULL,
PLAYER_LAVA,
PLAYER_WARP,
@@ -33,7 +33,7 @@ enum PlayerActions {
PLAYER_080728AC,
PLAYER_INHOLE,
PLAYER_08072C9C,
PLAYER_08074C44,
PLAYER_SLEEP,
PLAYER_CLIMB,
PLAYER_USEENTRANCE,
PLAYER_PARACHUTE,
@@ -77,7 +77,7 @@ enum PlayerSpawnType {
PL_SPAWN_DROP,
PL_SPAWN_WALKING,
PL_SPAWN_STEP_IN,
PL_SPAWN_SPECIAL,
PL_SPAWN_SLEEPING,
PL_SPAWN_DROP_MINISH,
PL_SPAWN_STAIRS_ASCEND,
PL_SPAWN_STAIRS_DESCEND,
@@ -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();
+2 -1
View File
@@ -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*);
+2
View File
@@ -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);
+1
View File
@@ -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);
+5 -5
View File
@@ -207,7 +207,7 @@ bool32 IsColliding(Entity* this, Entity* that) {
}
bool32 IsCollidingPlayer(Entity* this) {
if (sub_08079F8C())
if (PlayerCanBeMoved())
return IsColliding(this, &gPlayerEntity);
return FALSE;
}
@@ -528,7 +528,7 @@ s32 sub_08017F3C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
s32 sub_08017F40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if (tgt->confusedTime == 0) {
if (org == &gPlayerEntity) {
if (sub_08079F8C() &&
if (PlayerCanBeMoved() &&
#ifdef EU
(gPlayerState.flags & (PL_MINISH | PL_BUSY)) == 0 &&
#else
@@ -568,7 +568,7 @@ s32 sub_0801802C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
kind = org->kind;
if (kind == 1) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
if (((((direction ^ 0x10) - 4 * tgt->animationState + 5) & 0x1F)) > 0xA) {
x = 0x11aa;
return sub_08018308(org, tgt, direction, &gCollisionMtx[x + org->hurtType]);
@@ -622,7 +622,7 @@ s32 sub_080180E8(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
s32 sub_08018168(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if (tgt->confusedTime == 0) {
if (org == &gPlayerEntity) {
if (sub_08079F8C() &&
if (PlayerCanBeMoved() &&
#ifdef EU
(gPlayerState.flags & (PL_MINISH | PL_BUSY)) == 0 &&
#else
@@ -651,7 +651,7 @@ s32 sub_08018168(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
s32 sub_08018228(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if (org == &gPlayerEntity && sub_08079F8C())
if (org == &gPlayerEntity && PlayerCanBeMoved())
sub_08004484(tgt, org);
return 0;
}
+1 -1
View File
@@ -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);
+13 -6
View File
@@ -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;
}
+3 -3
View File
@@ -8,13 +8,13 @@
#include "sound.h"
#include "entity.h"
#include "room.h"
#include "functions.h"
#include "object.h"
void BladeTrap(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->child = GetCurrentRoomProperty(this->type);
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD);
}
if (!(this->direction & 0x80)) {
LinearMoveUpdate(this);
@@ -24,6 +24,6 @@ void BladeTrap(Entity* this) {
if (!(this->direction & 0x80)) {
EnqueueSFX(SFX_METAL_CLINK);
}
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD);
}
}
+2 -3
View File
@@ -3,7 +3,6 @@
#include "enemy.h"
#include "room.h"
#include "object.h"
#include "functions.h"
typedef struct {
Entity base;
@@ -27,7 +26,7 @@ void Bombarossa_OnTick(BombarossaEntity* this) {
InitializeAnimation(super, 0);
if (super->type != 0) {
super->child = GetCurrentRoomProperty(super->type);
sub_080A2CC0(super, (u16**)&super->child, &this->unk_0x76);
UpdateRailMovement(super, (u16**)&super->child, &this->unk_0x76);
}
}
@@ -68,7 +67,7 @@ void sub_0803350C(BombarossaEntity* this) {
}
if (--this->unk_0x76 == 0) {
sub_080A2CC0(super, (u16**)&super->child, &this->unk_0x76);
UpdateRailMovement(super, (u16**)&super->child, &this->unk_0x76);
}
}
+6 -5
View File
@@ -309,7 +309,7 @@ void Enemy64_Action4(Enemy64Entity* this) {
void Enemy64_Action4_SubAction0(Enemy64Entity* this) {
SoundReq(SFX_BOSS_DIE);
if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) {
if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
SetPlayerControl(CONTROL_2);
super->subAction = 2;
super->timer = 0x1e;
@@ -320,7 +320,7 @@ void Enemy64_Action4_SubAction0(Enemy64Entity* this) {
}
void Enemy64_Action4_SubAction1(Enemy64Entity* this) {
if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) {
if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
SetPlayerControl(CONTROL_2);
super->subAction = 2;
super->timer = 1;
@@ -438,7 +438,7 @@ void sub_08049998(Enemy64Entity* this, u32 param_2) {
tmpX = super->x.HALF.HI;
tmpY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (((this->unk_7c & 1) != 0) && sub_08079F8C()) {
if (((this->unk_7c & 1) != 0) && PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI = (super->x.HALF.HI - tmpX) + gPlayerEntity.x.HALF.HI;
gPlayerEntity.y.HALF.HI = (super->y.HALF.HI - tmpY) + gPlayerEntity.y.HALF.HI;
}
@@ -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)) && (sub_08079F8C())) && ((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,
@@ -491,7 +492,7 @@ void sub_08049B20(Enemy64Entity* this) {
tmpX = super->x.HALF.HI;
tmpY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (((this->unk_7c & 1) != 0) && sub_08079F8C()) {
if (((this->unk_7c & 1) != 0) && PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI = (super->x.HALF.HI - tmpX) + gPlayerEntity.x.HALF.HI;
gPlayerEntity.y.HALF.HI = (super->y.HALF.HI - tmpY) + gPlayerEntity.y.HALF.HI;
}
+3 -3
View File
@@ -1035,7 +1035,7 @@ void sub_08047DF0(GyorgMaleEntity* this, u32 unk1) {
oldY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (this->unk_7c & 1) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI += super->x.HALF.HI - oldX;
gPlayerEntity.y.HALF.HI += super->y.HALF.HI - oldY;
}
@@ -1053,7 +1053,7 @@ void sub_08047E58(GyorgMaleEntity* this) {
oldY = super->y.HALF.HI;
LinearMoveAngle(super, super->speed, super->direction);
if (this->unk_7c & 1) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
gPlayerEntity.x.HALF.HI += super->x.HALF.HI - oldX;
gPlayerEntity.y.HALF.HI += super->y.HALF.HI - oldY;
}
@@ -1126,7 +1126,7 @@ void sub_08048004(GyorgMaleEntity* this) {
COLLISION_OFF(super);
if (gPlayerEntity.z.HALF.HI != 0)
return;
if (!sub_08079F8C())
if (!PlayerCanBeMoved())
return;
if (this->unk_7c & 1) {
u32 b = super->spriteRendering.b3;
+1
View File
@@ -8,6 +8,7 @@
#include "enemy.h"
#include "object.h"
#include "functions.h"
#include "collision.h"
extern u32 sub_0804A024(Entity*, u32, u32);
+2 -1
View File
@@ -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*);
+2 -1
View File
@@ -7,7 +7,8 @@
#include "global.h"
#include "enemy.h"
#include "functions.h"
#include "physics.h"
#include "player.h"
extern void (*const LakituActionFuncs[])(Entity*);
+4 -2
View File
@@ -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*);
@@ -118,7 +120,7 @@ void sub_0803CDD8(Entity* this) {
void sub_0803CE14(Entity* this) {
u8 direction;
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD);
direction = this->direction;
if (direction & 0x80) {
+1 -1
View File
@@ -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);
-1
View File
@@ -9,7 +9,6 @@
#include "message.h"
#include "save.h"
#include "object.h"
#include "functions.h"
#include "item.h"
extern bool32 ItemIsShield(u32);
+1 -1
View File
@@ -144,7 +144,7 @@ void sub_08034E68(Entity* this) {
sub_08035120(this);
}
if (gRoomTransition.field_0x39 == 0) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
this->action = 3;
scriptExecutionContext = StartCutscene(this, (u16*)script_MazaalMacroDefeated);
*(ScriptExecutionContext**)&this->cutsceneBeh = scriptExecutionContext;
+1 -1
View File
@@ -6,7 +6,7 @@
*/
#include "enemy.h"
#include "functions.h"
#include "physics.h"
void sub_08045374(Entity*);
-1
View File
@@ -9,7 +9,6 @@
#include "global.h"
#include "collision.h"
#include "enemy.h"
#include "functions.h"
typedef struct {
/*0x00*/ Entity base;
+1 -1
View File
@@ -6,7 +6,7 @@
*/
#include "enemy.h"
#include "functions.h"
#include "physics.h"
void Octorok_Pause(Entity*);
bool32 Octorok_FacesPlayer(Entity*);
+5 -3
View File
@@ -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) {
+2 -1
View File
@@ -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*);
-1
View File
@@ -9,7 +9,6 @@
#include "collision.h"
#include "object.h"
#include "game.h"
#include "functions.h"
#include "save.h"
#include "playeritem.h"
-1
View File
@@ -8,7 +8,6 @@
#include "enemy.h"
#include "collision.h"
#include "object.h"
#include "functions.h"
extern u8 gUnk_080B37A0[];
extern u8 gUnk_080B3E80[];
+1 -1
View File
@@ -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*);
+4 -1
View File
@@ -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*);
+1 -1
View File
@@ -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*);
+2 -1
View File
@@ -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*);
+1 -3
View File
@@ -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*);
-1
View File
@@ -2,7 +2,6 @@
#include "collision.h"
#include "entity.h"
#include "enemy.h"
#include "functions.h"
typedef struct {
Entity base;
+2 -1
View File
@@ -6,7 +6,8 @@
*/
#include "enemy.h"
#include "functions.h"
#include "physics.h"
#include "collision.h"
extern u32 sub_0804A024(Entity*, u32, u32);
+2 -1
View File
@@ -6,7 +6,8 @@
*/
#include "enemy.h"
#include "functions.h"
#include "physics.h"
#include "room.h"
typedef struct {
s8 h, v;
+1 -1
View File
@@ -6,7 +6,7 @@
*/
#include "enemy.h"
#include "functions.h"
#include "physics.h"
void sub_08023E10(Entity*);
void sub_08023E54(Entity*);
+1 -1
View File
@@ -6,7 +6,7 @@
*/
#include "enemy.h"
#include "functions.h"
#include "physics.h"
extern void sub_080317F8(Entity*);
-1
View File
@@ -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*);
+3 -1
View File
@@ -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;
-1
View File
@@ -12,7 +12,6 @@
static bool32 ShouldSpawnTreeItem(Entity*);
extern u32 GetRandomByWeight(const u8*);
extern void sub_08049CF4(Entity*);
const u8 gTreeItemDropTables[][16] = {
+132 -130
View File
@@ -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 &&
+1 -1
View File
@@ -561,7 +561,7 @@ void VaatiWrathType0ActionD(Entity* this) {
void sub_08041BE8(Entity* this) {
Entity* entity;
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
this->subAction = 1;
this->timer = 120;
this->updatePriority = PRIO_NO_BLOCK;
+1 -1
View File
@@ -203,7 +203,7 @@ void UpdateEntities(void) {
UpdatePlayerInput();
UpdatePriority();
ClearHitboxList();
sub_0806F0A4();
CollideFollowers();
f = ram_UpdateEntities;
f(0);
ClearAllDeletedEntities();
+17 -17
View File
@@ -123,7 +123,7 @@ extern void sub_080186D4(void);
extern void sub_0806F364(void);
extern void sub_08052FF4(u32 area, u32 room);
extern void CloneMapData(void);
extern void sub_0807C740(void);
extern void InitializeCamera(void);
extern void SetBGDefaults(void);
extern void LoadItemGfx(void);
@@ -137,7 +137,7 @@ static void UpdateWindcrests(void);
static void UpdateFakeScroll(void);
static void UpdatePlayerMapCoords(void);
static void sub_08052C3C(void);
static void sub_0805340C(void);
static void UpdateTimerCallbacks(void);
static void sub_08051D98(void);
static void sub_08051DCC(void);
static bool32 CheckGameOver(void);
@@ -155,7 +155,7 @@ static void sub_080534E4(u32* a1);
static void InitAllRoomResInfo(void);
static void InitRoomResInfo(RoomResInfo* info, RoomHeader* hdr, u32 area, u32 room);
static void sub_080532E4(void);
static void sub_08053460(void);
static void ResetTimerFlags(void);
typedef struct {
u8 _0;
@@ -406,7 +406,7 @@ static void GameMain_Update(void) {
if (CheckInitPauseMenu() || CheckInitPortal()) {
return;
}
sub_0805340C();
UpdateTimerCallbacks();
// leave early if player is now entering a portal
if (gMain.substate != GAMEMAIN_UPDATE) {
@@ -499,7 +499,7 @@ static void InitializeEntities(void) {
CallRoomProp6();
InitializePlayer();
gUnk_03004030.unk_00 = NULL;
sub_0807C740();
InitializeCamera();
gUpdateVisibleTiles = 1;
LoadRoomBgm();
SetColor(0, 0);
@@ -648,7 +648,7 @@ void sub_08051F9C(u32 a1, u32 a2, u32 a3, u32 a4) {
sub_08052FF4(a1, a2);
gRoomControls.scroll_x = gRoomControls.origin_x + a3;
gRoomControls.scroll_y = gRoomControls.origin_y + a4;
sub_0807C740();
InitializeCamera();
gUpdateVisibleTiles = 1;
gUsedPalettes = 0;
gScreen.lcd.displayControl |= tmp;
@@ -950,8 +950,8 @@ static void InitializePlayer(void) {
[PL_SPAWN_MINISH] = PLAYER_MINISH,
[PL_SPAWN_DROP] = PLAYER_INIT,
[PL_SPAWN_WALKING] = PLAYER_ROOMTRANSITION,
[PL_SPAWN_STEP_IN] = PLAYER_080720DC,
[PL_SPAWN_SPECIAL] = PLAYER_08074C44,
[PL_SPAWN_STEP_IN] = PLAYER_ROOM_EXIT,
[PL_SPAWN_SLEEPING] = PLAYER_SLEEP,
[PL_SPAWN_DROP_MINISH] = PLAYER_MINISH,
[PL_SPAWN_STAIRS_ASCEND] = PLAYER_USEENTRANCE,
[PL_SPAWN_STAIRS_DESCEND] = PLAYER_USEENTRANCE,
@@ -1503,7 +1503,7 @@ void LoadAuxiliaryRoom(u32 area, u32 room) {
sub_08052FF4(area, room);
gRoomControls.camera_target = NULL;
CloneMapData();
sub_0807C740();
InitializeCamera();
}
void sub_08052FF4(u32 area, u32 room) {
@@ -1637,7 +1637,7 @@ static void sub_0805329C(void) {
sub_080532E4();
break;
default:
sub_08053460();
ResetTimerFlags();
break;
}
}
@@ -1690,7 +1690,7 @@ void sub_080533CC(void) {
gUsedPalettes |= 8;
}
static void sub_0805340C(void) {
static void UpdateTimerCallbacks(void) {
static void (*const sHandlers[])(u32*) = {
sub_08053434, DummyHandler, sub_080534E4, DummyHandler, DummyHandler, DummyHandler, DummyHandler, DummyHandler,
};
@@ -1710,13 +1710,13 @@ static void DummyHandler(u32* a1) {
static void sub_08053434(u32* a1) {
if (gArea.locationIndex == 29 && *a1) {
if (!--*a1) {
sub_08053460();
ResetTimerFlags();
MenuFadeIn(5, 6);
}
}
}
static void sub_08053460(void) {
static void ResetTimerFlags(void) {
static const u16 sClearFlags[] = { FLAG_BANK_10, LV6_GUFUU1_GISHIKI, FLAG_BANK_10, LV6_GUFUU1_DEMO,
FLAG_BANK_10, LV6_ZELDA_DISCURSE, FLAG_BANK_10, LV6_00_ESCAPE,
FLAG_BANK_10, LV6_GUFUU2_DEAD, FLAG_BANK_G, ENDING,
@@ -1730,7 +1730,7 @@ static void sub_08053460(void) {
ClearFlagArray(sClearFlags);
}
void sub_08053494(void) {
void StartDarkNutTimer(void) {
gSave.timers[0] = 10800;
}
@@ -1762,7 +1762,7 @@ static void ResetTmpFlags(void) {
FLAG_BANK_2, SHOP00_ITEM_01, FLAG_BANK_2, SHOP01_CAFE_01,
0xFFFF };
sub_08053460();
ResetTimerFlags();
ClearFlagArray(sClearFlags);
if (!CheckGlobalFlag(WATERBEAN_PUT))
@@ -2084,7 +2084,7 @@ void sub_08053DB4(void) {
if (gFadeControl.active == 0) {
u8* ptr = gMenu.field_0xc;
sub_08052FF4(gMenu.field_0xc[4], gMenu.field_0xc[5]);
sub_0807C740();
InitializeCamera();
gUpdateVisibleTiles = 1;
gRoomControls.scroll_x = (s8)ptr[6] + gRoomControls.scroll_x;
gRoomControls.scroll_y = (s8)ptr[7] + gRoomControls.scroll_y;
@@ -2143,7 +2143,7 @@ void sub_08053F20(void) {
DeleteAllEntities();
ptr = gMenu.field_0xc;
sub_08052FF4(gMenu.field_0xc[8], gMenu.field_0xc[9]);
sub_0807C740();
InitializeCamera();
gUpdateVisibleTiles = 1;
gRoomControls.scroll_x = (s8)ptr[10] + gRoomControls.scroll_x;
gRoomControls.scroll_y = (s8)ptr[0xb] + gRoomControls.scroll_y;
+4 -2
View File
@@ -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)
+11 -11
View File
@@ -27,7 +27,7 @@ void Manager22_Main(Manager22* this) {
s32 sVar1;
u32 uVar3;
if (gArea.unk_0b == 0) {
if (gArea.lightType == 0) {
sub_0801E104();
gScreen.lcd.displayControl &= ~(DISPCNT_BG3_ON | DISPCNT_WIN0_ON);
DeleteThisEntity();
@@ -46,7 +46,7 @@ void Manager22_Main(Manager22* this) {
sub_0805BA78();
sub_0805BAD4();
}
if (gArea.unk_0b == 2) {
if (gArea.lightType == 2) {
gScreen.lcd.displayControl &= ~DISPCNT_WIN0_ON;
} else {
if (CheckRectOnScreen(gPlayerEntity.x.HALF.HI - gRoomControls.origin_x,
@@ -56,7 +56,7 @@ void Manager22_Main(Manager22* this) {
gScreen.lcd.displayControl &= ~DISPCNT_WIN0_ON;
}
uVar3 = this->manager.unk_0e;
if (((gPlayerState.flags & PL_USE_LANTERN)) && (gArea.unk_0b)) {
if (((gPlayerState.flags & PL_USE_LANTERN)) && (gArea.lightType)) {
if (uVar3 < 0x48) {
uVar3 += 4;
sub_0801E154(uVar3);
@@ -127,13 +127,13 @@ extern u16 gUnk_08108CA8[];
void sub_0805BAD4() {
static const u16 gUnk_08108CA8[] = { 0x10, 0x10f, 0x20e, 0x30d, 0x40c, 0x50b, 0x60a, 0x709, 0x808,
0x907, 0xa06, 0xb05, 0xc04, 0xd03, 0xe02, 0xf01, 0x1000, 0x00 };
if (gArea.unk_0b) {
if (gArea.lightType != 0) {
gScreen.controls.alphaBlend = gUnk_08108CA8[(gArea.lightLevel << 0x10) >> 0x14];
}
}
void sub_0805BB00(s32 lightLevel, s32 param_2) {
if (gArea.unk_0b == 0) {
if (gArea.lightType == 0) {
Manager* pManager = GetEmptyManager();
if (pManager != 0) {
pManager->type = 9;
@@ -146,9 +146,9 @@ void sub_0805BB00(s32 lightLevel, s32 param_2) {
gScreen.controls.layerFXControl = 0x3e48;
gRoomVars.lightLevel = lightLevel;
if (param_2) {
gArea.unk_0b = 1;
gArea.lightType = 1;
} else {
gArea.unk_0b = 2;
gArea.lightType = 2;
}
}
@@ -173,7 +173,7 @@ s32 UpdateLightLevel() {
s32 iVar1;
iVar1 = 0;
if (gArea.unk_0b && gRoomVars.lightLevel < (s16)gArea.lightLevel) {
if (gArea.lightType && gRoomVars.lightLevel < (s16)gArea.lightLevel) {
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
iVar1 = sub_0805BA78();
if (iVar1) {
@@ -187,7 +187,7 @@ s32 sub_0805BC04(void) {
s32 iVar1;
iVar1 = 0;
if (gArea.unk_0b && gRoomVars.lightLevel > (short)gArea.lightLevel) {
if (gArea.lightType && gRoomVars.lightLevel > (short)gArea.lightLevel) {
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
iVar1 = sub_0805BA78();
if (iVar1) {
@@ -198,8 +198,8 @@ s32 sub_0805BC04(void) {
}
void sub_0805BC4C() {
if (gArea.unk_0b != 0) {
gArea.unk_0b = 0;
if (gArea.lightType != 0) {
gArea.lightType = 0;
gScreen.lcd.displayControl &= ~(DISPCNT_BG3_ON | DISPCNT_WIN0_ON);
}
}
+1
View File
@@ -10,6 +10,7 @@
#include "object.h"
#include "game.h"
#include "functions.h"
#include "message.h"
extern const struct {
u8 filler[7];
+3 -4
View File
@@ -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);
+1
View File
@@ -4,6 +4,7 @@
#include "save.h"
#include "message.h"
#include "npc.h"
#include "enemy.h"
extern void sub_08067C44(Entity*);
+3 -1
View File
@@ -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;
-1
View File
@@ -3,7 +3,6 @@
#include "player.h"
#include "flags.h"
#include "npc.h"
#include "functions.h"
#include "item.h"
extern u32 gUnk_08113F44;
-1
View File
@@ -1,5 +1,4 @@
#include "npc.h"
#include "functions.h"
#include "item.h"
extern void sub_08068780(Entity*);
+1 -1
View File
@@ -1,6 +1,6 @@
#include "entity.h"
#include "functions.h"
#include "sound.h"
#include "script.h"
extern SpriteLoadData gUnk_0810C48C;
+2 -2
View File
@@ -63,7 +63,7 @@ void nullsub_110(void) {
void sub_080663D4(Entity* this) {
if (this->x.HALF.HI == this->field_0x7c.HALF_U.HI - 8) {
if (gPlayerEntity.action != PLAYER_080720DC) {
if (gPlayerEntity.action != PLAYER_ROOM_EXIT) {
this->action = 4;
this->direction = 0;
this->speed = 0;
@@ -94,7 +94,7 @@ void sub_0806643C(Entity* this) {
}
void sub_08066474(void) {
if (gPlayerEntity.action != PLAYER_080720DC) {
if (gPlayerEntity.action != PLAYER_ROOM_EXIT) {
gPauseMenuOptions.disabled = 0;
}
}
+1
View File
@@ -2,6 +2,7 @@
#include "message.h"
#include "npc.h"
#include "hitbox.h"
#include "collision.h"
typedef struct {
u8 unk_0; // u8
+1
View File
@@ -5,6 +5,7 @@
#include "screen.h"
#include "common.h"
#include "flags.h"
#include "message.h"
#ifdef EU
void sub_0806EABC(Entity* this);
+1 -3
View File
@@ -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);
+1 -1
View File
@@ -274,7 +274,7 @@ s32 sub_0806F078(Entity* ent, s32 a2) {
return 0;
}
void sub_0806F0A4(void) {
void CollideFollowers(void) {
LinkedList* entityList = gEntityLists + 7;
Entity* currentEntity;
u32 val;
+1 -1
View File
@@ -57,7 +57,7 @@ void BigPushableLever_Idle(BigPushableLeverEntity* this) {
SetTile(this->tileIndexLower, this->tilePositionLower, super->collisionLayer);
EnqueueSFX(SFX_132);
RequestPriorityDuration(super, 0x1e);
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
gPlayerState.pushedObject = 0x98;
gPlayerState.queued_action = 5;
gPlayerState.flags |= PL_BUSY;
+6 -4
View File
@@ -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 & 0x80) != 0 && (gMessage.doTextBox & 0x7f) == 0 && gPlayerEntity.action != 28 &&
gPlayerEntity.action != 6 && gPlayerEntity.action != 9 && gPlayerState.framestate != 24 &&
gPlayerState.framestate != 11 && gPlayerState.framestate != 8 && sub_08079F8C() &&
(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);
+1 -1
View File
@@ -58,7 +58,7 @@ void sub_08098BE0(BoardEntity* this) {
}
void sub_08098BE8(BoardEntity* this) {
if ((gPlayerState.flags & PL_MINISH) && sub_08098C30(this, &gPlayerEntity) && sub_08079F8C() &&
if ((gPlayerState.flags & PL_MINISH) && sub_08098C30(this, &gPlayerEntity) && PlayerCanBeMoved() &&
gPlayerEntity.z.HALF.HI == 0) {
gPlayerState.field_0x14 = 1;
sub_0807AAF8(&gPlayerEntity, this->tile);
+1
View File
@@ -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[];
+1 -1
View File
@@ -165,7 +165,7 @@ Entity* sub_08081D74(Entity* this) {
u32 sub_08081E0C(Entity* this) {
Entity* tmp = &gPlayerEntity;
if (tmp->z.HALF.HI != 0 || !sub_08079F8C()) {
if (tmp->z.HALF.HI != 0 || !PlayerCanBeMoved()) {
return 0;
} else {
return EntityInRectRadius(this, tmp, 5, 6);
+1
View File
@@ -11,6 +11,7 @@
#include "functions.h"
#include "item.h"
#include "hitbox.h"
#include "collision.h"
typedef struct {
/*0x00*/ Entity base;
+2 -1
View File
@@ -6,6 +6,7 @@
#include "functions.h"
#include "sound.h"
#include "object.h"
#include "collision.h"
typedef struct {
Entity base;
@@ -113,7 +114,7 @@ void sub_0809EE44(FanEntity* this) {
if (uVar4 != 0) {
pEVar1 = &gPlayerEntity;
if (sub_0809EF78(this, pEVar1)) {
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
sub_08079E58(super->speed, super->direction);
}
}
+6 -6
View File
@@ -29,7 +29,7 @@ void sub_080860D8(FloatingPlatformEntity* this) {
super->frameIndex = super->type;
super->spritePriority.b0 = 7;
super->child = (Entity*)GetCurrentRoomProperty(super->type2);
sub_080A2CC0(super, (u16**)&super->child, &this->unk70);
UpdateRailMovement(super, (u16**)&super->child, &this->unk70);
}
void sub_0808611C(FloatingPlatformEntity* this) {
@@ -41,15 +41,15 @@ void sub_0808611C(FloatingPlatformEntity* this) {
super->parent->timer++;
}
sub_080A2BE4(super, iVar2);
SyncPlayerToPlatform(super, iVar2);
} else if (super->timer == 0) {
sub_080A2BE4(super, iVar2);
SyncPlayerToPlatform(super, iVar2);
} else {
sub_080A2BE4(super, FALSE);
SyncPlayerToPlatform(super, FALSE);
}
if (--this->unk70 == 0) {
sub_080A2CC0(super, (u16**)&super->child, &this->unk70);
UpdateRailMovement(super, (u16**)&super->child, &this->unk70);
}
}
@@ -58,7 +58,7 @@ bool32 sub_08086168(FloatingPlatformEntity* this) {
const u8* ptr;
ptr = gUnk_08120658 + super->type * 2;
if (((EntityInRectRadius(super, &gPlayerEntity, ptr[0], ptr[1])) && sub_08079F8C())) {
if (((EntityInRectRadius(super, &gPlayerEntity, ptr[0], ptr[1])) && PlayerCanBeMoved())) {
gPlayerState.field_0x14 = 1;
if (gPlayerEntity.z.HALF.HI == 0) {
return TRUE;
+1
View File
@@ -12,6 +12,7 @@
#include "hitbox.h"
#include "screen.h"
#include "message.h"
#include "collision.h"
typedef struct {
/*0x00*/ Entity base;
+2 -2
View File
@@ -225,7 +225,7 @@ void GyorgBossObject_FemalePhase4(GyorgBossObjectEntity* this) {
}
this->unk_6c = 0;
gRoomTransition.field_0x39 = 0;
if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) {
if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
super->action = 9;
super->timer = 0;
super->subtimer = 0xF0;
@@ -479,7 +479,7 @@ u32 sub_080A20B8(GyorgBossObjectEntity* this, GyorgMaleEntity* other) {
if (other == NULL) {
return 1;
}
if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) {
if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
return other->unk_7c == 0 && gPlayerState.field_0x14 != 0;
}
return 0;
+1
View File
@@ -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*);
+1
View File
@@ -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 -6
View File
@@ -18,11 +18,11 @@ typedef struct {
/*0x72*/ u16 wobbleTime; /**< Time the player can stand on the platform. */
/*0x74*/ u16 respawnTime; /**< Time until the platform respawns after it has sunk. */
/*0x76*/ u16 unk_76;
/*0x78*/ Entity* unk_78; // Typed same as second argument of sub_080A2CC0
/*0x78*/ Entity* unk_78; // Typed same as second argument of UpdateRailMovement
} LavaPlatformEntity;
typedef struct {
/*0x00*/ Entity* unk_78; // Typed same as second argument of sub_080A2CC0
/*0x00*/ Entity* unk_78; // Typed same as second argument of UpdateRailMovement
/*0x04*/ s16 x;
/*0x06*/ s16 y;
/*0x08*/ u8 collisionLayer;
@@ -246,7 +246,7 @@ void LavaPlatform_SpawnPlatforms(LavaPlatformEntity* this) {
platform->respawnTime = entry->respawnTime;
platform->unk_78 = entry->unk_78;
UpdateSpriteForCollisionLayer((Entity*)platform);
sub_080A2CC0(&platform->base, (u16**)&platform->unk_78, &platform->unk_76);
UpdateRailMovement(&platform->base, (u16**)&platform->unk_78, &platform->unk_76);
}
entry++;
}
@@ -282,7 +282,7 @@ void sub_0809264C(LavaPlatformEntity* this) {
bool32 LavaPlatform_IsPlayerOnPlatform(LavaPlatformEntity* this) {
if ((gPlayerState.flags & PL_MINISH) == 0 && EntityInRectRadius(super, &gPlayerEntity, 0x10, 0x10) &&
sub_08079F8C()) {
PlayerCanBeMoved()) {
gPlayerState.field_0x14 = 1;
if (gPlayerEntity.z.HALF.HI == 0) {
super->subtimer = 1;
@@ -294,12 +294,12 @@ bool32 LavaPlatform_IsPlayerOnPlatform(LavaPlatformEntity* this) {
}
void sub_080926E4(LavaPlatformEntity* this) {
sub_080A2BE4(super, super->subtimer);
SyncPlayerToPlatform(super, super->subtimer);
if (super->action == 1) {
(super->parent)->x.HALF.HI = super->x.HALF.HI;
(super->parent)->y.HALF.HI = super->y.HALF.HI;
}
if (--this->unk_76 == 0) {
sub_080A2CC0(super, (u16**)&this->unk_78, &this->unk_76);
UpdateRailMovement(super, (u16**)&this->unk_78, &this->unk_76);
}
}
+10 -5
View File
@@ -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,21 +63,21 @@ void sub_0809EABC(Entity* this) {
}
}
void sub_0809EAD8(Entity* this) {
static void sub_0809EAD8(Entity* this) {
u8 bVar1;
Entity* pEVar2;
if (this->type2 != 0) {
this->child = GetCurrentRoomProperty(this->type2);
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x74.HWORD);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x74.HWORD);
} else {
SetTile(0x4050, COORD_TO_TILE(this), this->collisionLayer);
}
}
void sub_0809EB30(Entity* this) {
static void sub_0809EB30(Entity* this) {
u16 uVar1;
u16* puVar2;
@@ -82,7 +87,7 @@ void sub_0809EB30(Entity* this) {
}
puVar2 = &this->field_0x74.HWORD;
if (!--*puVar2) {
sub_080A2CC0(this, (u16**)&this->child, puVar2);
UpdateRailMovement(this, (u16**)&this->child, puVar2);
}
}
}
+6 -6
View File
@@ -4,7 +4,7 @@
extern u16 gUnk_08123318[];
static void sub_08097B24(Entity* this);
static bool32 sub_08097ADC(Entity* this);
static bool32 CheckMovePlayer(Entity* this);
void LilypadSmall(Entity* this) {
u32 rand;
@@ -19,22 +19,22 @@ void LilypadSmall(Entity* this) {
this->spriteSettings.draw = TRUE;
this->spritePriority.b0 = 7;
this->child = GetCurrentRoomProperty(this->type2);
sub_080A2CC0(this, (u16**)&this->child, &this->field_0x70.HALF.LO);
UpdateRailMovement(this, (u16**)&this->child, &this->field_0x70.HALF.LO);
}
sub_080A2BE4(this, sub_08097ADC(this));
SyncPlayerToPlatform(this, CheckMovePlayer(this));
sub_08097B24(this);
psVar4 = (u16*)&this->field_0x70;
if (--*psVar4 == 0) {
sub_080A2CC0(this, (u16**)&this->child, psVar4);
UpdateRailMovement(this, (u16**)&this->child, psVar4);
}
}
static bool32 sub_08097ADC(Entity* this) {
static bool32 CheckMovePlayer(Entity* this) {
if (!(gPlayerState.flags & PL_MINISH)) {
return FALSE;
} else if (EntityInRectRadius(this, &gPlayerEntity, 8, 8) == 0) {
return FALSE;
} else if (!sub_08079F8C()) {
} else if (!PlayerCanBeMoved()) {
return FALSE;
} else {
gPlayerState.field_0x14 = 1;
-1
View File
@@ -1,7 +1,6 @@
#include "entity.h"
#include "asm.h"
void sub_0800445C(Entity*);
void MacroShoes_Init(Entity*);
void MacroShoes_Idle(Entity*);
+1
View File
@@ -10,6 +10,7 @@
#include "object.h"
#include "functions.h"
#include "item.h"
#include "collision.h"
typedef struct {
/*0x00*/ Entity base;
+1
View File
@@ -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 -2
View File
@@ -3,6 +3,7 @@
#include "projectile.h"
#include "room.h"
#include "functions.h"
#include "object.h"
typedef struct {
Entity base;
@@ -48,7 +49,7 @@ void sub_0809E360(Object98Entity* this) {
SetDefaultPriority(super, 0);
if (super->type != 0) {
super->child = (Entity*)GetCurrentRoomProperty(super->type);
sub_080A2CC0(super, (u16**)&super->child, &this->unk74);
UpdateRailMovement(super, (u16**)&super->child, &this->unk74);
}
}
}
@@ -62,7 +63,7 @@ void sub_0809E3E4(Object98Entity* this) {
}
if (--this->unk74 == 0) {
sub_080A2CC0(super, (u16**)&super->child, &this->unk74);
UpdateRailMovement(super, (u16**)&super->child, &this->unk74);
}
}
}
+1
View File
@@ -11,6 +11,7 @@
#include "functions.h"
#include "item.h"
#include "hitbox.h"
#include "collision.h"
typedef struct {
/*0x00*/ Entity base;
+1
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
#include "collision.h"
extern u8 gUnk_02027EB4[];
extern u8 gUnk_0200D654[];
+1
View File
@@ -2,6 +2,7 @@
#include "object.h"
#include "functions.h"
#include "hitbox.h"
#include "collision.h"
typedef struct {
Entity base;
+1 -1
View File
@@ -56,7 +56,7 @@ void PushableLever_Idle(PushableLeverEntity* this) {
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
EnqueueSFX(SFX_16A);
RequestPriorityDuration(super, 0x1e);
if (sub_08079F8C()) {
if (PlayerCanBeMoved()) {
gPlayerState.pushedObject = 0x90;
gPlayerState.queued_action = 5;
gPlayerState.flags |= PL_BUSY;
+8 -3
View File
@@ -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;
+1 -1
View File
@@ -205,7 +205,7 @@ void sub_0808B73C(Entity* this) {
u32 sub_0808B7C8(Entity* this) {
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.framestate != PL_STATE_DIE && gPlayerEntity.health != 0 &&
sub_08079F8C() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
PlayerCanBeMoved() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
if (this->timer == 0 && gPlayerEntity.action == PLAYER_08072C9C) {
ResetPlayerAnimationAndAction();
}
+1
View File
@@ -10,6 +10,7 @@
#include "object.h"
#include "functions.h"
#include "hitbox.h"
#include "collision.h"
typedef struct {
/*0x00*/ Entity base;
+2 -2
View File
@@ -261,7 +261,7 @@ void CreateSparkle(Entity* entity) {
}
}
NONMATCH("asm/non_matching/objectUtils/sub_080A2BE4.inc", void sub_080A2BE4(Entity* this, bool32 param_2)) {
NONMATCH("asm/non_matching/objectUtils/sub_080A2BE4.inc", void SyncPlayerToPlatform(Entity* this, bool32 param_2)) {
s16 oldValue;
s32 diff;
u16 newValue;
@@ -307,7 +307,7 @@ NONMATCH("asm/non_matching/objectUtils/sub_080A2BE4.inc", void sub_080A2BE4(Enti
}
END_NONMATCH
void sub_080A2CC0(Entity* this, u16** param_2, u16* param_3) {
void UpdateRailMovement(Entity* this, u16** param_2, u16* param_3) {
u16* ptr = *param_2;
if (ptr != NULL) {
if (*ptr == 0xfe) {
+9 -9
View File
@@ -63,7 +63,7 @@ static EntityAction sub_08071DB8;
static EntityAction PlayerEmptyBottle;
static EntityAction PlayerFrozen;
static EntityAction sub_0807204C;
static EntityAction sub_080720DC;
static EntityAction PlayerRoomExit;
static EntityAction PlayerPull;
static EntityAction PlayerLava;
EntityAction PlayerWarp; // why is this defined in playerUtils.c? We may never know : (
@@ -76,7 +76,7 @@ static EntityAction PlayerRoll;
static EntityAction PlayerWaitForScroll;
static EntityAction PlayerInHole;
static EntityAction sub_08072C9C;
static EntityAction sub_08074C44;
static EntityAction PlayerSleep;
static EntityAction PlayerClimb;
static EntityAction PlayerUseEntrance;
static EntityAction PlayerParachute;
@@ -152,7 +152,7 @@ static EntityAction PlayerFrozenUpdate;
static EntityAction sub_08072064;
static EntityAction sub_08072098;
// PLAYER_080720DC
// PLAYER_ROOM_EXIT
static EntityAction sub_08072100;
static EntityAction sub_08072168;
@@ -229,7 +229,7 @@ static EntityAction sub_08074018;
static EntityAction sub_08074060;
static EntityAction sub_080740D8;
// PLAYER_08074C44
// PLAYER_SLEEP
static EntityAction sub_08074C68;
static EntityAction sub_08074CF8;
static EntityAction sub_08074F00;
@@ -317,7 +317,7 @@ void DoPlayerAction(Entity* this) {
[PLAYER_EMPTYBOTTLE] = PlayerEmptyBottle,
[PLAYER_FROZEN] = PlayerFrozen,
[PLAYER_0807204C] = sub_0807204C,
[PLAYER_080720DC] = sub_080720DC,
[PLAYER_ROOM_EXIT] = PlayerRoomExit,
[PLAYER_PULL] = PlayerPull,
[PLAYER_LAVA] = PlayerLava,
[PLAYER_WARP] = PlayerWarp,
@@ -330,7 +330,7 @@ void DoPlayerAction(Entity* this) {
[PLAYER_080728AC] = PlayerWaitForScroll,
[PLAYER_INHOLE] = PlayerInHole,
[PLAYER_08072C9C] = sub_08072C9C,
[PLAYER_08074C44] = sub_08074C44,
[PLAYER_SLEEP] = PlayerSleep,
[PLAYER_CLIMB] = PlayerClimb,
[PLAYER_USEENTRANCE] = PlayerUseEntrance,
[PLAYER_PARACHUTE] = PlayerParachute,
@@ -1773,7 +1773,7 @@ static void sub_08072098(Entity* this) {
SetPlayerActionNormal();
}
static void sub_080720DC(Entity* this) {
static void PlayerRoomExit(Entity* this) {
static EntityAction* const gUnk_0811BB60[] = {
sub_08072100,
sub_08072168,
@@ -3787,7 +3787,7 @@ static void conveyer_push(Entity* this) {
LinearMoveUpdate(this);
}
static void sub_08074C44(Entity* this) {
static void PlayerSleep(Entity* this) {
static EntityAction* const gUnk_0811BC88[] = {
sub_08074C68,
sub_08074CF8,
@@ -4068,7 +4068,7 @@ void sub_080751E8(u32 a1, u32 a2, void* script) {
MemClear(&gPlayerScriptExecutionContext, sizeof(ScriptExecutionContext));
gPlayerScriptExecutionContext.scriptInstructionPointer = script;
((fixme*)&gPlayerEntity)->ctx = &gPlayerScriptExecutionContext;
gPlayerState.queued_action = PLAYER_08074C44;
gPlayerState.queued_action = PLAYER_SLEEP;
gPlayerState.field_0x38 = 1;
gPlayerState.field_0x39 = 0;
gPlayerState.field_0x3a = a2;

Some files were not shown because too many files have changed in this diff Show More