Improve undefined map assembler messages (#2196)

This commit is contained in:
Martin Griffin
2025-10-30 01:34:03 +00:00
committed by GitHub
parent 1de27646d2
commit d1d5435487
9 changed files with 46 additions and 19 deletions

View File

@@ -667,6 +667,14 @@
map \map
.endm
@ Set the player object's invisibility to FALSE.
.macro showplayer
.byte SCR_OP_SHOWOBJECTAT
.2byte LOCALID_PLAYER
.byte 0 @ map group
.byte 0 @ map num
.endm
@ Sets the specified object's invisibility to TRUE.
.macro hideobjectat localId:req, map:req
.byte SCR_OP_HIDEOBJECTAT
@@ -674,6 +682,14 @@
map \map
.endm
@ Set the player object's invisibility to TRUE.
.macro hideplayer
.byte SCR_OP_HIDEOBJECTAT
.2byte LOCALID_PLAYER
.byte 0 @ map group
.byte 0 @ map num
.endm
@ Turns the currently selected object (if there is one) to face the player.
.macro faceplayer
.byte SCR_OP_FACEPLAYER

View File

@@ -2,8 +2,12 @@
@ Takes a MAP constant and outputs the map group and map number as separate bytes
.macro map map_id:req
.ifdef \map_id
.byte \map_id >> 8 @ map group
.byte \map_id & 0xFF @ map num
.else
.error "undefined map (check for typos)"
.endif
.endm
@ Defines a map script. 'type' is any MAP_SCRIPT_* constant (see include/constants/map_scripts.h)