TODO:
change literals to use constants,
refactor the rendering code for the menu to have be leaner.
add text scroller to list all the tasks.
* 1st implementation will list all the tasks.dat
* 2nd round will try to get the scroller to only display relevant tasks to ai
Special thanks to wololo and MootPoint for helping me hammer this out. To abrasax, for the initial design of the layout.
73 lines
1.4 KiB
C++
73 lines
1.4 KiB
C++
#ifndef _GAME_STATE_DUEL_H_
|
|
#define _GAME_STATE_DUEL_H_
|
|
|
|
|
|
#include "GameState.h"
|
|
#include "SimpleMenu.h"
|
|
#include "DeckMenu.h"
|
|
#include "MTGDeck.h"
|
|
#include "GameObserver.h"
|
|
|
|
#define CHOOSE_OPPONENT 7
|
|
|
|
#ifdef TESTSUITE
|
|
class TestSuite;
|
|
#endif
|
|
class Credits;
|
|
class Rules;
|
|
|
|
|
|
class GameStateDuel: public GameState, public JGuiListener
|
|
{
|
|
private:
|
|
#ifdef TESTSUITE
|
|
TestSuite * testSuite;
|
|
#endif
|
|
Credits * credits;
|
|
int mGamePhase;
|
|
Player * mCurrentPlayer;
|
|
Player * mPlayers[2];
|
|
MTGPlayerCards * deck[2];
|
|
GameObserver * game;
|
|
DeckMenu * deckmenu;
|
|
DeckMenu * opponentMenu;
|
|
SimpleMenu * menu;
|
|
bool premadeDeck;
|
|
int OpponentsDeckid;
|
|
string musictrack;
|
|
Rules * rules;
|
|
|
|
bool MusicExist(string FileName);
|
|
void loadPlayer(int playerId, int decknb = 0, int isAI = 0);
|
|
void ensureOpponentMenu(); //loads the opponentMenu if it doesn't exist
|
|
|
|
public:
|
|
GameStateDuel(GameApp* parent);
|
|
virtual ~GameStateDuel();
|
|
#ifdef TESTSUITE
|
|
void loadTestSuitePlayers();
|
|
#endif
|
|
virtual void ButtonPressed(int ControllerId, int ControlId);
|
|
virtual void Start();
|
|
virtual void End();
|
|
virtual void Update(float dt);
|
|
virtual void Render();
|
|
void initRand (unsigned seed = 0);
|
|
|
|
enum ENUM_DUEL_STATE_MENU_ITEM
|
|
{
|
|
MENUITEM_NEW_DECK = -1,
|
|
MENUITEM_CANCEL = -10,
|
|
MENUITEM_RANDOM_PLAYER = -11,
|
|
MENUITEM_RANDOM_AI = -12,
|
|
MENUITEM_MAIN_MENU = -13,
|
|
MENUITEM_EVIL_TWIN = -14,
|
|
MENUITEM_MULLIGAN = -15
|
|
};
|
|
|
|
};
|
|
|
|
|
|
#endif
|
|
|