Files
wagic/projects/mtg/include/GameApp.h
wrenczes d5f3e4cfea Enabled precompiled headers for the build. This cuts the win compile time in debug by at least half on my laptop; on the psp compile, it shaves it down by ~ 45 seconds. I only did a cursory inspection of what to add to PrecompiledHeader.h, there's probably more that we can throw in there for more incremental speed improvements.
Also fixed the project includes so that we don't need to always use the indirect include path, ie:
#include "../include/foo.h" -> #include "foo.h"

I'm don't know much about make files - if I busted the linux build, mea culpa, but I think we're okay on that front too.  For future reference, here's the most straightforward link on the topic of adding pch support to make files:

http://www.mercs-eng.com/~hulud/index.php?2008/06/13/6-writing-a-good-makefile-for-a-c-project
2010-10-24 05:55:24 +00:00

100 lines
1.7 KiB
C++

/*
* Wagic, The Homebrew ?! is licensed under the BSD license
* See LICENSE in the Folder's root
* http://wololo.net/wagic/
*/
#ifndef _GAMEAPP_H_
#define _GAMEAPP_H_
#include "Logger.h"
#include <JApp.h>
#include <JGE.h>
#include <JSprite.h>
#include <JLBFont.h>
#include <hge/hgeparticle.h>
#include "WResourceManager.h"
#include "GameState.h"
#include "GameOptions.h"
#include "MTGDeck.h"
#include "MTGCard.h"
#include "MTGGameZones.h"
#include "CardEffect.h"
#define PLAYER_TYPE_CPU 0
#define PLAYER_TYPE_HUMAN 1
#define PLAYER_TYPE_TESTSUITE 2
enum
{
GAME_TYPE_CLASSIC,
GAME_TYPE_MOMIR,
GAME_TYPE_RANDOM1,
GAME_TYPE_RANDOM2,
GAME_TYPE_STORY
};
class MTGAllCards;
class TransitionBase;
class GameApp: public JApp
{
private:
#ifdef DEBUG
int nbUpdates;
float totalFPS;
#endif
bool mShowDebugInfo;
int mScreenShotCount;
GameState* mCurrentState;
GameState* mNextState;
GameState* mGameStates[GAME_STATE_MAX];
public:
int gameType;
CardEffect *effect;
GameApp();
virtual ~GameApp();
virtual void Create();
virtual void Destroy();
virtual void Update();
virtual void Render();
virtual void Pause();
virtual void Resume();
void LoadGameStates();
void SetNextState(int state);
void DoTransition(int trans, int tostate, float dur=-1, bool animonly = false);
void DoAnimation(int trans, float dur=-1);
static hgeParticleSystem * Particles[6];
static int HasMusic;
static string systemError;
static JMusic* music;
static string currentMusicFile;
static void playMusic(string filename, bool loop = true);
static MTGAllCards * collection;
static int players[2];
};
extern JQuad* manaIcons[7];
#endif