package u;

import com.ld57.game.ddd;

public class Uinput6 {
	// set defaults
	private static int p6left = 29;
	private static int p6right = 32;
	private static int p6up = 51;
	private static int p6down = 47;
	private static int p6aimleft = 21;// left key
	private static int p6aimright = 22;// right key
	private static int p6aimup = 19;// up key
	private static int p6aimdown = 20;// down key
	private static int p6fire = 0;
	private static int p6jump = 62;
	private static int p6inventory = 46;// this is actually reload for this game.
	private static int p6crouch = 59;
	private static int p6sprint = 129;
	private static int p6select = 1;
	private static int p6start = 111;// esc key
	private static String p6JoyLSRight = "cRd6";// button!
	private static String p6JoyLSLeft = "cLd6";// button!
	private static String p6JoyLSUp = "cUd6";// button!
	private static String p6JoyLSDown = "cDd6";// button!
	private static String p6JoyRSRight = "cRd6";// button!
	private static String p6JoyRSLeft = "cLd6";// button!
	private static String p6JoyRSUp = "cUd6";// button!
	private static String p6JoyRSDown = "cDd6";// button!
	private static String p6JoyFire = "bDd6";
	private static String p6JoyJump = "bLd6";
	private static String p6JoyInventory = "bRd6";
	private static String p6JoyCrouch = "bRTd6";
	private static String p6JoySprint = "bLTd6";
	private static String p6JoySelect = "bSeld6";
	private static String p6JoyStart = "bStd6";

	private static String p6masterright = "Right_IsKeyboard_PlayerSix";
	private static String p6masterleft = "Left_IsKeyboard_PlayerSix";
	private static String p6masterup = "Up_IsKeyboard_PlayerSix";
	private static String p6masterdown = "Down_IsKeyboard_PlayerSix";
	private static String p6masteraimright = "Aim_Right_IsKeyboard_PlayerSix";
	private static String p6masteraimleft = "Aim_Left_IsKeyboard_PlayerSix";
	private static String p6masteraimup = "Aim_Up_IsKeyboard_PlayerSix";
	private static String p6masteraimdown = "Aim_Down_IsKeyboard_PlayerSix";
	private static String p6masterfire = "Fire_IsMouse_PlayerSix";
	private static String p6masterjump = "Jump_IsKeyboard_PlayerSix";
	private static String p6masterinventory = "Inventory_IsKeyboard_PlayerSix";
	private static String p6mastercrouch = "Crouch_IsKeyboard_PlayerSix";
	private static String p6mastersprint = "Sprint_IsKeyboard_PlayerSix";
	private static String p6masterselect = "Select_IsKeyboard_PlayerSix";
	private static String p6masterstart = "Start_IsKeyboard_PlayerSix";

	public Uinput6() {

	}
	/*
	 * does this class need to be changed to add in controller support? I'd think so. hmmm. It just needs to be able to remember the last
	 * controller used, the buttons that were mapped, etc. Each one, i hope, can hold settings. That's all this should do.
	 */

	public static void LoadDefaultInputs() {
		boolean first = ddd.GameSettings.getBoolean("IsFirstTimeRunningGame6");// this is going to be backwards because it defaults to false.
		// System.out.println("first: " + first);
		if (!first) {// if the first time the game is running, set all the defaults
			ddd.GameSettings.putBoolean("IsFirstTimeRunningGame6", true);// remember this has to be backwards to work.^^
			ddd.GameSettings.putInteger("p6_left_key", 29);// a = 29
			ddd.GameSettings.putInteger("p6_right_key", 32);// d = 32
			ddd.GameSettings.putInteger("p6_up_key", 51);// w = 51
			ddd.GameSettings.putInteger("p6_down_key", 47);// s = 47
			ddd.GameSettings.putInteger("p6_aim_left_key", 21);// left = 21
			ddd.GameSettings.putInteger("p6_aim_right_key", 22);// right = 22
			ddd.GameSettings.putInteger("p6_aim_up_key", 19);// up = 19
			ddd.GameSettings.putInteger("p6_aim_down_key", 20);// down = 20
			ddd.GameSettings.putInteger("p6_fire_key", 0);// left_mouse_button = 0
			ddd.GameSettings.putInteger("p6_cancel_key", 1);// right_mouse_button = 1
			ddd.GameSettings.putInteger("p6_jump_key", 62);// space = 62
			ddd.GameSettings.putInteger("p6_inventory_key", 46);// i = 37 (46 is R for reload in this game)
			ddd.GameSettings.putInteger("p6_crouch_key", 59);// = left_shift = 59
			ddd.GameSettings.putInteger("p6_sprint_key", 129);// = left_control = 129
			ddd.GameSettings.putInteger("p6_start_key", 111);// = esc = 111
			ddd.GameSettings.putString("p6masterright", "Right_IsKeyboard_PlayerSix");// pause player master map (direction, controllerType, player)
			ddd.GameSettings.putString("p6masterleft", "Left_IsKeyboard_PlayerSix");// default everything to keyboard...? lolz
			ddd.GameSettings.putString("p6masterup", "Up_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masterdown", "Down_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masteraimright", "Aim_Right_IsKeyboard_PlayerSix");// aim keys...
			ddd.GameSettings.putString("p6masteraimleft", "Aim_Left_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masteraimup", "Aim_Up_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masteraimdown", "Aim_Down_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masterfire", "Fire_IsMouse_PlayerSix");
			ddd.GameSettings.putString("p6masterjump", "Jump_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masterinventory", "Inventory_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6mastercrouch", "Crouch_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6mastersprint", "Sprint_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masterselect", "Select_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6masterstart", "Start_IsKeyboard_PlayerSix");
			ddd.GameSettings.putString("p6_aim_right_button", "RScRd6");// buttons!
			ddd.GameSettings.putString("p6_aim_left_button", "RScLd6");// buttons!
			ddd.GameSettings.putString("p6_aim_up_button", "RScUd6");// buttons!
			ddd.GameSettings.putString("p6_aim_down_button", "RScDd6");// buttons!
			ddd.GameSettings.putString("p6_right_button", "bRd6");// buttons!
			ddd.GameSettings.putString("p6_left_button", "bLd6");// buttons!
			ddd.GameSettings.putString("p6_up_button", "bUd6");// buttons!
			ddd.GameSettings.putString("p6_down_button", "bsDd6");// buttons!
			ddd.GameSettings.putString("p6_fire_button", "bDd6");// buttons!
			ddd.GameSettings.putString("p6_jump_button", "bLd6");// buttons!
			ddd.GameSettings.putString("p6_inventory_button", "bRd6");// buttons!
			ddd.GameSettings.putString("p6_crouch_button", "bRTd6");// buttons!
			ddd.GameSettings.putString("p6_sprint_button", "bLTd6");// buttons!
			ddd.GameSettings.putString("p6_select_button", "bSeld6");// buttons!
			ddd.GameSettings.putString("p6_start_button", "bStd6");// buttons!
			ddd.GameSettings.flush();
		} else {// if not, load the defaults?... uhhhh it works. "PASSED" lol
			p6left = ddd.GameSettings.getInteger("p6_left_key");
			p6right = ddd.GameSettings.getInteger("p6_right_key");// d = 32
			p6up = ddd.GameSettings.getInteger("p6_up_key");// w = 51
			p6down = ddd.GameSettings.getInteger("p6_down_key");// s = 47
			p6aimleft = ddd.GameSettings.getInteger("p6_aim_left_key");
			p6aimright = ddd.GameSettings.getInteger("p6_aim_right_key");// d = 32
			p6aimup = ddd.GameSettings.getInteger("p6_aim_up_key");// w = 51
			p6aimdown = ddd.GameSettings.getInteger("p6_aim_down_key");// s = 47
			p6fire = ddd.GameSettings.getInteger("p6_fire_key");// left_mouse_button = 0
			p6select = ddd.GameSettings.getInteger("p6_select_key");// right_mouse_button = 1
			p6jump = ddd.GameSettings.getInteger("p6_jump_key");// space = 62
			p6inventory = ddd.GameSettings.getInteger("p6_inventory_key");// i = 37 I switched this to R for reload for this game.
			p6crouch = ddd.GameSettings.getInteger("p6_crouch_key");// = left_shift = 59
			p6sprint = ddd.GameSettings.getInteger("p6_sprint_key");// = left_control = 129
			p6start = ddd.GameSettings.getInteger("p6_start_key");// = esc = 111
			p6JoyLSRight = ddd.GameSettings.getString("p6_right_button");
			p6JoyLSLeft = ddd.GameSettings.getString("p6_left_button");
			p6JoyLSUp = ddd.GameSettings.getString("p6_up_button");
			p6JoyLSDown = ddd.GameSettings.getString("p6_down_button");
			p6JoyRSRight = ddd.GameSettings.getString("p6_aim_right_button");
			p6JoyRSLeft = ddd.GameSettings.getString("p6_aim_left_button");
			p6JoyRSUp = ddd.GameSettings.getString("p6_aim_up_button");
			p6JoyRSDown = ddd.GameSettings.getString("p6_aim_down_button");
			p6JoyFire = ddd.GameSettings.getString("p6_fire_button");
			p6JoySelect = ddd.GameSettings.getString("p6_select_button");
			p6JoyJump = ddd.GameSettings.getString("p6_jump_button");
			p6JoyInventory = ddd.GameSettings.getString("p6_inventory_button");
			p6JoyCrouch = ddd.GameSettings.getString("p6_crouch_button");
			p6JoySprint = ddd.GameSettings.getString("p6_sprint_button");
			p6JoyStart = ddd.GameSettings.getString("p6_start_button");
			p6masterright = ddd.GameSettings.getString("p6masterright");
			p6masterleft = ddd.GameSettings.getString("p6masterleft");
			p6masterup = ddd.GameSettings.getString("p6masterup");
			p6masterdown = ddd.GameSettings.getString("p6masterdown");
			p6masteraimright = ddd.GameSettings.getString("p6masteraimright");
			p6masteraimleft = ddd.GameSettings.getString("p6masteraimleft");
			p6masteraimup = ddd.GameSettings.getString("p6masteraimup");
			p6masteraimdown = ddd.GameSettings.getString("p6masteraimdown");
			p6masterfire = ddd.GameSettings.getString("p6masterfire");
			p6masterjump = ddd.GameSettings.getString("p6masterjump");
			p6masterinventory = ddd.GameSettings.getString("p6masterinventory");
			p6mastercrouch = ddd.GameSettings.getString("p6mastercrouch");
			p6mastersprint = ddd.GameSettings.getString("p6mastersprint");
			p6masterselect = ddd.GameSettings.getString("p6masterselect");
			p6masterstart = ddd.GameSettings.getString("p6masterstart");
		}

	}

	public static int P6AimLeft() {
		return p6aimleft;
	}

	public static int P6AimRight() {
		return p6aimright;
	}

	public static int P6AimUp() {
		return p6aimup;
	}

	public static int P6AimDown() {
		return p6aimdown;
	}

	public static int P6Left() {
		return p6left;
	}

	public static int P6Right() {
		return p6right;
	}

	public static int P6Up() {
		return p6up;
	}

	public static int P6Down() {
		return p6down;
	}

	public static int P6Fire() {
		return p6fire;
	}

	public static int P6Select() {
		return p6select;
	}

	public static int P6Jump() {
		return p6jump;
	}

	public static int P6Inventory() {
		return p6inventory;
	}

	public static int P6Crouch() {
		return p6crouch;
	}

	public static int P6Sprint() {
		return p6sprint;
	}

	public static int P6Start() {
		return p6start;
	}

	public static String P6MasterRight() {
		return p6masterright;
	}

	public static String P6MasterLeft() {
		return p6masterleft;
	}

	public static String P6MasterUp() {
		return p6masterup;
	}

	public static String P6MasterDown() {
		return p6masterdown;
	}

	public static String P6MasterAimRight() {
		return p6masteraimright;
	}

	public static String P6MasterAimLeft() {
		return p6masteraimleft;
	}

	public static String P6MasterAimUp() {
		return p6masteraimup;
	}

	public static String P6MasterAimDown() {
		return p6masteraimdown;
	}

	public static String P6MasterFire() {
		return p6masterfire;
	}

	public static String P6MasterJump() {
		return p6masterjump;
	}

	public static String P6MasterInventory() {
		return p6masterinventory;
	}

	public static String P6MasterSprint() {
		return p6mastersprint;
	}

	public static String P6MasterCrouch() {
		return p6mastercrouch;
	}

	public static String P6MasterSelect() {
		return p6masterselect;
	}

	public static String P6MasterStart() {
		return p6masterstart;
	}

	public static String P6JoyLSRight() {
		return p6JoyLSRight;
	}

	public static String P6JoyLSLeft() {
		return p6JoyLSLeft;
	}

	public static String P6JoyLSUp() {
		return p6JoyLSUp;
	}

	public static String P6JoyLSDown() {
		return p6JoyLSDown;
	}

	public static String P6JoyRSRight() {
		return p6JoyRSRight;
	}

	public static String P6JoyRSLeft() {
		return p6JoyRSLeft;
	}

	public static String P6JoyRSUp() {
		return p6JoyRSUp;
	}

	public static String P6JoyRSDown() {
		return p6JoyRSDown;
	}

	public static String P6JoyFire() {
		return p6JoyFire;
	}

	public static String P6JoyJump() {
		return p6JoyJump;
	}

	public static String P6JoyInventory() {
		return p6JoyInventory;
	}

	public static String P6JoyCrouch() {
		return p6JoyCrouch;
	}

	public static String P6JoySprint() {
		return p6JoySprint;
	}

	public static String P6JoySelect() {
		return p6JoySelect;
	}

	public static String P6JoyStart() {
		return p6JoyStart;
	}
}
