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

function CreateBackground(spriteName, bgType, parralaxCoords, staticYMin, staticYMax, isStaticMoving, staticXMin, staticXMax )
	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;
	obj.m_staticXMin = staticXMin or -1;
	obj.m_staticXMax = staticXMax or -1;	
	return obj;
end


bg_sky 					= CreateBackground( "Background/Surface_Sky", 		Static, 		nil, 0, 1024 );
bg_skyNight1 			= CreateBackground( "Background/Surface_SkyNight", 	StaticNight, 	nil, 500, 1024 );
bg_skyNight2 			= CreateBackground( "Background/Surface_SkyNight", 	StaticNight, 	nil, 0, 500, false, 900, 1024 );
bg_skyRain 				= CreateBackground( "Background/Surface_SkyRain", 	StaticRain, 	nil, 0, 1024 );


bg_skySea 				= CreateBackground( "Background/Ocean_Sky", 		Static, 		nil, 250, 350, true, 0, 900 );
bg_paraBackOceanM1 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( -1, 2 ) } );
bg_paraBackOcean0 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( 0, 2 ) } );
bg_paraBackOcean1 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( 1, 2 ) } );
bg_paraBackOcean2 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( 2, 2 ) } );
bg_paraBackOcean3 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( 3, 2 ) } );
bg_paraBackOcean4 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( 4, 2 ) } );
bg_paraBackOcean5 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( 5, 2 ) } );
bg_paraBackOcean6 		= CreateBackground( "Background/Ocean_Back", 		ParralaxBack, 	{ int2( 6, 2 ) } );


bg_paraBackMoria 		= CreateBackground( "Background/Moria_Back", 		ParralaxBack, 	{ int2( -2, 2 ) } );
bg_paraFrontMoria 		= CreateBackground( "Background/Moria_Front", 		ParralaxFront, 	{ int2( -2, 2 ) } );

list_backgrounds = { bg_sky, bg_skyNight1, bg_skyNight2, bg_skyRain,
bg_skySea, bg_paraBackOceanM1, bg_paraBackOcean0, bg_paraBackOcean1, bg_paraBackOcean2, bg_paraBackOcean3, bg_paraBackOcean4, bg_paraBackOcean5, bg_paraBackOcean6 }; 




