You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Implement clearing level in RAM according to End Space effect, supporting up to 4 clearable stages per level; Implement unlocking levels [Commit 1] (#35)
This commit is contained in:
41
data/levels/levels.asm
Executable file
41
data/levels/levels.asm
Executable file
@@ -0,0 +1,41 @@
|
||||
MACRO level_unlock_req
|
||||
|
||||
; a list of levels that must be cleared (each must be in the form of: <Level>, STAGE_*)
|
||||
if !STRCMP("\1", "LEVELS_CLEARED")
|
||||
db UNLOCK_WHEN_\1
|
||||
rept (_NARG - 1) / 2
|
||||
db \2, \3
|
||||
shift
|
||||
shift
|
||||
endr
|
||||
|
||||
; an amount of levels that must be cleared (regardless of stage)
|
||||
elif !STRCMP("\1", "NUMBER_OF_LEVELS_CLEARED")
|
||||
db UNLOCK_WHEN_\1
|
||||
db \2
|
||||
|
||||
; a list of techniques that must be cleared
|
||||
elif !STRCMP("\1", "TECHNIQUES_CLEARED")
|
||||
db UNLOCK_WHEN_\1
|
||||
rept _NARG - 1
|
||||
db \2
|
||||
shift
|
||||
endr
|
||||
|
||||
; else no requirements
|
||||
endc
|
||||
db $ff
|
||||
REDEF x += 1
|
||||
ENDM
|
||||
|
||||
LevelUnlockRequirements:
|
||||
DEF x = 0
|
||||
level_unlock_req NONE ; LEVEL_1 (irrelevant)
|
||||
if DEF(_DEBUG)
|
||||
level_unlock_req NONE ; DEBUGLEVEL_1
|
||||
level_unlock_req LEVELS_CLEARED, DEBUGLEVEL_1, STAGE_1 ; DEBUGLEVEL_2
|
||||
level_unlock_req LEVELS_CLEARED, DEBUGLEVEL_2, STAGE_1 ; DEBUGLEVEL_3
|
||||
level_unlock_req LEVELS_CLEARED, DEBUGLEVEL_3, STAGE_1 ; DEBUGLEVEL_4
|
||||
level_unlock_req LEVELS_CLEARED, DEBUGLEVEL_4, STAGE_1 ; DEBUGLEVEL_5
|
||||
endc
|
||||
assert x == NUM_LEVELS
|
Reference in New Issue
Block a user