From 8237e29a164211eb2ec4cd161eb4183cc1947fee Mon Sep 17 00:00:00 2001 From: Cheng Hann Gan Date: Thu, 9 Sep 2021 19:22:48 -0400 Subject: Defined more in-dungeon structs and enums (#53) * Defined DungeonEntity * Rename EntityType enums * Revert EntityType rename * Defined more in-dungeon structs and enums * Added more dungeon global structs/enums * Prefixed dungeonGlobalData with g * Fixed compile errors * Removed some CRLFs * Fixed compile after merge * Revert Makefile * Rename DungeonEntityData.entityType Co-authored-by: Seth Barberee * Renamed symbols per PR comments Co-authored-by: Cheng Hann Gan Co-authored-by: Seth Barberee --- src/code_8048480.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/code_8048480.c') diff --git a/src/code_8048480.c b/src/code_8048480.c index 470de97..675751e 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -1,5 +1,6 @@ #include "global.h" #include "dungeon_entity.h" +#include "constants/status.h" extern u32 gUnknown_80F89F4; extern u8 gAvailablePokemonNames[0x58]; @@ -81,7 +82,7 @@ void sub_804841C(struct DungeonEntity *r0, struct DungeonEntity *r1) void sub_8048428(struct DungeonEntity *r0, struct DungeonEntity *r1) { - if(r1->unk70->statusCondition == 4) // 4 - Paralyzed?? + if(r1->entityData->nonVolatileStatus == NON_VOLATILE_STATUS_PARALYZED) sub_807A290(r0, r1); else // Pointer to "But nothing happened!" @@ -90,7 +91,7 @@ void sub_8048428(struct DungeonEntity *r0, struct DungeonEntity *r1) void sub_8048450(struct DungeonEntity *r0, struct DungeonEntity *r1) { - if((u8)(r1->unk70->statusCondition - 2) <= 1) + if((u8)(r1->entityData->nonVolatileStatus - 2) <= 1) sub_807A290(r0, r1); else // Pointer to "But nothing happened!" @@ -135,7 +136,7 @@ void sub_80484DC(struct DungeonEntity *r0, struct DungeonEntity *r1) void sub_80484E8(struct DungeonEntity *r0, struct DungeonEntity *r1) { - if(r1->unk70->statusCondition == 1) // 1 - Burn?? + if(r1->entityData->nonVolatileStatus == NON_VOLATILE_STATUS_BURNED) sub_807A290(r0, r1); else { -- cgit v1.2.3