Decomped CheckVariousStatuses__0230172C

This commit is contained in:
AnonymousRandomPerson 2025-10-22 22:54:34 -04:00
parent a504858334
commit 7fbf7e456a
6 changed files with 22 additions and 30 deletions

View File

@ -1,32 +1,8 @@
.include "asm/macros.inc"
.include "overlay_29_02300D00.inc"
.include "overlay_29_02300D50.inc"
.text
arm_func_start CheckVariousStatuses__0230172C
CheckVariousStatuses__0230172C: ; 0x02300D00
ldr r1, [r0, #0xb4]
ldrb r0, [r1, #0xbd]
cmp r0, #2
cmpne r0, #4
cmpne r0, #0
movne r0, #1
bxne lr
ldrb r0, [r1, #0xc4]
cmp r0, #1
moveq r0, #1
bxeq lr
cmp r0, #6
moveq r0, #1
bxeq lr
ldrb r0, [r1, #0xd2]
cmp r0, #1
moveq r0, #1
movne r0, #0
and r0, r0, #0xff
bx lr
arm_func_end CheckVariousStatuses__0230172C
arm_func_start ov29_02300D50
ov29_02300D50: ; 0x02300D50
stmdb sp!, {r3, lr}

View File

@ -13,5 +13,7 @@ bool8 CheckVariousConditions__0230156C(struct entity *entity);
bool8 CheckVariousConditions__02301624(struct entity *entity);
// Returns false if none of these conditions holds for the given entity: asleep, frozen, petrified, biding.
bool8 CheckVariousStatuses__023016DC(struct entity *entity);
// Returns false if none of these conditions holds for the given entity: asleep, frozen, petrified, biding.
bool8 CheckVariousStatuses__0230172C(struct entity *entity);
#endif //PMDSKY_DUNGEON_CAPABILITIES_H

View File

@ -454,7 +454,7 @@ Overlay OVY_29
Object src/dungeon_capabilities.o
Object asm/overlay_29_023009A0.o
Object src/dungeon_capabilities_1.o
Object asm/overlay_29_02300D00.o
Object asm/overlay_29_02300D50.o
Object src/directional_bit_masks.o
Object src/dungeon_capabilities_3.o
Object asm/overlay_29_02300FCC.o

View File

@ -3,8 +3,6 @@
#include "dungeon_statuses.h"
#include "dungeon_util_static.h"
extern bool8 CheckVariousStatuses__0230172C(struct entity *entity);
bool8 IsMonsterSleeping(struct entity *monster)
{
if (GetEntInfo(monster)->sleep_class_status.sleep == STATUS_SLEEP_SLEEP)

View File

@ -5,8 +5,6 @@
#include "dungeon_util_static.h"
#include "joined_at_checks.h"
extern bool8 CheckVariousStatuses__0230172C(struct entity *entity);
bool8 CheckVariousConditions__0230156C(struct entity *entity)
{
struct monster *pokemon_info = GetEntInfo(entity);
@ -86,3 +84,21 @@ bool8 CheckVariousStatuses__023016DC(struct entity *entity)
return FALSE;
}
bool8 CheckVariousStatuses__0230172C(struct entity *entity)
{
struct monster *pokemon_info = GetEntInfo(entity);
if (pokemon_info->sleep_class_status.sleep != STATUS_SLEEP_SLEEPLESS &&
pokemon_info->sleep_class_status.sleep != STATUS_SLEEP_YAWNING &&
pokemon_info->sleep_class_status.sleep != STATUS_SLEEP_NONE)
return TRUE;
if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_FROZEN)
return TRUE;
if (pokemon_info->frozen_class_status.freeze == STATUS_FROZEN_PETRIFIED)
return TRUE;
if (pokemon_info->bide_class_status.bide == STATUS_TWO_TURN_BIDE)
return TRUE;
return FALSE;
}