
local Static, StaticNight, StaticRain, ParralaxFront, ParralaxBack = 0, 1, 2, 3, 4

function CreateBackground(spriteName, bgType, parralaxCoords, staticYMin, staticYMax, isStaticMoving )
	local obj = Create("CBackground");
	obj.m_spriteName = spriteName;
	obj.m_type = bgType;
	obj.m_parralaxCoords = parralaxCoords;
	obj.m_staticYMin = staticYMin or -1;
	obj.m_staticYMax = staticYMax or -1;
	obj.m_isStaticMoving = isStaticMoving or false;
	return obj;
end

bg_sky 					= CreateBackground( "Background/Surface_Sky", 		Static, 		nil, 700, 1024 );
bg_skyNight 			= CreateBackground( "Background/Surface_SkyNight", 	StaticNight, 	nil, 700, 1024 );
bg_skyRain 				= CreateBackground( "Background/Surface_SkyRain", 	StaticRain, 	nil, 700, 1024 );

bg_paraBackSurface 		= CreateBackground( "Background/Surface_Back", 		ParralaxBack, 	{ int2( -2, 5 ) } );
bg_paraFrontSurface 	= CreateBackground( "Background/Surface_Front", 	ParralaxFront, 	{ int2( -2, 5 ) } );

bg_paraBackChasm 		= CreateBackground( "Background/Chasm_Back", 		ParralaxBack, 	{ int2( 1, 4 ) } );
bg_paraFrontChasmTop 	= CreateBackground( "Background/Chasm_FrontTop", 	ParralaxFront, 	{ int2( 1, 5 ) } );
bg_paraFrontChasm 		= CreateBackground( "Background/Chasm_Front", 		ParralaxFront, 	{ int2( 1, 4 ) } );

bg_skySea 				= CreateBackground( "Background/Ocean_Sky", 		Static, 		nil, 350, 500, true );
bg_paraBackOcean 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( -2, 3 ) } );
bg_paraBackOcean_Uni 	= CreateBackground( "Background/Ocean_BackUni", 	ParralaxBack, 	{ int2( -2, 2 ) } );
                          
bg_skyMoria 			= CreateBackground( "Background/Moria_Sky", 		Static, 		nil, 0, 200, true );
bg_paraBackMoria 		= CreateBackground( "Background/Moria_Back", 		ParralaxBack, 	{ int2( -2, 0 ) } );
bg_paraBackMoria_Uni 	= CreateBackground( "Background/Moria_BackUni", 	ParralaxBack, 	{ int2( -2, -1 ), int2( -2, 1 ) } );
bg_paraFrontMoria 		= CreateBackground( "Background/Moria_Front", 		ParralaxFront, 	{ int2( -2, 0 ) } );
bg_paraFrontMoria_Uni 	= CreateBackground( "Background/Moria_FrontUni", 	ParralaxFront, 	{ int2( -2, -1 ), int2( -2, 1 ) } );


list_backgrounds = { bg_sky, bg_skyNight, bg_skyRain, bg_paraBackSurface, bg_paraFrontSurface, bg_paraBackChasm, bg_paraFrontChasmTop, bg_paraFrontChasm, bg_skySea, bg_paraBackOcean, bg_paraBackOcean_Uni, bg_skyMoria, bg_paraBackMoria, bg_paraBackMoria_Uni, bg_paraFrontMoria, bg_paraFrontMoria_Uni };