summaryrefslogtreecommitdiffstats
path: root/src/object/robotmain.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-06-24 21:37:15 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2013-06-24 21:37:15 +0200
commit7c2e955e1552a9c4e412ea2c936be61fc78ba010 (patch)
treeee506dfbec54f998d10c385bde3a1c3fa04e66b2 /src/object/robotmain.h
parente218dcfdf2c58f8841e7ebd220527d08e870a6d5 (diff)
parentb376486fd74fa02b0297ceef6d0f977b32358e5e (diff)
downloadcolobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.tar.gz
colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.tar.bz2
colobot-7c2e955e1552a9c4e412ea2c936be61fc78ba010.zip
Colobot Gold 0.1.0-alpha
Diffstat (limited to 'src/object/robotmain.h')
-rw-r--r--src/object/robotmain.h50
1 files changed, 43 insertions, 7 deletions
diff --git a/src/object/robotmain.h b/src/object/robotmain.h
index fe5fbd5..525e5df 100644
--- a/src/object/robotmain.h
+++ b/src/object/robotmain.h
@@ -99,13 +99,29 @@ struct EndTake
Math::Vector pos;
float dist;
ObjectType type;
- int min; // wins if>
+ int min; // wins if >
int max; // wins if <
int lost; // lost if <=
+ float powermin; // wins if energy cell >=
+ float powermax; // wins if energy cell <=
bool immediat;
char message[100];
};
+struct AudioChange
+{
+ Math::Vector pos;
+ float dist;
+ ObjectType type;
+ int min; // change if >
+ int max; // change if <
+ float powermin; // change if energy cell >=
+ float powermax; // change if energy cell <=
+ char music[100];
+ bool repeat;
+ bool changed;
+};
+
const int MAXNEWSCRIPTNAME = 20;
@@ -175,14 +191,17 @@ const int AXIS_INVALID = -1;
class CRobotMain : public CSingleton<CRobotMain>
{
public:
- CRobotMain(CApplication* app);
- ~CRobotMain();
+ CRobotMain(CApplication* app, bool loadProfile);
+ virtual ~CRobotMain();
Gfx::CCamera* GetCamera();
Gfx::CTerrain* GetTerrain();
Ui::CInterface* GetInterface();
Ui::CDisplayText* GetDisplayText();
+ //! Caused the given mission to be loaded immediately after start
+ void LoadSceneOnStart(const std::string& name, int rank);
+
void CreateIni();
//! Sets the default input bindings (key and axes)
@@ -210,7 +229,7 @@ public:
void ResetKeyStates();
void ChangePhase(Phase phase);
- bool EventProcess(Event &event);
+ bool ProcessEvent(Event &event);
bool CreateShortcuts();
void ScenePerso();
@@ -248,6 +267,8 @@ public:
void ResetObject();
void ResetCreate();
+ void UpdateAudio(bool frame);
+ void SetEndMission(Error result, float delay);
Error CheckEndMission(bool frame);
void CheckEndMessage(const char* message);
int GetObligatoryToken();
@@ -353,6 +374,11 @@ public:
int CreateSpot(Math::Vector pos, Gfx::Color color);
+ void SetNumericLocale();
+ void RestoreNumericLocale();
+
+ CObject* GetSelect();
+
protected:
bool EventFrame(const Event &event);
bool EventObject(const Event &event);
@@ -383,7 +409,6 @@ protected:
void DeleteAllObjects();
void UpdateInfoText();
CObject* SearchObject(ObjectType type);
- CObject* GetSelect();
void StartDisplayVisit(EventType event);
void FrameVisit(float rTime);
void StopDisplayVisit();
@@ -391,6 +416,7 @@ protected:
bool TestGadgetQuantity(int rank);
void UpdateSpeedLabel();
+
protected:
CApplication* m_app;
CEventQueue* m_eventQueue;
@@ -444,10 +470,12 @@ protected:
bool m_cheatRadar;
bool m_audioRepeat;
bool m_shortCut;
- int m_audioTrack;
+ std::string m_audioTrack;
int m_delayWriteMessage;
int m_movieInfoIndex;
+ CObject* m_controller;
+
//Level Checker flags
bool m_beginObject;
bool m_terrainGenerate;
@@ -516,19 +544,25 @@ protected:
int m_endTakeTotal;
EndTake m_endTake[10];
long m_endTakeResearch;
+ bool m_endTakeNever;
float m_endTakeWinDelay;
float m_endTakeLostDelay;
+ int m_audioChangeTotal;
+ AudioChange m_audioChange[10];
+
int m_obligatoryTotal;
char m_obligatoryToken[100][20];
int m_prohibitedTotal;
char m_prohibitedToken[100][20];
- char m_gamerName[100];
+ std::string m_gamerName;
int m_freeBuild; // constructible buildings
int m_freeResearch; // researches possible
+ Error m_missionResult;
+
ShowLimit m_showLimit[MAXSHOWLIMIT];
Gfx::Color m_colorRefBot;
@@ -540,5 +574,7 @@ protected:
Gfx::Color m_colorRefWater;
Gfx::Color m_colorNewWater;
float m_colorShiftWater;
+
+ std::string m_oldLocale;
};