From 83afce7528a5ac0b123d7f5bc6afbc23583ab396 Mon Sep 17 00:00:00 2001 From: Aleksandr Shabelnikov Date: Thu, 5 Dec 2024 12:17:29 +0100 Subject: [PATCH] `no1` dedupe has begun (#1973) --- config/splat.us.stno1.yaml | 4 ++++ config/symbols.us.stno1.txt | 12 ++++++++++++ src/st/no1/collision.c | 6 +----- src/st/no1/no1.h | 6 ++++++ src/st/no1/st_update.c | 9 ++------- 5 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 src/st/no1/no1.h diff --git a/config/splat.us.stno1.yaml b/config/splat.us.stno1.yaml index 7f1e521b9d..e28ce51d3b 100644 --- a/config/splat.us.stno1.yaml +++ b/config/splat.us.stno1.yaml @@ -39,6 +39,9 @@ segments: subalign: 4 subsegments: - [0x0, data] + - [0x1A5C, .data, st_update] + - [0x1A88, .data, collision] + - [0x1E48, data] - [0x34670, .rodata, first_c_file] - [0x34670, .rodata, e_red_door] - [0x348A8, .rodata, st_common] @@ -67,4 +70,5 @@ segments: - [0x4DDD8, c, unk_4DDD8] - [0x55AF8, c, prim_helpers] - [0x56328, sbss] + # - [0x57024, .bss, e_collect] - [0x57064] diff --git a/config/symbols.us.stno1.txt b/config/symbols.us.stno1.txt index 7fc7b70fa3..d341222b8f 100644 --- a/config/symbols.us.stno1.txt +++ b/config/symbols.us.stno1.txt @@ -1,6 +1,17 @@ +g_EInitDamageNum = 0x801809BC; D_80180C88 = 0x80180A58; D_80180C94 = 0x80180A64; D_80180CA0 = 0x80180A70; +g_testCollRandTable = 0x801814FC; +UNK_Invincibility0 = 0x80181A5C; +g_testCollEnemyLookup = 0x80181A88; +g_testCollLuckCutoff = 0x80181DA8; +g_testColluCoords = 0x80181DAC; +g_testCollvCoords = 0x80181DB4; +g_testCollElementLookup = 0x80181DBC; +g_testColliFrames = 0x80181DD0; +g_testCollPrizeTable = 0x80181DDC; +g_eDamageDisplayClut = 0x80181E38; D_80182424 = 0x80182774; D_80182488 = 0x801827D8; D_801824B8 = 0x80182808; @@ -113,3 +124,4 @@ PrimResetNext = 0x801D6164; UnkPolyFunc2 = 0x801D6244; UnkPolyFunc0 = 0x801D6298; PrimDecreaseBrightness = 0x801D62C4; +g_ItemIconSlots = 0x801D7024; diff --git a/src/st/no1/collision.c b/src/st/no1/collision.c index b04e06048e..ac4b650865 100644 --- a/src/st/no1/collision.c +++ b/src/st/no1/collision.c @@ -1,6 +1,2 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -#include "common.h" - -INCLUDE_ASM("st/no1/nonmatchings/collision", HitDetection); - -INCLUDE_ASM("st/no1/nonmatchings/collision", EntityDamageDisplay); +#include "../collision.h" diff --git a/src/st/no1/no1.h b/src/st/no1/no1.h new file mode 100644 index 0000000000..3c0518e6cf --- /dev/null +++ b/src/st/no1/no1.h @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +#include "stage.h" + +#define STAGE_IS_NO1 + +#define OVL_EXPORT(x) NO1_##x diff --git a/src/st/no1/st_update.c b/src/st/no1/st_update.c index a68febd43f..456d22e131 100644 --- a/src/st/no1/st_update.c +++ b/src/st/no1/st_update.c @@ -1,8 +1,3 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -#include "common.h" - -INCLUDE_ASM("st/no1/nonmatchings/st_update", Random); - -INCLUDE_ASM("st/no1/nonmatchings/st_update", Update); - -INCLUDE_ASM("st/no1/nonmatchings/st_update", UpdateStageEntities); +#include "no1.h" +#include "../st_update.h"