Decomped ov31_023837C8

Decomped by anonymous user (https://decomp.me/scratch/roJ4e)
This commit is contained in:
AnonymousRandomPerson 2025-07-17 21:56:30 -04:00
parent 397c0f7d76
commit c607247fdb
5 changed files with 27 additions and 48 deletions

View File

@ -2,15 +2,12 @@
.public AdvanceFrame
.public CloseInventoryMenu
.public CloseScrollBox
.public CloseTextBox2
.public CreateScrollBoxSingle
.public DUNGEON_WINDOW_PARAMS_8
.public GetItemToUse
.public GetLeader
.public IsScrollBoxActive
.public MemFree
.public OVERLAY31_UNKNOWN_POINTER__NA_238A26C
.public PositionHasItem
.public ov10_022BCD10
.public ov29_0234E988
.public sub_020282F4

View File

@ -115,46 +115,3 @@ _023837B4:
strb r0, [r7]
ldmia sp!, {r3, r4, r5, r6, r7, pc}
arm_func_end ov31_02383768
arm_func_start ov31_023837C8
ov31_023837C8: ; 0x023837C8
stmdb sp!, {r3, lr}
ldr r0, _02383850 ; =OVERLAY31_UNKNOWN_POINTER__NA_238A26C
ldr r0, [r0]
add r0, r0, #0x92
add r0, r0, #0x1100
bl ov29_0234E988
ldr r0, _02383850 ; =OVERLAY31_UNKNOWN_POINTER__NA_238A26C
mvn r1, #1
ldr r0, [r0]
add r0, r0, #0x1100
ldrsb r0, [r0, #0x94]
cmp r0, r1
beq _02383800
bl CloseTextBox2
_02383800:
ldr r0, _02383850 ; =OVERLAY31_UNKNOWN_POINTER__NA_238A26C
mvn r1, #1
ldr r0, [r0]
add r0, r0, #0x1100
ldrsb r0, [r0, #0x95]
cmp r0, r1
beq _02383820
bl CloseTextBox2
_02383820:
ldr r0, _02383850 ; =OVERLAY31_UNKNOWN_POINTER__NA_238A26C
ldr r0, [r0]
add r0, r0, #0x93
add r0, r0, #0x1100
bl ov31_02383768
ldr r0, _02383850 ; =OVERLAY31_UNKNOWN_POINTER__NA_238A26C
ldr r0, [r0]
bl MemFree
ldr r0, _02383850 ; =OVERLAY31_UNKNOWN_POINTER__NA_238A26C
mov r1, #0
str r1, [r0]
ldmia sp!, {r3, pc}
.align 2, 0
_02383850: .word OVERLAY31_UNKNOWN_POINTER__NA_238A26C
arm_func_end ov31_023837C8

View File

@ -4,9 +4,15 @@
#include "dungeon_mode.h"
struct loc_struct {
u8 PAD_0x0000[4508];
u8 PAD_0x0[0x1192];
u8 field_0x1192;
u8 field_0x1193;
s8 field_0x1194;
s8 field_0x1195;
u8 PAD_0x1196[6];
s16* field_0x119C;
u8 PAD_0x11A0[18];
u8 PAD_0x11A0[17];
u8 field_0x11b1;
u8 field_0x11B2;
u8 field_0x11B3;
struct item* field_0x11B4;

View File

@ -5,6 +5,8 @@ struct window
{
};
// Cleans up and frees OVERLAY31_UNKNOWN_POINTER__NA_238A26C
void ov31_023837C8(void);
void ov31_02383854(struct window* w);
void ov31_02383880(u8* arg1);

View File

@ -4,9 +4,26 @@
#include "overlay_31_02383478.h"
extern struct dungeon* DUNGEON_PTR[];
extern struct loc_struct* OVERLAY31_UNKNOWN_POINTER__NA_238A26C;
extern void ov29_0234E988(u8*);
extern void CloseTextBox2();
extern void ov31_02383768(u8*);
extern void MemFree(void*);
extern void DrawTextInWindow(struct window*, u32, u32, u8*);
void ov31_023837C8(void)
{
ov29_0234E988(&(OVERLAY31_UNKNOWN_POINTER__NA_238A26C->field_0x1192));
if ((OVERLAY31_UNKNOWN_POINTER__NA_238A26C->field_0x1194) != -2)
CloseTextBox2();
if ((OVERLAY31_UNKNOWN_POINTER__NA_238A26C->field_0x1195) != -2)
CloseTextBox2();
ov31_02383768(&(OVERLAY31_UNKNOWN_POINTER__NA_238A26C->field_0x1193));
MemFree(OVERLAY31_UNKNOWN_POINTER__NA_238A26C);
OVERLAY31_UNKNOWN_POINTER__NA_238A26C = NULL;
}
void ov31_02383854(struct window* w)
{
DrawTextInWindow(w, 2, 2, StringFromId(0x08e6));