Define scene constants alongside scene_scripts (#979)

Generic SCENE_DEFAULT and SCENE_FINISHED are legacy values
This commit is contained in:
Rangi
2022-07-29 17:43:10 -04:00
committed by GitHub
parent 51bfd31ea8
commit 8826d97ee4
94 changed files with 380 additions and 518 deletions

View File

@@ -249,6 +249,9 @@ DEF PERSONTYPE_SCRIPT EQUS "OBJECTTYPE_SCRIPT"
DEF PERSONTYPE_ITEMBALL EQUS "OBJECTTYPE_ITEMBALL"
DEF PERSONTYPE_TRAINER EQUS "OBJECTTYPE_TRAINER"
DEF SCENE_DEFAULT EQU 0
DEF SCENE_FINISHED EQU 1
; macros/scripts/movement.asm
DEF show_person EQUS "show_object"

View File

@@ -10,13 +10,26 @@ DEF object_const_def EQUS "const_def 2"
MACRO def_scene_scripts
REDEF _NUM_SCENE_SCRIPTS EQUS "_NUM_SCENE_SCRIPTS_\@"
db {_NUM_SCENE_SCRIPTS}
const_def
DEF {_NUM_SCENE_SCRIPTS} = 0
ENDM
MACRO scene_const
;\1: scene id constant
const \1
EXPORT \1
ENDM
MACRO scene_script
;\1: script pointer
;\2: scene id constant
dw \1
dw 0 ; filler
if _NARG == 2
scene_const \2
else
const_skip
endc
DEF {_NUM_SCENE_SCRIPTS} += 1
ENDM