From ef0f1750d151e6da49040254862cec61d71e3e2f Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sun, 21 Jun 2026 19:17:04 -0400 Subject: [PATCH] Decomped sub_0205E090 Decomped by anonymous decomp.me user --- asm/include/main_0205E090.inc | 3 - asm/main_0205E090.s | 105 ---------------------------------- asm/overlay_29_022FC9C0.s | 1 + include/main_0205E01C.h | 1 + main.lsf | 1 - src/main_0205E01C.c | 40 +++++++++++++ 6 files changed, 42 insertions(+), 109 deletions(-) delete mode 100644 asm/include/main_0205E090.inc delete mode 100644 asm/main_0205E090.s diff --git a/asm/include/main_0205E090.inc b/asm/include/main_0205E090.inc deleted file mode 100644 index 7989b6a9..00000000 --- a/asm/include/main_0205E090.inc +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once -.public MISSION_DELIVER_LIST_PTR -.public sub_0205E01C diff --git a/asm/main_0205E090.s b/asm/main_0205E090.s deleted file mode 100644 index 02498336..00000000 --- a/asm/main_0205E090.s +++ /dev/null @@ -1,105 +0,0 @@ - .include "asm/macros.inc" - .include "main_0205E090.inc" - - .text - - arm_func_start sub_0205E090 -sub_0205E090: ; 0x0205E090 - stmdb sp!, {r4, r5, r6, r7, r8, lr} - mov r6, r0 - mov r5, r1 - mov r4, r2 - mov r8, #0 - ldr r7, _0205E1E4 ; =MISSION_DELIVER_LIST_PTR - b _0205E0D4 -_0205E0AC: - ldr r0, [r7, #0x18] - mov r1, r6 - mov r2, r5 - mov r3, r4 - add r0, r0, r8, lsl #5 - bl sub_0205E01C - cmp r0, #0 - movne r0, #1 - ldmneia sp!, {r4, r5, r6, r7, r8, pc} - add r8, r8, #1 -_0205E0D4: - cmp r8, #8 - blt _0205E0AC - mov r8, #0 - ldr r7, _0205E1E4 ; =MISSION_DELIVER_LIST_PTR - b _0205E114 -_0205E0E8: - ldr r0, [r7, #0x18] - mov r1, r6 - add r0, r0, #0x100 - mov r2, r5 - mov r3, r4 - add r0, r0, r8, lsl #5 - bl sub_0205E01C - cmp r0, #0 - movne r0, #1 - ldmneia sp!, {r4, r5, r6, r7, r8, pc} - add r8, r8, #1 -_0205E114: - cmp r8, #8 - blt _0205E0E8 - mov r8, #0 - ldr r7, _0205E1E4 ; =MISSION_DELIVER_LIST_PTR - b _0205E154 -_0205E128: - ldr r0, [r7, #0x18] - mov r1, r6 - add r0, r0, #0x200 - mov r2, r5 - mov r3, r4 - add r0, r0, r8, lsl #5 - bl sub_0205E01C - cmp r0, #0 - movne r0, #1 - ldmneia sp!, {r4, r5, r6, r7, r8, pc} - add r8, r8, #1 -_0205E154: - cmp r8, #8 - blt _0205E128 - mov r8, #0 - ldr r7, _0205E1E4 ; =MISSION_DELIVER_LIST_PTR - b _0205E194 -_0205E168: - ldr r0, [r7, #0x18] - mov r1, r6 - add r0, r0, #0x300 - mov r2, r5 - mov r3, r4 - add r0, r0, r8, lsl #5 - bl sub_0205E01C - cmp r0, #0 - movne r0, #1 - ldmneia sp!, {r4, r5, r6, r7, r8, pc} - add r8, r8, #1 -_0205E194: - cmp r8, #1 - blt _0205E168 - mov r8, #0 - ldr r7, _0205E1E4 ; =MISSION_DELIVER_LIST_PTR - b _0205E1D4 -_0205E1A8: - ldr r0, [r7, #0x18] - mov r1, r6 - add r0, r0, #0x320 - mov r2, r5 - mov r3, r4 - add r0, r0, r8, lsl #5 - bl sub_0205E01C - cmp r0, #0 - movne r0, #1 - ldmneia sp!, {r4, r5, r6, r7, r8, pc} - add r8, r8, #1 -_0205E1D4: - cmp r8, #1 - blt _0205E1A8 - mov r0, #0 - ldmia sp!, {r4, r5, r6, r7, r8, pc} - .align 2, 0 -_0205E1E4: .word MISSION_DELIVER_LIST_PTR - arm_func_end sub_0205E090 diff --git a/asm/overlay_29_022FC9C0.s b/asm/overlay_29_022FC9C0.s index 5d21a9e3..9ac73814 100644 --- a/asm/overlay_29_022FC9C0.s +++ b/asm/overlay_29_022FC9C0.s @@ -509,6 +509,7 @@ _022FD070: _022FD080: .word DUNGEON_PTR arm_func_end SpawnInitialMonsters +; https://decomp.me/scratch/x6LAV arm_func_start SpawnMonster SpawnMonster: ; 0x022FD084 #ifdef JAPAN diff --git a/include/main_0205E01C.h b/include/main_0205E01C.h index 868967ab..fdc333ef 100644 --- a/include/main_0205E01C.h +++ b/include/main_0205E01C.h @@ -13,5 +13,6 @@ struct unkStruct_0205E01C { }; bool8 sub_0205E01C(struct unkStruct_0205E01C *ptr, s32 arg1, s32 arg2, s32 arg3); +s32 sub_0205E090(s32 arg0, s32 arg1, s32 arg2); #endif //PMDSKY_MAIN_0205E01C_H diff --git a/main.lsf b/main.lsf index bb296097..1664cc61 100644 --- a/main.lsf +++ b/main.lsf @@ -191,7 +191,6 @@ Static main Object src/main_0205D11C.o Object asm/main_0205D1F4.o Object src/main_0205E01C.o - Object asm/main_0205E090.o Object src/main_0205E288.o Object asm/main_0205E48C.o Object src/main_0205E954.o diff --git a/src/main_0205E01C.c b/src/main_0205E01C.c index adc6e5e0..5c0f29e1 100644 --- a/src/main_0205E01C.c +++ b/src/main_0205E01C.c @@ -1,4 +1,7 @@ #include "main_0205E01C.h" +#include "mission.h" + +extern struct mission_deliver_list MISSION_DELIVER_LIST_PTR; s32 sub_0205E258(struct unkStruct_0205E01C *ptr); @@ -20,3 +23,40 @@ bool8 sub_0205E01C(struct unkStruct_0205E01C *ptr, s32 arg1, s32 arg2, s32 arg3) return FALSE; } + +s32 sub_0205E090(s32 arg0, s32 arg1, s32 arg2) +{ + s32 i; + + for(i = 0; i < 8; i++){ + if (sub_0205E01C((struct unkStruct_0205E01C*)(MISSION_DELIVER_LIST_PTR.unk18 + (i * 32)), arg0, arg1, arg2) != 0) { + return 1; + } + } + + for(i = 0; i < 8; i++){ + if (sub_0205E01C((struct unkStruct_0205E01C*)(MISSION_DELIVER_LIST_PTR.unk18 + 0x100 + (i * 32)), arg0, arg1, arg2) != 0) { + return 1; + } + } + + for(i = 0; i < 8; i++){ + if (sub_0205E01C((struct unkStruct_0205E01C*)(MISSION_DELIVER_LIST_PTR.unk18 + 0x200 + (i * 32)), arg0, arg1, arg2) != 0) { + return 1; + } + } + + for(i = 0; i < 1; i++){ + if (sub_0205E01C((struct unkStruct_0205E01C*)(MISSION_DELIVER_LIST_PTR.unk18 + 0x300 + (i * 32)), arg0, arg1, arg2) != 0) { + return 1; + } + } + + for(i = 0; i < 1; i++){ + if (sub_0205E01C((struct unkStruct_0205E01C*)(MISSION_DELIVER_LIST_PTR.unk18 + 0x320 + (i * 32)), arg0, arg1, arg2) != 0) { + return 1; + } + } + + return 0; +}