From 5e0be442b006687c8ca4c0f32062f1cb15356079 Mon Sep 17 00:00:00 2001 From: "wagic.jeck" Date: Thu, 25 Feb 2010 15:22:19 +0000 Subject: [PATCH] Jeck - Removed "Reverse Triggers" option, as per issue 359. --- projects/mtg/include/GameOptions.h | 1 - projects/mtg/src/ActionStack.cpp | 2 +- projects/mtg/src/GameOptions.cpp | 1 - projects/mtg/src/GameStateOptions.cpp | 1 - projects/mtg/src/GuiCombat.cpp | 5 -- projects/mtg/src/GuiHand.cpp | 2 +- projects/mtg/src/MTGGamePhase.cpp | 112 +++++++++++++------------- 7 files changed, 58 insertions(+), 66 deletions(-) diff --git a/projects/mtg/include/GameOptions.h b/projects/mtg/include/GameOptions.h index 7c40f80b9..0e7f58af1 100644 --- a/projects/mtg/include/GameOptions.h +++ b/projects/mtg/include/GameOptions.h @@ -39,7 +39,6 @@ public: CLOSEDHAND, HANDDIRECTION, MANADISPLAY, - REVERSETRIGGERS, DISABLECARDS, MAX_GRADE, ECON_DIFFICULTY, diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index e5e5ef6c6..1b40884bf 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -621,7 +621,7 @@ void ActionStack::endOfInterruption(){ bool ActionStack::CheckUserInput(JButton key){ - JButton trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_NEXT : JGE_BTN_PREV); + JButton trigger = JGE_BTN_PREV; if (mode == ACTIONSTACK_STANDARD){ if (askIfWishesToInterrupt){ if (JGE_BTN_SEC == key){ diff --git a/projects/mtg/src/GameOptions.cpp b/projects/mtg/src/GameOptions.cpp index 01346fd54..55bff1320 100644 --- a/projects/mtg/src/GameOptions.cpp +++ b/projects/mtg/src/GameOptions.cpp @@ -26,7 +26,6 @@ const string Options::optionNames[] = { "closed_hand", "hand_direction", "mana_display", - "reverse_triggers", "disable_cards", "maxGrade", "economic_difficulty", diff --git a/projects/mtg/src/GameStateOptions.cpp b/projects/mtg/src/GameStateOptions.cpp index fb66caebf..67c1f2d58 100644 --- a/projects/mtg/src/GameStateOptions.cpp +++ b/projects/mtg/src/GameStateOptions.cpp @@ -42,7 +42,6 @@ void GameStateOptions::Start() optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::CLOSEDHAND,"Closed hand",1,1,0))); optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::HANDDIRECTION,"Hand direction",1,1,0))); optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::MANADISPLAY,"Mana display",2,1,0))); - optionsList->Add(NEW OptionInteger(Options::REVERSETRIGGERS, "Reverse left and right triggers")); optionsList->Add(NEW OptionInteger(Options::DISABLECARDS,"Disable card images")); optionsList->Add(NEW OptionInteger(Options::TRANSITIONS,"Disable screen transitions")); optionsTabs->Add(optionsList); diff --git a/projects/mtg/src/GuiCombat.cpp b/projects/mtg/src/GuiCombat.cpp index a0653ffe4..ee0aa7106 100644 --- a/projects/mtg/src/GuiCombat.cpp +++ b/projects/mtg/src/GuiCombat.cpp @@ -243,12 +243,7 @@ bool GuiCombat::CheckUserInput(JButton key) case JGE_BTN_PRI: active = activeAtk = NULL; cursor_pos = OK; break; - case JGE_BTN_NEXT: - if (!options[Options::REVERSETRIGGERS].number) return false; - active = activeAtk = NULL; cursor_pos = OK; - break; case JGE_BTN_PREV: - if (options[Options::REVERSETRIGGERS].number) return false; active = activeAtk = NULL; cursor_pos = OK; break; default: diff --git a/projects/mtg/src/GuiHand.cpp b/projects/mtg/src/GuiHand.cpp index 14d8d4511..ee7bc14b3 100644 --- a/projects/mtg/src/GuiHand.cpp +++ b/projects/mtg/src/GuiHand.cpp @@ -139,7 +139,7 @@ void GuiHandSelf::Repos() bool GuiHandSelf::CheckUserInput(JButton key) { - JButton trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_PREV : JGE_BTN_NEXT); + JButton trigger = JGE_BTN_NEXT; if (trigger == key) { state = (Open == state ? Closed : Open); diff --git a/projects/mtg/src/MTGGamePhase.cpp b/projects/mtg/src/MTGGamePhase.cpp index 4148543fb..4c256d2bb 100644 --- a/projects/mtg/src/MTGGamePhase.cpp +++ b/projects/mtg/src/MTGGamePhase.cpp @@ -1,56 +1,56 @@ -#include "../include/config.h" -#include "../include/MTGGamePhase.h" - - -MTGGamePhase::MTGGamePhase(int id):ActionElement(id){ - animation = 0; - currentState = -1; - mFont= resources.GetJLBFont("simon"); - mFont->SetBase(0); // using 2nd font -} - - -void MTGGamePhase::Update(float dt){ - - int newState = GameObserver::GetInstance()->getCurrentGamePhase(); - if (newState != currentState){ - activeState = ACTIVE; - animation = 4; - currentState = newState; - } - - - if (animation > 0){ - animation -- ; - }else{ - activeState = INACTIVE; - animation = 0; - - } - -} - -bool MTGGamePhase::CheckUserInput(JButton key){ - GameObserver * game = GameObserver::GetInstance(); - if (activeState == INACTIVE){ - JButton trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_NEXT : JGE_BTN_PREV); - if ((trigger == key) && game->currentActionPlayer == game->currentlyActing()) - { - activeState = ACTIVE; - game->userRequestNextGamePhase(); - return true; - } - } - return false; -} - - MTGGamePhase * MTGGamePhase::clone() const{ - MTGGamePhase * a = NEW MTGGamePhase(*this); - a->isClone = 1; - return a; - } - -ostream& MTGGamePhase::toString(ostream& out) const -{ - return out << "MTGGamePhase ::: animation " << animation << " ; currentState : " << currentState; -} +#include "../include/config.h" +#include "../include/MTGGamePhase.h" + + +MTGGamePhase::MTGGamePhase(int id):ActionElement(id){ + animation = 0; + currentState = -1; + mFont= resources.GetJLBFont("simon"); + mFont->SetBase(0); // using 2nd font +} + + +void MTGGamePhase::Update(float dt){ + + int newState = GameObserver::GetInstance()->getCurrentGamePhase(); + if (newState != currentState){ + activeState = ACTIVE; + animation = 4; + currentState = newState; + } + + + if (animation > 0){ + animation -- ; + }else{ + activeState = INACTIVE; + animation = 0; + + } + +} + +bool MTGGamePhase::CheckUserInput(JButton key){ + GameObserver * game = GameObserver::GetInstance(); + if (activeState == INACTIVE){ + JButton trigger = JGE_BTN_PREV; + if ((trigger == key) && game->currentActionPlayer == game->currentlyActing()) + { + activeState = ACTIVE; + game->userRequestNextGamePhase(); + return true; + } + } + return false; +} + + MTGGamePhase * MTGGamePhase::clone() const{ + MTGGamePhase * a = NEW MTGGamePhase(*this); + a->isClone = 1; + return a; + } + +ostream& MTGGamePhase::toString(ostream& out) const +{ + return out << "MTGGamePhase ::: animation " << animation << " ; currentState : " << currentState; +}