mirror of
https://github.com/pret/pmd-sky.git
synced 2026-04-26 08:35:04 -05:00
Merge pull request #238 from SethBarberee/overlay_29_02338560
decomp TrySpawnDoughSeedPoke
This commit is contained in:
commit
cfc5a1d429
|
|
@ -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
|
|
||||||
6
include/overlay_29_02338560.h
Normal file
6
include/overlay_29_02338560.h
Normal 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 */
|
||||||
2
main.lsf
2
main.lsf
|
|
@ -650,7 +650,7 @@ Overlay OVY_29
|
||||||
Object src/overlay_29_0233836C.o
|
Object src/overlay_29_0233836C.o
|
||||||
Object asm/overlay_29_023383A8.o
|
Object asm/overlay_29_023383A8.o
|
||||||
Object src/overlay_29_02338548.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 src/overlay_29_02338604.o
|
||||||
Object asm/overlay_29_0233861C.o
|
Object asm/overlay_29_0233861C.o
|
||||||
Object src/overlay_29_02340CAC.o
|
Object src/overlay_29_02340CAC.o
|
||||||
|
|
|
||||||
24
src/overlay_29_02338560.c
Normal file
24
src/overlay_29_02338560.c
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user