summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-01-23 17:24:55 +0200
committerTal Hayon <talhayon1@gmail.com>2022-01-23 17:24:55 +0200
commit70e2ef587740bfa159528bc0b160bb89869ad925 (patch)
tree766b21f8ce110a96d673e52e8cd7ac05072e5495 /include
parenta1ae3b229bf3767349849e3da29fe4fd2043eda3 (diff)
parent85aaada18f7eace3284937c4da8db05f047d316b (diff)
Merge remote-tracking branch 'upstream/master' into coord
Diffstat (limited to 'include')
-rw-r--r--include/coord.h4
-rw-r--r--include/entity.h8
-rw-r--r--include/functions.h6
-rw-r--r--include/global.h4
-rw-r--r--include/object.h2
-rw-r--r--include/player.h1
-rw-r--r--include/sound.h4
-rw-r--r--include/sprite.h2
8 files changed, 16 insertions, 15 deletions
diff --git a/include/coord.h b/include/coord.h
index 85a56ce2..5ead1236 100644
--- a/include/coord.h
+++ b/include/coord.h
@@ -12,8 +12,8 @@ void PositionEntityOnTop(Entity*, Entity*);
void PositionRelative(Entity*, Entity*, s32, s32);
void CopyPositionAndSpriteOffset(Entity* param_1, Entity* param_2);
void sub_0806FA90(Entity*, Entity*, s32, s32);
-void ResolveEntityOnTop(Entity*, Entity*);
-void ResolveEntityBelow(Entity*, Entity*);
+void SortEntityAbove(Entity*, Entity*);
+void SortEntityBelow(Entity*, Entity*);
u32 sub_0806F5A4(u32 idx);
u32 sub_0806F3E4(Entity*);
diff --git a/include/entity.h b/include/entity.h
index c3477e9e..5ff5dcdc 100644
--- a/include/entity.h
+++ b/include/entity.h
@@ -160,14 +160,14 @@ typedef struct Entity_ {
/*0x1d*/ u8 field_0x1d;
/*0x1e*/ u8 frameIndex;
/*0x1f*/ u8 lastFrameIndex;
- /*0x20*/ s32 zVelocity; /**< Z axis speed. */
+ /*0x20*/ s32 zVelocity; /**< Z axis speed, measured in px/frame */
/*0x24*/ s16 speed; /**< Magnitude of speed. */
/*0x26*/ u8 spriteAnimation[3];
/*0x29*/ SpritePriority spritePriority;
/*0x2a*/ u16 collisions;
- /*0x2c*/ union SplitWord x; /**< X position, fixed point. */
- /*0x30*/ union SplitWord y; /**< Y position, fixed point. */
- /*0x34*/ union SplitWord z; /**< Z position, fixed point. */
+ /*0x2c*/ union SplitWord x; /**< X position, fixed point Q16.16. */
+ /*0x30*/ union SplitWord y; /**< Y position, fixed point Q16.16. */
+ /*0x34*/ union SplitWord z; /**< Z position, fixed point Q16.16. */
/*0x38*/ u8 collisionLayer; /**< Collision layer. */
/*0x39*/ s8 interactType;
/*0x3a*/ u8 field_0x3a;
diff --git a/include/functions.h b/include/functions.h
index e6d66558..0fba11a2 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -86,7 +86,7 @@ extern u32 sub_080002B8(Entity*);
extern u32 sub_08049F84(Entity*, u32);
extern u32 sub_0800419C(Entity*, Entity*, u32, u32);
extern void sub_08004542(Entity*);
-extern u32 sub_08017850(Entity*);
+extern u32 IsCollidingPlayer(Entity*);
extern void sub_080809D4(void);
extern void sub_08080CB4(Entity*);
extern void sub_0807B7D8(u32, u32, u32);
@@ -96,7 +96,7 @@ extern u32 sub_0805F8F8(u32);
extern u32 sub_0805F7A0(u32);
extern u32* sub_0805F25C(u32);
u32 isEntityWithinDistance(Entity*, s32, s32, s32);
-extern void sub_0806F62C(Entity*, u32, u32);
+extern void LinearMoveAngle(Entity*, u32, u32);
extern void sub_080A1ED0(u32, u32, u32);
extern u32 sub_0806F5B0(u32);
extern void sub_08078790(Entity*, u32);
@@ -125,7 +125,7 @@ extern bool32 sub_080806BC(u32, u32, u32, u32);
extern bool32 sub_0806FC80(Entity*, Entity*, s32);
extern u32 sub_080002B4(Entity*, u32, u32);
extern u32 sub_080AF134(Entity*);
-extern void sub_0806F5BC(Entity*, u32, u32);
+extern void LinearMoveDirection(Entity*, u32, u32);
extern void sub_080A2AF4(Entity*, u32, u32);
extern u32 sub_080002CC(Entity*, s32, s32);
extern bool32 sub_0807BD14(Entity*, u32);
diff --git a/include/global.h b/include/global.h
index 0f656445..8521b77c 100644
--- a/include/global.h
+++ b/include/global.h
@@ -59,8 +59,8 @@
// Converts a number to Q8.8 fixed-point format
#define Q_8_8(n) ((s16)((n)*256))
-// Converts a number to Q4.12 fixed-point format
-#define Q_4_12(n) ((s16)((n)*4096))
+// Converts a number to Q16.16 fixed-point format
+#define Q_16_16(n) ((s32)((n) * (1 << 16)))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
diff --git a/include/object.h b/include/object.h
index fa41a123..53338ef3 100644
--- a/include/object.h
+++ b/include/object.h
@@ -262,7 +262,7 @@ void Object20(Entity*);
void Object21(Entity*);
void FigurineDevice(Entity*);
void EyeSwitch(Entity*);
-void PressurePlate(Entity*);
+void PressurePlate();
void BigBarrel(Entity*);
void BarrelInside(Entity*);
void PushableStatue(Entity*);
diff --git a/include/player.h b/include/player.h
index 09483161..b0658c39 100644
--- a/include/player.h
+++ b/include/player.h
@@ -278,6 +278,7 @@ extern void (*const gPlayerItemFunctions[])(Entity*);
extern u8 gBombBagSizes[];
extern u8 gQuiverSizes[];
extern u16 gWalletSizes[];
+extern Entity* gPlayerClones[];
extern PlayerState gPlayerState;
extern Entity gPlayerEntity;
diff --git a/include/sound.h b/include/sound.h
index 8549510f..58462600 100644
--- a/include/sound.h
+++ b/include/sound.h
@@ -299,7 +299,7 @@ typedef enum {
SFX_109,
SFX_10A,
SFX_10B,
- SFX_10C,
+ SFX_BUTTON_PRESS,
SFX_10D,
SFX_10E,
SFX_10F,
@@ -394,7 +394,7 @@ typedef enum {
SFX_168,
SFX_169,
SFX_16A,
- SFX_16B,
+ SFX_PRESSURE_PLATE,
SFX_16C,
SFX_16D,
SFX_16E,
diff --git a/include/sprite.h b/include/sprite.h
index bb2445b1..7539891f 100644
--- a/include/sprite.h
+++ b/include/sprite.h
@@ -22,7 +22,7 @@ typedef struct {
u8 endOfAnimation : 1;
} PACKED b;
} PACKED frameSettings;
-} Frame;
+} PACKED Frame;
typedef struct {
u8 numGfxTiles;