Decompile overlay 1 (Part 3) (#95)

* ZeldaArrangeBinary OK

* ZeldaMapBinary 26%

* UnkStruct_SceneChange1 -> EntranceInfo

* cleanup EntranceInfo ctors

* fix regressions

* ZeldaMapBinary 47%

* fix regressions

* ZeldaMapBinary 73%

* ZeldaMapBinary 89%

* ZeldaMapBinary 99%
This commit is contained in:
Yanis
2026-07-01 04:09:04 +02:00
committed by GitHub
parent 6ea40b4493
commit 4074a603d2
76 changed files with 1924 additions and 643 deletions
+17
View File
@@ -53,7 +53,15 @@ extern "C" {
#define MUL_FX32(a, b) (fx32)((((s64) (a)) * ((s64) (b)) + 0x800) >> FX32_SHIFT)
#define DIV_FX32(a, b) (((a) << FX32_SHIFT) / (b))
// some kind of angle conversion? only used for angle values so far
#define MUL_FX32_FX64(a, b) (fx32)(((((a) * (b)) + 0x80000000000LL) >> 32))
#define UNK_FX_OPERATION_1(a) (MUL_FX32_FX64((u64) (a), 0xB60B60B60BLL) >> FX32_SHIFT)
#define MUL_FX32_U(a, b) (fx32)((((u64) (a)) * ((u64) (b)) + 0x800) >> FX32_SHIFT)
#define UNK_FX_OPERATION_2(a) MUL_FX32_U((u64) (a), FLOAT_TO_FX32(1.2f))
#define DEG_TO_ANG(n) ((n) * 0x10000 / 360)
#define DEG_TO_ANG_ALT(n) DEG_TO_ANG((u64) (n))
#define SIN(n) (gSinCosTable[2 * ((n) >> 4)])
#define COS(n) (gSinCosTable[2 * ((n) >> 4) + 1])
@@ -82,6 +90,15 @@ static inline void Vec2p_Copy(const Vec2p *src, Vec2p *dst) {
#endif
}
typedef union Vec2b {
struct {
/* 0 */ u8 x;
/* 4 */ u8 y;
/* 8 */
};
u8 coords[2];
} Vec2b;
typedef struct Mat2p {
/* 00 */ Vec2p xColumn;
/* 08 */ Vec2p yColumn;
+1 -1
View File
@@ -34,7 +34,7 @@ typedef volatile s8 vs8;
typedef volatile f32 vf32;
typedef volatile f64 vf64;
typedef u32 BOOL;
typedef s32 BOOL;
#define ATTRIBUTE_ALIGN(x) __attribute__((aligned(x)))