level
{
	name "Level 10"
	number 10
	
	bonus time 100 // Initial bonus time, in seconds
	
	world
	{
		visitable
		{
			// Start room
			min_max (-512,1024,2048) (511,1791,2303)		// Start room
			min_max (-512,768,1792) (511,1791,2047)			// First step down towards main room
			min_max (-768,768,1536) (767,1791,1791)			// Out towards the main room
			min_max (-512,512,1536) (511,767,1791)			// Step down on the way to main room
			
			// From start to exit, left to rigth
			min_max (-1280,-1024,768) (-513,1535,1535)
			min_max (-512,-1024,768) (511,1535,1535)
			min_max (512,-1024,768) (1279,1535,1535)
			
			min_max (-1280,-1024,0) (-513,1535,767)
			min_max (-512,-1024,0) (511,1535,767)
			min_max (512,-1024,0) (1279,1535,767)
			
			min_max (-1280,-1024,-768) (-513,1535,-1)
			min_max (-512,-1024,-768) (511,1535,-1)
			min_max (512,-1024,-768) (1279,1535,-1)
			
			min_max (-1280,-1024,-1536) (-513,1535,-769)
			min_max (-512,-1024,-1536) (511,1535,-769)
			min_max (512,-1024,-1536) (1279,1535,-769)
			
			// Exit
			min_max (-512,256,-1792) (511,767,-1537)		// Entrance to exit
			min_max (-256,256,-2304) (255,767,-1793)		// The exit itself
		}
		
		not_visitable
		{
			// Main room, from start to exit, left to rigth
			min_max (-1280,-1024,768) (-513,-769,1535)
			min_max (-1280,-768,1024) (-1025,-513,1535)
			min_max (-1280,-512,1280) (-1025,-257,1535)
			min_max (-1024,-768,768) (-513,-257,1535)
			min_max (-1024,-256,1024) (-769,-1,1279)
			min_max (-768,-256,768) (-513,-1,1535)
			min_max (-768,0,1024) (-513,255,1279)
			
			min_max (-512,-1024,768) (511,-257,1535)
			min_max (-512,-256,1024) (511,-1,1535)
			min_max (-256,-256,768) (511,-1,1023)
			min_max (-512,0,1280) (511,255,1535)
			min_max (0,0,1024) (255,255,1279)
			
			min_max (512,-1024,768) (1279,-769,1535)
			min_max (512,-768,1024) (1279,-257,1535)
			min_max (512,-768,768) (1023,-513,1023)
			min_max (512,-512,768) (767,-257,1023)
			min_max (512,-256,1280) (1023,-1,1535)
			min_max (512,-256,1024) (767,-1,1279)
			
			min_max (-1280,-1024,0) (-513,-769,255)
			min_max (-768,-1024,256) (-513,-513,767)
			min_max (-1280,-768,0) (-1025,-257,255)
			min_max (-768,-512,256) (-513,-257,511)
			
			min_max (-512,-1024,0) (511,-513,767)
			min_max (-512,-512,256) (511,-257,767)
			min_max (-512,-256,512) (-1,-1,767)
			min_max (-256,-512,0) (-1,-257,255)
			
			min_max (512,-1024,0) (1279,-769,255)
			min_max (512,-1024,256) (767,-513,767)
			min_max (1024,-768,0) (1279,-257,255)
			min_max (512,-512,256) (767,-257,511)
				// Half way
			min_max (-768,-1024,-768) (-513,-769,-513)
			min_max (-1024,-1024,-768) (-769,-257,-513)
			min_max (-1280,-1024,-256) (-1025,-257,-1)
			min_max (-1280,-1024,-768) (-1025,-1,-257)
			
			min_max (256,-1024,-768) (511,-513,-513)
			min_max (-512,-1024,-768) (-257,-769,-513)
			min_max (-512,-1024,-512) (255,-769,-1)
			min_max (-256,-768,-512) (-1,-513,-1)
			min_max (-512,-768,-256) (-257,-513,-1)
			
			min_max (768,-1024,-256) (1023,-769,-1)
			min_max (768,-1024,-512) (1023,-513,-257)
			min_max (512,-1024,-768) (767,-513,-513)
			min_max (768,-1024,-768) (1023,-257,-513)
			min_max (1024,-1024,-768) (1279,-1,-513)
			min_max (1024,-1024,-512) (1279,-257,-1)
			
			min_max (-1280,-1024,-1536) (-513,-1,-769)
			min_max (-1280,0,-1536) (-769,255,-1281)
			min_max (-1280,0,-1280) (-1025,255,-769)
			min_max (-768,0,-1536) (-513,255,-1025)
			min_max (-1280,256,-1280) (-1025,511,-1025)
			min_max (-768,256,-1536) (-513,511,-1281)
			
			min_max (-512,-1024,-1536) (-257,-1,-769)
			min_max (-256,-1024,-1536) (511,-257,-1025)
			min_max (256,-1024,-1024) (511,-257,-769)
			min_max (-512,0,-1536) (-257,255,-1281)
			min_max (-256,-256,-1536) (255,-1,-1281)
			min_max (256,-256,-1536) (511,-1,-1025)
			
			min_max (512,-1024,-1536) (1279,-1,-769)
			min_max (1024,0,-1536) (1279,255,-769)
			min_max (768,0,-1536) (1023,255,-1281)
			min_max (512,0,-1536) (767,511,-1281)
		}
		
		exit // supports unlimited exits in the same level
		{
			min_max (-256,256,-2304) (255,767,-1793)
		}
		
		arrows
		{
		}
		
		start
		{
			pos (0,1152,2176)
			angle (0,2048,0)  // Looking angle. 4096 = 360 degrees. Last angle (z) is unused
		}
	}
	
	lava
	{
		delay 30000
	}
	
	bubbles
	{
		stopping   // Spawn point for stopping bubbles
		{
			start (-1024,-1152,512)
			end 1152						// Bubbles will disappear when reaching this y-position
			delay 10000				// ms between spawning new bubble
			firstdelay 8000		// ms until spawning first bubble 
			maxBubbles 3			// maximum bubbles existing at the same time from this spawn
		}
		stopping   // Spawn point for stopping bubbles
		{
			start (-768,-1152,256)
			end 1152						// Bubbles will disappear when reaching this y-position
			delay 10000				// ms between spawning new bubble
			firstdelay 6000		// ms until spawning first bubble 
			maxBubbles 3			// maximum bubbles existing at the same time from this spawn
		}
		stopping   // Spawn point for stopping bubbles
		{
			start (0,-1152,-768)
			end 1152						// Bubbles will disappear when reaching this y-position
			delay 10000				// ms between spawning new bubble
			firstdelay 4000		// ms until spawning first bubble 
			maxBubbles 3			// maximum bubbles existing at the same time from this spawn
		}
		stopping   // Spawn point for stopping bubbles
		{
			start (512,-1152,-256)
			end 1152						// Bubbles will disappear when reaching this y-position
			delay 10000				// ms between spawning new bubble
			firstdelay 2000		// ms until spawning first bubble 
			maxBubbles 3			// maximum bubbles existing at the same time from this spawn
		}
		stopping   // Spawn point for stopping bubbles
		{
			start (1024,-1152,512)
			end 1152						// Bubbles will disappear when reaching this y-position
			delay 10000				// ms between spawning new bubble
			maxBubbles 3			// maximum bubbles existing at the same time from this spawn
		}
	}
	
	emeralds 14
	{
		required 12
		pos (-128,896,1920)
		pos (128,384,1152)
		pos (-1152,-128,1408)
		pos (640,128,1152)
		pos (896,-384,896)
		pos (-384,128,640)
		pos (640,-128,384)
		pos (1152,-128,128)
		pos (-128,-384,-384)
		pos (-1152,128,-384)
		pos (-640,128,-896)
		pos (640,128,-896)
		pos (1152,384,-1152)
		pos (128,384,-1664)
	}
	
	bird
	{
		pos (1024,0,-128)
		pos (640,0,384)		// (640,128,384) ?
		pos (-128,256,640)
		pos (-640,0,384)	// (-640,128,384) ?
		pos (-1024,0,128)
	}
}
