Erwan
- fix issue 392 (broken tests) - Fix a bunch of memory leaks (guys please be careful!) - Added Logging facility in JGE - HBL Compatibility (cleaned up some code with MP3 in JGE) - Added "winGame" ability. Currently used mostly by the story mode, but some cards could probably need it too - Improved story mode and uncommented it from the source. -- The current campaign is of course very basic, anybody who wants to improve it or create other ones feel free to do so -- TODO (short term): save progress, rewards system, improve tutorial campaign -- I'll talk a bit more about this on the forums/email after a night of sleep
This commit is contained in:
@@ -10,12 +10,39 @@ using namespace std;
|
||||
class GameObserver;
|
||||
#define CAMPAIGNS_FOLDER "Res/campaigns/"
|
||||
|
||||
|
||||
class StoryGraphicalElement:public JGuiObject {
|
||||
public:
|
||||
float mX;
|
||||
float mY;
|
||||
StoryGraphicalElement(float x, float y);
|
||||
};
|
||||
|
||||
class StoryText:public StoryGraphicalElement {
|
||||
public :
|
||||
string text;
|
||||
int align;
|
||||
StoryText(string text, float mX, float mY, string align = "center");
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
class StoryImage:public StoryGraphicalElement {
|
||||
public :
|
||||
string img;
|
||||
StoryImage(string img, float mX, float mY);
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
class StoryChoice:public JGuiObject {
|
||||
public:
|
||||
string pageId;
|
||||
string text;
|
||||
int mX;
|
||||
int mY;
|
||||
float mX;
|
||||
float mY;
|
||||
|
||||
bool mHasFocus;
|
||||
float mScale;
|
||||
float mTargetScale;
|
||||
@@ -42,10 +69,12 @@ public:
|
||||
|
||||
class StoryDialog:public StoryPage, public JGuiListener,public JGuiController {
|
||||
private:
|
||||
string text;
|
||||
vector<StoryGraphicalElement *>graphics;
|
||||
string safeAttribute(TiXmlElement* element, string attribute);
|
||||
|
||||
public:
|
||||
StoryDialog(TiXmlElement* el,StoryFlow * mParent);
|
||||
~StoryDialog();
|
||||
void Update(float dt);
|
||||
void Render();
|
||||
void ButtonPressed(int,int);
|
||||
|
||||
Reference in New Issue
Block a user