- Modified DuelLayers to not use a global MTGPhaseGame instance anymore - Moved the reset of currentActionCard out of the ActionLayer render function : that fixes the remaing problematic tests in the multithreaded testsuite - Added a method in ActionLayer converting a card ability into a menu index - Used this new method in the game observer to log correctly AI ability actions - Added a DumpAssert method in the game observer, it can be used to dump the game and assert in order to easy crash reproduction - Cleaned up TargetList properties access - Added an optimisation in GuiMana to not compute update code if the rendering is not used (multi-threaded mode) - Added a deadlock detection in the test AI vs AI multithreaded mode - Fixed minor bugs in test AI vs AI multithreaded mode - Added a games/second counter in the test AI vs AI rendering
61 lines
1.2 KiB
C++
61 lines
1.2 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 MTGGamePhase;
|
|
|
|
class DuelLayers
|
|
{
|
|
protected:
|
|
int nbitems;
|
|
vector<GuiLayer*> objects;
|
|
vector<Pos*> waiters;
|
|
GuiCombat* combat;
|
|
ActionLayer* action;
|
|
ActionStack* stack;
|
|
GuiHandSelf *hand;
|
|
GuiAvatars * avatars;
|
|
GameObserver* observer;
|
|
MTGGamePhase* phaseHandler;
|
|
|
|
public:
|
|
DuelLayers();
|
|
~DuelLayers();
|
|
|
|
ActionLayer * actionLayer();
|
|
ActionStack * stackLayer();
|
|
GuiCombat * combatLayer();
|
|
GuiAvatars * GetAvatars();
|
|
MTGGamePhase* getPhaseHandler() {return phaseHandler;};
|
|
void init(GameObserver* go);
|
|
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
|