28 #include "common/language.h" 33 #include "level/level_category.h" 71 : index(-1), axisCount(0), buttonCount(0) {}
115 PCNT_EVENT_PROCESSING,
139 DEBUG_SYS_EVENTS = 1 << 0,
140 DEBUG_APP_EVENTS = 1 << 1,
141 DEBUG_EVENTS = DEBUG_SYS_EVENTS | DEBUG_APP_EVENTS,
142 DEBUG_MODELS = 1 << 2,
143 DEBUG_ALL = DEBUG_SYS_EVENTS | DEBUG_APP_EVENTS | DEBUG_MODELS
212 int GetExitCode()
const;
215 const std::string& GetErrorMessage()
const;
218 VideoQueryResult GetVideoResolutionList(std::vector<Math::IntPoint> &resolutions,
219 bool fullScreen,
bool resizeable)
const;
228 void SuspendSimulation();
230 void ResumeSimulation();
232 bool GetSimulationSuspended()
const;
235 void ResetTimeAfterLoading();
238 void SetSimulationSpeed(
float speed);
240 float GetSimulationSpeed()
const;
244 float GetAbsTime()
const;
246 long long GetExactAbsTime()
const;
249 long long GetRealAbsTime()
const;
252 float GetRelTime()
const;
254 long long GetExactRelTime()
const;
257 long long GetRealRelTime()
const;
260 std::vector<JoystickDevice> GetJoystickList()
const;
270 void SetJoystickEnabled(
bool enable);
271 bool GetJoystickEnabled()
const;
275 void UpdateJoystick();
282 void SetGrabInput(
bool grab);
283 bool GetGrabInput()
const;
297 void SetDebugModeActive(DebugMode mode,
bool active);
298 bool IsDebugModeActive(DebugMode mode)
const;
299 static bool ParseDebugModes(
const std::string& str,
int& debugModes);
304 Language GetLanguage()
const;
305 char GetLanguageChar()
const;
306 void SetLanguage(Language language);
307 static bool ParseLanguage(
const std::string& str, Language& language);
312 void SetLowCPU(
bool low);
313 bool GetLowCPU()
const;
323 bool GetSceneTestMode();
329 void RenderIfNeeded(
int updateRate);
333 bool CreateVideoSurface();
336 Event ProcessSystemEvent();
338 Event CreateVirtualEvent(
const Event& sourceEvent);
340 TEST_VIRTUAL
Event CreateUpdateEvent();
342 void LogEvent(
const Event& event);
347 void CloseJoystick();
350 void InternalResumeSimulation();
353 void ResetPerformanceCounters();
355 void UpdatePerformanceCountersData();
404 float m_performanceCountersData[
PCNT_MAX];
406 long long m_realAbsTimeBase;
407 long long m_realAbsTime;
408 long long m_realRelTime;
410 long long m_absTimeBase;
411 long long m_exactAbsTime;
412 long long m_exactRelTime;
417 float m_simulationSpeed;
418 bool m_simulationSuspended;
440 LevelCategory m_runSceneCategory;
461 static char m_languageLocale[50];
CSingleton base class for singletons.
< frame update in CParticle
Definition: app.h:120
std::unique_ptr< CInput > m_input
Input manager.
Definition: app.h:375
std::string m_windowTitle
Text set as window title.
Definition: app.h:395
ParseArgsStatus
State of parsing commandline arguments.
Definition: app.h:90
< swapping buffers and vsync
Definition: app.h:132
Class for managing data/lang/save paths.
Definition: pathman.h:37
bool m_sceneTest
Scene test mode.
Definition: app.h:446
< rendering shadow map
Definition: app.h:130
bool m_resolutionOverride
Screen resoultion overriden by commandline.
Definition: app.h:455
< rendering the water
Definition: app.h:125
std::vector< bool > m_joyButtonState
Current state of joystick buttons; may be updated from another thread.
Definition: app.h:437
< all ok
Definition: app.h:93
< all counters together
Definition: app.h:134
CSystemUtils * m_systemUtils
System utils instance.
Definition: app.h:359
std::vector< int > m_joyAxeState
Current state of joystick axes; may be updated from another thread.
Definition: app.h:435
< invalid syntax
Definition: app.h:94
< the whole frame update process
Definition: app.h:118
Gfx::DeviceConfig m_deviceConfig
Current configuration of OpenGL display device.
Definition: app.h:390
< in-game cursor visible; system cursor hidden
Definition: app.h:105
Definition: singleton.h:30
int index
Device index (-1 = invalid device)
Definition: app.h:62
std::string m_graphics
Graphics device to use.
Definition: app.h:425
std::string name
Device name.
Definition: app.h:64
std::unique_ptr< ApplicationPrivate > m_private
Private (SDL-dependent data)
Definition: app.h:361
Global event queue.
Definition: event.h:840
int axisCount
Number of axes (only available after joystick opened)
Definition: app.h:66
SystemTimeStamp * m_baseTimeStamp
Animation time stamps, etc.
Definition: app.h:399
bool m_lowCPU
Low cpu mode.
Definition: app.h:452
Class for loading config file.
Definition: config_file.h:40
PerformanceCounter
Type of counter testing performance.
Definition: app.h:113
std::unique_ptr< CSoundInterface > m_sound
Sound subsystem.
Definition: app.h:369
General config for graphics device.
Definition: device.h:55
std::unique_ptr< Gfx::CDevice > m_device
Graphics device.
Definition: app.h:367
< rendering 2D interface
Definition: app.h:128
long m_debugModes
Bit array of active debug modes.
Definition: app.h:384
std::unique_ptr< Gfx::CEngine > m_engine
Graphics engine.
Definition: app.h:365
< rendering the particles in 3D
Definition: app.h:124
< rendering the terrain
Definition: app.h:126
< frame update in CEngine
Definition: app.h:119
2D point
Definition: point.h:50
< both cursors visible (only for debug)
Definition: app.h:106
< the whole rendering process
Definition: app.h:123
Main application.
Definition: app.h:191
std::unique_ptr< CEventQueue > m_eventQueue
Global event queue.
Definition: app.h:363
Language m_language
Application language.
Definition: app.h:449
std::unique_ptr< CPathManager > m_pathManager
Path manager.
Definition: app.h:377
int m_exitCode
Code to return at exit.
Definition: app.h:380
Entry point into CRobotMain.
Definition: controller.h:40
JoystickDevice m_joystick
Info about current joystick device.
Definition: app.h:431
bool m_joystickEnabled
Whether joystick is enabled.
Definition: app.h:433
std::unique_ptr< CConfigFile > m_configFile
Profile (INI) reader/writer.
Definition: app.h:373
Namespace for (new) graphics code.
Definition: app.h:49
VideoQueryResult
Result of querying for available video resolutions.
Definition: app.h:78
< rendering the 3D objects
Definition: app.h:127
bool m_headless
Headles mode.
Definition: app.h:458
The graphics engine.
Definition: engine.h:620
Gfx::DeviceConfig m_lastDeviceConfig
Previous configuration of OpenGL display device.
Definition: app.h:392
Event types, structs and event queue.
MouseMode m_mouseMode
Current mode of mouse.
Definition: app.h:428
bool m_active
Whether application window is active.
Definition: app.h:382
< event processing (except update events)
Definition: app.h:117
std::unique_ptr< CController > m_controller
Game controller - game engine and UI.
Definition: app.h:371
MouseMode
Mode of mouse cursor.
Definition: app.h:101
Platform-specific utils.
Definition: system.h:91
Definition: system_linux.h:30
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:387
< system cursor visible; in-game cursor hidden
Definition: app.h:104
< frame update in CRobotMain
Definition: app.h:122
Event sent by system, interface or game.
Definition: event.h:709
int buttonCount
Number of buttons (only available after joystick opened)
Definition: app.h:68
Private data of CApplication class.
Definition: app.cpp:80
Information about a joystick device.
Definition: app.h:59
Sound plugin interface.
Definition: sound.h:57