Decomp IsSkyExclusiveDungeon

Authored by Claude (Opus 4.8) under human direction. Confirmed by a matching
build: build/pmdsky.us/pmdsky.us.nds: OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
cecilarmitais 2026-07-19 16:27:08 -07:00
parent 014967fda3
commit 3a80e75ed3
3 changed files with 10 additions and 12 deletions

View File

@ -191,15 +191,3 @@ IsExpEnabledInDungeon: ; 0x0205171C
.align 2, 0
_02051740: .word DUNGEON_RESTRICTIONS
arm_func_end IsExpEnabledInDungeon
arm_func_start IsSkyExclusiveDungeon
IsSkyExclusiveDungeon: ; 0x02051744
cmp r0, #0x67
blo _02051758
cmp r0, #0xb0
movls r0, #1
bxls lr
_02051758:
mov r0, #0
bx lr
arm_func_end IsSkyExclusiveDungeon

View File

@ -1,8 +1,10 @@
#ifndef PMDSKY_MAIN_02051760_H
#define PMDSKY_MAIN_02051760_H
#include "enums.h"
#include "util.h"
bool8 IsSkyExclusiveDungeon(enum dungeon_id dungeon_id);
bool32 JoinedAtRangeCheck2(u8 joined_at);
#endif //PMDSKY_MAIN_02051760_H

View File

@ -2,6 +2,14 @@
#include "enums.h"
#include "util.h"
bool8 IsSkyExclusiveDungeon(enum dungeon_id dungeon_id)
{
if (dungeon_id >= DUNGEON_ZERO_ISLE_CENTER && dungeon_id <= DUNGEON_ARMALDOS_SHELTER) {
return TRUE;
}
return FALSE;
}
bool32 JoinedAtRangeCheck2(u8 joined_at) {
return joined_at == DUNGEON_BEACH || (joined_at >= DUNGEON_DUMMY_0xEC && DUNGEON_DUMMY_0xF0 >= joined_at);
}