3 namespace Domain\VOs\StepMania
;
5 use Domain\Exception\InvalidDanceModeException
;
7 class DanceMode
implements IDanceMode
9 protected $stepManiaName;
10 protected $prettyName;
12 //XXX: Known step types, taken from https://github.com/stepmania/stepmania/blob/master/src/GameManager.cpp
13 private $_nameMap = array(
14 'dance-single' => 'Single',
15 'dance-double' => 'Double',
16 'dance-couple' => 'Couple',
17 'dance-solo' => 'Solo',
18 'dance-threepanel' => 'Three Panel',
19 'dance-routine' => 'Routine',
20 'pump-single' => 'Single',
21 'pump-double' => 'Double',
22 'pump-couple' => 'Couple',
23 'pump-halfdouble' => 'Half Double',
24 'pump-routine' => 'Routine',
25 'kb7-single' => 'Single',
26 'ez2-single' => 'Single',
27 'ez2-double' => 'Double',
29 'para-single' => 'Single',
30 'para-versus' => 'Versus', //Not in the list but I have seen it in files
31 'ds3ddx-single' => 'Single',
32 'bm-single' => 'Single', //Not in the list but I have seen it in files
33 'bm-single5' => 'Single 5 Key',
34 'bm-single7' => 'Single 7 Key',
35 'bm-double' => 'Double', //Not in the list, and I haven't seen it, but I feel like it must exist lol
36 'bm-double5' => 'Double 5 Key',
37 'bm-double7' => 'Double 7 Key',
38 'bm-versus5' => 'Versus 5 Key',
39 'bm-versus7' => 'Versus 7 Key',
40 //Seems like bm may have been called iidx or was changed to iidx at some point so...
41 'iidx-single' => 'Single', //Not in the list but I have seen it in files
42 'iidx-single5' => 'Single 5 Key',
43 'iidx-single7' => 'Single 7 Key',
44 'iidx-double' => 'Double', //Not in the list, and I haven't seen it, but I feel like it must exist lol
45 'iidx-double5' => 'Double 5 Key',
46 'iidx-double7' => 'Double 7 Key',
47 'iidx-versus5' => 'Versus 5 Key',
48 'iidx-versus7' => 'Versus 7 Key',
49 'maniax-single' => 'Single',
50 'maniax-double' => 'Double',
51 'techno-single4' => 'Single 4 Panel',
52 'techno-single5' => 'Single 5 Panel',
53 'techno-single8' => 'Single 8 Panel',
54 'techno-double4' => 'Double 4 Panel',
55 'techno-double5' => 'Double 5 Panel',
56 'techno-double8' => 'Double 8 Panel',
57 'pnm-five' => 'Five Key',
58 'pnm-nine' => 'Nine Key',
59 'lights-cabinet' => 'Cabinet Lights'
62 private $_smGameNameToNiceName = array(
63 'dance' => 'In The Groove',
64 'pump' => 'Pump It Up',
66 'para' => 'ParaParaParadise',
68 'iidx' => 'Beatmania',
69 'maniax' => 'Dance Maniax',
70 'techno' => 'TechnoMotion',
71 'pnm' => 'Pop\'n Music',
72 'ds3ddx' => 'Dance Station 3DDX',
77 public function __construct($stepManiaName)
79 if(array_key_exists($stepManiaName, $this->_nameMap
)) {
80 $this->stepManiaName
= $stepManiaName;
81 $this->prettyName
= $this->_nameMap
[$stepManiaName];
83 throw new InvalidDanceModeException(sprintf('Invalid dance mode %s', $stepManiaName));
87 public function getStepManiaName()
89 return $this->stepManiaName
;
92 public function getPrettyName()
94 return $this->prettyName
;
97 public function getGame()
99 $game = explode('-', $this->stepManiaName
)[0];
100 return $this->_smGameNameToNiceName
[$game];