CAREFUL : this update REVERSES the triggers default actions.
* Make the right trigger opens the hand and the left trigger skips to
  next phase.
* Add an option to reverse triggers (and thus revert to old style).
This commit is contained in:
jean.chalard
2009-09-23 07:25:39 +00:00
parent 82551174d9
commit 28f93c035f
7 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -29,10 +29,10 @@ public:
MUSICVOLUME, MUSICVOLUME,
SFXVOLUME, SFXVOLUME,
DIFFICULTY, DIFFICULTY,
PLASMAEFFECT,
OSD, OSD,
CLOSEDHAND, CLOSEDHAND,
HANDDIRECTION, HANDDIRECTION,
REVERSETRIGGERS,
INTERRUPT_SECONDS, INTERRUPT_SECONDS,
//My interrupts //My interrupts
INTERRUPTMYSPELLS, INTERRUPTMYSPELLS,
+2 -1
View File
@@ -684,12 +684,13 @@ void ActionStack::endOfInterruption(){
bool ActionStack::CheckUserInput(u32 key){ bool ActionStack::CheckUserInput(u32 key){
u32 trigger = (options[Options::REVERSETRIGGERS].number ? PSP_CTRL_RTRIGGER : PSP_CTRL_LTRIGGER);
if (mode == ACTIONSTACK_STANDARD){ if (mode == ACTIONSTACK_STANDARD){
if (askIfWishesToInterrupt){ if (askIfWishesToInterrupt){
if (PSP_CTRL_CROSS == key){ if (PSP_CTRL_CROSS == key){
setIsInterrupting(askIfWishesToInterrupt); setIsInterrupting(askIfWishesToInterrupt);
return true; return true;
}else if ((PSP_CTRL_CIRCLE == key) || (PSP_CTRL_RTRIGGER == key) ){ }else if ((PSP_CTRL_CIRCLE == key) || (trigger == key) ){
cancelInterruptOffer(); cancelInterruptOffer();
return true; return true;
}else if ((PSP_CTRL_SQUARE == key)){ }else if ((PSP_CTRL_SQUARE == key)){
+1 -1
View File
@@ -131,7 +131,7 @@ bool CardSelector::CheckUserInput(u32 key)
case PSP_CTRL_DOWN: case PSP_CTRL_DOWN:
active = closest<Down>(cards, limitor, active); active = closest<Down>(cards, limitor, active);
break; break;
case PSP_CTRL_LTRIGGER: case PSP_CTRL_TRIANGLE:
showBig = !showBig; showBig = !showBig;
return true; return true;
default: default:
+1
View File
@@ -45,6 +45,7 @@ void GameStateOptions::Start()
optionsList = NEW OptionsList("Game"); optionsList = NEW OptionsList("Game");
optionsList->Add(NEW OptionClosedHand(Options::CLOSEDHAND, "Closed hand")); optionsList->Add(NEW OptionClosedHand(Options::CLOSEDHAND, "Closed hand"));
optionsList->Add(NEW OptionHandDirection(Options::HANDDIRECTION, "Hand direction")); optionsList->Add(NEW OptionHandDirection(Options::HANDDIRECTION, "Hand direction"));
optionsList->Add(NEW OptionInteger(Options::REVERSETRIGGERS, "Reverse left and right triggers"));
optionsTabs->Add(optionsList); optionsTabs->Add(optionsList);
optionsList = NEW OptionsList("Profiles"); optionsList = NEW OptionsList("Profiles");
+7
View File
@@ -232,7 +232,14 @@ bool GuiCombat::CheckUserInput(u32 key)
addOne(active, step); addOne(active, step);
break; break;
case PSP_CTRL_SQUARE: case PSP_CTRL_SQUARE:
active = activeAtk = NULL; cursor_pos = OK;
break;
case PSP_CTRL_RTRIGGER: case PSP_CTRL_RTRIGGER:
if (!options[Options::REVERSETRIGGERS].number) return false;
active = activeAtk = NULL; cursor_pos = OK;
break;
case PSP_CTRL_LTRIGGER:
if (options[Options::REVERSETRIGGERS].number) return false;
active = activeAtk = NULL; cursor_pos = OK; active = activeAtk = NULL; cursor_pos = OK;
break; break;
} }
+1 -2
View File
@@ -134,8 +134,7 @@ void GuiHandSelf::Repos()
bool GuiHandSelf::CheckUserInput(u32 key) bool GuiHandSelf::CheckUserInput(u32 key)
{ {
//u32 trigger = options[REVERSE_TRIGGERS]; u32 trigger = (options[Options::REVERSETRIGGERS].number ? PSP_CTRL_LTRIGGER : PSP_CTRL_RTRIGGER);
u32 trigger = PSP_CTRL_LTRIGGER;
if (trigger == key) if (trigger == key)
{ {
state = (Open == state ? Closed : Open); state = (Open == state ? Closed : Open);
+2 -1
View File
@@ -40,7 +40,8 @@ void MTGGamePhase::Update(float dt){
bool MTGGamePhase::CheckUserInput(u32 key){ bool MTGGamePhase::CheckUserInput(u32 key){
GameObserver * game = GameObserver::GetInstance(); GameObserver * game = GameObserver::GetInstance();
if (activeState == INACTIVE){ if (activeState == INACTIVE){
if ((PSP_CTRL_RTRIGGER == key) && game->currentActionPlayer == game->currentlyActing()) u32 trigger = (options[Options::REVERSETRIGGERS].number ? PSP_CTRL_RTRIGGER : PSP_CTRL_LTRIGGER);
if ((trigger == key) && game->currentActionPlayer == game->currentlyActing())
{ {
activeState = ACTIVE; activeState = ACTIVE;
game->userRequestNextGamePhase(); game->userRequestNextGamePhase();