28 #include "common/language.h" 33 #include "level/level_category.h" 71 : index(-1), axisCount(0), buttonCount(0) {}
103 PCNT_EVENT_PROCESSING,
127 DEBUG_SYS_EVENTS = 1 << 0,
128 DEBUG_UPDATE_EVENTS = 1 << 1,
129 DEBUG_APP_EVENTS = 1 << 2,
130 DEBUG_EVENTS = DEBUG_SYS_EVENTS | DEBUG_UPDATE_EVENTS | DEBUG_APP_EVENTS,
131 DEBUG_MODELS = 1 << 3,
132 DEBUG_ALL = DEBUG_SYS_EVENTS | DEBUG_APP_EVENTS | DEBUG_MODELS
201 int GetExitCode()
const;
204 const std::string& GetErrorMessage()
const;
207 void GetVideoResolutionList(std::vector<Math::IntPoint> &resolutions,
int display = 0)
const;
216 void SuspendSimulation();
218 void ResumeSimulation();
220 bool GetSimulationSuspended()
const;
223 void ResetTimeAfterLoading();
226 void SetSimulationSpeed(
float speed);
228 float GetSimulationSpeed()
const;
232 float GetAbsTime()
const;
234 long long GetExactAbsTime()
const;
237 long long GetRealAbsTime()
const;
240 float GetRelTime()
const;
242 long long GetExactRelTime()
const;
245 long long GetRealRelTime()
const;
248 std::vector<JoystickDevice> GetJoystickList()
const;
258 void SetJoystickEnabled(
bool enable);
259 bool GetJoystickEnabled()
const;
263 void UpdateJoystick();
276 void SetTextInput(
bool textInputEnabled);
283 void SetDebugModeActive(DebugMode mode,
bool active);
284 bool IsDebugModeActive(DebugMode mode)
const;
285 static bool ParseDebugModes(
const std::string& str,
int& debugModes);
290 Language GetLanguage()
const;
291 char GetLanguageChar()
const;
292 void SetLanguage(Language language);
302 bool GetSceneTestMode();
308 void RenderIfNeeded(
int updateRate);
311 void PlayForceFeedbackEffect(
float strength = 1.0f,
int length = 999999);
313 void StopForceFeedbackEffect();
317 bool CreateVideoSurface();
320 Event ProcessSystemEvent();
322 Event CreateVirtualEvent(
const Event& sourceEvent);
324 TEST_VIRTUAL
Event CreateUpdateEvent();
326 void LogEvent(
const Event& event);
331 void CloseJoystick();
334 void InternalResumeSimulation();
337 void ResetPerformanceCounters();
339 void UpdatePerformanceCountersData();
386 float m_performanceCountersData[
PCNT_MAX];
388 long long m_realAbsTimeBase;
389 long long m_realAbsTime;
390 long long m_realRelTime;
392 long long m_absTimeBase;
393 long long m_exactAbsTime;
394 long long m_exactRelTime;
399 float m_simulationSpeed;
400 bool m_simulationSuspended;
407 bool m_graphicsOverride =
false;
408 std::string m_graphics =
"default";
410 bool m_glVersionOverride =
false;
414 bool m_glProfileOverride =
false;
430 LevelCategory m_runSceneCategory;
448 static char m_languageLocale[50];
CSingleton base class for singletons.
< frame update in CParticle
Definition: app.h:108
std::unique_ptr< CInput > m_input
Input manager.
Definition: app.h:359
std::string m_windowTitle
Text set as window title.
Definition: app.h:377
ParseArgsStatus
State of parsing commandline arguments.
Definition: app.h:78
< swapping buffers and vsync
Definition: app.h:120
Class for managing data/lang/save paths.
Definition: pathman.h:37
bool m_sceneTest
Scene test mode.
Definition: app.h:436
< rendering shadow map
Definition: app.h:118
bool m_resolutionOverride
Screen resoultion overriden by commandline.
Definition: app.h:442
< rendering the water
Definition: app.h:113
std::vector< bool > m_joyButtonState
Current state of joystick buttons; may be updated from another thread.
Definition: app.h:427
< all ok
Definition: app.h:81
< all counters together
Definition: app.h:122
CSystemUtils * m_systemUtils
System utils instance.
Definition: app.h:343
std::vector< int > m_joyAxeState
Current state of joystick axes; may be updated from another thread.
Definition: app.h:425
< invalid syntax
Definition: app.h:82
< the whole frame update process
Definition: app.h:106
Gfx::DeviceConfig m_deviceConfig
Current configuration of OpenGL display device.
Definition: app.h:374
< in-game cursor visible; system cursor hidden
Definition: app.h:93
Definition: singleton.h:30
int index
Device index (-1 = invalid device)
Definition: app.h:62
std::string name
Device name.
Definition: app.h:64
std::unique_ptr< ApplicationPrivate > m_private
Private (SDL-dependent data)
Definition: app.h:345
Global event queue.
Definition: event.h:866
int axisCount
Number of axes (only available after joystick opened)
Definition: app.h:66
SystemTimeStamp * m_baseTimeStamp
Animation time stamps, etc.
Definition: app.h:381
Class for loading config file.
Definition: config_file.h:40
PerformanceCounter
Type of counter testing performance.
Definition: app.h:101
std::unique_ptr< CSoundInterface > m_sound
Sound subsystem.
Definition: app.h:353
General config for graphics device.
Definition: device.h:64
std::unique_ptr< Gfx::CDevice > m_device
Graphics device.
Definition: app.h:351
< rendering 2D interface
Definition: app.h:116
long m_debugModes
Bit array of active debug modes.
Definition: app.h:368
std::unique_ptr< Gfx::CEngine > m_engine
Graphics engine.
Definition: app.h:349
< rendering the particles in 3D
Definition: app.h:112
< rendering the terrain
Definition: app.h:114
< frame update in CEngine
Definition: app.h:107
2D point
Definition: point.h:50
< both cursors visible (only for debug)
Definition: app.h:94
< the whole rendering process
Definition: app.h:111
Main application.
Definition: app.h:180
std::unique_ptr< CEventQueue > m_eventQueue
Global event queue.
Definition: app.h:347
Language m_language
Application language.
Definition: app.h:439
std::unique_ptr< CPathManager > m_pathManager
Path manager.
Definition: app.h:361
int m_exitCode
Code to return at exit.
Definition: app.h:364
Entry point into CRobotMain.
Definition: controller.h:39
JoystickDevice m_joystick
Info about current joystick device.
Definition: app.h:421
bool m_joystickEnabled
Whether joystick is enabled.
Definition: app.h:423
std::unique_ptr< CConfigFile > m_configFile
Profile (INI) reader/writer.
Definition: app.h:357
Namespace for (new) graphics code.
Definition: app.h:49
< rendering the 3D objects
Definition: app.h:115
bool m_headless
Headles mode.
Definition: app.h:445
The graphics engine.
Definition: engine.h:585
Event types, structs and event queue.
MouseMode m_mouseMode
Current mode of mouse.
Definition: app.h:418
bool m_active
Whether application window is active.
Definition: app.h:366
< event processing (except update events)
Definition: app.h:105
std::unique_ptr< CController > m_controller
Game controller - game engine and UI.
Definition: app.h:355
MouseMode
Mode of mouse cursor.
Definition: app.h:89
Platform-specific utils.
Definition: system.h:91
Definition: system_linux.h:31
Abstract graphics device - CDevice class and related structs/enums.
std::string m_errorMessage
Message to be displayed as error to the user.
Definition: app.h:371
< system cursor visible; in-game cursor hidden
Definition: app.h:92
< frame update in CRobotMain
Definition: app.h:110
Event sent by system, interface or game.
Definition: event.h:735
int buttonCount
Number of buttons (only available after joystick opened)
Definition: app.h:68
Private data of CApplication class.
Definition: app.cpp:79
Information about a joystick device.
Definition: app.h:59
Sound plugin interface.
Definition: sound.h:60