shithub: pokered

ref: d7808d110f6b104a3e5ed7b21260ed8f1b718719
dir: /macros/vc.asm/

View raw version
vc_hook: MACRO
IF DEF(_RED_VC) || DEF(_BLUE_VC)
.VC_\1::
ENDC
ENDM

vc_hook_red: MACRO
IF DEF(_RED_VC)
.VC_\1::
ENDC
ENDM

vc_hook_blue: MACRO
IF DEF(_BLUE_VC)
.VC_\1::
ENDC
ENDM

vc_patch: MACRO
IF DEF(_RED_VC) || DEF(_BLUE_VC)
	ASSERT !DEF(CURRENT_VC_PATCH), "Already started a vc_patch"
CURRENT_VC_PATCH EQUS "\1"
.VC_{CURRENT_VC_PATCH}::
ENDC
ENDM

vc_patch_end: MACRO
IF DEF(_RED_VC) || DEF(_BLUE_VC)
	ASSERT DEF(CURRENT_VC_PATCH), "No vc_patch started"
.VC_{CURRENT_VC_PATCH}_End::
	PURGE CURRENT_VC_PATCH
ENDC
ENDM

vc_assert: MACRO
IF DEF(_RED_VC) || DEF(_BLUE_VC)
	ASSERT \#
ENDC
ENDM