diff --git a/JGE/include/JGE.h b/JGE/include/JGE.h index 5a60be6fb..76da15084 100644 --- a/JGE/include/JGE.h +++ b/JGE/include/JGE.h @@ -95,7 +95,6 @@ class JGE bool mCriticalAssert; const char *mAssertFile; int mAssertLine; - u32 tickFrequency; static JGE* mInstance; diff --git a/JGE/include/JGui.h b/JGE/include/JGui.h index cd73ba615..8e3b000bb 100644 --- a/JGE/include/JGui.h +++ b/JGE/include/JGui.h @@ -51,7 +51,7 @@ class JGuiObject virtual void Update(float dt); virtual void Entering(); // when focus is transferring to this obj - virtual bool Leaving(u32 key); // when focus is transferring away from this obj, true to go ahead + virtual bool Leaving(JButton key); // when focus is transferring away from this obj, true to go ahead virtual bool ButtonPressed(); // action button pressed, return false to ignore int GetId(); diff --git a/JGE/src/JGE.cpp b/JGE/src/JGE.cpp index 2eada06c9..e1fcfb663 100644 --- a/JGE/src/JGE.cpp +++ b/JGE/src/JGE.cpp @@ -24,7 +24,6 @@ ////////////////////////////////////////////////////////////////////////// #if defined (WIN32) // WIN32 specific code -#include "../../Dependencies/include/png.h" #include "../../Dependencies/include/fmod.h" u8 JGE::GetAnalogX() @@ -44,7 +43,6 @@ u8 JGE::GetAnalogY() #elif defined (LINUX) // Unix specific code #include -#include "png.h" #include "../Dependencies/include/fmod.h" @@ -253,7 +251,7 @@ void JGE::Init() void JGE::SetDelta(float delta) { - mDeltaTime = (float)delta; + mDeltaTime = delta; } float JGE::GetDelta() @@ -279,12 +277,6 @@ void JGE::Init() mDebug = false; #endif -#if defined (WIN32) || defined (LINUX) - tickFrequency = 120; -#else - tickFrequency = sceRtcGetTickResolution(); -#endif - if (mDebug) pspDebugScreenInit(); // do this so that we can use pspDebugScreenPrintf diff --git a/JGE/src/JGui.cpp b/JGE/src/JGui.cpp index 85f26dbeb..7c598e300 100644 --- a/JGE/src/JGui.cpp +++ b/JGE/src/JGui.cpp @@ -28,7 +28,7 @@ JGuiObject::~JGuiObject() } -bool JGuiObject::Leaving(u32 key __attribute__((unused))) +bool JGuiObject::Leaving(JButton key __attribute__((unused))) { return true; } diff --git a/projects/mtg/include/ActionElement.h b/projects/mtg/include/ActionElement.h index 0822dec48..2f94b4c2f 100644 --- a/projects/mtg/include/ActionElement.h +++ b/projects/mtg/include/ActionElement.h @@ -37,7 +37,7 @@ class ActionElement: public JGuiObject{ virtual void Render(){}; virtual int testDestroy(){return 0;}; virtual int destroy(){return 0;}; - virtual bool CheckUserInput(u32 key){return false;}; + virtual bool CheckUserInput(JButton key){return false;}; ActionElement(int id); virtual ~ActionElement(); virtual int isReactingToTargetClick(Targetable * card); diff --git a/projects/mtg/include/ActionLayer.h b/projects/mtg/include/ActionLayer.h index bc34dce94..443f5ce63 100644 --- a/projects/mtg/include/ActionLayer.h +++ b/projects/mtg/include/ActionLayer.h @@ -24,7 +24,7 @@ class ActionLayer: public GuiLayer, public JGuiListener{ int stuffHappened; virtual void Render(); virtual void Update(float dt); - bool CheckUserInput(u32 key); + bool CheckUserInput(JButton key); ActionLayer(); ~ActionLayer(); int cancelCurrentAction(); diff --git a/projects/mtg/include/ActionStack.h b/projects/mtg/include/ActionStack.h index 6366b530f..ab6a10c37 100644 --- a/projects/mtg/include/ActionStack.h +++ b/projects/mtg/include/ActionStack.h @@ -51,7 +51,7 @@ class Interruptible: public PlayGuiObject, public Targetable{ int state, display; MTGCardInstance * source; virtual void Entering(){mHasFocus = true;}; - virtual bool Leaving(u32 key){mHasFocus = false;return true;}; + virtual bool Leaving(JButton key){mHasFocus = false;return true;}; virtual bool ButtonPressed(){return true;}; virtual int resolve(){return 0;}; virtual void Render(){}; @@ -169,7 +169,7 @@ class ActionStack :public GuiLayer{ int addDamage(MTGCardInstance * _source, Damageable * target, int _damage); int addAbility(MTGAbility * ability); void Update(float dt); - bool CheckUserInput(u32 key); + bool CheckUserInput(JButton key); virtual void Render(); ActionStack(GameObserver* game); int resolve(); diff --git a/projects/mtg/include/CardDisplay.h b/projects/mtg/include/CardDisplay.h index b2713e2b1..d224bc22a 100644 --- a/projects/mtg/include/CardDisplay.h +++ b/projects/mtg/include/CardDisplay.h @@ -20,7 +20,7 @@ class CardDisplay:public PlayGuiObjectController{ void AddCard(MTGCardInstance * _card); void rotateLeft(); void rotateRight(); - bool CheckUserInput(u32 key); + bool CheckUserInput(JButton key); virtual void Update(float dt); void Render(); void init(MTGGameZone * zone); diff --git a/projects/mtg/include/CardSelector.h b/projects/mtg/include/CardSelector.h index f11748da9..7922c26ab 100644 --- a/projects/mtg/include/CardSelector.h +++ b/projects/mtg/include/CardSelector.h @@ -57,7 +57,7 @@ class ObjectSelector : public GuiLayer int bigMode; void Add(T*); void Remove(T*); - bool CheckUserInput(u32 key); + bool CheckUserInput(JButton key); void Update(float dt); void Render(); void Limit(LimitorFunctor* limitor, SelectorZone); diff --git a/projects/mtg/include/DuelLayers.h b/projects/mtg/include/DuelLayers.h index 953f9268d..8342d87ac 100644 --- a/projects/mtg/include/DuelLayers.h +++ b/projects/mtg/include/DuelLayers.h @@ -2,10 +2,7 @@ #define _DUELLAYERS_H_ #include "GuiLayers.h" -#include "PlayGuiObject.h" - -template class ObjectSelector; -typedef ObjectSelector CardSelector; +#include "CardSelector.h" class MTGGuiHand; class MTGGuiPlay; diff --git a/projects/mtg/include/GuiAvatars.h b/projects/mtg/include/GuiAvatars.h index 2b37106b9..0a0a970e7 100644 --- a/projects/mtg/include/GuiAvatars.h +++ b/projects/mtg/include/GuiAvatars.h @@ -27,7 +27,7 @@ class GuiAvatars : public GuiLayer void Deactivate(PlayGuiObject* c); int receiveEventPlus(WEvent*); int receiveEventMinus(WEvent*); - bool CheckUserInput(u32 key); + bool CheckUserInput(JButton key); float LeftBoundarySelf(); }; diff --git a/projects/mtg/include/GuiCombat.h b/projects/mtg/include/GuiCombat.h index df28692c0..ae63aad83 100644 --- a/projects/mtg/include/GuiCombat.h +++ b/projects/mtg/include/GuiCombat.h @@ -34,7 +34,7 @@ class GuiCombat : public GuiLayer virtual void Update(float dt); virtual void Render(); bool clickOK(); - virtual bool CheckUserInput(u32 key); + virtual bool CheckUserInput(JButton key); virtual int receiveEventPlus(WEvent* e); virtual int receiveEventMinus(WEvent* e); diff --git a/projects/mtg/include/GuiHand.h b/projects/mtg/include/GuiHand.h index 275f7ffca..fe782385e 100644 --- a/projects/mtg/include/GuiHand.h +++ b/projects/mtg/include/GuiHand.h @@ -72,7 +72,7 @@ class GuiHandSelf : public GuiHand virtual int receiveEventMinus(WEvent* e); void Repos(); - bool CheckUserInput(u32 key); + bool CheckUserInput(JButton key); virtual void Render(); void Update(float dt); float LeftBoundary(); diff --git a/projects/mtg/include/GuiLayers.h b/projects/mtg/include/GuiLayers.h index f70f8e3a9..aa29a9d0a 100644 --- a/projects/mtg/include/GuiLayers.h +++ b/projects/mtg/include/GuiLayers.h @@ -14,7 +14,7 @@ class Player; class GuiLayer{ protected: - u32 mActionButton; + JButton mActionButton; public: int mCount; int mCurr; @@ -28,7 +28,7 @@ class GuiLayer{ GuiLayer(); virtual ~GuiLayer(); virtual void Update(float dt); - virtual bool CheckUserInput(u32 key){ return false; }; + virtual bool CheckUserInput(JButton key){ return false; }; int getIndexOf(JGuiObject * object); JGuiObject * getByIndex (int index); virtual void Render(); diff --git a/projects/mtg/include/GuiStatic.h b/projects/mtg/include/GuiStatic.h index 6cee24a31..712e549f1 100644 --- a/projects/mtg/include/GuiStatic.h +++ b/projects/mtg/include/GuiStatic.h @@ -13,7 +13,7 @@ struct GuiStatic : public PlayGuiObject{ GuiAvatars* parent; GuiStatic(float desiredHeight, float x, float y, bool hasFocus, GuiAvatars* parent); virtual void Entering(); - virtual bool Leaving(u32 key); + virtual bool Leaving(JButton key); }; struct GuiAvatar : public GuiStatic{ @@ -42,7 +42,7 @@ struct GuiGameZone : public GuiStatic{ CardDisplay * cd; int showCards; virtual void Render(); - virtual bool CheckUserInput(u32 key); + virtual bool CheckUserInput(JButton key); virtual void Update(float dt); GuiGameZone(float x, float y, bool hasFocus, MTGGameZone * zone, GuiAvatars* parent); ~GuiGameZone(); diff --git a/projects/mtg/include/MTGGamePhase.h b/projects/mtg/include/MTGGamePhase.h index 18fbab720..e8c75888f 100644 --- a/projects/mtg/include/MTGGamePhase.h +++ b/projects/mtg/include/MTGGamePhase.h @@ -16,7 +16,7 @@ class MTGGamePhase: public ActionElement { public: MTGGamePhase(int id); virtual void Update(float dt); - bool CheckUserInput(u32 key); + bool CheckUserInput(JButton key); virtual MTGGamePhase * clone() const; virtual ostream& toString(ostream& out) const; }; diff --git a/projects/mtg/include/MenuItem.h b/projects/mtg/include/MenuItem.h index caad523c3..6ef3edd6c 100644 --- a/projects/mtg/include/MenuItem.h +++ b/projects/mtg/include/MenuItem.h @@ -37,7 +37,7 @@ class MenuItem: public JGuiObject virtual void Update(float dt); virtual void Entering(); - virtual bool Leaving(u32 key); + virtual bool Leaving(JButton key); virtual bool ButtonPressed(); virtual ostream& toString(ostream& out) const; diff --git a/projects/mtg/include/OSD.h b/projects/mtg/include/OSD.h index bc51d6a30..36f032c97 100644 --- a/projects/mtg/include/OSD.h +++ b/projects/mtg/include/OSD.h @@ -4,7 +4,7 @@ class OSDLayer : public PlayGuiObjectController { virtual void Update(float dt); - virtual bool CheckUserInput(u32 key); + virtual bool CheckUserInput(JButton key); virtual void Render(); }; diff --git a/projects/mtg/include/PlayGuiObject.h b/projects/mtg/include/PlayGuiObject.h index d79034cff..50d7ff3b5 100644 --- a/projects/mtg/include/PlayGuiObject.h +++ b/projects/mtg/include/PlayGuiObject.h @@ -25,8 +25,8 @@ class PlayGuiObject: public JGuiObject, public JGuiListener, public Pos{ bool mHasFocus; int type; virtual void Entering(){mHasFocus = true; zoom = 1.4f;}; - virtual bool Leaving(u32 key){mHasFocus = false; zoom = 1.0; return true;}; - virtual bool CheckUserInput(u32 key) {return false;}; + virtual bool Leaving(JButton key){mHasFocus = false; zoom = 1.0; return true;}; + virtual bool CheckUserInput(JButton key) {return false;}; virtual bool ButtonPressed(){return true;}; virtual void Render(); virtual void Update(float dt); diff --git a/projects/mtg/include/PlayGuiObjectController.h b/projects/mtg/include/PlayGuiObjectController.h index 11ccbb971..0b5e6ec51 100644 --- a/projects/mtg/include/PlayGuiObjectController.h +++ b/projects/mtg/include/PlayGuiObjectController.h @@ -13,7 +13,7 @@ class PlayGuiObjectController : public GuiLayer{ static int showBigCards;// 0 hide, 1 show, 2 show text public: virtual void Update(float dt); - virtual bool CheckUserInput(u32 key); + virtual bool CheckUserInput(JButton key); PlayGuiObjectController(){last_user_move=0;}; virtual void Render(){GuiLayer::Render();}; }; diff --git a/projects/mtg/include/SimpleMenuItem.h b/projects/mtg/include/SimpleMenuItem.h index f25d2ff10..5a6ea93f8 100644 --- a/projects/mtg/include/SimpleMenuItem.h +++ b/projects/mtg/include/SimpleMenuItem.h @@ -39,7 +39,7 @@ class SimpleMenuItem: public JGuiObject virtual void Update(float dt); virtual void Entering(); - virtual bool Leaving(u32 key); + virtual bool Leaving(JButton key); virtual bool ButtonPressed(); virtual ostream& toString(ostream& out) const; }; diff --git a/projects/mtg/include/StoryFlow.h b/projects/mtg/include/StoryFlow.h index 2703375a1..87dc34731 100644 --- a/projects/mtg/include/StoryFlow.h +++ b/projects/mtg/include/StoryFlow.h @@ -5,7 +5,7 @@ #include #include using namespace std; -#include "../../../JGE/src/TinyXML/tinyxml.h" +#include "../../../JGE/src/tinyxml/tinyxml.h" #include class GameObserver; #define CAMPAIGNS_FOLDER "Res/campaigns/" @@ -24,7 +24,7 @@ public: void Update(float dt); void Entering(); - bool Leaving(u32 key); + bool Leaving(JButton key); bool ButtonPressed(); bool hasFocus(); virtual ostream& toString(ostream& out) const; @@ -83,4 +83,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/projects/mtg/src/ActionLayer.cpp b/projects/mtg/src/ActionLayer.cpp index b5fa841c5..c6f249a29 100644 --- a/projects/mtg/src/ActionLayer.cpp +++ b/projects/mtg/src/ActionLayer.cpp @@ -50,7 +50,7 @@ int ActionLayer::reactToTargetClick(ActionElement* ability, Targetable * card){ return result; } -bool ActionLayer::CheckUserInput(u32 key){ +bool ActionLayer::CheckUserInput(JButton key){ GameObserver * g = GameObserver::GetInstance(); if (g->waitForExtraPayment && key == JGE_BTN_SEC){ g->waitForExtraPayment = NULL; diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index aebc94882..e5e5ef6c6 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -620,8 +620,8 @@ void ActionStack::endOfInterruption(){ } -bool ActionStack::CheckUserInput(u32 key){ - u32 trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_NEXT : JGE_BTN_PREV); +bool ActionStack::CheckUserInput(JButton key){ + JButton trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_NEXT : JGE_BTN_PREV); if (mode == ACTIONSTACK_STANDARD){ if (askIfWishesToInterrupt){ if (JGE_BTN_SEC == key){ diff --git a/projects/mtg/src/CardDisplay.cpp b/projects/mtg/src/CardDisplay.cpp index 526f90203..d147d8548 100644 --- a/projects/mtg/src/CardDisplay.cpp +++ b/projects/mtg/src/CardDisplay.cpp @@ -77,7 +77,7 @@ void CardDisplay::Update(float dt){ if (update) init(zone); } -bool CardDisplay::CheckUserInput(u32 key){ +bool CardDisplay::CheckUserInput(JButton key){ if (JGE_BTN_SEC == key) { if (listener){ @@ -136,6 +136,8 @@ bool CardDisplay::CheckUserInput(u32 key){ } } return true; + default: + ; } return false; } diff --git a/projects/mtg/src/CardSelector.cpp b/projects/mtg/src/CardSelector.cpp index 0899f7266..9cc6b36cf 100644 --- a/projects/mtg/src/CardSelector.cpp +++ b/projects/mtg/src/CardSelector.cpp @@ -8,6 +8,9 @@ using std::cout; +// The X lib annoyingly defines True to be 1, leading to +// hard to understand syntax errors. Not using it, so it's +// safe to undefine it. #ifdef True #undef True #endif @@ -98,13 +101,13 @@ void CardSelector::Pop() { { CardView* c = dynamic_cast(oldactive); if (c) c->zoom = 1.0; } //Is this needed, I think it is one in Leaving(0) ? { CardView* c = dynamic_cast(active); if (c) c->zoom = 1.4; } //Is this needed, I think it is one in Entering() ? - if (oldactive) oldactive->Leaving(0); + if (oldactive) oldactive->Leaving(JGE_BTN_NONE); if (active) active->Entering(); } } template<> -bool CardSelector::CheckUserInput(u32 key) +bool CardSelector::CheckUserInput(JButton key) { if (!active) { @@ -175,7 +178,7 @@ bool CardSelector::CheckUserInput(u32 key) { { CardView* c = dynamic_cast(oldactive); if (c) c->zoom = 1.0; } { CardView* c = dynamic_cast(active); if (c) c->zoom = 1.4; } - if (oldactive) oldactive->Leaving(0); + if (oldactive) oldactive->Leaving(JGE_BTN_NONE); if (active) active->Entering(); } return true; @@ -248,7 +251,7 @@ void CardSelector::Limit(LimitorFunctor* limitor, SelectorZone destzone) { { CardView* c = dynamic_cast(oldactive); if (c) c->zoom = 1.0; } { CardView* c = dynamic_cast(active); if (c) c->zoom = 1.4; } - if (oldactive) oldactive->Leaving(0); + if (oldactive) oldactive->Leaving(JGE_BTN_NONE); if (active) active->Entering(); } } diff --git a/projects/mtg/src/DuelLayers.cpp b/projects/mtg/src/DuelLayers.cpp index 18299adef..c343bf2a3 100644 --- a/projects/mtg/src/DuelLayers.cpp +++ b/projects/mtg/src/DuelLayers.cpp @@ -48,7 +48,7 @@ void DuelLayers::init(){ } void DuelLayers::CheckUserInput(int isAI){ - u32 key; + JButton key; while ((key = JGE::GetInstance()->ReadButton())){ if ((!isAI) && (0 != key)) { diff --git a/projects/mtg/src/GuiAvatars.cpp b/projects/mtg/src/GuiAvatars.cpp index 7218f2af1..91e9f9b18 100644 --- a/projects/mtg/src/GuiAvatars.cpp +++ b/projects/mtg/src/GuiAvatars.cpp @@ -66,7 +66,7 @@ int GuiAvatars::receiveEventMinus(WEvent* e) return 1; } -bool GuiAvatars::CheckUserInput(u32 key){ +bool GuiAvatars::CheckUserInput(JButton key){ if (self->CheckUserInput(key)) return true; if (opponent->CheckUserInput(key)) return true; if (selfGraveyard->CheckUserInput(key)) return true; diff --git a/projects/mtg/src/GuiCombat.cpp b/projects/mtg/src/GuiCombat.cpp index 1cae346e2..a0653ffe4 100644 --- a/projects/mtg/src/GuiCombat.cpp +++ b/projects/mtg/src/GuiCombat.cpp @@ -137,7 +137,7 @@ bool GuiCombat::clickOK(){ return false; } -bool GuiCombat::CheckUserInput(u32 key) +bool GuiCombat::CheckUserInput(JButton key) { if (NONE == cursor_pos) return false; DamagerDamaged* oldActive = active; @@ -251,6 +251,8 @@ bool GuiCombat::CheckUserInput(u32 key) if (options[Options::REVERSETRIGGERS].number) return false; active = activeAtk = NULL; cursor_pos = OK; break; + default: + ; } if (oldActive != active) { diff --git a/projects/mtg/src/GuiHand.cpp b/projects/mtg/src/GuiHand.cpp index 52455ac5c..14d8d4511 100644 --- a/projects/mtg/src/GuiHand.cpp +++ b/projects/mtg/src/GuiHand.cpp @@ -137,9 +137,9 @@ void GuiHandSelf::Repos() } } -bool GuiHandSelf::CheckUserInput(u32 key) +bool GuiHandSelf::CheckUserInput(JButton key) { - u32 trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_PREV : JGE_BTN_NEXT); + JButton trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_PREV : JGE_BTN_NEXT); if (trigger == key) { state = (Open == state ? Closed : Open); diff --git a/projects/mtg/src/GuiMessageBox.cpp b/projects/mtg/src/GuiMessageBox.cpp index 6d95fefd9..8fbcff139 100644 --- a/projects/mtg/src/GuiMessageBox.cpp +++ b/projects/mtg/src/GuiMessageBox.cpp @@ -1,6 +1,6 @@ #include "GuiMessageBox.h" -bool GuiMessageBox::CheckUserInput(u32 key){ +bool GuiMessageBox::CheckUserInput(JButton key){ if (mActionButton == key) { if (mObjects[mCurr] != NULL && mObjects[mCurr]->ButtonPressed()) diff --git a/projects/mtg/src/GuiStatic.cpp b/projects/mtg/src/GuiStatic.cpp index 664d52092..a57eff34c 100644 --- a/projects/mtg/src/GuiStatic.cpp +++ b/projects/mtg/src/GuiStatic.cpp @@ -7,7 +7,7 @@ void GuiStatic::Entering() { parent->Activate(this); } -bool GuiStatic::Leaving(u32 key) +bool GuiStatic::Leaving(JButton key) { parent->Deactivate(this); return false; @@ -151,7 +151,7 @@ void GuiGameZone::ButtonPressed(int controllerId, int controlId){ GameObserver::GetInstance()->ButtonPressed(this); } -bool GuiGameZone::CheckUserInput(u32 key){ +bool GuiGameZone::CheckUserInput(JButton key){ if (showCards) return cd->CheckUserInput(key); return false; } diff --git a/projects/mtg/src/MTGGamePhase.cpp b/projects/mtg/src/MTGGamePhase.cpp index b2a5a3192..4148543fb 100644 --- a/projects/mtg/src/MTGGamePhase.cpp +++ b/projects/mtg/src/MTGGamePhase.cpp @@ -30,10 +30,10 @@ void MTGGamePhase::Update(float dt){ } -bool MTGGamePhase::CheckUserInput(u32 key){ +bool MTGGamePhase::CheckUserInput(JButton key){ GameObserver * game = GameObserver::GetInstance(); if (activeState == INACTIVE){ - u32 trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_NEXT : JGE_BTN_PREV); + JButton trigger = (options[Options::REVERSETRIGGERS].number ? JGE_BTN_NEXT : JGE_BTN_PREV); if ((trigger == key) && game->currentActionPlayer == game->currentlyActing()) { activeState = ACTIVE; diff --git a/projects/mtg/src/MenuItem.cpp b/projects/mtg/src/MenuItem.cpp index e0ffb1a7f..bb5f6f537 100644 --- a/projects/mtg/src/MenuItem.cpp +++ b/projects/mtg/src/MenuItem.cpp @@ -94,7 +94,7 @@ void MenuItem::Entering() } -bool MenuItem::Leaving(u32 key) +bool MenuItem::Leaving(JButton key) { mParticleSys->Stop(true); mHasFocus = false; diff --git a/projects/mtg/src/PlayGuiObjectController.cpp b/projects/mtg/src/PlayGuiObjectController.cpp index 4492dd89b..a0c6cb1d9 100644 --- a/projects/mtg/src/PlayGuiObjectController.cpp +++ b/projects/mtg/src/PlayGuiObjectController.cpp @@ -85,7 +85,7 @@ void PlayGuiObjectController::Update(float dt){ } -bool PlayGuiObjectController::CheckUserInput(u32 key){ +bool PlayGuiObjectController::CheckUserInput(JButton key){ /* if (!mCount) return false; diff --git a/projects/mtg/src/SimpleMenuItem.cpp b/projects/mtg/src/SimpleMenuItem.cpp index d903c82af..23a94a01b 100644 --- a/projects/mtg/src/SimpleMenuItem.cpp +++ b/projects/mtg/src/SimpleMenuItem.cpp @@ -53,7 +53,7 @@ void SimpleMenuItem::Entering() } -bool SimpleMenuItem::Leaving(u32 key) +bool SimpleMenuItem::Leaving(JButton key) { mHasFocus = false; return true; diff --git a/projects/mtg/src/SimplePad.cpp b/projects/mtg/src/SimplePad.cpp index 00c3ee6aa..68f022b80 100644 --- a/projects/mtg/src/SimplePad.cpp +++ b/projects/mtg/src/SimplePad.cpp @@ -196,7 +196,7 @@ void SimplePad::MoveSelection(unsigned char moveto) void SimplePad::Update(float dt){ JGE * mEngine = JGE::GetInstance(); - u32 key = mEngine->ReadButton(); + JButton key = mEngine->ReadButton(); //Start button changes capslock setting. if (key == JGE_BTN_MENU) diff --git a/projects/mtg/src/StoryFlow.cpp b/projects/mtg/src/StoryFlow.cpp index e8b67f715..f5c72a6b7 100644 --- a/projects/mtg/src/StoryFlow.cpp +++ b/projects/mtg/src/StoryFlow.cpp @@ -52,7 +52,7 @@ void StoryChoice::Entering() } -bool StoryChoice::Leaving(u32 key) +bool StoryChoice::Leaving(JButton key) { mHasFocus = false; mTargetScale = 1.0f; @@ -267,4 +267,4 @@ StoryFlow::~StoryFlow(){ SAFE_DELETE(i->second); } pages.clear(); -} \ No newline at end of file +}