131 const int MAXNEWSCRIPTNAME = 20;
141 const int MAXSHOWLIMIT = 5;
142 const int MAXSHOWPARTI = 200;
143 const float SHOWLIMITTIME = 20.0f;
151 int parti[MAXSHOWPARTI];
158 const int SATCOM_HUSTON = 0;
159 const int SATCOM_SAT = 1;
160 const int SATCOM_OBJECT = 2;
161 const int SATCOM_LOADING = 3;
162 const int SATCOM_PROG = 4;
163 const int SATCOM_SOLUCE = 5;
164 const int SATCOM_MAX = 6;
230 float GetJoystickDeadzone();
246 bool GetSatComLock();
256 float GetTracePrecision();
276 void SetEndMission(
Error result,
float delay);
317 char* GetScriptName();
318 char* GetScriptFile();
325 bool GetHimselfDamage();
326 bool GetShowSoluce();
327 bool GetSceneSoluce();
330 const char* GetSavegameDir();
331 const char* GetPublicDir();
332 const char* GetFilesDir();
354 float radius,
float duration=SHOWLIMITTIME);
376 bool IOWriteScene(
const char *filename,
const char *filecbot,
char *info);
383 void SetNumericLocale();
384 void RestoreNumericLocale();
388 void DisplayError(
Error err,
CObject* pObj,
float time=10.0f);
389 void DisplayError(
Error err,
Math::Vector goal,
float height=15.0f,
float dist=60.0f,
float time=10.0f);
397 void CreateScene(
bool soluce,
bool fixScene,
bool resetObject);
423 void UpdateSpeedLabel();
451 float m_joystickDeadzone;
460 float m_checkEndTime;
479 std::string m_audioTrack;
481 std::string m_satcomTrack;
483 std::string m_editorTrack;
485 int m_delayWriteMessage;
486 int m_movieInfoIndex;
492 bool m_terrainGenerate;
493 bool m_terrainInitTextures;
495 bool m_terrainCreate;
499 bool m_immediatSatCom;
513 char m_mapFilename[100];
516 std::string m_tooltipName;
519 char m_infoFilename[SATCOM_MAX][100];
522 int m_infoPos[SATCOM_MAX];
527 char m_scriptName[100];
528 char m_scriptFile[100];
530 int m_endingLostRank;
533 bool m_exitAfterMission;
552 float m_visitParticle;
558 long m_endTakeResearch;
560 float m_endTakeWinDelay;
561 float m_endTakeLostDelay;
563 int m_audioChangeTotal;
566 int m_obligatoryTotal;
567 char m_obligatoryToken[100][20];
568 int m_prohibitedTotal;
569 char m_prohibitedToken[100][20];
571 std::string m_gamerName;
576 Error m_missionResult;
588 float m_colorShiftWater;
590 std::string m_oldLocale;
void StartDisplayVisit(EventType event)
Start of the visit instead of an error.
Definition: robotmain.cpp:2374
void SetFriendAim(bool friendAim)
Indicates whether mouse is on an friend object, on which we should not shoot.
Definition: robotmain.cpp:7196
CSingleton base class for singletons.
void StartMusic()
Starts music with a mission.
Definition: robotmain.cpp:7220
Definition: maindialog.h:72
float SearchNearestObject(Math::Vector center, CObject *exclu)
Calculates the distance to the nearest object.
Definition: robotmain.cpp:5324
void StopSuspend()
End of dialogue during the game.
Definition: robotmain.cpp:2275
bool FreeSpace(Math::Vector ¢er, float minRadius, float maxRadius, float space, CObject *exclu)
Calculates a free space.
Definition: robotmain.cpp:5377
ParticleType
Definition: particle.h:58
void SetSpeed(float speed)
Changes game speed.
Definition: robotmain.cpp:7060
Math::Vector m_joyMotion
Motion vector set by joystick axes.
Definition: robotmain.h:455
Definition: displaytext.h:52
bool GetShowMap()
Indicates whether the mini-map is visible.
Definition: robotmain.cpp:7109
void ReadFreeParam()
Reads the global parameters for free play.
Definition: robotmain.cpp:6435
JoyAxisSlot
Slots for joystick axes inputs.
Definition: global.h:267
void SetInputBinding(InputSlot slot, InputBinding binding)
Management of input bindings.
Definition: robotmain.cpp:1037
void SetTracePrecision(float factor)
Management of the precision of drawing the ground.
Definition: robotmain.cpp:7208
MainMovieType GetMainMovie()
Returns the type of current movie.
Definition: robotmain.cpp:2125
void StopDisplayInfo()
End of displaying of instructions.
Definition: robotmain.cpp:2209
void SetIOPublic(bool mode)
Managing windows open/save.
Definition: robotmain.cpp:2336
Definition: robotmain.h:145
void CompileScript(bool soluce)
Compiles all scripts of robots.
Definition: robotmain.cpp:5697
void InitEye()
Initializes the view.
Definition: robotmain.cpp:3389
Definition: robotmain.h:114
bool DeselectObject()
Deselects the selected object.
Definition: robotmain.cpp:2628
void RemoteCamera(float pan, float zoom, float rTime)
Panned with the camera if a button is pressed.
Definition: robotmain.cpp:3332
void CreateIni()
Creates the file colobot.ini at the first time.
Definition: robotmain.cpp:967
void SelectOneObject(CObject *pObj, bool displayError=true)
Selects an object, without attending to deselect the rest.
Definition: robotmain.cpp:2555
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:3264
void StartDisplayInfo(int index, bool movie)
Definition: robotmain.cpp:2145
void HiliteClear()
Removes setting evidence of the object with the mouse hovers over.
Definition: robotmain.cpp:3023
bool IsBusy()
Seeks if an object occupies in a spot, to prevent a backup of the game.
Definition: robotmain.cpp:5969
int CreateSpot(Math::Vector pos, Gfx::Color color)
Creates a light spot.
Definition: robotmain.cpp:5141
bool IsSelectable(CObject *pObj)
Indicates whether an object is selectable.
Definition: robotmain.cpp:2932
Definition: robotmain.h:98
void FrameVisit(float rTime)
Move the arrow to visit.
Definition: robotmain.cpp:2465
Definition: singleton.h:27
void ClearInterface()
Removes hilite and tooltip.
Definition: robotmain.cpp:7250
int GetGamerFace()
Returns the representation to use for the player.
Definition: robotmain.cpp:7021
void CreateTooltip(Math::Point pos, const std::string &text)
Creates a tooltip.
Definition: robotmain.cpp:3125
void StartPauseMusic(PauseType pause)
Starts pause music.
Definition: robotmain.cpp:7230
int axis
Axis index or AXIS_INVALID.
Definition: robotmain.h:188
Some common, global definitions.
void CheckEndMessage(const char *message)
Checks if the mission is finished after displaying a message.
Definition: robotmain.cpp:6840
bool TestGadgetQuantity(int rank)
Updates the number of unnecessary objects.
Definition: robotmain.cpp:5291
bool CreateShortcuts()
Creates interface shortcuts to the units.
Definition: robotmain.cpp:7095
void SetJoyAxisBinding(JoyAxisSlot slot, JoyAxisBinding binding)
Management of joystick axis bindings.
Definition: robotmain.cpp:1049
void SetEditLock(bool lock, bool edit)
Management of the lock mode for the edition.
Definition: robotmain.cpp:7153
Math::Vector m_keyMotion
Motion vector set by keyboard or joystick buttons.
Definition: robotmain.h:453
char * GetGamerName()
Gets the player's name.
Definition: robotmain.cpp:7014
Definition: mainmovie.h:47
void IOWriteObject(FILE *file, CObject *pObj, const char *cmd)
Writes an object into the backup file.
Definition: robotmain.cpp:5990
CObject * GetSelectObject()
Returns the object that default was select after the creation of a scene.
Definition: robotmain.cpp:2532
void SetWindowPos(Math::Point pos)
Managing the size of the default window.
Definition: robotmain.cpp:2310
Global event queue.
Definition: event.h:764
Manager for dynamic lights in 3D scene.
Definition: lightman.h:142
void ExecuteCmd(char *cmd)
Executes a command.
Definition: robotmain.cpp:1798
int GetObligatoryToken()
Returns the number of instructions required.
Definition: robotmain.cpp:6857
InputSlot
Available slots for input bindings.
Definition: global.h:233
void Convert()
Conversion of units.
Definition: robotmain.cpp:3647
void ChangeCamera()
Change the mode of the camera.
Definition: robotmain.cpp:3194
InputBinding m_inputBindings[INPUT_SLOT_MAX]
Bindings for user inputs.
Definition: robotmain.h:449
Definition: robotmain.h:196
CRobotMain(CApplication *app, bool loadProfile)
Constructor of robot application.
Definition: robotmain.cpp:611
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:5120
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:5573
void SetFontSize(float size)
Managing the size of the default fonts.
Definition: robotmain.cpp:2298
Particle engine.
Definition: particle.h:266
void AdjustShowLimit(int i, Math::Vector pos)
Adjusts the boundaries to show.
Definition: robotmain.cpp:5609
void UpdateMap()
Updates the map.
Definition: robotmain.cpp:7103
bool FlushNewScriptName()
Empty the list.
Definition: robotmain.cpp:5926
bool AddNewScriptName(ObjectType type, char *name)
Adds a script name.
Definition: robotmain.cpp:5935
char * GetNewScriptName(ObjectType type, int rank)
Seeks a script name for a given type.
Definition: robotmain.cpp:5951
float GetPersoAngle()
Returns the angle of presentation.
Definition: robotmain.cpp:7039
CObject * DeselectAll()
Deselects everything, and returns the object that was selected.
Definition: robotmain.cpp:2539
CObject * SearchNearest(Math::Vector pos, CObject *pExclu)
Returns the nearest selectable object from a given position.
Definition: robotmain.cpp:2725
virtual ~CRobotMain()
Destructor of robot application.
Definition: robotmain.cpp:904
float GetFlatZoneRadius(Math::Vector center, float maxRadius, CObject *exclu)
Calculates the maximum radius of a free space.
Definition: robotmain.cpp:5442
void LoadFileScript(CObject *pObj, const char *filename, int objRank, int &nerror)
Load all programs of the robot.
Definition: robotmain.cpp:5804
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:5897
ObjectType
Type of game object.
Definition: object.h:46
void SetDefaultInputBindings()
Sets the default input bindings (key and axes)
Definition: robotmain.cpp:985
bool invert
True to invert axis value.
Definition: robotmain.h:190
void ScenePerso()
Load the scene for the character.
Definition: robotmain.cpp:3840
bool IOWriteScene(const char *filename, const char *filecbot, char *info)
Saves the current game.
Definition: robotmain.cpp:6090
Definition: mainshort.h:35
bool GetGamerOnlyHead()
Returns the mode with just the head.
Definition: robotmain.cpp:7033
bool DeleteObject()
Deletes the selected object.
Definition: robotmain.cpp:3005
CObject * SearchToto()
Returns the object toto.
Definition: robotmain.cpp:2709
void FlushShowLimit(int i)
Erases the boundaries shown.
Definition: robotmain.cpp:5552
2D point
Definition: point.h:46
Binding for joystick axis.
Definition: robotmain.h:185
void ResetKeyStates()
Resets tracked key states (motion vectors)
Definition: robotmain.cpp:1071
bool IsProhibitedToken(const char *token)
Checks if an instruction is not part of the banned list.
Definition: robotmain.cpp:6880
void SelectHuman()
Selects the human.
Definition: robotmain.cpp:2687
Main application.
Definition: app.h:201
void SetGamerName(const char *name)
Change the player's name.
Definition: robotmain.cpp:7006
void UpdateInfoText()
Updates the text information.
Definition: robotmain.cpp:3372
void HiliteObject(Math::Point pos)
Highlights the object with the mouse hovers over.
Definition: robotmain.cpp:3049
int GetDisplayInfoPosition(int index)
Returns the name of the text display.
Definition: robotmain.cpp:2248
void StartSuspend()
Beginning of a dialogue during the game.
Definition: robotmain.cpp:2261
void ChangePhase(Phase phase)
Changes phase.
Definition: robotmain.cpp:1078
void SetSatComLock(bool lock)
Management of the blocking of the call of SatCom.
Definition: robotmain.cpp:7142
Camera moving in 3D scene.
Definition: camera.h:130
void ResetCreate()
Resets all objects to their original position.
Definition: robotmain.cpp:6553
Management of pause modes.
Terrain loader/generator and manager.
Definition: terrain.h:220
Error CheckEndMission(bool frame)
Checks if the mission is over.
Definition: robotmain.cpp:6680
void SetJoystickDeadzone(float zone)
Management of joystick deadzone.
Definition: robotmain.cpp:1061
void FrameShowLimit(float rTime)
Advances the boundaries shown.
Definition: robotmain.cpp:5624
CObject - base class for all game objects.
The graphics engine.
Definition: engine.h:682
bool ProcessEvent(Event &event)
Processes an event.
Definition: robotmain.cpp:1306
bool GetTrainerPilot()
Indicates whether it is possible to control a driving robot.
Definition: robotmain.cpp:6892
CObject * DetectObject(Math::Point pos)
Detects the object aimed by the mouse.
Definition: robotmain.cpp:2782
CObject * SearchHuman()
Returns the object human.
Definition: robotmain.cpp:2693
CObject * IOReadScene(const char *filename, const char *filecbot)
Resumes some part of the game.
Definition: robotmain.cpp:6279
void SaveFileScript(CObject *pObj, const char *filename, int objRank)
Definition: robotmain.cpp:5874
bool EventObject(const Event &event)
Makes the event for all robots.
Definition: robotmain.cpp:3601
void HiliteFrame(float rTime)
Highlights the object with the mouse hovers over.
Definition: robotmain.cpp:3108
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:7116
void StartShowLimit()
Mount the boundaries of the selected object.
Definition: robotmain.cpp:5615
void ChangePause(PauseType pause)
Changes on the pause mode.
Definition: robotmain.cpp:7046
void AbortMovie()
Cancels the current movie.
Definition: robotmain.cpp:3352
void HelpObject()
Displays help for an object.
Definition: robotmain.cpp:3181
Water manager/renderer.
Definition: water.h:116
CObject * GetSelect()
Returns the selected object.
Definition: robotmain.cpp:2753
void CreateScene(bool soluce, bool fixScene, bool resetObject)
Creates the whole scene.
Definition: robotmain.cpp:3877
void HideDropZone(CObject *metal)
Hides buildable area when a cube of metal is taken up.
Definition: robotmain.cpp:5455
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:6456
bool SelectObject(CObject *pObj, bool displayError=true)
Selects the object aimed by the mouse.
Definition: robotmain.cpp:2608
void SaveAllScript()
Saves all programs of all the robots.
Definition: robotmain.cpp:5832
Definition: displayinfo.h:46
void UpdateAudio(bool frame)
Updates the audiotracks.
Definition: robotmain.cpp:6597
bool ReadFileStack(CObject *pObj, FILE *file, int objRank)
Resumes the execution stack of the program in a robot.
Definition: robotmain.cpp:5911
void LoadSceneOnStart(const std::string &name, int rank)
Caused the given mission to be loaded immediately after start.
Definition: robotmain.cpp:956
RGBA color.
Definition: color.h:35
CObject * IOReadObject(char *line, const char *filename, int objRank)
Resumes the game.
Definition: robotmain.cpp:6194
void SaveOneScript(CObject *pObj)
Definition: robotmain.cpp:5847
void WriteFreeParam()
Writes the global parameters for free play.
Definition: robotmain.cpp:6416
void StopDisplayVisit()
End of the visit instead of an error.
Definition: robotmain.cpp:2495
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:6869
void ChangeColor()
Change the colors and textures.
Definition: robotmain.cpp:5166
Event sent by system, interface or game.
Definition: event.h:686
Definition: pausemanager.h:42
char * GetDisplayInfoName(int index)
Returns the name of the text display.
Definition: robotmain.cpp:2242
void SetDisplayInfoPosition(int index, int pos)
Returns the name of the text display.
Definition: robotmain.cpp:2254
Definition: interface.h:56
float GetGameTime()
Returns the absolute time of the game.
Definition: robotmain.cpp:2290
void DeleteAllObjects()
Quickly removes all objects.
Definition: robotmain.cpp:2651
bool EventFrame(const Event &event)
Advances the entire scene.
Definition: robotmain.cpp:3397
int GetGamerGlasses()
Returns the representation to use for the player.
Definition: robotmain.cpp:7027
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:5471
void FlushDisplayInfo()
Clears the display of instructions.
Definition: robotmain.cpp:2132
void SetEditFull(bool full)
Management of the fullscreen mode during editing.
Definition: robotmain.cpp:7178
bool GetFixScene()
Indicates whether the scene is fixed, without interaction.
Definition: robotmain.cpp:6898
Definition: robotmain.h:133
Math::Vector LookatPoint(Math::Vector eye, float angleH, float angleV, float length)
Calculates the point of arrival of the camera.
Definition: robotmain.cpp:3625
const int AXIS_INVALID
Invalid value for axis binding (no axis assigned)
Definition: robotmain.h:194
void ClearTooltip()
Clears the previous tooltip.
Definition: robotmain.cpp:3174
void UpdateShortcuts()
Updates all the shortcuts.
Definition: robotmain.cpp:2526
void LoadOneScript(CObject *pObj, int &nerror)
Load all programs of the robot.
Definition: robotmain.cpp:5775