From d7c59dcef121cc6370e76eeb6a583af92e8ca33d Mon Sep 17 00:00:00 2001 From: xCrystal Date: Mon, 21 Aug 2023 01:45:06 +0200 Subject: [PATCH] Unlocked level flags --- engine/pokemon/stats_screen.asm | 2 +- home/flag.asm | 7 +++++-- home/text.asm | 1 + ram/wram.asm | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm index cadf03e7f..7eece47b0 100644 --- a/engine/pokemon/stats_screen.asm +++ b/engine/pokemon/stats_screen.asm @@ -7,7 +7,7 @@ DEF NUM_STAT_PAGES EQU const_value - 1 DEF STAT_PAGE_MASK EQU %00000011 BattleStatsScreenInit: -; fallthrough + ; fallthrough StatsScreenInit: ld hl, StatsScreenMain diff --git a/home/flag.asm b/home/flag.asm index d48f0d093..c74b29b4c 100644 --- a/home/flag.asm +++ b/home/flag.asm @@ -21,10 +21,13 @@ ResetFlashIfOutOfCave:: res STATUSFLAGS_FLASH_F, [hl] ret +UnlockedLevelsFlagAction:: + ld hl, wUnlockedLevels + jr FlagAction + EventFlagAction:: ld hl, wEventFlags - call FlagAction - ret + ; fallthrough FlagAction:: ; Perform action b on bit de in flag array hl. diff --git a/home/text.asm b/home/text.asm index 56e1e9373..a619bef1c 100644 --- a/home/text.asm +++ b/home/text.asm @@ -177,6 +177,7 @@ PrintText1bpp:: PrintText2bpp:: push hl call SpeechTextbox2bpp + ; fallthrough _PrintText: call UpdateSprites diff --git a/ram/wram.asm b/ram/wram.asm index bee54ab2a..42d40027e 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -2376,6 +2376,8 @@ wMooMooBerries:: db wUndergroundSwitchPositions:: db wFarfetchdPosition:: db +wUnlockedLevels:: flag_array NUM_LANDMARKS + ; map scene ids (data/maps/scenes.asm:MapScenes) ; wPokecenter2FSceneID:: db