126 const int MAXNEWSCRIPTNAME = 20;
136 const int MAXSHOWLIMIT = 5;
137 const int MAXSHOWPARTI = 200;
138 const float SHOWLIMITTIME = 20.0f;
146 int parti[MAXSHOWPARTI];
153 const int SATCOM_HUSTON = 0;
154 const int SATCOM_SAT = 1;
155 const int SATCOM_OBJECT = 2;
156 const int SATCOM_LOADING = 3;
157 const int SATCOM_PROG = 4;
158 const int SATCOM_SOLUCE = 5;
159 const int SATCOM_MAX = 6;
225 float GetJoystickDeadzone();
241 bool GetSatComLock();
251 float GetTracePrecision();
271 void SetEndMission(
Error result,
float delay);
312 char* GetScriptName();
313 char* GetScriptFile();
320 bool GetHimselfDamage();
321 bool GetShowSoluce();
322 bool GetSceneSoluce();
325 const char* GetSavegameDir();
326 const char* GetPublicDir();
327 const char* GetFilesDir();
348 float radius,
float duration=SHOWLIMITTIME);
370 bool IOWriteScene(
const char *filename,
const char *filecbot,
char *info);
377 void SetNumericLocale();
378 void RestoreNumericLocale();
382 void DisplayError(
Error err,
CObject* pObj,
float time=10.0f);
383 void DisplayError(
Error err,
Math::Vector goal,
float height=15.0f,
float dist=60.0f,
float time=10.0f);
391 void CreateScene(
bool soluce,
bool fixScene,
bool resetObject);
395 float height,
ObjectType type,
float power=1.0f,
396 bool trainer=
false,
bool toy=
false,
int option=0);
420 void UpdateSpeedLabel();
447 float m_joystickDeadzone;
456 float m_checkEndTime;
476 std::string m_audioTrack;
477 int m_delayWriteMessage;
478 int m_movieInfoIndex;
484 bool m_terrainGenerate;
485 bool m_terrainInitTextures;
487 bool m_terrainCreate;
491 bool m_immediatSatCom;
506 char m_mapFilename[100];
509 char m_tooltipName[100];
512 char m_infoFilename[SATCOM_MAX][100];
515 int m_infoPos[SATCOM_MAX];
520 char m_scriptName[100];
521 char m_scriptFile[100];
523 int m_endingLostRank;
543 float m_visitParticle;
549 long m_endTakeResearch;
551 float m_endTakeWinDelay;
552 float m_endTakeLostDelay;
554 int m_audioChangeTotal;
557 int m_obligatoryTotal;
558 char m_obligatoryToken[100][20];
559 int m_prohibitedTotal;
560 char m_prohibitedToken[100][20];
562 std::string m_gamerName;
567 Error m_missionResult;
579 float m_colorShiftWater;
581 std::string m_oldLocale;
void StartDisplayVisit(EventType event)
Start of the visit instead of an error.
Definition: robotmain.cpp:2376
void SetFriendAim(bool friendAim)
Indicates whether mouse is on an friend object, on which we should not shoot.
Definition: robotmain.cpp:7469
CSingleton base class for singletons.
void StartMusic()
Starts music with a mission.
Definition: robotmain.cpp:7493
Definition: maindialog.h:70
float SearchNearestObject(Math::Vector center, CObject *exclu)
Calculates the distance to the nearest object.
Definition: robotmain.cpp:5617
void StopSuspend()
End of dialogue during the game.
Definition: robotmain.cpp:2277
bool FreeSpace(Math::Vector ¢er, float minRadius, float maxRadius, float space, CObject *exclu)
Calculates a free space.
Definition: robotmain.cpp:5670
ParticleType
Definition: particle.h:58
void SetSpeed(float speed)
Changes game speed.
Definition: robotmain.cpp:7333
Math::Vector m_joyMotion
Motion vector set by joystick axes.
Definition: robotmain.h:451
Definition: displaytext.h:52
bool GetShowMap()
Indicates whether the mini-map is visible.
Definition: robotmain.cpp:7382
void ReadFreeParam()
Reads the global parameters for free play.
Definition: robotmain.cpp:6722
JoyAxisSlot
Slots for joystick axes inputs.
Definition: global.h:285
void SetInputBinding(InputSlot slot, InputBinding binding)
Management of input bindings.
Definition: robotmain.cpp:1020
void SetTracePrecision(float factor)
Management of the precision of drawing the ground.
Definition: robotmain.cpp:7481
MainMovieType GetMainMovie()
Returns the type of current movie.
Definition: robotmain.cpp:2127
void StopDisplayInfo()
End of displaying of instructions.
Definition: robotmain.cpp:2211
void CreateTooltip(Math::Point pos, const char *text)
Creates a tooltip.
Definition: robotmain.cpp:3128
void SetIOPublic(bool mode)
Managing windows open/save.
Definition: robotmain.cpp:2338
Definition: robotmain.h:140
void CompileScript(bool soluce)
Compiles all scripts of robots.
Definition: robotmain.cpp:5990
void InitEye()
Initializes the view.
Definition: robotmain.cpp:3392
Definition: robotmain.h:111
bool DeselectObject()
Deselects the selected object.
Definition: robotmain.cpp:2630
void RemoteCamera(float pan, float zoom, float rTime)
Panned with the camera if a button is pressed.
Definition: robotmain.cpp:3335
void CreateIni()
Creates the file colobot.ini at the first time.
Definition: robotmain.cpp:955
void SelectOneObject(CObject *pObj, bool displayError=true)
Selects an object, without attending to deselect the rest.
Definition: robotmain.cpp:2557
const unsigned int KEY_INVALID
Special value for invalid key bindings.
Definition: key.h:63
void KeyCamera(EventType event, unsigned int key)
Remote control the camera using the arrow keys.
Definition: robotmain.cpp:3267
void StartDisplayInfo(int index, bool movie)
Definition: robotmain.cpp:2147
void ChangePause(bool pause)
Changes on the pause mode.
Definition: robotmain.cpp:7321
void HiliteClear()
Removes setting evidence of the object with the mouse hovers over.
Definition: robotmain.cpp:3025
bool IsBusy()
Seeks if an object occupies in a spot, to prevent a backup of the game.
Definition: robotmain.cpp:6260
int CreateSpot(Math::Vector pos, Gfx::Color color)
Creates a light spot.
Definition: robotmain.cpp:5434
bool IsSelectable(CObject *pObj)
Indicates whether an object is selectable.
Definition: robotmain.cpp:2934
Definition: robotmain.h:97
void FrameVisit(float rTime)
Move the arrow to visit.
Definition: robotmain.cpp:2467
Definition: singleton.h:27
void ClearInterface()
Removes hilite and tooltip.
Definition: robotmain.cpp:7504
int GetGamerFace()
Returns the representation to use for the player.
Definition: robotmain.cpp:7296
int axis
Axis index or AXIS_INVALID.
Definition: robotmain.h:183
Some common, global definitions.
void CheckEndMessage(const char *message)
Checks if the mission is finished after displaying a message.
Definition: robotmain.cpp:7115
bool TestGadgetQuantity(int rank)
Updates the number of unnecessary objects.
Definition: robotmain.cpp:5584
bool CreateShortcuts()
Creates interface shortcuts to the units.
Definition: robotmain.cpp:7368
void SetJoyAxisBinding(JoyAxisSlot slot, JoyAxisBinding binding)
Management of joystick axis bindings.
Definition: robotmain.cpp:1032
void SetEditLock(bool lock, bool edit)
Management of the lock mode for the edition.
Definition: robotmain.cpp:7426
Math::Vector m_keyMotion
Motion vector set by keyboard or joystick buttons.
Definition: robotmain.h:449
char * GetGamerName()
Gets the player's name.
Definition: robotmain.cpp:7289
Definition: mainmovie.h:47
void IOWriteObject(FILE *file, CObject *pObj, const char *cmd)
Writes an object into the backup file.
Definition: robotmain.cpp:6281
CObject * GetSelectObject()
Returns the object that default was select after the creation of a scene.
Definition: robotmain.cpp:2534
void SetWindowPos(Math::Point pos)
Managing the size of the default window.
Definition: robotmain.cpp:2312
Global event queue.
Definition: event.h:765
Manager for dynamic lights in 3D scene.
Definition: lightman.h:142
void ExecuteCmd(char *cmd)
Executes a command.
Definition: robotmain.cpp:1797
int GetObligatoryToken()
Returns the number of instructions required.
Definition: robotmain.cpp:7132
InputSlot
Available slots for input bindings.
Definition: global.h:251
void Convert()
Conversion of units.
Definition: robotmain.cpp:3650
void ChangeCamera()
Change the mode of the camera.
Definition: robotmain.cpp:3197
InputBinding m_inputBindings[INPUT_SLOT_MAX]
Bindings for user inputs.
Definition: robotmain.h:445
Definition: robotmain.h:191
CRobotMain(CApplication *app, bool loadProfile)
Constructor of robot application.
Definition: robotmain.cpp:607
Cloud layer renderer.
Definition: cloud.h:76
Lightning effect renderer.
Definition: lightning.h:52
int CreateLight(Math::Vector direction, Gfx::Color color)
Creates a directional light.
Definition: robotmain.cpp:5413
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:5866
void SetFontSize(float size)
Managing the size of the default fonts.
Definition: robotmain.cpp:2300
Particle engine.
Definition: particle.h:266
void AdjustShowLimit(int i, Math::Vector pos)
Adjusts the boundaries to show.
Definition: robotmain.cpp:5902
void UpdateMap()
Updates the map.
Definition: robotmain.cpp:7376
bool FlushNewScriptName()
Empty the list.
Definition: robotmain.cpp:6217
bool AddNewScriptName(ObjectType type, char *name)
Adds a script name.
Definition: robotmain.cpp:6226
char * GetNewScriptName(ObjectType type, int rank)
Seeks a script name for a given type.
Definition: robotmain.cpp:6242
float GetPersoAngle()
Returns the angle of presentation.
Definition: robotmain.cpp:7314
CObject * DeselectAll()
Deselects everything, and returns the object that was selected.
Definition: robotmain.cpp:2541
CObject * SearchNearest(Math::Vector pos, CObject *pExclu)
Returns the nearest selectable object from a given position.
Definition: robotmain.cpp:2727
virtual ~CRobotMain()
Destructor of robot application.
Definition: robotmain.cpp:893
float GetFlatZoneRadius(Math::Vector center, float maxRadius, CObject *exclu)
Calculates the maximum radius of a free space.
Definition: robotmain.cpp:5735
void LoadFileScript(CObject *pObj, const char *filename, int objRank, int &nerror)
Load all programs of the robot.
Definition: robotmain.cpp:6095
Planet manager.
Definition: planet.h:80
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:6188
ObjectType
Type of game object.
Definition: object.h:46
void SetDefaultInputBindings()
Sets the default input bindings (key and axes)
Definition: robotmain.cpp:973
bool invert
True to invert axis value.
Definition: robotmain.h:185
CObject * CreateObject(Math::Vector pos, float angle, float zoom, float height, ObjectType type, float power=1.0f, bool trainer=false, bool toy=false, int option=0)
Creates an object of decoration mobile or stationary.
Definition: robotmain.cpp:5080
void ScenePerso()
Load the scene for the character.
Definition: robotmain.cpp:3843
bool IOWriteScene(const char *filename, const char *filecbot, char *info)
Saves the current game.
Definition: robotmain.cpp:6378
Definition: mainshort.h:35
bool GetGamerOnlyHead()
Returns the mode with just the head.
Definition: robotmain.cpp:7308
bool DeleteObject()
Deletes the selected object.
Definition: robotmain.cpp:3007
CObject * SearchToto()
Returns the object toto.
Definition: robotmain.cpp:2711
void FlushShowLimit(int i)
Erases the boundaries shown.
Definition: robotmain.cpp:5845
2D point
Definition: point.h:46
Binding for joystick axis.
Definition: robotmain.h:180
void ResetKeyStates()
Resets tracked key states (motion vectors)
Definition: robotmain.cpp:1054
bool IsProhibitedToken(const char *token)
Checks if an instruction is not part of the banned list.
Definition: robotmain.cpp:7155
void SelectHuman()
Selects the human.
Definition: robotmain.cpp:2689
Main application.
Definition: app.h:200
void SetGamerName(const char *name)
Change the player's name.
Definition: robotmain.cpp:7281
void UpdateInfoText()
Updates the text information.
Definition: robotmain.cpp:3375
void HiliteObject(Math::Point pos)
Highlights the object with the mouse hovers over.
Definition: robotmain.cpp:3051
int GetDisplayInfoPosition(int index)
Returns the name of the text display.
Definition: robotmain.cpp:2250
void StartSuspend()
Beginning of a dialogue during the game.
Definition: robotmain.cpp:2263
void ChangePhase(Phase phase)
Changes phase.
Definition: robotmain.cpp:1061
void SetSatComLock(bool lock)
Management of the blocking of the call of SatCom.
Definition: robotmain.cpp:7415
Camera moving in 3D scene.
Definition: camera.h:130
void ResetCreate()
Resets all objects to their original position.
Definition: robotmain.cpp:6840
Terrain loader/generator and manager.
Definition: terrain.h:220
Error CheckEndMission(bool frame)
Checks if the mission is over.
Definition: robotmain.cpp:6960
void SetJoystickDeadzone(float zone)
Management of joystick deadzone.
Definition: robotmain.cpp:1044
void FrameShowLimit(float rTime)
Advances the boundaries shown.
Definition: robotmain.cpp:5917
CObject - base class for all game objects.
The graphics engine.
Definition: engine.h:681
bool ProcessEvent(Event &event)
Processes an event.
Definition: robotmain.cpp:1310
bool GetTrainerPilot()
Indicates whether it is possible to control a driving robot.
Definition: robotmain.cpp:7167
CObject * DetectObject(Math::Point pos)
Detects the object aimed by the mouse.
Definition: robotmain.cpp:2784
CObject * SearchHuman()
Returns the object human.
Definition: robotmain.cpp:2695
CObject * IOReadScene(const char *filename, const char *filecbot)
Resumes some part of the game.
Definition: robotmain.cpp:6566
void SaveFileScript(CObject *pObj, const char *filename, int objRank)
Definition: robotmain.cpp:6165
bool EventObject(const Event &event)
Makes the event for all robots.
Definition: robotmain.cpp:3604
void HiliteFrame(float rTime)
Highlights the object with the mouse hovers over.
Definition: robotmain.cpp:3110
Error
Type of error or info message.
Definition: global.h:29
void SetMovieLock(bool lock)
Management of the lock mode for movies.
Definition: robotmain.cpp:7389
void StartShowLimit()
Mount the boundaries of the selected object.
Definition: robotmain.cpp:5908
void AbortMovie()
Cancels the current movie.
Definition: robotmain.cpp:3355
void HelpObject()
Displays help for an object.
Definition: robotmain.cpp:3184
Water manager/renderer.
Definition: water.h:116
CObject * GetSelect()
Returns the selected object.
Definition: robotmain.cpp:2755
void CreateScene(bool soluce, bool fixScene, bool resetObject)
Creates the whole scene.
Definition: robotmain.cpp:3878
void HideDropZone(CObject *metal)
Hides buildable area when a cube of metal is taken up.
Definition: robotmain.cpp:5748
Particle rendering - CParticle class (aka particle)
3D (3x1) vector
Definition: vector.h:49
void ResetObject()
Resets all objects to their original position.
Definition: robotmain.cpp:6743
bool SelectObject(CObject *pObj, bool displayError=true)
Selects the object aimed by the mouse.
Definition: robotmain.cpp:2610
void SaveAllScript()
Saves all programs of all the robots.
Definition: robotmain.cpp:6123
Definition: displayinfo.h:44
void UpdateAudio(bool frame)
Updates the audiotracks.
Definition: robotmain.cpp:6882
bool ReadFileStack(CObject *pObj, FILE *file, int objRank)
Resumes the execution stack of the program in a robot.
Definition: robotmain.cpp:6202
void LoadSceneOnStart(const std::string &name, int rank)
Caused the given mission to be loaded immediately after start.
Definition: robotmain.cpp:945
RGBA color.
Definition: color.h:35
CObject * IOReadObject(char *line, const char *filename, int objRank)
Resumes the game.
Definition: robotmain.cpp:6482
void SaveOneScript(CObject *pObj)
Definition: robotmain.cpp:6138
void WriteFreeParam()
Writes the global parameters for free play.
Definition: robotmain.cpp:6703
void StopDisplayVisit()
End of the visit instead of an error.
Definition: robotmain.cpp:2497
EventType
Type of event message.
Definition: event.h:35
int IsObligatoryToken(const char *token)
Checks if an instruction is part of the obligatory list.
Definition: robotmain.cpp:7144
void ChangeColor()
Change the colors and textures.
Definition: robotmain.cpp:5459
Event sent by system, interface or game.
Definition: event.h:687
char * GetDisplayInfoName(int index)
Returns the name of the text display.
Definition: robotmain.cpp:2244
void SetDisplayInfoPosition(int index, int pos)
Returns the name of the text display.
Definition: robotmain.cpp:2256
Definition: interface.h:56
float GetGameTime()
Returns the absolute time of the game.
Definition: robotmain.cpp:2292
void DeleteAllObjects()
Quickly removes all objects.
Definition: robotmain.cpp:2653
bool EventFrame(const Event &event)
Advances the entire scene.
Definition: robotmain.cpp:3400
int GetGamerGlasses()
Returns the representation to use for the player.
Definition: robotmain.cpp:7302
Sound plugin interface.
Definition: sound.h:149
void ShowDropZone(CObject *metal, CObject *truck)
Shows the buildable area when a cube of metal is deposited.
Definition: robotmain.cpp:5764
void FlushDisplayInfo()
Clears the display of instructions.
Definition: robotmain.cpp:2134
void SetEditFull(bool full)
Management of the fullscreen mode during editing.
Definition: robotmain.cpp:7451
bool GetFixScene()
Indicates whether the scene is fixed, without interaction.
Definition: robotmain.cpp:7173
Definition: robotmain.h:128
Math::Vector LookatPoint(Math::Vector eye, float angleH, float angleV, float length)
Calculates the point of arrival of the camera.
Definition: robotmain.cpp:3628
const int AXIS_INVALID
Invalid value for axis binding (no axis assigned)
Definition: robotmain.h:189
void ClearTooltip()
Clears the previous tooltip.
Definition: robotmain.cpp:3177
void UpdateShortcuts()
Updates all the shortcuts.
Definition: robotmain.cpp:2528
void LoadOneScript(CObject *pObj, int &nerror)
Load all programs of the robot.
Definition: robotmain.cpp:6066