;Comment

SCENE 2242 ;-------------------------------------------------------------------------------------------------------------------------------
	COMPARE #<VSpreview>, "1"
	IF>= @VSpreview
	SET num.devTableId, "90"
	SET str.devTableRowId, "0"
	SET vsmaxGenCommand, #<str.devTableCOL3>
;<Begin Scene-grabbing chunk>
	CALL 2240@downloadstring vs2242command, scene, 2242
	CALL 2240@decompilestring vs2242command, vs2242execute

;<End Scene-grabbing chunk>
@vs2242reloadscene
	SET vs2242ExIndex, "1"
	N: #<vs2242execute> commands for scene 2242.

	SET_SUBSTR vs2242command, 0, 2, vs2242execute-#<vs2242ExIndex>
	COMPARE *#<vs2242command>, #<vsmaxGenCommand>
	IF<= @vs2242executeGeneral
	GOTO @vs2242execute#<vs2242command>
	END

@vs2242executeGeneral
	SET vs2242string, "vs2242execute-#<vs2242ExIndex>"
	CALL 2240@vsunpack *#<vs2242string>
	SET vs2242excom, #<arg0>
	SUB numArgs, 1

	CALL 2240@vsdenest #<numArgs>, #<arg1>, #<arg2>, #<arg3>, #<arg4>, #<arg5>, #<arg6>, #<arg7>, #<arg8>, #<arg9>

	CALL 2240@ExCommand#<vs2242excom> #<vs2242excom>, #<arg1>, #<arg2>, #<arg3>, #<arg4>, #<arg5>, #<arg6>, #<arg7>, #<arg8>, #<arg9>

	ADD vs2242ExIndex, "1"
	SET_SUBSTR vs2242command, 0, 2, vs2242execute#<vs2242ExIndex>
	COMPARE *#<vs2242command>, #<vsmaxGenCommand>
	IF<= @vs2242executeGeneral
	STRSTR "-*#<vs2242command>, "-33-36-"
	GOTO @vs2242execute#<vs2242command>

	COMPARE #<vsPreview>, "1"
	IF= @backtoide
	END

@vs2242execute33
	SET_SUBSTR vs2242execute33-test, 0, 2, #<arg1>
	STRCMP #<vs2242execute33-test>, "!="
	IF= @vs2242execute33-cmpNQ
	STRCMP #<vs2242execute33-test>, ">="
	IF= @vs2242execute33-cmpGQ
	STRCMP #<vs2242execute33-test>, "<="
	IF= @vs2242execute33-cmpLQ
	STRCMP #<vs2242execute33-test>, "="
	IF= @vs2242execute33-cmpEQ
	STRCMP #<vs2242execute33-test>, ">"
	IF= @vs2242execute33-cmpGT
	STRCMP #<vs2242execute33-test>, "<"
	IF= @vs2242execute33-cmpLT
	STRCMP #<vs2242execute33-test>, "EV"
	IF= @vs2242execute33-cmpEV
	STRCMP #<vs2242execute33-test>, "OD"
	IF= @vs2242execute33-cmpOD
	
	IF #<arg1> @vs2242execute33-true

@vs2242execute33-exnext
	ADD vs2242ExIndex, "1"
	SET_SUBSTR vs2242command, 0, 2, vs2242execute#<vs2242ExIndex>
	COMPARE *#<vs2242command>, #<vsmaxGenCommand>
	IF<= @vs2242executeGeneral
	STRSTR "-*#<vs2242command>, "-33-36-"
	GOTO @vs2242execute#<vs2242command>

	COMPARE #<vsPreview>, "1"
	IF= @backtoide
	END
@vs2242execute33-cmpNQ
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 6
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-cmpGQ
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 3
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-cmpLQ
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 5
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-cmpEQ
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 1
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-cmpGT
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 2
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-cmpLT
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 4
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-cmpEV
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 8
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-cmpOD
	SET ExCommandTestIf, #<ExCommandLastIf>
	AND ExCommandTestIf, 16
	COMPARE #<ExCommandLastIf>, 0
	IF> @vs2242execute33-true
	GOTO @vs2242execute33-exnext
	END
@vs2242execute33-true
	SET vs2242command, #<arg2>
	COMPARE *#<vs2242command>, #<vsmaxGenCommand>
	IF<= @vs2242executeGeneral
	STRSTR "-*#<vs2242command>, "-33-36-"
	GOTO @vs2242execute#<vs2242command>

	COMPARE #<vsPreview>, "1"
	IF= @backtoide
	END

@vs2242execute36
	SET vs2242string, "vs2242execute-#<vs2242ExIndex>"
	CALL 2240@vsunpack *#<vs2242string>
	SUB numArgs, 1

	CALL 2240@vsdenest #<numArgs>, #<arg1>, #<arg2>, #<arg3>, #<arg4>, #<arg5>, #<arg6>, #<arg7>, #<arg8>
	
	GOTO @vs2242execute36-#<numArgs>
@vs2242execute36-2
	MENU "#<arg1>=@vs2242ex36-goarg2"
	GOTO @vs2242execute36-exnext
	END
@vs2242execute36-4
	MENU "#<arg1>=@vs2242ex36-goarg2","#<arg3>=@vs2242ex36-goarg4"
	GOTO @vs2242execute36-exnext
	END
@vs2242execute36-6
	MENU "#<arg1>=@vs2242ex36-goarg2","#<arg3>=@vs2242ex36-goarg4","#<arg5>=@vs2242ex36-goarg6"
	GOTO @vs2242execute36-exnext
	END
@vs2242execute36-6
	MENU "#<arg1>=@vs2242ex36-goarg2","#<arg3>=@vs2242ex36-goarg4","#<arg5>=@vs2242ex36-goarg6","#<arg7>=@vs2242ex36-goarg8"
	GOTO @vs2242execute36-exnext
	END
	
@vs2242ex36-goarg2
	SET vs2242JumpLabel, #<arg2>
	GOTO @vs2242execute98
	END
@vs2242ex36-goarg4
	SET vs2242JumpLabel, #<arg4>
	GOTO @vs2242execute98
	END
@vs2242ex36-goarg6
	SET vs2242JumpLabel, #<arg6>
	GOTO @vs2242execute98
	END
@vs2242ex36-goarg8
	SET vs2242JumpLabel, #<arg8>
	GOTO @vs2242execute98
	END
	
@vs2242execute36-exnext
	ADD vs2242ExIndex, "1"
	SET_SUBSTR vs2242command, 0, 2, vs2242execute-#<vs2242ExIndex>
	COMPARE *#<vs2242command>, #<vsmaxGenCommand>
	IF<= @vs2242executeGeneral
	STRSTR "-*#<vs2242command>, "-33-36-"
	GOTO @vs2242execute#<vs2242command>

	COMPARE #<vsPreview>, "1"
	IF= @backtoide
	END
	
@vs2242execute72
@vs2242execute73
@vs2242execute74
@vs2242execute75
@vs2242execute76
@vs2242execute77
@vs2242execute78
@vs2242execute79
@vs2242execute80
@vs2242execute81
@vs2242execute82
@vs2242execute83
@vs2242execute84
@vs2242execute85
@vs2242execute86
@vs2242execute87
@vs2242execute88
@vs2242execute89
@vs2242execute90
@vs2242execute91
@vs2242execute92
@vs2242execute93
@vs2242execute94
	END

@vs2242execute95 ;Load scene from a table array.  Table Number, Rowname
	SET vs2242string, "vs2242execute#<vs2242ExIndex>"
	CALL 2240@vsunpack *#<vs2242string>
	;Non-functional!

	END

@vs2242execute96 ;Load scene from a cookie array whose NAME is specified.
	SET vs2242string, "vs2242execute#<vs2242ExIndex>"
	SET_LEN vs2242strlen, *#<vs2242string>
	SUB vs2242strlen, 5
	SET_SUBSTR vs2242string, 5, #<vs2242strlen>, *#<vs2242string>
	CALL 2240@arraycopy #<vs2242string>, vs2242execute
	GOTO @vs2242reloadscene
	END

@vs2242execute97 ;CALL scene@label, this uses a cookie set externally, virtualscenelabel, to find and jump to a virtual label.
	PUSH testpointadd
	PUSH testcommand
	PUSH testpoint
	PUSH testvalue
	SET testpoint, "3"
@vs2242execute97loop
	SET_SUBSTR testcommand, #<testpoint>, 2, #<vs2242commands>
	COMPARE #<testcommand>, "99"
	IF= @vs2242execute97test
	ADD testpoint, "2"
	COMPARE #<testcommand>, "11"
	IF= @vs2242execute97loop
	COMPARE #<testcommand>, "27"
	IF= @vs2242execute97loop
	COMPARE #<testcommand>, "49"
	IF= @vs2242execute98loop
	SET_SUBSTR testpointadd, #<testpoint>, 3, #<vs2242commands>
	ADD testpoint, "#<testpointadd>"
	GOTO @vs2242execute97loop
	END
@vs2242execute97test
	SET virtualscenelabel, "#<arg0>"
	CALL 2240@vsripdata
	SET testvalue, "#<arg0>"
	STRCMP "#<testvalue>", "#<virtualscenelabel>"
	IF> @vs2242execute97loop
	IF< @vs2242execute97loop
	SET vs2242readpoint, "#<testpoint>"
	SET_SUBSTR vs2242command, #<vs2242readpoint>, 2, #<vs2242commands>
	ADD vs2242readpoint, "2"
	POP testvalue
	POP testpoint
	POP testcommand
	POP testpointadd
	COMPARE #<vs2242command>, V
	IF<= @vs2242executeGeneral
	GOTO @vs2242execute#<vs2242command>

	COMPARE #<vsPreview>, "1"
	IF= @backtoide
	END

@vs2242execute98 ;GOTO @label, IF x @label; this finds and sends to label.
	SET testindex, "0"
	SET maxindex, #<vs2242execute>
@vs2242execute98loop
	ADD testindex, 1
	COMPARE #<testindex>, #<maxindex>
	IF> @vs2242execute98fail
	SET readpoint, vs2242execute#<testindex>
	SET_SUBSTR testcommand, 0, 2, *#<readpoint>
	COMPARE #<testcommand>, "99"
	IF!= @vs2242execute98loop
	SET vs2242string, "vs2242execute#<testindex>"
	SET_LEN vs2242strlen, *#<vs2242string>
	SUB vs2242strlen, 5
	SET_SUBSTR vs2242string, 5, #<vs2242strlen>, *#<vs2242string>
	STRCMP #<vs2242string>, #<vs2242JumpLabel>
	IF!= @vs2242execute98loop
	SET vs2242ExIndex, #<testindex>
	GOTO @vs2242execute99
	END

@vs2242execute99
	ADD vs2242ExIndex, "1"	
	SET_SUBSTR vs2242command, 0, 2, vs2242execute#<vs2242ExIndex>
	COMPARE *#<vs2242command>, #<vsmaxGenCommand>
	IF<= @vs2242executeGeneral
	GOTO @vs2242execute#<vs2242command>

	COMPARE #<vsPreview>, "1"
	IF= @backtoide
	END

@vs2242execute00

	COMPARE #<vsPreview>, "1"
	IF= @backtoide

END


@VSpreview
	SET cookiename, "#<localdestPVS>-0"
	SET vs2242master, "*#<cookiename>"
	SET_SUBSTR vs2242numstrings, 0, 3, #<vs2242master>
	SET currstring, "1"
	SET offset, "6"
@previewgetcommandsloop
		SET cookiename, "#<localdestPVS>-#<currstring>"
		SET vs2242command-#<currstring>, "*#<cookiename>"
		SET_SUBSTR vs2242command-#<currstring>-len, #<offset>, 3, #<vs2242master>
		ADD currstring, "1"
		ADD offset, "6"
		COMPARE #<currstring>, "#<vs2242numstrings>"
		IF<= @previewgetcommandsloop
		SET currstring, "1"
	GOTO @vs2242reloadscene

@backtoide
	SET num.devTableId, "91"
	SET str.devTableRowId, "VS"
	SET currnum, "3"
@backtoideloop
		SET cookiename, "str.devTableCOL#<currnum>"
		SET testide, "*#<cookiename>"
		COMPARE #<testide>, "5"
		IF= @backiside
		ADD currnum, "2"
		GOTO @backtoideloop
@backiside
	SUB currnum, "1"
	SET cookiename, "str.devTableCOL#<currnum>"
	SET idescene, "*#<cookiename>"
	GOTO SCENE #<idescene>
	END

;comment