diff --git a/decompressed.pal.yaml b/decompressed.pal.yaml index 1007d531..8339909c 100644 --- a/decompressed.pal.yaml +++ b/decompressed.pal.yaml @@ -171,7 +171,7 @@ segments: - [0xF50010, c, stub_13640] - [0xF50050, c, sprite] - [0xF500a0, c, overlaymanager] - - [0xF50360, c, code_13990] + - [0xF50360, c, mlmtx] - [0xF51FC0, hasm, code_155F0] - [0xF52000, c, overlay] - [0xF52140, c, depthbuffer] @@ -380,7 +380,7 @@ segments: - [0xF74DE0, .data, pfsmanager] - [0xF74DF0, .data, code_11AC0] - [0xF75380, .data, overlaymanager] - - [0xF75620, .data, code_13990] + - [0xF75620, .data, mlmtx] - [0xF75630, .data, code_15B30] - [0xF75640, .data, memory] - [0xF75670, .data, lookup] @@ -421,7 +421,7 @@ segments: - [0xF77210, .rodata, code_11AC0] - [0xF77220, .rodata, rumblemanager] - [0xF77230, .rodata, overlaymanager] - - [0xF772B0, .rodata, code_13990] + - [0xF772B0, .rodata, mlmtx] - [0xF772D0, .rodata, ml] - [0xF773D0, .rodata, code_1BE90] - [0xF77400, .rodata, code_1D5D0] @@ -472,7 +472,7 @@ segments: - [0xF791D0, .bss, rumblemanager] - [0xF791D0, .bss, stub_13640] - [0xF791D0, .bss, overlaymanager] - - [0xF791D0, .bss, code_13990] + - [0xF791D0, .bss, mlmtx] - [0xF791D0, .bss, depthbuffer] - [0xF791D0, .bss, code_15B30] - [0xF791D0, .bss, memory] diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml index 1b5bd203..9895a65f 100644 --- a/decompressed.us.v10.yaml +++ b/decompressed.us.v10.yaml @@ -172,7 +172,7 @@ segments: - [0xF2C890, c, stub_13640] #DONE - [0xF2C8D0, c, sprite] #DONE - [0xF2C920, c, overlaymanager] #DONE - - [0xF2CBE0, c, code_13990] + - [0xF2CBE0, c, mlmtx] - [0xF2E840, hasm, code_155F0] #DONE - [0xF2E880, c, overlay] #DONE - [0xF2E9C0, c, depthbuffer] #DONE @@ -381,7 +381,7 @@ segments: - [0xF51560, .data, pfsmanager] - [0xF51570, .data, code_11AC0] - [0xF51B00, .data, overlaymanager] - - [0xF51DA0, .data, code_13990] + - [0xF51DA0, .data, mlmtx] - [0xF51DB0, .data, code_15B30] - [0xF51DC0, .data, memory] - [0xF51DF0, .data, lookup] @@ -423,7 +423,7 @@ segments: - [0xF539B0, .rodata, code_11AC0] - [0xF539C0, .rodata, rumblemanager] - [0xF539D0, .rodata, overlaymanager] - - [0xF53A50, .rodata, code_13990] + - [0xF53A50, .rodata, mlmtx] - [0xF53A70, .rodata, ml] - [0xF53B70, .rodata, code_1BE90] - [0xF53BA0, .rodata, code_1D5D0] @@ -473,7 +473,7 @@ segments: - [0xF55960, .bss, rumblemanager] - [0xF55960, .bss, stub_13640] - [0xF55960, .bss, overlaymanager] - - [0xF55960, .bss, code_13990] + - [0xF55960, .bss, mlmtx] - [0xF55960, .bss, depthbuffer] - [0xF55960, .bss, code_15B30] - [0xF55960, .bss, memory] diff --git a/include/core1/core1.h b/include/core1/core1.h index 4f193fd7..e1fb239c 100644 --- a/include/core1/core1.h +++ b/include/core1/core1.h @@ -13,6 +13,7 @@ #include "core1/main.h" #include "core1/mem.h" #include "core1/ml.h" +#include "core1/mlmtx.h" #include "core1/pfsmanager.h" #include "core1/rarezip.h" #include "core1/sns.h" diff --git a/include/core1/mlmtx.h b/include/core1/mlmtx.h index 9ac1a288..0bf54369 100644 --- a/include/core1/mlmtx.h +++ b/include/core1/mlmtx.h @@ -1,9 +1,5 @@ -#ifndef __ML_MTX__ -#define __ML_MTX__ - -typedef struct { - f32 m[4][4]; -} MtxF; +#ifndef BANJO_KAZOOIE_CORE1_MLMTX_H +#define BANJO_KAZOOIE_CORE1_MLMTX_H void mlMtxGet(MtxF *dst); MtxF *mlMtx_get_stack_pointer(void); diff --git a/include/core1/viewport.h b/include/core1/viewport.h index 9295e3e7..509b9b02 100644 --- a/include/core1/viewport.h +++ b/include/core1/viewport.h @@ -1,11 +1,6 @@ #ifndef BANJO_KAZOOIE_CORE1_VIEWPORT_H #define BANJO_KAZOOIE_CORE1_VIEWPORT_H -#include -#include // for Cube -#include "ml/mtx.h" // for MtxF - - void viewport_moveAlongZAxis(f32 offset); f32 viewport_getDistance(f32 arg0[3]); void viewport_getLookVector(f32 arg0[3]); diff --git a/include/core2/animctrl.h b/include/core2/animctrl.h index 34062cb2..e044933c 100644 --- a/include/core2/animctrl.h +++ b/include/core2/animctrl.h @@ -3,7 +3,6 @@ #include #include "generic.h" -#include "ml/mtx.h" #ifndef NONMATCHING #define animctrl_start(this, file, line) _animctrl_start(this, file, line) diff --git a/include/functions.h b/include/functions.h index 23103ea0..542a30c1 100644 --- a/include/functions.h +++ b/include/functions.h @@ -14,7 +14,6 @@ #include "core2/core2.h" #include "math.h" // ToDo: sort out actual dependencies -#include "ml/mtx.h" #include "bs_funcs.h" #include "bsint.h" diff --git a/include/structs.h b/include/structs.h index a6bcd9cc..1232d677 100644 --- a/include/structs.h +++ b/include/structs.h @@ -47,6 +47,10 @@ typedef struct freelist_s{ #define FREE_LIST(T) struct freelist_s //^defined to keep element type with sla +typedef struct { + f32 m[4][4]; +} MtxF; + typedef struct bk_sprite_s{ s16 frameCnt; s16 type; diff --git a/src/FP/ch/scarfsled.c b/src/FP/ch/scarfsled.c index 6438f440..e4f658fb 100644 --- a/src/FP/ch/scarfsled.c +++ b/src/FP/ch/scarfsled.c @@ -1,7 +1,6 @@ #include #include "functions.h" #include "variables.h" -#include "ml/mtx.h" void chScarfSled_update(Actor *this); diff --git a/src/core1/mlmtx.c b/src/core1/mlmtx.c index 12cca18e..3bb4e7fd 100644 --- a/src/core1/mlmtx.c +++ b/src/core1/mlmtx.c @@ -6,8 +6,6 @@ #include "version.h" -#include "ml/mtx.h" - void _guRotateF(f32 mf[4][4], f32, f32, f32, f32); f32 func_80263FF0(f32); f32 cosf(f32); diff --git a/src/core2/code_630D0.c b/src/core2/code_630D0.c index 5d5aef8c..2c501aaf 100644 --- a/src/core2/code_630D0.c +++ b/src/core2/code_630D0.c @@ -2,7 +2,6 @@ #include "functions.h" #include "variables.h" #include "animation.h" -#include "ml/mtx.h" void *defrag(void *); diff --git a/src/core2/code_637D0.c b/src/core2/code_637D0.c index edb0513e..66e4091d 100644 --- a/src/core2/code_637D0.c +++ b/src/core2/code_637D0.c @@ -1,7 +1,6 @@ #include #include "functions.h" #include "variables.h" -#include "ml/mtx.h" extern void func_80252C08(f32[3], f32[3], f32, f32[3]); extern void func_80252CC4(f32[3], f32[3], f32, f32[3]); diff --git a/src/core2/code_6B030.c b/src/core2/code_6B030.c index 5bb7c268..ed2b237e 100644 --- a/src/core2/code_6B030.c +++ b/src/core2/code_6B030.c @@ -3,8 +3,6 @@ #include "functions.h" #include "variables.h" -#include "ml/mtx.h" - diff --git a/src/core2/code_72060.c b/src/core2/code_72060.c index 32845d06..473be387 100644 --- a/src/core2/code_72060.c +++ b/src/core2/code_72060.c @@ -2,7 +2,6 @@ #include "core1/core1.h" #include "functions.h" #include "variables.h" -#include "ml/mtx.h" typedef struct { u8 pad0[0xC]; diff --git a/src/core2/code_AEDA0.c b/src/core2/code_AEDA0.c index c706c8a7..7eaaea97 100644 --- a/src/core2/code_AEDA0.c +++ b/src/core2/code_AEDA0.c @@ -2,7 +2,6 @@ #include "core1/core1.h" #include "functions.h" #include "variables.h" -#include "ml/mtx.h" void func_80252330(f32, f32, f32); void func_803382D8(s32 arg0); diff --git a/src/core2/code_B8860.c b/src/core2/code_B8860.c index 65577b15..a450a231 100644 --- a/src/core2/code_B8860.c +++ b/src/core2/code_B8860.c @@ -2,7 +2,6 @@ #include "core1/core1.h" #include "functions.h" #include "variables.h" -#include "ml/mtx.h" extern void mlMtxRotatePYR(f32, f32, f32); diff --git a/src/core2/code_BD100.c b/src/core2/code_BD100.c index b7bae5f6..cebf6dea 100644 --- a/src/core2/code_BD100.c +++ b/src/core2/code_BD100.c @@ -2,7 +2,6 @@ #include "core1/core1.h" #include "functions.h" #include "variables.h" -#include "ml/mtx.h" extern void spriteRender_drawWithSegment(Gfx**, Vtx**, BKSprite *, s32, s32); diff --git a/src/core2/code_BE2C0.c b/src/core2/code_BE2C0.c index 2aaa7ada..6be762c5 100644 --- a/src/core2/code_BE2C0.c +++ b/src/core2/code_BE2C0.c @@ -3,8 +3,6 @@ #include "functions.h" #include "variables.h" -#include "ml/mtx.h" - #define LENGTH_SQ_VEC4F(v) (v[0]*v[0] + v[1]*v[1] + v[2]*v[2] + v[3]*v[3]) /* .data */ diff --git a/src/core2/gc/pauseMenu.c b/src/core2/gc/pauseMenu.c index e0ddaa28..79f02fa0 100644 --- a/src/core2/gc/pauseMenu.c +++ b/src/core2/gc/pauseMenu.c @@ -2,7 +2,6 @@ #include "core1/core1.h" #include "functions.h" #include "variables.h" -#include "ml/mtx.h" #include "zoombox.h" diff --git a/src/core2/gc/zoombox.c b/src/core2/gc/zoombox.c index 017af7af..06a6d86c 100644 --- a/src/core2/gc/zoombox.c +++ b/src/core2/gc/zoombox.c @@ -4,7 +4,6 @@ #include "functions.h" #include "variables.h" #include "zoombox.h" -#include "ml/mtx.h" void func_80252330(f32, f32, f32); diff --git a/src/core2/modelRender.c b/src/core2/modelRender.c index c30a8504..4bf95aad 100644 --- a/src/core2/modelRender.c +++ b/src/core2/modelRender.c @@ -6,7 +6,6 @@ #include "core2/modelRender.h" #include "animation.h" -#include "ml/mtx.h" #define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))