Level selection menu: draw level cleared indicators [Commit 1] (#12)

This commit is contained in:
xCrystal
2024-01-22 19:32:19 +01:00
parent ce2f5f3822
commit fa42b14e29
10 changed files with 228 additions and 49 deletions

View File

@@ -21,6 +21,20 @@ ResetFlashIfOutOfCave::
res STATUSFLAGS_FLASH_F, [hl]
ret
GetClearedLevelsStageAddress::
; Return hl = wClearedLevelsStage* given STAGE_*_F constant in a
ld hl, wClearedLevelsStage1
cp ES1 ; cp STAGE_1_F
ret z
ld hl, wClearedLevelsStage2
cp ES2 ; cp STAGE_2_F
ret z
ld hl, wClearedLevelsStage3
cp ES3 ; cp STAGE_3_F
ret z
ld hl, wClearedLevelsStage4
ret
UnlockedLevelsFlagAction::
; Perform action b on bit e in flag array wUnlockedLevels.
ld hl, wUnlockedLevels