Skip to content

Commit 2a6dc4c

Browse files
committed
PlayerConfig : add 10key PlayModeConfig
1 parent 9f23ab6 commit 2a6dc4c

File tree

5 files changed

+71
-8
lines changed

5 files changed

+71
-8
lines changed

src/bms/player/beatoraja/PlayModeConfig.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ public void setKeyAssign(Mode mode, boolean enable) {
189189
Keys.CONTROL_LEFT };
190190
break;
191191
case BEAT_10K:
192+
keys = new int[] { Keys.Z, Keys.S, Keys.X, Keys.D, Keys.C, Keys.SHIFT_LEFT,
193+
Keys.CONTROL_LEFT, Keys.COMMA, Keys.L, Keys.PERIOD, Keys.SEMICOLON, Keys.SLASH, Keys.SHIFT_RIGHT, Keys.CONTROL_RIGHT };
194+
break;
192195
case BEAT_14K:
193196
default:
194197
keys = new int[] { Keys.Z, Keys.S, Keys.X, Keys.D, Keys.C, Keys.F, Keys.V, Keys.SHIFT_LEFT,
@@ -306,6 +309,9 @@ public void setKeyAssign(Mode mode, int player, boolean enable) {
306309
BMKeys.BUTTON_5, BMKeys.LEFT, BMKeys.UP, BMKeys.DOWN };
307310
break;
308311
case BEAT_10K:
312+
keys = new int[]{ BMKeys.BUTTON_4, BMKeys.BUTTON_7, BMKeys.BUTTON_3, BMKeys.BUTTON_8, BMKeys.BUTTON_2,
313+
BMKeys.UP, BMKeys.DOWN, -1,-1,-1,-1,-1,-1,-1 };
314+
break;
309315
case BEAT_14K:
310316
keys = new int[]{ BMKeys.BUTTON_4, BMKeys.BUTTON_7, BMKeys.BUTTON_3, BMKeys.BUTTON_8, BMKeys.BUTTON_2,
311317
BMKeys.BUTTON_5, BMKeys.LEFT, BMKeys.UP, BMKeys.DOWN, -1,-1,-1,-1,-1,-1,-1,-1,-1 };
@@ -332,6 +338,9 @@ public void setKeyAssign(Mode mode, int player, boolean enable) {
332338
Arrays.fill(keys, -1);
333339
break;
334340
case BEAT_10K:
341+
keys = new int[]{-1,-1,-1,-1,-1,-1,-1,BMKeys.BUTTON_4, BMKeys.BUTTON_7, BMKeys.BUTTON_3, BMKeys.BUTTON_8, BMKeys.BUTTON_2,
342+
BMKeys.UP, BMKeys.DOWN};
343+
break;
335344
case BEAT_14K:
336345
keys = new int[]{-1,-1,-1,-1,-1,-1,-1,-1,-1,BMKeys.BUTTON_4, BMKeys.BUTTON_7, BMKeys.BUTTON_3, BMKeys.BUTTON_8, BMKeys.BUTTON_2,
337346
BMKeys.BUTTON_5, BMKeys.LEFT, BMKeys.UP, BMKeys.DOWN};
@@ -466,6 +475,16 @@ public Input getKeyAssign(int index) {
466475
public void setKeyAssign(Mode mode, boolean enable) {
467476
switch (mode) {
468477
case BEAT_5K:
478+
// 5keys
479+
keys = new Input[7];
480+
for (int i = 0; i < 5; i++) {
481+
keys[i] = new Input(Input.Type.NOTE, 53 + i);
482+
}
483+
keys[5] = new Input(Input.Type.NOTE, 49);
484+
keys[6] = new Input(Input.Type.NOTE, 51);
485+
start = new Input(Input.Type.NOTE, 47);
486+
select = new Input(Input.Type.NOTE, 48);
487+
break;
469488
case BEAT_7K:
470489
default:
471490
// 7keys
@@ -479,6 +498,22 @@ public void setKeyAssign(Mode mode, boolean enable) {
479498
select = new Input(Input.Type.NOTE, 48);
480499
break;
481500
case BEAT_10K:
501+
keys = new Input[14];
502+
for (int i = 0; i < 5; i++) {
503+
// 1P keys
504+
keys[i] = new Input(Input.Type.NOTE, 53 + i);
505+
// 2P keys
506+
keys[7 + i] = new Input(Input.Type.NOTE, 65 + i);
507+
}
508+
// 1P turntables
509+
keys[5] = new Input(Input.Type.NOTE, 49);
510+
keys[6] = new Input(Input.Type.NOTE, 51);
511+
// 2P turntables
512+
keys[12] = new Input(Input.Type.NOTE, 73);
513+
keys[13] = new Input(Input.Type.NOTE, 75);
514+
start = new Input(Input.Type.NOTE, 47);
515+
select = new Input(Input.Type.NOTE, 48);
516+
break;
482517
case BEAT_14K:
483518
keys = new Input[18];
484519
for (int i = 0; i < 7; i++) {

src/bms/player/beatoraja/PlayerConfig.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ public class PlayerConfig {
132132

133133
private PlayModeConfig mode7 = new PlayModeConfig(Mode.BEAT_7K);
134134

135+
private PlayModeConfig mode10 = new PlayModeConfig(Mode.BEAT_10K);
136+
135137
private PlayModeConfig mode14 = new PlayModeConfig(Mode.BEAT_14K);
136138

137139
private PlayModeConfig mode9 = new PlayModeConfig(Mode.POPN_9K);
@@ -290,6 +292,7 @@ public PlayModeConfig getPlayConfig(Mode modeId) {
290292
case BEAT_7K:
291293
return getMode7();
292294
case BEAT_10K:
295+
return getMode10();
293296
case BEAT_14K:
294297
return getMode14();
295298
case POPN_9K:
@@ -310,8 +313,9 @@ public PlayModeConfig getPlayConfig(int modeId) {
310313
case 5:
311314
return getMode5();
312315
case 14:
313-
case 10:
314316
return getMode14();
317+
case 10:
318+
return getMode10();
315319
case 9:
316320
return getMode9();
317321
case 25:
@@ -339,6 +343,18 @@ public void setMode7(PlayModeConfig mode7) {
339343
this.mode7 = mode7;
340344
}
341345

346+
public PlayModeConfig getMode10() {
347+
if(mode10 == null || mode10.getController().length < 2) {
348+
mode10 = new PlayModeConfig(Mode.BEAT_10K);
349+
Logger.getGlobal().warning("mode10のPlayConfigを再構成");
350+
}
351+
return mode10;
352+
}
353+
354+
public void setMode10(PlayModeConfig mode10) {
355+
this.mode10 = mode10;
356+
}
357+
342358
public PlayModeConfig getMode14() {
343359
if(mode14 == null || mode14.getController().length < 2) {
344360
mode14 = new PlayModeConfig(Mode.BEAT_14K);
@@ -592,6 +608,9 @@ public void validate() {
592608
if(mode14 == null) {
593609
mode14 = new PlayModeConfig(Mode.BEAT_14K);
594610
}
611+
if(mode10 == null) {
612+
mode10 = new PlayModeConfig(Mode.BEAT_10K);
613+
}
595614
if(mode9 == null) {
596615
mode9 = new PlayModeConfig(Mode.POPN_9K);
597616
}
@@ -603,6 +622,7 @@ public void validate() {
603622
}
604623
mode5.validate(7);
605624
mode7.validate(9);
625+
mode10.validate(14);
606626
mode14.validate(18);
607627
mode9.validate(9);
608628
mode24.validate(26);

src/bms/player/beatoraja/config/KeyConfiguration.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ public class KeyConfiguration extends MainState {
3737

3838
private BitmapFont titlefont;
3939

40-
private static final String[] MODE = { "5 KEYS", "7 KEYS", "9 KEYS", "14 KEYS", "24 KEYS", "24 KEYS DOUBLE" };
41-
private static final Mode[] MODE_HINT = { Mode.BEAT_5K,Mode.BEAT_7K, Mode.POPN_9K, Mode.BEAT_14K, Mode.KEYBOARD_24K,
40+
private static final String[] MODE = { "5 KEYS", "7 KEYS", "9 KEYS", "10 KEYS", "14 KEYS", "24 KEYS", "24 KEYS DOUBLE" };
41+
private static final Mode[] MODE_HINT = { Mode.BEAT_5K,Mode.BEAT_7K, Mode.POPN_9K, Mode.BEAT_10K, Mode.BEAT_14K, Mode.KEYBOARD_24K,
4242
Mode.KEYBOARD_24K_DOUBLE };
4343

4444
private static final String[][] KEYS = {
4545
{ "1 KEY", "2 KEY", "3 KEY", "4 KEY", "5 KEY", "F-SCR", "R-SCR", "START", "SELECT" },
4646
{ "1 KEY", "2 KEY", "3 KEY", "4 KEY", "5 KEY", "6 KEY", "7 KEY", "F-SCR", "R-SCR", "START", "SELECT" },
4747
{ "1 KEY", "2 KEY", "3 KEY", "4 KEY", "5 KEY", "6 KEY", "7 KEY", "8 KEY", "9 KEY", "START", "SELECT" },
48+
{ "1P-1 KEY", "1P-2 KEY", "1P-3 KEY", "1P-4 KEY", "1P-5 KEY", "1P-F-SCR",
49+
"1P-R-SCR", "2P-1 KEY", "2P-2 KEY", "2P-3 KEY", "2P-4 KEY", "2P-5 KEY",
50+
"2P-F-SCR", "2P-R-SCR", "START", "SELECT" },
4851
{ "1P-1 KEY", "1P-2 KEY", "1P-3 KEY", "1P-4 KEY", "1P-5 KEY", "1P-6 KEY", "1P-7 KEY", "1P-F-SCR",
4952
"1P-R-SCR", "2P-1 KEY", "2P-2 KEY", "2P-3 KEY", "2P-4 KEY", "2P-5 KEY", "2P-6 KEY", "2P-7 KEY",
5053
"2P-F-SCR", "2P-R-SCR", "START", "SELECT" },
@@ -59,6 +62,7 @@ public class KeyConfiguration extends MainState {
5962
private static final int[][] KEYSA = { { 0, 1, 2, 3, 4, 5, 6, -1, -2 },
6063
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -2 },
6164
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -2 },
65+
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, -2 },
6266
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -2 },
6367
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -2 },
6468
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
@@ -67,6 +71,7 @@ public class KeyConfiguration extends MainState {
6771
private static final int[][] BMKEYSA = { { 0, 1, 2, 3, 4, 5, 6, -1, -2 },
6872
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -2 },
6973
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -2 },
74+
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, -2 },
7075
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -2 },
7176
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -2 },
7277
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
@@ -76,6 +81,7 @@ public class KeyConfiguration extends MainState {
7681
{ 0, 1, 2, 3, 4, 5, 6, -1, -2 },
7782
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -2 },
7883
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -2 },
84+
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, -2 },
7985
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, -1, -2 },
8086
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -2 },
8187
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,

src/bms/player/beatoraja/launcher/PlayConfigurationView.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,8 +1120,10 @@ protected void updateItem(Integer arg0, boolean arg1) {
11201120
}
11211121

11221122
enum PlayMode {
1123-
BEAT_7K("5/7KEYS"),
1124-
BEAT_14K("10/14KEYS"),
1123+
BEAT_5K("5KEYS"),
1124+
BEAT_7K("7KEYS"),
1125+
BEAT_10K("10KEYS"),
1126+
BEAT_14K("14KEYS"),
11251127
POPN_9K("9KEYS"),
11261128
KEYBOARD_24K("24KEYS"),
11271129
KEYBOARD_24K_DOUBLE("24KEYS DOUBLE");

src/bms/player/beatoraja/play/LaneProperty.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ public LaneProperty(Mode mode) {
5151
scratchToKey = new int[][] { {7,8} };
5252
break;
5353
case BEAT_10K:
54-
keyToLane = new int[] { 0, 1, 2, 3, 4, -1, -1, 5, 5, 6, 7, 8, 9, 10, -1, -1, 11, 11 };
55-
laneToKey = new int[][] { {0}, {1}, {2}, {3}, {4}, {7,8}, {9}, {10}, {11}, {12}, {13}, {16,17} };
54+
keyToLane = new int[] { 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 11 };
55+
laneToKey = new int[][] { {0}, {1}, {2}, {3}, {4}, {5,6}, {7}, {8}, {9}, {10}, {11}, {12,13} };
5656
laneToScratch = new int[] { -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 1 };
5757
laneToSkinOffset = new int[] { 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0 };
58-
scratchToKey = new int[][] { {7,8}, {16,17} };
58+
scratchToKey = new int[][] { {5,6}, {12,13} };
5959
break;
6060
case BEAT_14K:
6161
keyToLane = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15 };

0 commit comments

Comments
 (0)