Files
wagic/projects/mtg/include/DuelLayers.h
wrenczes@gmail.com 5a1e8e6ffe More reorganization work around CardSelector and the singleton pattern. Broke the source for the singleton into its own separate source file, to keep things clean. Also broke apart a circular header dependency: CardSelector defines and uses a SelectorZone, which is a member inside of CardView. CardView in turn is used heavily by CardSelector. Instead SelectorZone is now defined within CardView (where it's set & controlled anyway).
I've also added my current work on the zone navigation system (class Navigator) - it's currently turned off for now (the override for this is inside of CardSelectorSingleton's Instance() call, simply comment out the NEW CardSelector and uncomment out the NEW Navigator line.)  It's functional, but I want to do more testing before considering wiring it into the game options or something similar.  (Also, note that it currently doesn't support the mouse functionality added by DJardin.)

Lastly, there's a bug crash fix in ActionStack that I tripped across while testing - basically, an illegal index value would have us walk off the bounds of a vector.
2010-10-31 07:50:53 +00:00

57 lines
1.0 KiB
C++

#ifndef _DUELLAYERS_H_
#define _DUELLAYERS_H_
#include "GuiLayers.h"
class MTGGuiHand;
class MTGGuiPlay;
class ActionLayer;
class ActionStack;
class DamageResolverLayer;
class GuiHandSelf;
class GuiHandOpponent;
class GuiCombat;
class GuiAvatars;
class CardSelectorBase;
struct Pos;
class DuelLayers {
protected:
int nbitems;
vector<GuiLayer*> objects;
vector<Pos*> waiters;
GuiCombat* combat;
ActionLayer* action;
ActionStack* stack;
GuiHandSelf *hand;
GuiAvatars * avatars;
public:
DuelLayers();
~DuelLayers();
ActionLayer * actionLayer();
ActionStack * stackLayer();
GuiCombat * combatLayer();
GuiAvatars * GetAvatars();
void init();
virtual void Update(float dt, Player * player);
void CheckUserInput(int isAI);
void Render();
void Add(GuiLayer * layer);
void Remove();
int receiveEvent(WEvent * e);
float RightBoundary();
CardSelectorBase* mCardSelector;
};
#include "ActionLayer.h"
#include "GameObserver.h"
#include "MTGGamePhase.h"
#include "ActionStack.h"
#include "Damage.h"
#endif