Prefer signed integers

This commit is contained in:
Aetias
2024-03-19 17:13:26 +01:00
parent 9f2dbce3b9
commit 064086da4f
20 changed files with 56 additions and 54 deletions
+3 -3
View File
@@ -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 */
+3 -1
View File
@@ -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))
+3 -3
View File
@@ -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))