diff options
-rw-r--r-- | asm/code_80428A0.s | 25 | ||||
-rw-r--r-- | include/dungeon_engine.h | 2 | ||||
-rw-r--r-- | src/dungeon_engine.c | 11 | ||||
-rw-r--r-- | src/status_checker.c | 2 |
4 files changed, 13 insertions, 27 deletions
diff --git a/asm/code_80428A0.s b/asm/code_80428A0.s index 6f512f1..f2e258a 100644 --- a/asm/code_80428A0.s +++ b/asm/code_80428A0.s @@ -2828,29 +2828,4 @@ _080441B4: .4byte gTeamInventory_203B460 _080441B8: .4byte gRecruitedPokemonRef thumb_func_end sub_8044124 - thumb_func_start IsBossBattle -IsBossBattle: - push {lr} - ldr r0, _080441D8 - ldr r0, [r0] - ldr r1, _080441DC - adds r0, r1 - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - beq _080441E0 - cmp r0, 0x31 - bgt _080441E0 - movs r0, 0x1 - b _080441E2 - .align 2, 0 -_080441D8: .4byte gDungeonGlobalData -_080441DC: .4byte 0x00003a14 -_080441E0: - movs r0, 0 -_080441E2: - pop {r1} - bx r1 - thumb_func_end IsBossBattle - .align 2, 0
\ No newline at end of file diff --git a/include/dungeon_engine.h b/include/dungeon_engine.h index f987b11..d2be40b 100644 --- a/include/dungeon_engine.h +++ b/include/dungeon_engine.h @@ -1,6 +1,8 @@ #ifndef GUARD_DUNGEON_ENGINE_H #define GUARD_DUNGEON_ENGINE_H +// 0x441BC +bool8 IsBossBattle(); // 0x441E8 bool8 IsFixedDungeon(); diff --git a/src/dungeon_engine.c b/src/dungeon_engine.c index dd25441..20c3a50 100644 --- a/src/dungeon_engine.c +++ b/src/dungeon_engine.c @@ -3,6 +3,15 @@ #include "constants/dungeon.h" #include "dungeon_global_data.h" +bool8 IsBossBattle() +{ + if (gDungeonGlobalData->bossBattleIndex != 0 && gDungeonGlobalData->bossBattleIndex <= 0x31) + { + return TRUE; + } + return FALSE; +} + bool8 IsFixedDungeon() { if (gDungeonGlobalData->tileset > DUNGEON_OUT_ON_RESCUE) @@ -10,4 +19,4 @@ bool8 IsFixedDungeon() return TRUE; } return FALSE; -} +}
\ No newline at end of file diff --git a/src/status_checker.c b/src/status_checker.c index 7fbfc51..612e6cd 100644 --- a/src/status_checker.c +++ b/src/status_checker.c @@ -5,6 +5,7 @@ #include "constants/status.h" #include "constants/type.h" #include "constants/weather.h" +#include "dungeon_engine.h" #include "dungeon_global_data.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_util.h" @@ -93,7 +94,6 @@ const u8 gDungeonCamouflageTypes[76] = { TYPE_ROCK }; -extern bool8 IsBossBattle(); extern u8 GetWeather(struct DungeonEntity*); extern bool8 HasQuarterHPOrLess(struct DungeonEntity*); extern bool8 IsTileGround(struct MapTile*); |