package u;

import com.ld58.game.rcr;

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