Skip to content

Commit

Permalink
Improved Windows Mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarcloud committed Apr 19, 2016
1 parent 3e03862 commit 541be29
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 19 deletions.
2 changes: 1 addition & 1 deletion creator.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ <h1>GameInput Mapping Creator</h1>
GameInput.getPlayer(index).model.schema[schemaName] = new GameInput.Schema.AxisButton(value);
GameInput.getPlayer(index).schema[schemaName] = new GameInput.Schema.AxisButton(value);
}
updateCode(player);
updateCode(element);
}

function updateIcon(element) {
Expand Down
127 changes: 109 additions & 18 deletions gameinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,8 @@ var gi = {};
new gi.Schema.AxisButton(-4),
new gi.Schema.AxisButton(4),
new gi.Schema.AxisButton(-3),
new gi.Schema.AxisButton(3)//,
// TODO l_button,
// TODO r_button,
// TODO l_trigger,
// TODO r_trigger
new gi.Schema.AxisButton(3),
5,6,7,8
)),
new gi.Model(
gi.Type.Ragdoll,
Expand Down Expand Up @@ -582,15 +579,13 @@ var gi = {};
new gi.Schema.AxisButton(2),
new gi.Schema.AxisButton(-1),
new gi.Schema.AxisButton(1),
undefined,
undefined,
undefined,
undefined//,
// TODO l_button,
// TODO r_button,
// TODO l_trigger,
// TODO r_trigger
new gi.Schema.AxisButton(-4),
new gi.Schema.AxisButton(4),
new gi.Schema.AxisButton(-3),
new gi.Schema.AxisButton(3),
5,6,7,8
))

];

gi.Models.Specific = [
Expand All @@ -610,12 +605,58 @@ var gi = {};
new gi.Schema.AxisButton(-4),
new gi.Schema.AxisButton(4),
new gi.Schema.AxisButton(-3),
new gi.Schema.AxisButton(3)//,
// TODO l_button,
// TODO r_button,
// TODO l_trigger,
// TODO r_trigger
new gi.Schema.AxisButton(3),
5,6,7,8
)),
new gi.Model(
gi.Type.Ragdoll,
"ds4",
"Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 05c4)",
"Windows",
new gi.Schema.GamePadAPI(
13,14,15,16,
10,
1,2,3,4,
new gi.Schema.AxisButton(-2),
new gi.Schema.AxisButton(2),
new gi.Schema.AxisButton(-1),
new gi.Schema.AxisButton(1),
new gi.Schema.AxisButton(-4),
new gi.Schema.AxisButton(4),
new gi.Schema.AxisButton(-3),
new gi.Schema.AxisButton(3),
5,6,7,8
)
),
new gi.Model(
gi.Type.Ragdoll,
"ds4",
"054c-05c4-Wireless Controller",
"Windows",
new gi.Schema.GamePadAPI(
/* d_up */ 15,
/* d_down */ 16,
/* d_left */ 17,
/* d_right */ 18,
/* menu */ 10,
/* button0 */ 2,
/* button1 */ 3,
/* button2 */ 1,
/* button3 */ 4,
/* l_up */ new gi.Schema.AxisButton(-2),
/* l_down */ new gi.Schema.AxisButton(2),
/* l_left */ new gi.Schema.AxisButton(-1),
/* l_right */ new gi.Schema.AxisButton(1),
/* r_up */ new gi.Schema.AxisButton(-6),
/* r_down */ new gi.Schema.AxisButton(6),
/* r_left */ new gi.Schema.AxisButton(-3),
/* r_right */ new gi.Schema.AxisButton(3),
/* l_button */ 5,
/* r_button */ 6,
/* l_trigger */ 7,
/* r_trigger */ 8
)
),
new gi.Model(
gi.Type.Hedgehog,
"xbox360",
Expand Down Expand Up @@ -709,6 +750,27 @@ var gi = {};
undefined,
5, 6
)),
new gi.Model(
gi.Type.Hedgehog,
"dc",
"USB GamePad (Vendor: 0e8f Product: 3013)",
"Windows",
new gi.Schema.GamePadAPI(
13, 15, 16, 14,
10,
1,2,3,4,
new gi.Schema.AxisButton(-2),
new gi.Schema.AxisButton(2),
new gi.Schema.AxisButton(-1),
new gi.Schema.AxisButton(1),
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
5, 6
)),
new gi.Model(
gi.Type.Ragdoll,
"ds3",
Expand Down Expand Up @@ -794,6 +856,35 @@ var gi = {};
7,
8
)),
new gi.Model(
gi.Type.Hedgehog,
"joystick",
"Mayflash Arcade Stick (Vendor: 0e8f Product: 0003)",
"Windows",
new gi.Schema.GamePadAPI(
/* d_up */ new gi.Schema.AxisButton(-2),
/* d_down */ new gi.Schema.AxisButton(2),
/* d_left */ new gi.Schema.AxisButton(-1),
/* d_right */ new gi.Schema.AxisButton(1),
/* menu */ 10,
/* button0 */ 1,
/* button1 */ 2,
/* button2 */ 3,
/* button3 */ 4,
/* l_up */ undefined,
/* l_down */ undefined,
/* l_left */ undefined,
/* l_right */ undefined,
/* r_up */ undefined,
/* r_down */ undefined,
/* r_left */ undefined,
/* r_right */ undefined,
/* l_button */ 5,
/* r_button */ 6,
/* l_trigger */ 7,
/* r_trigger */ 8
)
),
new gi.Model(
gi.Type.Ragdoll,
"joystick",
Expand Down

0 comments on commit 541be29

Please sign in to comment.