summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2021-11-11 21:18:48 -0800
committertheo3 <arisstephenson2@gmail.com>2021-11-11 21:18:48 -0800
commitfddb4abd534ef1ef623cb044bc97c45713fbcfd1 (patch)
tree4668fa2e16aa441da3c2f06b8d9b54c9762c2523 /include
parent313cc336f21fcf81e3e336b4fe45ca5053771f93 (diff)
move entity update functions
Diffstat (limited to 'include')
-rw-r--r--include/entity.h40
-rw-r--r--include/gba/m4a.h2
-rw-r--r--include/screen.h36
3 files changed, 39 insertions, 39 deletions
diff --git a/include/entity.h b/include/entity.h
index b6793df1..96735a0d 100644
--- a/include/entity.h
+++ b/include/entity.h
@@ -209,23 +209,29 @@ enum {
#define Direction8FromAnimationState(expr) (((expr) << 2)
Entity* GetEmptyEntity(void);
-extern Entity* CreateEnemy(u32 id, u32 type);
-extern Entity* CreateNPC(u32 id, u32 type, u32 type2);
-extern Entity* CreateObject(u32 id, u32 type, u32 type2);
-extern Entity* CreateObjectWithParent(Entity* parent, u32 id, u32 type, u32 type2);
-extern Entity* CreateFx(Entity* parent, u32 type, u32 type2);
-
-extern void InitializeAnimation(Entity*, u32);
-extern void InitAnimationForceUpdate(Entity*, u32);
-extern void UpdateAnimationSingleFrame(Entity*);
-extern void UpdateSpriteForCollisionLayer(Entity*);
-extern void GetNextFrame(Entity*);
-extern u32 LoadExtraSpriteData(Entity*, SpriteLoadData*);
-extern void SetExtraSpriteFrame(Entity*, u32, u32);
-extern void SetSpriteSubEntryOffsetData1(Entity*, u32, u32);
-extern void SetSpriteSubEntryOffsetData2(Entity*, u32, u32);
-
-extern u32 GetFacingDirection(Entity*, Entity*);
+void DrawEntity(Entity*);
+Entity* CreateEnemy(u32 id, u32 type);
+Entity* CreateNPC(u32 id, u32 type, u32 type2);
+Entity* CreateObject(u32 id, u32 type, u32 type2);
+Entity* CreateObjectWithParent(Entity* parent, u32 id, u32 type, u32 type2);
+Entity* CreateFx(Entity* parent, u32 type, u32 type2);
+
+void InitializeAnimation(Entity*, u32);
+void InitAnimationForceUpdate(Entity*, u32);
+void UpdateAnimationSingleFrame(Entity*);
+void UpdateSpriteForCollisionLayer(Entity*);
+void GetNextFrame(Entity*);
+u32 LoadExtraSpriteData(Entity*, SpriteLoadData*);
+void SetExtraSpriteFrame(Entity*, u32, u32);
+void SetSpriteSubEntryOffsetData1(Entity*, u32, u32);
+void SetSpriteSubEntryOffsetData2(Entity*, u32, u32);
+
+u32 GetFacingDirection(Entity*, Entity*);
+
+/**
+ * @brief Check if entity should sleep this frame.
+ */
+bool32 CheckDontUpdate(Entity* this);
/**
* @brief Delete the entity currently in execution.
diff --git a/include/gba/m4a.h b/include/gba/m4a.h
index 0dcbd822..7b6a345e 100644
--- a/include/gba/m4a.h
+++ b/include/gba/m4a.h
@@ -173,6 +173,8 @@ typedef struct MusicPlayer {
extern const MusicPlayer gMusicPlayers[];
extern const Song gSongTable[];
+void m4aSoundMain(void);
+void m4aSoundVSync(void);
void m4aSoundInit(void);
void m4aSongNumStart(u16 n);
void m4aSongNumStartOrContinue(u16 n);
diff --git a/include/screen.h b/include/screen.h
index e6462de1..12c30c57 100644
--- a/include/screen.h
+++ b/include/screen.h
@@ -11,29 +11,19 @@ typedef struct {
} LcdControls;
typedef struct {
- u16 bg0Control;
- u16 bg0xOffset;
- u16 bg0yOffset;
- u16 bg0Updated;
- void* bg0Tilemap;
- u16 bg1Control;
- u16 bg1xOffset;
- u16 bg1yOffset;
- u16 bg1Updated;
- void* bg1Tilemap;
+ u16 control;
+ u16 xOffset;
+ u16 yOffset;
+ u16 updated;
+ void* tilemap;
} BgSettings;
typedef struct {
- u16 bg2Control;
- u16 bg2xOffset;
- u16 bg2yOffset;
- u16 bg2Updated;
- void* bg2Tilemap;
- u16 bg3Control;
- s16 bg3xOffset;
- s16 bg3yOffset;
- u16 bg3Updated;
- void* bg3Tilemap;
+ u16 control;
+ s16 xOffset;
+ s16 yOffset;
+ u16 updated;
+ void* tilemap;
} BgAffSettings;
typedef struct {
@@ -67,8 +57,10 @@ typedef struct {
typedef struct {
/*0x00*/ LcdControls lcd;
- /*0x08*/ BgSettings bg;
- /*0x20*/ BgAffSettings affine;
+ /*0x08*/ BgSettings bg0;
+ /*0x14*/ BgSettings bg1;
+ /*0x20*/ BgAffSettings bg2;
+ /*0x2c*/ BgAffSettings bg3;
/*0x38*/ BgControls controls;
/*0x6c*/ u8 _6c;
/*0x6d*/ u8 _6d;