Decomp IntToFixedPoint64

This commit is contained in:
Zur3l
2026-07-11 15:59:37 -04:00
parent 7e53278b53
commit 15bc9a91ae
6 changed files with 19 additions and 18 deletions

View File

@@ -4,5 +4,6 @@
#include "util.h"
u32 sub_02001BB4(s32 x, s32 y);
void IntToFixedPoint64(struct fixed_point_64* out, s32 x);
#endif //PMDSKY_MAIN_02001BB4_H

View File

@@ -32,6 +32,13 @@ struct fixed_point {
s16 fractional;
};
// 64-bit signed fixed-point number with 16 fraction bits.
// Represents the number ((upper << 16) + (lower >> 16) + (lower & 0xFFFF) * 2^-16)
struct fixed_point_64 {
s32 upper; // sign bit, plus the 31 most significant integer bits
u32 lower; // the 32 least significant bits (16 integer + 16 fraction)
};
// Compares two numbers and return the minimum
#define MIN(A, B) ((A > B) ? B : A)