program DemoMaker;
var  

@define play_music 1
// Turn off kernalr
@define useKernal 0
// Turn on/off raster debug
@define debug_raster 1
// Key for turning on / off rasters
@define rasterDebugKey "KEY_R"
/*
	Pointers must be declared outside of blocks
*/
    p1,zp1,p2,zp2,textPointer: pointer;

@ifdef debug_raster
	show_raster: byte=0;
@endif


// Specify user data
	@userdata "$0400" "$0800" "Bank 1 video temp storage"
	@userdata "$4400" "$4800" "Bank 2 video"
	@userdata "$8400" "$8800" "Bank 3 video"
	
// Main demo music (by Uctumi)
	music: incsid("music/courierb0.sid",2);


// Put all these variables at $F000
@startblock $F000 "Variables"

	// Standard variables
	a,b,c,i,j,k,l,m,n,o : byte;

	@include "demomaker_vars.ras"
	// Some standard color themes

	@define @scene2charval 64

	/*
			 ***
			*
			 **
			   * C E N E S
  			***
	*/	

	// Set up scenes
	@define scene1 1
	@define scene2 2
	@define scene3 3
	// Timestamps decide order of scenes (column 0) and how long they should last (column 1)
	// Column 2 and 3 are purely optional for extra data (like, displaying same scene multiple times with various
	// colors or character sets)

	timeStamps: array[64] of byte = (		
										@scene1, $6, 0,0, 
										@scene2, $A, 4,0, 
										@scene1, $10,2,0,
										@scene2, $14, 5,1, 

	);

@endblock


// Include automatically generated scenes
@include "packed_resources1.ras"



interrupt RasterScene1();
procedure InitScene1();
interrupt RasterScene2();
procedure InitScene2();

procedure InitSceneRaster();
begin
	if (nextScene=@scene1) then 
		RasterIRQ(RasterScene1(),0,@useKernal);
	if (nextScene=@scene2) then 
		RasterIRQ(RasterScene2(),0,@useKernal);
end;

procedure MainLoopInitScene();
begin
	if (nextScene=@scene1) then 
		InitScene1();
	if (nextScene=@scene2) then 
		InitScene2();

end;

@include "demomaker_procedures.ras"

// Include a scene
@include "include/scene1.ras"
@include "include/scene2.ras"



begin
	DemoMakerMainLoop();
end.
