shithub: pokecrystal

ref: 2137f0be09d8ad5ff2d995725dee273b55dbcc04
dir: /macros/vc.asm/

View raw version
; Virtual Console macros

MACRO vc_hook
	if DEF(_CRYSTAL11_VC)
	.VC_\1::
	endc
ENDM

MACRO vc_patch
	if DEF(_CRYSTAL11_VC)
		assert !DEF(CURRENT_VC_PATCH), "Already started a vc_patch"
		DEF CURRENT_VC_PATCH EQUS "\1"
	.VC_{CURRENT_VC_PATCH}::
	endc
ENDM

MACRO vc_patch_end
	if DEF(_CRYSTAL11_VC)
		assert DEF(CURRENT_VC_PATCH), "No vc_patch started"
	.VC_{CURRENT_VC_PATCH}_End::
		PURGE CURRENT_VC_PATCH
	endc
ENDM

MACRO vc_assert
	if DEF(_CRYSTAL11_VC)
		assert \#
	endc
ENDM