Add anchor points to support manual movement between spaces (#26)

This commit is contained in:
xCrystal
2023-11-16 17:20:13 +01:00
parent 8b9d731c5c
commit 6613cd5386
17 changed files with 164 additions and 18 deletions

View File

@@ -107,6 +107,7 @@ DEF NUM_PLAYER_MOVEMENTS EQU const_value
DEF SCENE_SCRIPT_SIZE EQU 4 ; scene_script
DEF CALLBACK_SIZE EQU 3 ; callback
DEF WARP_EVENT_SIZE EQU 5 ; warp_event
DEF ANCHOR_EVENT_SIZE EQU 3 ; anchor_event
DEF COORD_EVENT_SIZE EQU 8 ; coord_event
DEF BG_EVENT_SIZE EQU 5 ; bg_event
; An object_event is a map_object without its initial MAPOBJECT_OBJECT_STRUCT_ID or final padding

View File

@@ -3,6 +3,14 @@ DEF FIRST_SPACE_METATILE EQU $80
DEF FIRST_GREY_SPACE_METATILE EQU $e0
DEF UNIQUE_SPACE_METATILES_MASK EQU %11111
; reserved next space values that signal movement towards anchor point rather than towards space
const_def -1, -1
const GO_DOWN ; 255
const GO_UP ; 254
const GO_LEFT ; 253
const GO_RIGHT ; 252
DEF NEXT_SPACE_IS_ANCHOR_POINT EQU const_value + 1
; Branch Space special direction values
DEF BRANCH_DIRECTION_INVALID EQU -1
DEF BRANCH_DIRECTION_UNAVAILABLE EQU -2
DEF BRANCH_DIRECTION_UNAVAILABLE EQU -2