-- --------------------------------------------------------------------------
-- Copyright © 2008 PlayFirst, Inc. All Rights Reserved.
--
-- This material is the confidential trade secret and proprietary
-- information of PlayFirst, Inc. It may not be reproduced, used, disclosed,
-- sold or transferred without the prior written consent of PlayFirst, Inc. 
-- All rights reserved.
-- --------------------------------------------------------------------------

--begin Sprite position
kSkyX = 0;
kSkyY = 0;

kGreenFieldX = 0;
kGreenFieldY = 0;

kMainCityGapX = -9;
kMainCityGapY = -6;

kDinertownX = 0+kMainCityGapX;
kDinertownY = 84;

kBrickGymX = -123.6+kMainCityGapX;
kBrickGymY = 59+kMainCityGapY;
kBrickGym2X = kBrickGymX-0.5;
kBrickGym2Y = kBrickGymY-0.5;


kCruiseshipX = 111+kMainCityGapX;
kCruiseshipY = 55+kMainCityGapY;
kCruiseship2X = kCruiseshipX+0.5;
kCruiseship2Y = kCruiseshipY;

kRooftopX = 87+kMainCityGapX;
kRooftopY = 123+kMainCityGapY;
kRooftop2X = kRooftopX;
kRooftop2Y = kRooftopY-0.5;

kZenX = -107+kMainCityGapX;
kZenY = 144+kMainCityGapY;
kZen2X = kZenX-0.5;
kZen2Y = kZenY;

kOlympusX = 2+kMainCityGapX;
kOlympusY = 13+kMainCityGapY;
kOlympus2X = kOlympusX;
kOlympus2Y = kOlympusY-2;

kCloud1X = 5+kMainCityGapX;
kCloud1Y = -33+kMainCityGapY;

kCloud2X = 20+kMainCityGapX;
kCloud2Y = -83+kMainCityGapY;

kFinalPathX = 50+kMainCityGapX;
kFinalPathY = -86+kMainCityGapY;

kMeattropolisX = -25;
kMeattropolisY = -210;

--end Sprite position

--Begin Level Marker

kMarker_Map1_Level1X = -207;
kMarker_Map1_Level1Y = 24;
kMarker_Map1_Level2X = -254;
kMarker_Map1_Level2Y = 14;
kMarker_Map1_Level3X = -300;
kMarker_Map1_Level3Y = 2;
kMarker_Map1_Level4X = -337;
kMarker_Map1_Level4Y = -17;
kMarker_Map1_Level5X = -350;
kMarker_Map1_Level5Y = -48;
kMarker_Map1_Level6X = -305;
kMarker_Map1_Level6Y = -63;
kMarker_Map1_Level7X = -254;
kMarker_Map1_Level7Y = -72;
kMarker_Map1_Level8X = -212;
kMarker_Map1_Level8Y = -92;
kMarker_Map1_Level9X = -229;
kMarker_Map1_Level9Y = -120;
kMarker_Map1_Level10X = -266;
kMarker_Map1_Level10Y = -139;
kMarker_Map1_Level11X = -305;
kMarker_Map1_Level11Y = -155;

kMarker_Map2_Level1X = 207;
kMarker_Map2_Level1Y = 20;
kMarker_Map2_Level2X = 254;
kMarker_Map2_Level2Y = 10;
kMarker_Map2_Level3X = 300;
kMarker_Map2_Level3Y = -4;
kMarker_Map2_Level4X = 335;
kMarker_Map2_Level4Y = -23;
kMarker_Map2_Level5X = 347;
kMarker_Map2_Level5Y = -52;
kMarker_Map2_Level6X = 303;
kMarker_Map2_Level6Y = -65;
kMarker_Map2_Level7X = 252;
kMarker_Map2_Level7Y = -72;
kMarker_Map2_Level8X = 208;
kMarker_Map2_Level8Y = -92;
kMarker_Map2_Level9X = 222;
kMarker_Map2_Level9Y = -122;
kMarker_Map2_Level10X = 258;
kMarker_Map2_Level10Y = -140;
kMarker_Map2_Level11X = 294;
kMarker_Map2_Level11Y = -156;

kMarker_Map3_Level1X = 145;
kMarker_Map3_Level1Y = 139;
kMarker_Map3_Level2X = 195;
kMarker_Map3_Level2Y = 139;
kMarker_Map3_Level3X = 235;
kMarker_Map3_Level3Y = 163;
kMarker_Map3_Level4X = 180;
kMarker_Map3_Level4Y = 183;
kMarker_Map3_Level5X = 127;
kMarker_Map3_Level5Y = 184;
kMarker_Map3_Level6X = 74;
kMarker_Map3_Level6Y = 185;
kMarker_Map3_Level7X = 24;
kMarker_Map3_Level7Y = 199;
kMarker_Map3_Level8X = 52;
kMarker_Map3_Level8Y = 225;
kMarker_Map3_Level9X = 100;
kMarker_Map3_Level9Y = 227;
kMarker_Map3_Level10X = 150;
kMarker_Map3_Level10Y = 227;
kMarker_Map3_Level11X = 200;
kMarker_Map3_Level11Y = 227;

kMarker_Map4_Level1X = -200;
kMarker_Map4_Level1Y = 136;
kMarker_Map4_Level2X = -240;
kMarker_Map4_Level2Y = 158;
kMarker_Map4_Level3X = -210;
kMarker_Map4_Level3Y = 181;
kMarker_Map4_Level4X = -160;
kMarker_Map4_Level4Y = 182;
kMarker_Map4_Level5X = -110;
kMarker_Map4_Level5Y = 182;
kMarker_Map4_Level6X = -60;
kMarker_Map4_Level6Y = 182;
kMarker_Map4_Level7X = -27;
kMarker_Map4_Level7Y = 210;
kMarker_Map4_Level8X = -76;
kMarker_Map4_Level8Y = 224;
kMarker_Map4_Level9X = -129;
kMarker_Map4_Level9Y = 224;
kMarker_Map4_Level10X = -182;
kMarker_Map4_Level10Y = 224;
kMarker_Map4_Level11X = -235;
kMarker_Map4_Level11Y = 224;

kMarker_Map5_Level1X = -85;
kMarker_Map5_Level1Y = -30;
kMarker_Map5_Level2X = -123;
kMarker_Map5_Level2Y = -75;
kMarker_Map5_Level3X = -147;
kMarker_Map5_Level3Y = -125;
kMarker_Map5_Level4X = -100;
kMarker_Map5_Level4Y = -149;
kMarker_Map5_Level5X = -40;
kMarker_Map5_Level5Y = -140;
kMarker_Map5_Level6X = 25;
kMarker_Map5_Level6Y = -133;
kMarker_Map5_Level7X = 90;
kMarker_Map5_Level7Y = -137;
kMarker_Map5_Level8X = 155;
kMarker_Map5_Level8Y = -152;
kMarker_Map5_Level9X = 202;
kMarker_Map5_Level9Y = -175;
kMarker_Map5_Level10X = 220;
kMarker_Map5_Level10Y = -215;
kMarker_Map5_Level11X = 155;
kMarker_Map5_Level11Y = -232;


--End Level Marker

color_score_green		= Color(159,226,137,255);
color_score_green_flash	= Color(153,255,0,255);

MetamapBtnGrapRight = {
	"images/metamap/right_arrow.png",
	"images/metamap/right_arrow_click.png",
	"images/metamap/right_arrow_rollover.png"
};
MetamapBtnGrapLeft = {
	"images/metamap/left_arrow.png",
	"images/metamap/left_arrow_click.png",
	"images/metamap/left_arrow_rollover.png"
};
MetamapBtnStyle = {
	graphics		= MetamapBtnGrapRight,
	w				= 38,
	h				= 40,
};

dofile( "scripts/tittle_style.lua" );
require( "scripts/luadebug.lua" );

kPlayButtonX = 750;
kPlayButtonY = 560;

kScoreX = 500;
kScoreY = kPlayButtonY-11;
kLineHud = 20;

MakeDialog
{
	name="levelselector",

	Bitmap
	{
		name="bgpopup01",
		image="images/backgrounds/bgpopup01.png",
		x = 0, y = 0, w = kMax, h = kMax,

		MetaMapLayerWindow
		{
			name="GameLayerWindow",
			x = 0, y = 0, w = kMax, h = kMax,	

				
			MetaMap
			{
				x = 0, y = 0, w=kMax, h=kMax,

		-- SCORE
				Text
				{
					font = { standardFont, 12, color_score_green };				
					x=kScoreX,
					y=kScoreY+kLineHud,
					w=100,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					name = "best_score_header",
					label = "best_score_header"
				};
		-- Best score indicator
				Text
				{
					font = { standardFont, 16, color_score_green_flash };				
					x=kScoreX,
					y=kScoreY,
					w=100,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					name = "best_score",
					label = "best_score"
				};
		-- Level header
				Text
				{
					font = { standardFont, 12, color_score_green };				
					x=kCenter-3,
					y=kScoreY+kLineHud,
					w=100,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					name = "current_level_header",
					label = "current_level_header"
				};
		-- Level 
				Text
				{
					font = { standardFont, 16, color_score_green_flash };				
					x=kCenter-3,
					y=kScoreY,
					w=100,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					name = "current_level",
				};
		-- Location header
				Text
				{
					font = { standardFont, 12, color_score_green };				
					x=kCenter-155,
					y=kScoreY+kLineHud,
					w=100,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					label = "current_venue_header"
				};
		-- Location
				Text
				{
					font = { standardFont, 16, color_score_green_flash };				
					x=kCenter-158,
					y=kScoreY,
					w=120,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					name = "current_venue",
				};
				
				SetStyle(MetamapBtnStyle),


--TOGGLE DIFFICULTY ENDLESS
				Button
				{
					x=kPlayButtonX-13,
					y=kPlayButtonY-6,
					name = "fitness_difficulty",
--					label = "common.play.label",
					command = 
						function()
							DoModal("scripts/endlessdifficult.lua");					
						end
				};

--TOGGLE DIFFICULTY TUG
				Button
				{
					x=kPlayButtonX-13,
					y=kPlayButtonY-6,
					name = "tug_difficulty",
--					label = "common.play.label",
					command = 
						function()
							DoModal("scripts/endlessdifficult2.lua");					
						end
				};

--PLAY
				Button
				{
					w=66,h=52,
					x=kPlayButtonX-13,
					y=kPlayButtonY-6,
					name = "play",
					mask = "assets/images/metamap/mask_btn",
					command = 
						function()
							PlayButton();							
						end
				};
				Text
				{
					font = { standardFont, 16, WhiteColor};				
					x=kPlayButtonX-95,
					y=kPlayButtonY-5,
					w=120,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					name = "playtx",
					label ="common.play.metamap",	
				};
--BACK
				Button
				{
					graphics		= MetamapBtnGrapLeft,
					x=0,
					y=kPlayButtonY-6,
					mask = "assets/images/metamap/mask_btn",
					name="back",
					command = 
						function()
							-- Close the current window
							StopComicMusic();
							PopModal("levelselector");
							-- Return to the main menu
							DoModal("scripts/mainmenu.lua");

						end
				};
				Text
				{
					font = { standardFont, 16, WhiteColor };				
					x=12+15,
					y=kPlayButtonY-5,
					w=120,
					h=50,
					flags = kHAlignCenter + kVAlignCenter,
					name = "backtx",
					label ="common.back.metamap",	
				};
			}
		}
	}
}
