Decomped HasDropeyeStatus

This commit is contained in:
AnonymousRandomPerson 2025-03-11 23:33:31 -04:00
parent 3698c97835
commit f5f0c59b83
6 changed files with 13 additions and 20 deletions

View File

@ -1,25 +1,8 @@
.include "asm/macros.inc"
.include "overlay_29_02301F50.inc"
.include "overlay_29_02301F80.inc"
.text
arm_func_start HasDropeyeStatus
HasDropeyeStatus: ; 0x02301F50
stmdb sp!, {r4, lr}
mov r4, r0
bl EntityIsValid__023000E4
cmp r0, #0
beq _02301F78
ldr r0, [r4, #0xb4]
ldrb r0, [r0, #0xf1]
cmp r0, #4
moveq r0, #1
ldmeqia sp!, {r4, pc}
_02301F78:
mov r0, #0
ldmia sp!, {r4, pc}
arm_func_end HasDropeyeStatus
arm_func_start IqSkillIsEnabled
IqSkillIsEnabled: ; 0x02301F80
stmdb sp!, {r3, lr}

View File

@ -8,5 +8,7 @@
bool8 CanSeeInvisibleMonsters(struct entity *entity);
// Returns whether a monster is set to use a specific tactic.
bool8 IsTacticSet(struct entity *entity, enum tactic_id tactic_id);
// Returns whether a certain monster is under the effect of status::STATUS_DROPEYE.
bool8 HasDropeyeStatus(struct entity* entity);
#endif //PMDSKY_DUNGEON_POKEMON_ATTRIBUTES_1_H

View File

@ -299,7 +299,7 @@ Overlay OVY_29
Object src/dungeon_pokemon_attributes.o
Object asm/overlay_29_02301D84.o
Object src/dungeon_pokemon_attributes_1.o
Object asm/overlay_29_02301F50.o
Object asm/overlay_29_02301F80.o
Object src/overlay_29_023026CC.o
Object asm/overlay_29_023026FC.o
Object src/overlay_29_02302A38.o

View File

@ -1,6 +1,7 @@
#include "dungeon_pokemon_attributes_1.h"
#include "dungeon_util_static.h"
#include "overlay_29_022FF898.h"
#include "overlay_29_023000E4.h"
bool8 CanSeeInvisibleMonsters(struct entity *entity)
{
@ -21,3 +22,11 @@ bool8 IsTacticSet(struct entity *entity, enum tactic_id tactic_id)
return pokemon_info->tactic == tactic_id;
}
bool8 HasDropeyeStatus(struct entity* entity)
{
if (EntityIsValid__023000E4(entity) && GetEntInfo(entity)->blinker_class_status.blinded == STATUS_BLINKER_DROPEYE)
return TRUE;
return FALSE;
}

View File

@ -4,7 +4,6 @@
#include "dungeon_statuses.h"
#include "dungeon_util_static.h"
extern bool8 HasDropeyeStatus(struct entity* entity);
extern bool8 IsPositionActuallyInSight(struct position *pos1, struct position *pos2, bool8 user_has_dropeye);
bool8 CanSeeTarget(struct entity *user, struct entity *target)