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_8057824.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/code_8057824.c') diff --git a/src/code_8057824.c b/src/code_8057824.c index c80aa55..9d0e673 100644 --- a/src/code_8057824.c +++ b/src/code_8057824.c @@ -1,8 +1,8 @@ #include "global.h" -#include "gUnknown_203B418.h" +#include "dungeon_global_data.h" #include "dungeon_entity.h" -extern struct unkStruct_203B418 *gUnknown_203B418; +extern struct DungeonGlobalData *gDungeonGlobalData; extern u32 gUnknown_80FCF74; extern u32 gUnknown_80FCF80; @@ -49,7 +49,7 @@ bool32 sub_805783C(struct DungeonEntity *param_1, struct DungeonEntity *param_2) bool32 sub_805785C(struct DungeonEntity *param_1, struct DungeonEntity *param_2) { - gUnknown_203B418->unkE26B = gUnknown_80F4F42; + gDungeonGlobalData->unkE26B = gUnknown_80F4F42; if (sub_807EAA0(1,0) == '\0') { // The weather remains unchanged sub_80522F4(param_1,param_2,gUnknown_80FCF74); @@ -59,7 +59,7 @@ bool32 sub_805785C(struct DungeonEntity *param_1, struct DungeonEntity *param_2) bool32 sub_80578A4(struct DungeonEntity *param_1, struct DungeonEntity *param_2) { - gUnknown_203B418->unkE26C = gUnknown_80F4F42; + gDungeonGlobalData->weatherTurnsLeft = gUnknown_80F4F42; if (sub_807EAA0(1,0) == '\0') { // The weather remains unchanged sub_80522F4(param_1,param_2,gUnknown_80FCF80); @@ -105,7 +105,7 @@ bool32 sub_8057974(struct DungeonEntity *param_1, struct DungeonEntity *param_2, s32 newHP; u8 local_24; - newHP = param_2->unk70->HP / 2; + newHP = param_2->entityData->HP / 2; local_24 = 0; if (newHP != 0) { sub_806F370(param_1,param_2,newHP,1,&local_24,sub_8092B00(param_3),sub_8057600(param_3,param_4),0,1,0); -- cgit v1.2.3