diff options
| author | Aetias <aetias@outlook.com> | 2024-03-19 17:13:26 +0100 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2024-03-19 17:13:26 +0100 |
| commit | 064086da4fd3f65da99c85abf44eb56b969c63a5 (patch) | |
| tree | e10ff9ee35bde899f66a2bbe790ef828c15c0385 /include | |
| parent | 9f2dbce3b96acdbbc2071ca909118ef033fee27a (diff) | |
Prefer signed integers
Diffstat (limited to 'include')
| -rw-r--r-- | include/Item/ItemManager.hpp | 6 | ||||
| -rw-r--r-- | include/lib/math.h | 4 | ||||
| -rw-r--r-- | include/types.h | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/include/Item/ItemManager.hpp b/include/Item/ItemManager.hpp index 42445af7..ca0ddad0 100644 --- a/include/Item/ItemManager.hpp +++ b/include/Item/ItemManager.hpp @@ -155,7 +155,7 @@ struct SaveItemManager { /* 74 */ s8 treasure[Treasure_COUNT];
/* 7c */ unk8 unk_7c[4];
/* 80 */ u16 hourglassSeconds;
- /* 82 */ unk16 unk_82[6];
+ /* 82 */ u16 unk_82[6];
/* 8e */ u16 numRupees;
/* 90 */ unk8 unk_90;
/* 91 */ unk8 unk_91;
@@ -169,7 +169,7 @@ struct SaveItemManager { /* 9c */ u8 quiverSize;
/* 9d */ u8 bombBagSize;
/* 9e */ u8 bombchuBagSize;
- /* 9f */ unk8 unk_9f[6];
+ /* 9f */ u8 unk_9f[6];
/* a5 */ u8 equippedFairy;
/* a6 */
};
@@ -212,7 +212,7 @@ private: /* 13c */ ShipPartPricesShown mShipPartPricesShown;
/* 148 */ u32 mTreasurePriceShownFlags[CEIL_DIV(Treasure_COUNT, 32)];
/* 14c */ unk8 mUnk_14c;
- /* 14d */ unk8 mUnk_14d;
+ /* 14d */ u8 mUnk_14d;
/* 14e */ unk8 mUnk_14e[0x2];
/* 150 */
diff --git a/include/lib/math.h b/include/lib/math.h index 67a8b9cc..86c483a0 100644 --- a/include/lib/math.h +++ b/include/lib/math.h @@ -4,7 +4,9 @@ #include "types.h" // Q20.12 fixed point number -typedef u32 q20; +typedef s32 q20; +// Q4.12 fixed point number +typedef s16 q4; #define INT_TO_Q20(n) ((s32)((n) << 12)) #define FLOAT_TO_Q20(n) ((s32)(((n) * 8192 + 1) / 2)) diff --git a/include/types.h b/include/types.h index af5cda8c..baa3fb32 100644 --- a/include/types.h +++ b/include/types.h @@ -9,9 +9,9 @@ typedef int s32; typedef short s16;
typedef char s8;
-typedef u8 unk8;
-typedef u16 unk16;
-typedef u32 unk32;
+typedef s8 unk8;
+typedef s16 unk16;
+typedef s32 unk32;
#define CEIL_DIV(a, b) (((a) + (b) - 1) / (b))
|
