116 bool countTransported;
137 const int MAXNEWSCRIPTNAME = 20;
147 const int MAXSHOWLIMIT = 5;
148 const int MAXSHOWPARTI = 200;
149 const float SHOWLIMITTIME = 20.0f;
157 int parti[MAXSHOWPARTI];
164 const int SATCOM_HUSTON = 0;
165 const int SATCOM_SAT = 1;
166 const int SATCOM_OBJECT = 2;
167 const int SATCOM_LOADING = 3;
168 const int SATCOM_PROG = 4;
169 const int SATCOM_SOLUCE = 5;
170 const int SATCOM_MAX = 6;
178 void Create(
bool loadProfile =
true);
188 void ResetAfterDeviceChanged();
200 bool GetSatComLock();
210 float GetTracePrecision();
230 void SetEndMission(
Error result,
float delay);
271 char* GetScriptName();
272 char* GetScriptFile();
279 bool GetHimselfDamage();
280 bool GetShowSoluce();
281 bool GetSceneSoluce();
284 const char* GetSavegameDir();
285 const char* GetPublicDir();
286 const char* GetFilesDir();
295 char* GetSceneName();
310 float radius,
float duration=SHOWLIMITTIME);
332 bool IOWriteScene(
const char *filename,
const char *filecbot,
char *info);
341 void DisplayError(
Error err,
CObject* pObj,
float time=10.0f);
342 void DisplayError(
Error err,
Math::Vector goal,
float height=15.0f,
float dist=60.0f,
float time=10.0f);
344 std::string& GetUserLevelName(
int id);
346 void StartMissionTimer();
348 void SetAutosave(
bool enable);
350 void SetAutosaveInterval(
int interval);
351 int GetAutosaveInterval();
352 void SetAutosaveSlots(
int slots);
353 int GetAutosaveSlots();
363 void CreateScene(
bool soluce,
bool fixScene,
bool resetObject);
389 void UpdateSpeedLabel();
391 int AutosaveRotate(
bool freeOne);
439 std::string m_audioTrack;
441 std::string m_satcomTrack;
443 std::string m_editorTrack;
445 int m_delayWriteMessage;
446 int m_movieInfoIndex;
451 bool m_immediatSatCom;
465 char m_mapFilename[100];
468 std::string m_tooltipName;
471 char m_infoFilename[SATCOM_MAX][100];
474 int m_infoPos[SATCOM_MAX];
479 char m_scriptName[100];
480 char m_scriptFile[100];
482 int m_endingLostRank;
485 bool m_exitAfterMission;
504 float m_visitParticle;
510 long m_endTakeResearch;
512 float m_endTakeWinDelay;
513 float m_endTakeLostDelay;
515 int m_audioChangeTotal;
518 int m_obligatoryTotal;
519 char m_obligatoryToken[100][20];
520 int m_prohibitedTotal;
521 char m_prohibitedToken[100][20];
523 std::string m_gamerName;
528 Error m_missionResult;
540 float m_colorShiftWater;
542 bool m_missionTimerEnabled;
543 bool m_missionTimerStarted;
544 float m_missionTimer;
547 int m_autosaveInterval;
549 float m_autosaveLast;
void StartDisplayVisit(EventType event)
Start of the visit instead of an error.
Definition: robotmain.cpp:1634
void SetFriendAim(bool friendAim)
Indicates whether mouse is on an friend object, on which we should not shoot.
Definition: robotmain.cpp:6114
CSingleton base class for singletons.
void StartMusic()
Starts music with a mission.
Definition: robotmain.cpp:6138
Definition: maindialog.h:70
float SearchNearestObject(Math::Vector center, CObject *exclu)
Calculates the distance to the nearest object.
Definition: robotmain.cpp:4211
void StopSuspend()
End of dialogue during the game.
Definition: robotmain.cpp:1539
bool FreeSpace(Math::Vector ¢er, float minRadius, float maxRadius, float space, CObject *exclu)
Calculates a free space.
Definition: robotmain.cpp:4261
ParticleType
Definition: particle.h:60
void SetSpeed(float speed)
Changes game speed.
Definition: robotmain.cpp:5978
Definition: displaytext.h:54
bool GetShowMap()
Indicates whether the mini-map is visible.
Definition: robotmain.cpp:6027
void ReadFreeParam()
Reads the global parameters for free play.
Definition: robotmain.cpp:5290
void SetTracePrecision(float factor)
Management of the precision of drawing the ground.
Definition: robotmain.cpp:6126
MainMovieType GetMainMovie()
Returns the type of current movie.
Definition: robotmain.cpp:1403
void StopDisplayInfo()
End of displaying of instructions.
Definition: robotmain.cpp:1481
void SetIOPublic(bool mode)
Managing windows open/save.
Definition: robotmain.cpp:1596
Definition: robotmain.h:151
void CompileScript(bool soluce)
Compiles all scripts of robots.
Definition: robotmain.cpp:4561
void InitEye()
Initializes the view.
Definition: robotmain.cpp:2586
InputSlot
Available slots for input bindings NOTE: When adding new values, remember to also update keyTable in ...
Definition: key.h:76
Definition: robotmain.h:120
bool DeselectObject()
Deselects the selected object.
Definition: robotmain.cpp:1886
void RemoteCamera(float pan, float zoom, float rTime)
Panned with the camera if a button is pressed.
Definition: robotmain.cpp:2533
Definition: controller.h:32
void CreateIni()
Creates the file colobot.ini at the first time.
Definition: robotmain.cpp:388
void SelectOneObject(CObject *pObj, bool displayError=true)
Selects an object, without attending to deselect the rest.
Definition: robotmain.cpp:1813
void StartDisplayInfo(int index, bool movie)
Definition: robotmain.cpp:1423
void HiliteClear()
Removes setting evidence of the object with the mouse hovers over.
Definition: robotmain.cpp:2240
bool IsBusy()
Seeks if an object occupies in a spot, to prevent a backup of the game.
Definition: robotmain.cpp:4847
CRobotMain(CController *controller)
Constructor of robot application.
Definition: robotmain.cpp:126
int CreateSpot(Math::Vector pos, Gfx::Color color)
Creates a light spot.
Definition: robotmain.cpp:4028
bool IsSelectable(CObject *pObj)
Indicates whether an object is selectable.
Definition: robotmain.cpp:2149
Definition: robotmain.h:103
void KeyCamera(EventType event, InputSlot key)
Remote control the camera using the arrow keys.
Definition: robotmain.cpp:2475
void FrameVisit(float rTime)
Move the arrow to visit.
Definition: robotmain.cpp:1725
Definition: singleton.h:30
void ClearInterface()
Removes hilite and tooltip.
Definition: robotmain.cpp:6168
int GetGamerFace()
Returns the representation to use for the player.
Definition: robotmain.cpp:5929
void CreateTooltip(Math::Point pos, const std::string &text)
Creates a tooltip.
Definition: robotmain.cpp:2339
void StartPauseMusic(PauseType pause)
Starts pause music.
Definition: robotmain.cpp:6148
Some common, global definitions.
void CheckEndMessage(const char *message)
Checks if the mission is finished after displaying a message.
Definition: robotmain.cpp:5751
bool TestGadgetQuantity(int rank)
Updates the number of unnecessary objects.
Definition: robotmain.cpp:4178
bool CreateShortcuts()
Creates interface shortcuts to the units.
Definition: robotmain.cpp:6013
void SetEditLock(bool lock, bool edit)
Management of the lock mode for the edition.
Definition: robotmain.cpp:6071
char * GetGamerName()
Gets the player's name.
Definition: robotmain.cpp:5922
Definition: mainmovie.h:50
CObject * GetSelectObject()
Returns the object that default was select after the creation of a scene.
Definition: robotmain.cpp:1792
void SetWindowPos(Math::Point pos)
Managing the size of the default window.
Definition: robotmain.cpp:1570
Global event queue.
Definition: event.h:751
Manager for dynamic lights in 3D scene.
Definition: lightman.h:144
void ExecuteCmd(char *cmd)
Executes a command.
Definition: robotmain.cpp:1082
Definition: parserline.h:33
int GetObligatoryToken()
Returns the number of instructions required.
Definition: robotmain.cpp:5768
void ChangeCamera()
Change the mode of the camera.
Definition: robotmain.cpp:2408
Definition: robotmain.h:172
Cloud layer renderer.
Definition: cloud.h:78
Lightning effect renderer.
Definition: lightning.h:54
int CreateLight(Math::Vector direction, Gfx::Color color)
Creates a directional light.
Definition: robotmain.cpp:4007
void SetShowLimit(int i, Gfx::ParticleType parti, CObject *pObj, Math::Vector pos, float radius, float duration=SHOWLIMITTIME)
Specifies the boundaries to show.
Definition: robotmain.cpp:4454
void SetFontSize(float size)
Managing the size of the default fonts.
Definition: robotmain.cpp:1558
Particle engine.
Definition: particle.h:268
void AdjustShowLimit(int i, Math::Vector pos)
Adjusts the boundaries to show.
Definition: robotmain.cpp:4490
void UpdateMap()
Updates the map.
Definition: robotmain.cpp:6021
bool FlushNewScriptName()
Empty the list.
Definition: robotmain.cpp:4804
bool AddNewScriptName(ObjectType type, char *name)
Adds a script name.
Definition: robotmain.cpp:4813
char * GetNewScriptName(ObjectType type, int rank)
Seeks a script name for a given type.
Definition: robotmain.cpp:4829
float GetPersoAngle()
Returns the angle of presentation.
Definition: robotmain.cpp:5947
CObject * DeselectAll()
Deselects everything, and returns the object that was selected.
Definition: robotmain.cpp:1799
CObject * SearchNearest(Math::Vector pos, CObject *pExclu)
Returns the nearest selectable object from a given position.
Definition: robotmain.cpp:1962
virtual ~CRobotMain()
Destructor of robot application.
Definition: robotmain.cpp:319
float GetFlatZoneRadius(Math::Vector center, float maxRadius, CObject *exclu)
Calculates the maximum radius of a free space.
Definition: robotmain.cpp:4326
void LoadFileScript(CObject *pObj, const char *filename, int objRank, int &nerror)
Load all programs of the robot.
Definition: robotmain.cpp:4668
Planet manager.
Definition: planet.h:82
CMainMovie - control over movie sequences.
bool SaveFileStack(CObject *pObj, FILE *file, int objRank)
Saves the stack of the program in execution of a robot.
Definition: robotmain.cpp:4775
ObjectType
Type of game object.
Definition: object.h:51
void ScenePerso()
Load the scene for the character.
Definition: robotmain.cpp:2841
bool IOWriteScene(const char *filename, const char *filecbot, char *info)
Saves the current game.
Definition: robotmain.cpp:4933
Definition: mainshort.h:37
bool GetGamerOnlyHead()
Returns the mode with just the head.
Definition: robotmain.cpp:5941
bool DeleteObject()
Deletes the selected object.
Definition: robotmain.cpp:2222
CObject * SearchToto()
Returns the object toto.
Definition: robotmain.cpp:1956
void IOWriteObject(CLevelParserLine *line, CObject *obj)
Writes an object into the backup file.
Definition: robotmain.cpp:4865
void FlushShowLimit(int i)
Erases the boundaries shown.
Definition: robotmain.cpp:4433
2D point
Definition: point.h:49
bool IsProhibitedToken(const char *token)
Checks if an instruction is not part of the banned list.
Definition: robotmain.cpp:5791
void SelectHuman()
Selects the human.
Definition: robotmain.cpp:1944
Main application.
Definition: app.h:187
CObject * IOReadObject(CLevelParserLine *line, const char *filename, int objRank)
Resumes the game.
Definition: robotmain.cpp:5053
void SetGamerName(const char *name)
Change the player's name.
Definition: robotmain.cpp:5914
void UpdateInfoText()
Updates the text information.
Definition: robotmain.cpp:2570
void HiliteObject(Math::Point pos)
Highlights the object with the mouse hovers over.
Definition: robotmain.cpp:2263
int GetDisplayInfoPosition(int index)
Returns the name of the text display.
Definition: robotmain.cpp:1516
void StartSuspend()
Beginning of a dialogue during the game.
Definition: robotmain.cpp:1529
void ChangePhase(Phase phase)
Changes phase.
Definition: robotmain.cpp:412
Entry point into CRobotMain and CMainDialog.
Definition: controller.h:40
void SetSatComLock(bool lock)
Management of the blocking of the call of SatCom.
Definition: robotmain.cpp:6060
Camera moving in 3D scene.
Definition: camera.h:133
void ResetCreate()
Resets all objects to their original position.
Definition: robotmain.cpp:5415
void SetExitAfterMission(bool exit)
Enable mode where completing mission closes the game.
Definition: robotmain.cpp:6315
Management of pause modes.
Terrain loader/generator and manager.
Definition: terrain.h:222
Error CheckEndMission(bool frame)
Checks if the mission is over.
Definition: robotmain.cpp:5551
Namespace for (new) graphics code.
Definition: app.h:49
void FrameShowLimit(float rTime)
Advances the boundaries shown.
Definition: robotmain.cpp:4505
CObject - base class for all game objects.
The graphics engine.
Definition: engine.h:684
bool ProcessEvent(Event &event)
Processes an event.
Definition: robotmain.cpp:659
bool GetTrainerPilot()
Indicates whether it is possible to control a driving robot.
Definition: robotmain.cpp:5803
CObject * DetectObject(Math::Point pos)
Detects the object aimed by the mouse.
Definition: robotmain.cpp:2006
CObject * SearchHuman()
Returns the object human.
Definition: robotmain.cpp:1950
CObject * IOReadScene(const char *filename, const char *filecbot)
Resumes some part of the game.
Definition: robotmain.cpp:5135
void SaveFileScript(CObject *pObj, const char *filename, int objRank)
Definition: robotmain.cpp:4744
bool EventObject(const Event &event)
Makes the event for all robots.
Definition: robotmain.cpp:2809
void HiliteFrame(float rTime)
Highlights the object with the mouse hovers over.
Definition: robotmain.cpp:2322
Error
Type of error or info message.
Definition: global.h:32
void SetMovieLock(bool lock)
Management of the lock mode for movies.
Definition: robotmain.cpp:6034
void StartShowLimit()
Mount the boundaries of the selected object.
Definition: robotmain.cpp:4496
void ChangePause(PauseType pause)
Changes on the pause mode.
Definition: robotmain.cpp:5964
void AbortMovie()
Cancels the current movie.
Definition: robotmain.cpp:2553
void HelpObject()
Displays help for an object.
Definition: robotmain.cpp:2395
Water manager/renderer.
Definition: water.h:118
CObject * GetSelect()
Returns the selected object.
Definition: robotmain.cpp:1988
void CreateScene(bool soluce, bool fixScene, bool resetObject)
Creates the whole scene.
Definition: robotmain.cpp:2888
void HideDropZone(CObject *metal)
Hides buildable area when a cube of metal is taken up.
Definition: robotmain.cpp:4339
Particle rendering - CParticle class (aka particle)
3D (3x1) vector
Definition: vector.h:52
void ResetObject()
Resets all objects to their original position.
Definition: robotmain.cpp:5318
bool SelectObject(CObject *pObj, bool displayError=true)
Selects the object aimed by the mouse.
Definition: robotmain.cpp:1866
void SaveAllScript()
Saves all programs of all the robots.
Definition: robotmain.cpp:4696
Definition: displayinfo.h:48
void UpdateAudio(bool frame)
Updates the audiotracks.
Definition: robotmain.cpp:5465
bool ReadFileStack(CObject *pObj, FILE *file, int objRank)
Resumes the execution stack of the program in a robot.
Definition: robotmain.cpp:4789
RGBA color.
Definition: color.h:38
void SaveOneScript(CObject *pObj)
Definition: robotmain.cpp:4708
void WriteFreeParam()
Writes the global parameters for free play.
Definition: robotmain.cpp:5269
void StopDisplayVisit()
End of the visit instead of an error.
Definition: robotmain.cpp:1755
EventType
Type of event message.
Definition: event.h:38
int IsObligatoryToken(const char *token)
Checks if an instruction is part of the obligatory list.
Definition: robotmain.cpp:5780
void ChangeColor()
Change the colors and textures.
Definition: robotmain.cpp:4053
Event sent by system, interface or game.
Definition: event.h:678
Definition: pausemanager.h:44
char * GetDisplayInfoName(int index)
Returns the name of the text display.
Definition: robotmain.cpp:1510
void SetDisplayInfoPosition(int index, int pos)
Returns the name of the text display.
Definition: robotmain.cpp:1522
Definition: interface.h:58
float GetGameTime()
Returns the absolute time of the game.
Definition: robotmain.cpp:1550
void DeleteAllObjects()
Quickly removes all objects.
Definition: robotmain.cpp:1909
bool EventFrame(const Event &event)
Advances the entire scene.
Definition: robotmain.cpp:2594
int GetGamerGlasses()
Returns the representation to use for the player.
Definition: robotmain.cpp:5935
Sound plugin interface.
Definition: sound.h:151
void ShowDropZone(CObject *metal, CObject *truck)
Shows the buildable area when a cube of metal is deposited.
Definition: robotmain.cpp:4355
void FlushDisplayInfo()
Clears the display of instructions.
Definition: robotmain.cpp:1410
void SetEditFull(bool full)
Management of the fullscreen mode during editing.
Definition: robotmain.cpp:6096
bool GetFixScene()
Indicates whether the scene is fixed, without interaction.
Definition: robotmain.cpp:5809
Definition: robotmain.h:139
Math::Vector LookatPoint(Math::Vector eye, float angleH, float angleV, float length)
Calculates the point of arrival of the camera.
Definition: robotmain.cpp:2830
void ClearTooltip()
Clears the previous tooltip.
Definition: robotmain.cpp:2388
void UpdateShortcuts()
Updates all the shortcuts.
Definition: robotmain.cpp:1786
void LoadOneScript(CObject *pObj, int &nerror)
Load all programs of the robot.
Definition: robotmain.cpp:4634