From 85adde6c618bdf0b3741f7828db2ba3807bc626c Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew@gmail.com" Date: Sun, 6 Dec 2009 11:34:00 +0000 Subject: [PATCH] Erwan -shortcut to reset the GU is now start+square --- projects/mtg/include/Rules.h | 94 ++++++++++++++++++------------------ projects/mtg/src/GameApp.cpp | 2 +- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/projects/mtg/include/Rules.h b/projects/mtg/include/Rules.h index ad9f8c1b0..f863850b2 100644 --- a/projects/mtg/include/Rules.h +++ b/projects/mtg/include/Rules.h @@ -1,18 +1,18 @@ -#ifndef _RULES_H_ -#define _RULES_H_ - -#include -#include - -using namespace std; -class ManaCost; -class Player; -class MTGPlayerCards; -class MTGDeck; -class MTGCardInstance; - -#define MAX_RULES_CARDS 4096; - +#ifndef _RULES_H_ +#define _RULES_H_ + +#include +#include + +using namespace std; +class ManaCost; +class Player; +class MTGPlayerCards; +class MTGDeck; +class MTGCardInstance; + +#define MAX_RULES_CARDS 4096; + class RulesPlayerZone{ public: vector cards; @@ -31,8 +31,8 @@ class RulesPlayerData{ ~RulesPlayerData(); void cleanup(); -}; - +}; + class RulesState{ public: int phase; @@ -40,35 +40,35 @@ class RulesState{ RulesState(); RulesPlayerData playerData[2]; void cleanup(); -}; - - -class Rules{ -protected: +}; + + +class Rules{ +protected: Player * loadPlayerMomir(int isAI); - Player * loadPlayerRandom(int isAI, int mode); - Player * initPlayer(int playerId); - MTGDeck * buildDeck( int playerId); - int strToGameMode(string s); -public: - enum { - PARSE_UNDEFINED, - PARSE_INIT, - PARSE_PLAYER1, - PARSE_PLAYER2, - PARSE_PLAYERS - }; - Rules(string filename); - int load(string filename); - int gamemode; - void initPlayers(); - void addExtraRules(); - void initGame(); - void cleanup(); - vector extraRules; - RulesState initState; - static int getMTGId(string name); - static MTGCardInstance * getCardByMTGId(int mtgid); -}; - + Player * loadPlayerRandom(int isAI, int mode); + Player * initPlayer(int playerId); + MTGDeck * buildDeck( int playerId); + int strToGameMode(string s); +public: + enum { + PARSE_UNDEFINED, + PARSE_INIT, + PARSE_PLAYER1, + PARSE_PLAYER2, + PARSE_PLAYERS + }; + Rules(string filename); + int load(string filename); + int gamemode; + void initPlayers(); + void addExtraRules(); + void initGame(); + void cleanup(); + vector extraRules; + RulesState initState; + static int getMTGId(string name); + static MTGCardInstance * getCardByMTGId(int mtgid); +}; + #endif \ No newline at end of file diff --git a/projects/mtg/src/GameApp.cpp b/projects/mtg/src/GameApp.cpp index 855acd084..29b857f5f 100644 --- a/projects/mtg/src/GameApp.cpp +++ b/projects/mtg/src/GameApp.cpp @@ -243,7 +243,7 @@ void GameApp::Update() } //Restart Rendering engine when START and TRIANGLE ARE PRESSED SIMULTANEOUSLY - if (mEngine->GetButtonState(PSP_CTRL_START) && mEngine->GetButtonState(PSP_CTRL_TRIANGLE)){ + if (mEngine->GetButtonState(PSP_CTRL_START) && mEngine->GetButtonState(PSP_CTRL_SQUARE)){ JRenderer::Destroy(); }