Merge pull request #238 from SethBarberee/overlay_29_02338560

decomp TrySpawnDoughSeedPoke
This commit is contained in:
AnonymousRandomPerson 2026-01-03 15:40:35 -05:00 committed by GitHub
commit cfc5a1d429
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 31 additions and 45 deletions

View File

@ -1,44 +0,0 @@
.include "asm/macros.inc"
.include "overlay_29_02338560.inc"
.text
; https://decomp.me/scratch/5EgdA
arm_func_start TrySpawnDoughSeedPoke
TrySpawnDoughSeedPoke: ; 0x02338560
stmdb sp!, {r3, lr}
ldr r0, _023385BC ; =DUNGEON_PTR
ldr r0, [r0]
add r0, r0, #0x4000
#ifdef JAPAN
ldrb r0, [r0, #0x24]
#else
ldrb r0, [r0, #0xc8]
#endif
cmp r0, #0
ldmeqia sp!, {r3, pc}
bl IsFullFloorFixedRoom
cmp r0, #0
bne _023385A4
ldr r1, _023385C0 ; =ov29_02352B5C
add r0, sp, #0
ldrh r2, [r1]
strh r2, [sp]
ldrh r1, [r1, #2]
strh r1, [sp, #2]
bl ov29_02344E88
_023385A4:
ldr r0, _023385BC ; =DUNGEON_PTR
mov r1, #0
ldr r0, [r0]
add r0, r0, #0x4000
#ifdef JAPAN
strb r1, [r0, #0x24]
#else
strb r1, [r0, #0xc8]
#endif
ldmia sp!, {r3, pc}
.align 2, 0
_023385BC: .word DUNGEON_PTR
_023385C0: .word ov29_02352B5C
arm_func_end TrySpawnDoughSeedPoke

View File

@ -0,0 +1,6 @@
#ifndef PMDSKY_OVERLAY_29_02338560_H
#define PMDSKY_OVERLAY_29_02338560_H
void TrySpawnDoughSeedPoke(void);
#endif /* ifndef PMDSKY_OVERLAY_29_02338560_H */

View File

@ -650,7 +650,7 @@ Overlay OVY_29
Object src/overlay_29_0233836C.o
Object asm/overlay_29_023383A8.o
Object src/overlay_29_02338548.o
Object asm/overlay_29_02338560.o
Object src/overlay_29_02338560.o
Object src/overlay_29_02338604.o
Object asm/overlay_29_0233861C.o
Object src/overlay_29_02340CAC.o

24
src/overlay_29_02338560.c Normal file
View File

@ -0,0 +1,24 @@
#include "overlay_29_02338560.h"
#include "dungeon.h"
#include "fixed_room_data_1.h"
extern u16 ov29_02352B5C[2];
void ov29_02344E88(s16 *param_1);
void TrySpawnDoughSeedPoke(void)
{
s16 arr[2];
if (!DUNGEON_PTR[0]->gen_info.dough_seed_extra_poke_flag) {
return;
}
if (!IsFullFloorFixedRoom()) {
arr[0] = ov29_02352B5C[0];
arr[1] = ov29_02352B5C[1];
ov29_02344E88(arr);
}
DUNGEON_PTR[0]->gen_info.dough_seed_extra_poke_flag = FALSE;
}