No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted. some extra things I added: * Any empty virtual declarations were kept to one line. * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
This commit is contained in:
@@ -14,73 +14,84 @@ class PlayGuiObject;
|
||||
|
||||
namespace DrawMode
|
||||
{
|
||||
enum
|
||||
{
|
||||
kNormal = 0,
|
||||
kText,
|
||||
kHidden
|
||||
};
|
||||
const int kNumDrawModes = 3;
|
||||
enum
|
||||
{
|
||||
kNormal,
|
||||
kText,
|
||||
kHidden
|
||||
};
|
||||
const int kNumDrawModes = 3;
|
||||
}
|
||||
|
||||
struct CardGui : public PlayGuiObject {
|
||||
protected:
|
||||
struct CardGui: public PlayGuiObject
|
||||
{
|
||||
protected:
|
||||
|
||||
/*
|
||||
** Tries to render the Big version of a card picture, backups to text version in case of failure
|
||||
*/
|
||||
static void RenderBig(MTGCard * card, const Pos& pos);
|
||||
|
||||
void RenderCountersBig(const Pos& pos);
|
||||
static void AlternateRender(MTGCard * card, const Pos& pos);
|
||||
static void TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad);
|
||||
/*
|
||||
** Tries to render the Big version of a card picture, backups to text version in case of failure
|
||||
*/
|
||||
static void RenderBig(MTGCard * card, const Pos& pos);
|
||||
|
||||
public:
|
||||
static const float Width;
|
||||
static const float Height;
|
||||
static const float BigWidth;
|
||||
static const float BigHeight;
|
||||
void RenderCountersBig(const Pos& pos);
|
||||
static void AlternateRender(MTGCard * card, const Pos& pos);
|
||||
static void TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad);
|
||||
|
||||
MTGCardInstance* card;
|
||||
CardGui(MTGCardInstance* card, float x, float y);
|
||||
CardGui(MTGCardInstance* card, const Pos& ref);
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
public:
|
||||
static const float Width;
|
||||
static const float Height;
|
||||
static const float BigWidth;
|
||||
static const float BigHeight;
|
||||
|
||||
void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal);
|
||||
static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal);
|
||||
MTGCardInstance* card;
|
||||
CardGui(MTGCardInstance* card, float x, float y);
|
||||
CardGui(MTGCardInstance* card, const Pos& ref);
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
|
||||
static JQuad * AlternateThumbQuad(MTGCard * card);
|
||||
virtual ostream& toString(ostream&) const;
|
||||
void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal);
|
||||
static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal);
|
||||
|
||||
static JQuad * AlternateThumbQuad(MTGCard * card);
|
||||
virtual ostream& toString(ostream&) const;
|
||||
};
|
||||
|
||||
class CardView: public CardGui
|
||||
{
|
||||
public:
|
||||
|
||||
class CardView : public CardGui {
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
nullZone, handZone, playZone
|
||||
} SelectorZone;
|
||||
|
||||
typedef enum {
|
||||
nullZone, handZone, playZone
|
||||
} SelectorZone;
|
||||
const SelectorZone owner;
|
||||
|
||||
const SelectorZone owner;
|
||||
MTGCardInstance* getCard(); // remove this when possible
|
||||
CardView(const SelectorZone, MTGCardInstance* card, float x, float y);
|
||||
CardView(const SelectorZone, MTGCardInstance* card, const Pos& ref);
|
||||
virtual ~CardView();
|
||||
|
||||
MTGCardInstance* getCard(); // remove this when possible
|
||||
CardView(const SelectorZone, MTGCardInstance* card, float x, float y);
|
||||
CardView(const SelectorZone, MTGCardInstance* card, const Pos& ref);
|
||||
virtual ~CardView();
|
||||
void Render()
|
||||
{
|
||||
CardGui::Render();
|
||||
}
|
||||
;
|
||||
void Render(JQuad* q)
|
||||
{
|
||||
Pos::Render(q);
|
||||
}
|
||||
;
|
||||
virtual ostream& toString(ostream&) const;
|
||||
|
||||
void Render(){CardGui::Render();};
|
||||
void Render(JQuad* q){Pos::Render(q);};
|
||||
virtual ostream& toString(ostream&) const;
|
||||
|
||||
float GetCenterX();
|
||||
float GetCenterY();
|
||||
float GetCenterX();
|
||||
float GetCenterY();
|
||||
};
|
||||
|
||||
class TransientCardView : public CardGui {
|
||||
public:
|
||||
TransientCardView(MTGCardInstance* card, float x, float y);
|
||||
TransientCardView(MTGCardInstance* card, const Pos& ref);
|
||||
class TransientCardView: public CardGui
|
||||
{
|
||||
public:
|
||||
TransientCardView(MTGCardInstance* card, float x, float y);
|
||||
TransientCardView(MTGCardInstance* card, const Pos& ref);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user