Skip to content

Commit

Permalink
Define relationship between map_object and object_events
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcandth committed Aug 10, 2023
1 parent 6926900 commit 4984d32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions constants/map_object_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ DEF RELATIVE_ATTRIBUTES EQU 1 << RELATIVE_ATTRIBUTES_F
DEF ABSOLUTE_TILE_ID EQU 1 << ABSOLUTE_TILE_ID_F

; map_object struct members (see macros/ram.asm)
; struct initialized by object_event macro (see macros/scripts/maps.asm)
rsreset
DEF MAPOBJECT_OBJECT_STRUCT_ID rb ; 0
DEF MAPOBJECT_SPRITE rb ; 1
Expand Down
3 changes: 2 additions & 1 deletion constants/script_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ DEF CALLBACK_SIZE EQU 3 ; callback
DEF WARP_EVENT_SIZE EQU 5 ; warp_event
DEF COORD_EVENT_SIZE EQU 8 ; coord_event
DEF BG_EVENT_SIZE EQU 5 ; bg_event
DEF OBJECT_EVENT_SIZE EQU 13 ; object_event
; An object_event is a map_object without its initial MAPOBJECT_OBJECT_STRUCT_ID or final padding
DEF OBJECT_EVENT_SIZE EQU MAPOBJECT_LENGTH - 3 ; 13

; A coord_event for scene -1 will always activate,
; regardless of the map's scene variable value.
Expand Down

0 comments on commit 4984d32

Please sign in to comment.