From 3e2d83b5522551427f35c4f2608cd6eef82a7cca Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Mon, 6 Apr 2026 16:25:40 -0700 Subject: [PATCH] more dungeon_init funcs --- asm/main_0204EFE0.s | 24 ------------------------ include/dungeon_init.h | 2 ++ main.lsf | 1 - src/dungeon_init.c | 11 ++++++++++- 4 files changed, 12 insertions(+), 26 deletions(-) delete mode 100644 asm/main_0204EFE0.s diff --git a/asm/main_0204EFE0.s b/asm/main_0204EFE0.s deleted file mode 100644 index 1e0fd87d..00000000 --- a/asm/main_0204EFE0.s +++ /dev/null @@ -1,24 +0,0 @@ - .include "asm/macros.inc" - .include "main_0204EFE0.inc" - - .text - - arm_func_start sub_0204F024 -sub_0204F024: ; 0x0204F024 - ldr r1, _0204F030 ; =PENDING_DUNGEON_ID - strb r0, [r1, #0xe] - bx lr - .align 2, 0 -_0204F030: .word PENDING_DUNGEON_ID - arm_func_end sub_0204F024 - - arm_func_start sub_0204F034 -sub_0204F034: ; 0x0204F034 - stmdb sp!, {r3, lr} - mov r0, #0 - mov r1, #0x28 - bl LoadScriptVariableValue - mov r0, r0, lsl #0x18 - mov r0, r0, asr #0x18 - ldmia sp!, {r3, pc} - arm_func_end sub_0204F034 diff --git a/include/dungeon_init.h b/include/dungeon_init.h index aab56900..3fa33a92 100644 --- a/include/dungeon_init.h +++ b/include/dungeon_init.h @@ -95,5 +95,7 @@ struct dungeon_init { void sub_0204E974(s8 arg0); void InitDungeonInit(struct dungeon_init* dg_init, s16 dungeon_idx); s32 IsNoLossPenaltyDungeon(s16 dungeon_id); +void sub_0204F024(s32 value); +s8 sub_0204F034(void); #endif //PMDSKY_DUNGEON_INIT diff --git a/main.lsf b/main.lsf index eb255dd7..81776f2f 100644 --- a/main.lsf +++ b/main.lsf @@ -88,7 +88,6 @@ Static main Object src/main_0204DD80.o Object asm/main_0204DE7C.o Object src/dungeon_init.o - Object asm/main_0204EFE0.o Object src/main_0204F050.o Object asm/main_0204F0A0.o Object src/main_0204FDFC.o diff --git a/src/dungeon_init.c b/src/dungeon_init.c index 177cef08..78c808a7 100644 --- a/src/dungeon_init.c +++ b/src/dungeon_init.c @@ -3,6 +3,7 @@ #include "enums.h" #include "game_mode.h" #include "main_0205BD14.h" +#include "nitro/types.h" #include "progression.h" #include "script_variable.h" @@ -268,7 +269,7 @@ s32 IsNoLossPenaltyDungeon(s16 dungeon_id) { return_val = TRUE; break; case DUNGEON_DEEP_STAR_CAVE_TEAM_ROGUE: - if(LoadScriptVariableValue(NULL, DUNGEON_STEAM_CAVE_PEAK) == 0) { + if(LoadScriptVariableValue(NULL, VAR_SIDE01_BOSS2ND) == 0) { return_val = TRUE; } break; @@ -278,3 +279,11 @@ s32 IsNoLossPenaltyDungeon(s16 dungeon_id) { return return_val; } + +void sub_0204F024(s32 value) { + PENDING_DUNGEON_ID.field_0xE = value; +} + +s8 sub_0204F034(void) { + return LoadScriptVariableValue(NULL, VAR_DUNGEON_ENTER_MODE); +}