diff --git a/asm/nonmatchings/code_8560/create_cameras_a.s b/asm/nonmatchings/code_8800/create_cameras_a.s similarity index 100% rename from asm/nonmatchings/code_8560/create_cameras_a.s rename to asm/nonmatchings/code_8800/create_cameras_a.s diff --git a/asm/nonmatchings/code_8560/create_cameras_b.s b/asm/nonmatchings/code_8800/create_cameras_b.s similarity index 100% rename from asm/nonmatchings/code_8560/create_cameras_b.s rename to asm/nonmatchings/code_8800/create_cameras_b.s diff --git a/asm/nonmatchings/code_8560/func_8002E82C.s b/asm/nonmatchings/code_8800/func_8002E82C.s similarity index 100% rename from asm/nonmatchings/code_8560/func_8002E82C.s rename to asm/nonmatchings/code_8800/func_8002E82C.s diff --git a/asm/nonmatchings/code_8560/get_screen_coords.s b/asm/nonmatchings/code_8800/get_screen_coords.s similarity index 100% rename from asm/nonmatchings/code_8560/get_screen_coords.s rename to asm/nonmatchings/code_8800/get_screen_coords.s diff --git a/asm/nonmatchings/code_8560/initialize_next_camera.s b/asm/nonmatchings/code_8800/initialize_next_camera.s similarity index 100% rename from asm/nonmatchings/code_8560/initialize_next_camera.s rename to asm/nonmatchings/code_8800/initialize_next_camera.s diff --git a/asm/nonmatchings/code_8560/render_frame.s b/asm/nonmatchings/code_8800/render_frame.s similarity index 100% rename from asm/nonmatchings/code_8560/render_frame.s rename to asm/nonmatchings/code_8800/render_frame.s diff --git a/asm/nonmatchings/code_8560/set_cam_viewport.s b/asm/nonmatchings/code_8800/set_cam_viewport.s similarity index 100% rename from asm/nonmatchings/code_8560/set_cam_viewport.s rename to asm/nonmatchings/code_8800/set_cam_viewport.s diff --git a/asm/nonmatchings/code_8560/update_cameras.s b/asm/nonmatchings/code_8800/update_cameras.s similarity index 100% rename from asm/nonmatchings/code_8560/update_cameras.s rename to asm/nonmatchings/code_8800/update_cameras.s diff --git a/asm/nonmatchings/code_ad90_len_2880/do_camera_type_3.s b/asm/nonmatchings/code_B0E0/do_camera_type_3.s similarity index 100% rename from asm/nonmatchings/code_ad90_len_2880/do_camera_type_3.s rename to asm/nonmatchings/code_B0E0/do_camera_type_3.s diff --git a/asm/nonmatchings/code_ad90_len_2880/do_camera_type_5.s b/asm/nonmatchings/code_B0E0/do_camera_type_5.s similarity index 100% rename from asm/nonmatchings/code_ad90_len_2880/do_camera_type_5.s rename to asm/nonmatchings/code_B0E0/do_camera_type_5.s diff --git a/asm/nonmatchings/code_ad90_len_2880/do_camera_type_unused.s b/asm/nonmatchings/code_B0E0/do_camera_type_unused.s similarity index 100% rename from asm/nonmatchings/code_ad90_len_2880/do_camera_type_unused.s rename to asm/nonmatchings/code_B0E0/do_camera_type_unused.s diff --git a/asm/nonmatchings/code_ad90_len_2880/func_80030210.s b/asm/nonmatchings/code_B0E0/func_80030210.s similarity index 100% rename from asm/nonmatchings/code_ad90_len_2880/func_80030210.s rename to asm/nonmatchings/code_B0E0/func_80030210.s diff --git a/asm/nonmatchings/code_ad90_len_2880/func_8003034C.s b/asm/nonmatchings/code_B0E0/func_8003034C.s similarity index 100% rename from asm/nonmatchings/code_ad90_len_2880/func_8003034C.s rename to asm/nonmatchings/code_B0E0/func_8003034C.s diff --git a/asm/nonmatchings/code_ad90_len_2880/func_800304FC.s b/asm/nonmatchings/code_B0E0/func_800304FC.s similarity index 100% rename from asm/nonmatchings/code_ad90_len_2880/func_800304FC.s rename to asm/nonmatchings/code_B0E0/func_800304FC.s diff --git a/asm/nonmatchings/code_ad90_len_2880/test_ray_zone_aabb.s b/asm/nonmatchings/code_B0E0/test_ray_zone_aabb.s similarity index 100% rename from asm/nonmatchings/code_ad90_len_2880/test_ray_zone_aabb.s rename to asm/nonmatchings/code_B0E0/test_ray_zone_aabb.s diff --git a/src/code_8560.c b/src/code_8560.c index c9df80593e..99fdfd8ffb 100644 --- a/src/code_8560.c +++ b/src/code_8560.c @@ -1,53 +1,3 @@ #include "common.h" INCLUDE_ASM(s32, "code_8560", func_8002D160); - -INCLUDE_ASM(s32, "code_8560", update_cameras); - -INCLUDE_ASM(s32, "code_8560", render_frame); - -INCLUDE_ASM(s32, "code_8560", create_cameras_a); - -INCLUDE_ASM(s32, "code_8560", create_cameras_b); - -INCLUDE_ASM(s32, "code_8560", initialize_next_camera); - -INCLUDE_ASM(void, "code_8560", set_cam_viewport, s16 id, s16 x, s16 y, s16 width, s16 height); - -void get_cam_viewport(s32 camID, u16* x, u16* y, u16* width, u16* height) { - *width = CAM(camID)->viewportW; - *height = CAM(camID)->viewportH; - *x = CAM(camID)->viewportStartX; - *y = CAM(camID)->viewportStartY; -} - -INCLUDE_ASM(void, "code_8560", get_screen_coords, Cam camID, f32 x, f32 y, f32 z, f32* outX, f32* outY, f32* outZ); - -s32 func_8002E754(s32 camID, s32 x, s32 y) { - s32 startX = CAM(camID)->viewportStartX; - s32 startY = CAM(camID)->viewportStartY; - s32 endX = startX + CAM(camID)->viewportW; - s32 endY = startY + CAM(camID)->viewportH; - - if (x < startX) { - return TRUE; - } else if (x > endX) { - return TRUE; - } else if (y < startY) { - return TRUE; - } else if (y > endY) { - return TRUE; - } else { - return FALSE; - } -} - - -void func_8002E7CC(s32 camID, s32* x, s32* y, s32* width, s32* height) { - *x = CAM(camID)->viewportStartX; - *y = CAM(camID)->viewportStartY; - *width = CAM(camID)->viewportStartX + CAM(camID)->viewportW; - *height = CAM(camID)->viewportStartY + CAM(camID)->viewportH; -} - -INCLUDE_ASM(s32, "code_8560", func_8002E82C); diff --git a/src/code_8800.c b/src/code_8800.c new file mode 100644 index 0000000000..7443611065 --- /dev/null +++ b/src/code_8800.c @@ -0,0 +1,50 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_8800", update_cameras); + +INCLUDE_ASM(s32, "code_8800", render_frame); + +INCLUDE_ASM(s32, "code_8800", create_cameras_a); + +INCLUDE_ASM(s32, "code_8800", create_cameras_b); + +INCLUDE_ASM(s32, "code_8800", initialize_next_camera); + +INCLUDE_ASM(void, "code_8800", set_cam_viewport, s16 id, s16 x, s16 y, s16 width, s16 height); + +void get_cam_viewport(s32 camID, u16* x, u16* y, u16* width, u16* height) { + *width = CAM(camID)->viewportW; + *height = CAM(camID)->viewportH; + *x = CAM(camID)->viewportStartX; + *y = CAM(camID)->viewportStartY; +} + +INCLUDE_ASM(void, "code_8800", get_screen_coords, Cam camID, f32 x, f32 y, f32 z, f32* outX, f32* outY, f32* outZ); + +s32 func_8002E754(s32 camID, s32 x, s32 y) { + s32 startX = CAM(camID)->viewportStartX; + s32 startY = CAM(camID)->viewportStartY; + s32 endX = startX + CAM(camID)->viewportW; + s32 endY = startY + CAM(camID)->viewportH; + + if (x < startX) { + return TRUE; + } else if (x > endX) { + return TRUE; + } else if (y < startY) { + return TRUE; + } else if (y > endY) { + return TRUE; + } else { + return FALSE; + } +} + +void func_8002E7CC(s32 camID, s32* x, s32* y, s32* width, s32* height) { + *x = CAM(camID)->viewportStartX; + *y = CAM(camID)->viewportStartY; + *width = CAM(camID)->viewportStartX + CAM(camID)->viewportW; + *height = CAM(camID)->viewportStartY + CAM(camID)->viewportH; +} + +INCLUDE_ASM(s32, "code_8800", func_8002E82C); diff --git a/src/code_B0E0.c b/src/code_B0E0.c new file mode 100644 index 0000000000..8e8ab67b8a --- /dev/null +++ b/src/code_B0E0.c @@ -0,0 +1,18 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_B0E0", do_camera_type_unused); + +INCLUDE_ASM(s32, "code_B0E0", do_camera_type_5); + +INCLUDE_ASM(s32, "code_B0E0", func_80030210); + +INCLUDE_ASM(s32, "code_B0E0", func_8003034C); + +void func_80030450(void) { +} + +INCLUDE_ASM(s32, "code_B0E0", test_ray_zone_aabb); + +INCLUDE_ASM(s32, "code_B0E0", func_800304FC); + +INCLUDE_ASM(s32, "code_B0E0", do_camera_type_3); diff --git a/src/code_ad90_len_2880.c b/src/code_ad90_len_2880.c index 1d162c8702..f9f0cb54a4 100644 --- a/src/code_ad90_len_2880.c +++ b/src/code_ad90_len_2880.c @@ -1,20 +1,3 @@ #include "common.h" INCLUDE_ASM(s32, "code_ad90_len_2880", do_camera_type_6); - -INCLUDE_ASM(s32, "code_ad90_len_2880", do_camera_type_unused); - -INCLUDE_ASM(s32, "code_ad90_len_2880", do_camera_type_5); - -INCLUDE_ASM(s32, "code_ad90_len_2880", func_80030210); - -INCLUDE_ASM(s32, "code_ad90_len_2880", func_8003034C); - -void func_80030450(void) { -} - -INCLUDE_ASM(s32, "code_ad90_len_2880", test_ray_zone_aabb); - -INCLUDE_ASM(s32, "code_ad90_len_2880", func_800304FC); - -INCLUDE_ASM(s32, "code_ad90_len_2880", do_camera_type_3); diff --git a/tools/splat.yaml b/tools/splat.yaml index e64260b2d0..578981e85f 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -44,8 +44,10 @@ segments: - [0x7e40, c, os/code_7e40_len_3f0] - [0x8230, c, os/nusys/nuSiMgr] - [0x8560, c] + - [0x8800, c] - [0x9d10, c, code_9d10_len_1080] - [0xad90, c, code_ad90_len_2880] + - [0xB0E0, c] - [0xd610, c, code_d610_len_1330] - [0xe940, c, code_e940_len_290] - [0xebd0, c, code_ebd0_len_6a0] @@ -92,7 +94,7 @@ segments: - [0x3b2f0, c, os/nusys/nuContRmbCheck] - [0x3b390, c, os/nusys/nuContRmbModeSet] - [0x3b4a0, c, os/nusys/code_3B4A0] - - [0x3B5F0, c, os/nusys/nuGfxThread] + - [0x3B5F0, c, os/nusys/nuGfxThread] # End of nusys - [0x3b710, c, os/code_3b710_len_40] - [0x3b750, c, os/code_3b750_len_20] - [0x3b770, c, os/code_3b770_len_80]