Files
wagic/projects/mtg/include/GameStateDuel.h
techdragon.nguyen@gmail.com 2fdc80aee1 Synchronized avatar images to be loaded correctly on first display of the opponent selection.
* changed how the avatar images are assigned since how they were before was incorrect.  They are now assigned upon instantiation of the meta file.  Not when the stats are calculated.  
* Added new image for "Evil Twin".  This is a horizontally flipped image of the original player avatar with a red background.  Please feel free to edit the image.
* removed display of avatar image on menu items in deck selection that are not deck related. (ie "Cancel", "Back to Main Menu", etc)  "New Deck" also does not have an image since no deck really exists yet so no avatar.  

Issue: 622
2011-04-20 17:51:40 +00:00

84 lines
1.9 KiB
C++

#ifndef _GAME_STATE_DUEL_H_
#define _GAME_STATE_DUEL_H_
#include "GameState.h"
#include "SimpleMenu.h"
#include "SimplePopup.h"
#include "DeckMenu.h"
#include "MTGDeck.h"
#include "GameObserver.h"
#define CHOOSE_OPPONENT 7
#ifdef TESTSUITE
class TestSuite;
#endif
class Credits;
class Rules;
#ifdef NETWORK_SUPPORT
class JNetwork;
#endif
class GameStateDuel: public GameState, public JGuiListener
{
private:
#ifdef TESTSUITE
TestSuite * testSuite;
#endif
Credits * credits;
int mGamePhase;
Player * mCurrentPlayer;
Player * mPlayers[2];
GameObserver * game;
DeckMenu * deckmenu;
DeckMenu * opponentMenu;
SimpleMenu * menu;
SimplePopup * popupScreen; // used for informational screens, modal
static int selectedPlayerDeckId;
static int selectedAIDeckId;
bool premadeDeck;
int OpponentsDeckid;
string musictrack;
Rules * rules;
bool MusicExist(string FileName);
void loadPlayer(int playerId, int decknb = 0, bool isAI = false, bool isNetwork = false);
void ConstructOpponentMenu(); //loads the opponentMenu if it doesn't exist
void initScroller();
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_CANCEL = kCancelMenuID,
MENUITEM_NEW_DECK = -10,
MENUITEM_RANDOM_PLAYER = kRandomPlayerMenuID,
MENUITEM_RANDOM_AI = kRandomAIPlayerMenuID,
MENUITEM_MAIN_MENU = -13,
MENUITEM_EVIL_TWIN = kEvilTwinMenuID,
MENUITEM_MULLIGAN = -15,
#ifdef NETWORK_SUPPORT
MENUITEM_REMOTE_CLIENT = -16,
MENUITEM_REMOTE_SERVER = -17,
#endif
MENUITEM_MORE_INFO = kInfoMenuID
};
};
#endif