decomp sub_809922E0

This commit is contained in:
Seth Barberee
2024-12-26 14:17:38 -08:00
parent bbfe80ea0c
commit e4d8d9002d
2 changed files with 17 additions and 41 deletions

View File

@@ -255,44 +255,3 @@ _080992D4: .4byte gUnknown_20398C4
_080992D8: .4byte gUnknown_2039950
_080992DC: .4byte gUnknown_20398C8 + 0x10
thumb_func_end sub_809927C
thumb_func_start sub_80992E0
sub_80992E0:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
movs r0, 0
movs r1, 0x13
bl GetScriptVarValue
lsls r0, 16
asrs r1, r0, 16
movs r0, 0x1
negs r0, r0
cmp r1, r0
beq _08099316
cmp r1, 0x50
beq _08099316
cmp r1, 0x51
beq _08099316
cmp r1, 0x52
beq _08099316
strh r1, [r4]
movs r0, 0
movs r1, 0x14
bl GetScriptVarValue
strh r0, [r5]
movs r0, 0x1
b _08099322
_08099316:
movs r1, 0x1
negs r1, r1
adds r0, r1, 0
strh r0, [r4]
strh r0, [r5]
movs r0, 0
_08099322:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80992E0

View File

@@ -2,6 +2,23 @@
#include "code_80A26CC.h"
#include "event_flag.h"
u8 sub_80992E0(s16 *param_1, s16 *param_2)
{
s32 sVar2;
sVar2 = (s16)GetScriptVarValue(NULL,DUNGEON_ENTER);
if ((((sVar2 != -1) && (sVar2 != 0x50)) && (sVar2 != 0x51)) && (sVar2 != 0x52)) {
*param_1 = sVar2;
*param_2 = GetScriptVarValue(NULL,DUNGEON_ENTER_INDEX);
return TRUE;
}
else {
*param_1 = -1;
*param_2 = -1;
return FALSE;
}
}
bool8 sub_8099328(u8 *dungeonId) {
s16 script_disc;
DungeonInfo* dungeonInfo;