diff --git a/Makefile b/Makefile index 0e4829721e..4b47220e92 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,10 @@ SHELL=/bin/bash -o pipefail # BUILD_DIR is location where all build artifacts are placed BUILD_DIR = build -WORLD_AREAS := $(foreach dir, $(wildcard src/world/*), $(dir:src/world/%=%)) - -SRC_DIRS := src src/os src/os/nusys $(foreach area,$(WORLD_AREAS),src/world/$(area)) +SRC_DIRS := $(shell find src -type d) ASM_DIRS := asm asm/os INCLUDE_DIRS := include include/PR src -DATA_DIRS := bin bin/world $(foreach area,$(WORLD_AREAS),bin/world/$(area)) +DATA_DIRS := $(shell find bin -type d -not -name Yay0) YAY0_DIRS := bin/Yay0 ASSETS_FS_DIRS := assets/fs diff --git a/asm/nonmatchings/world/area_sbk/sbk_00/func_80240000_929270.s b/asm/nonmatchings/world/area_sbk/sbk_00/func_80240000_929270.s deleted file mode 100644 index 5d2adaa84e..0000000000 --- a/asm/nonmatchings/world/area_sbk/sbk_00/func_80240000_929270.s +++ /dev/null @@ -1,20 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_929270 -/* 929270 80240000 44800000 */ mtc1 $zero, $f0 -/* 929274 80240004 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 929278 80240008 44050000 */ mfc1 $a1, $f0 -/* 92927C 8024000C 0000202D */ daddu $a0, $zero, $zero -/* 929280 80240010 AFBF0018 */ sw $ra, 0x18($sp) -/* 929284 80240014 AFA00014 */ sw $zero, 0x14($sp) -/* 929288 80240018 E7A00010 */ swc1 $f0, 0x10($sp) -/* 92928C 8024001C 00A0302D */ daddu $a2, $a1, $zero -/* 929290 80240020 0C01CA54 */ jal func_80072950 -/* 929294 80240024 00A0382D */ daddu $a3, $a1, $zero -/* 929298 80240028 8FBF0018 */ lw $ra, 0x18($sp) -/* 92929C 8024002C 24020002 */ addiu $v0, $zero, 2 -/* 9292A0 80240030 03E00008 */ jr $ra -/* 9292A4 80240034 27BD0020 */ addiu $sp, $sp, 0x20 -/* 9292A8 80240038 00000000 */ nop -/* 9292AC 8024003C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_sbk/sbk_00/func_80240040_929270.s b/asm/nonmatchings/world/area_sbk/sbk_00/func_80240040_929270.s deleted file mode 100644 index f2d33af5cd..0000000000 --- a/asm/nonmatchings/world/area_sbk/sbk_00/func_80240040_929270.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240040_9292B0 -/* 9292B0 80240040 8C830148 */ lw $v1, 0x148($a0) -/* 9292B4 80240044 24020003 */ addiu $v0, $zero, 3 -/* 9292B8 80240048 A06200B5 */ sb $v0, 0xb5($v1) -/* 9292BC 8024004C 03E00008 */ jr $ra -/* 9292C0 80240050 24020002 */ addiu $v0, $zero, 2 -/* 9292C4 80240054 00000000 */ nop -/* 9292C8 80240058 00000000 */ nop -/* 9292CC 8024005C 00000000 */ nop diff --git a/include/functions.h b/include/functions.h index aa88864b26..638278faba 100644 --- a/include/functions.h +++ b/include/functions.h @@ -32,6 +32,8 @@ s32 get_model_list_index_from_tree_index(s32 treeIndex); void get_model_center_and_size(s32 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY, f32* sizeZ); +void func_80072950(s32, f32, f32, f32, f32, s32 time); + void update_collider_transform(s16 colliderID); void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z); diff --git a/src/os/code_4ac90_len_3910.c b/src/os/code_4ac90_len_3910.c index 17e359d698..380c88ec1c 100644 --- a/src/os/code_4ac90_len_3910.c +++ b/src/os/code_4ac90_len_3910.c @@ -260,7 +260,7 @@ INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072890); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800728F0); -INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_80072950); +INCLUDE_ASM(void, "os/code_4ac90_len_3910", func_80072950, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 time); INCLUDE_ASM(s32, "os/code_4ac90_len_3910", func_800729B0); diff --git a/src/world/area_sbk/sbk_00.c b/src/world/area_sbk/sbk_00.c deleted file mode 100644 index 99fd595f30..0000000000 --- a/src/world/area_sbk/sbk_00.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "world/area_sbk/sbk_00", func_80240000_929270); - -INCLUDE_ASM(s32, "world/area_sbk/sbk_00", func_80240040_929270); diff --git a/src/world/area_sbk/sbk_00/sbk_00.c b/src/world/area_sbk/sbk_00/sbk_00.c new file mode 100644 index 0000000000..2163ccc91e --- /dev/null +++ b/src/world/area_sbk/sbk_00/sbk_00.c @@ -0,0 +1,3 @@ +#include "common.h" + +#include "world/common/SpawnSunEffect.c" diff --git a/src/world/area_sbk/sbk_00/sbk_00_2.c b/src/world/area_sbk/sbk_00/sbk_00_2.c new file mode 100644 index 0000000000..efbbd5527f --- /dev/null +++ b/src/world/area_sbk/sbk_00/sbk_00_2.c @@ -0,0 +1,7 @@ +#include "common.h" + +//INCLUDE_ASM(s32, "world/area_sbk/sbk_00", func_80240040_929270); +ApiStatus func_80240040_929270(ScriptInstance* script, s32 isInitialCall) { + script->ownerActorID->unk_B5 = 3; + return ApiStatus_DONE2; +} diff --git a/src/world/area_sbk/sbk_01.c b/src/world/area_sbk/sbk_01.c index 573791a2b4..f1e2937cd4 100644 --- a/src/world/area_sbk/sbk_01.c +++ b/src/world/area_sbk/sbk_01.c @@ -1,5 +1,6 @@ #include "common.h" +//#include "world/common/SpawnSunEffect.c" INCLUDE_ASM(s32, "world/area_sbk/sbk_01", func_80240000_929A90); INCLUDE_ASM(s32, "world/area_sbk/sbk_01", func_80240040_929A90); diff --git a/src/world/common/SpawnSunEffect.c b/src/world/common/SpawnSunEffect.c new file mode 100644 index 0000000000..a8ae6ba016 --- /dev/null +++ b/src/world/common/SpawnSunEffect.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus SpawnSunEffect(ScriptInstance* script, s32 isInitialCall) { + func_80072950(0, 0.0f, 0.0f, 0.0f, 0.0f, 0); + return ApiStatus_DONE2; +} diff --git a/tools/splat.yaml b/tools/splat.yaml index 235a6c2700..7a88f007a0 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -1249,7 +1249,8 @@ segments: start: 0x929270 vram: 0x80240000 files: - - [0x929270, "c", "world/area_sbk/sbk_00"] + - [0x929270, "c", "world/area_sbk/sbk_00/sbk_00"] + - [0x9292B0, "c", "world/area_sbk/sbk_00/sbk_00_2"] - [0x9292D0, "bin", "world/area_sbk/sbk_00_data"] - name: world/area_sbk/sbk_01 type: code