RigsofRods
Soft-body Physics Simulation
Namespaces | Macros | Enumerations | Functions | Variables
Application.h File Reference

Central state/object manager and communications hub. More...

#include "BitFlags.h"
#include "CVar.h"
#include "ForwardDeclarations.h"
#include "Str.h"
#include <fmt/format.h>
#include <OgreStringConverter.h>
#include <assert.h>
#include <string>
+ Include dependency graph for Application.h:

Go to the source code of this file.

Namespaces

 RoR
 
 RoR::App
 

Macros

#define ROR_ASSERT(_EXPR)   assert(_EXPR)
 
#define CHARACTER_ANIM_NAME_LEN   10
 
#define RGN_TEMP   "Temp"
 
#define RGN_CACHE   "Cache"
 
#define RGN_REPO   "Repo"
 
#define RGN_CONFIG   "Config"
 
#define RGN_CONTENT   "Content"
 
#define RGN_SAVEGAMES   "Savegames"
 
#define RGN_MANAGED_MATS   "ManagedMaterials"
 
#define RGN_SCRIPTS   "Scripts"
 
#define RGN_LOGS   "Logs"
 
#define TOSTRING(x)   Ogre::StringConverter::toString(x)
 
#define PARSEINT(x)   Ogre::StringConverter::parseInt(x)
 
#define PARSEREAL(x)   Ogre::StringConverter::parseReal(x)
 
#define HydraxLOG(msg)   Ogre::LogManager::getSingleton().logMessage("[Hydrax] " + Ogre::String(msg));
 

Enumerations

enum  RoR::MsgType {
  RoR::MSG_INVALID, RoR::MSG_APP_SHUTDOWN_REQUESTED, RoR::MSG_APP_SCREENSHOT_REQUESTED, RoR::MSG_APP_DISPLAY_FULLSCREEN_REQUESTED,
  RoR::MSG_APP_DISPLAY_WINDOWED_REQUESTED, RoR::MSG_APP_MODCACHE_LOAD_REQUESTED, RoR::MSG_APP_MODCACHE_UPDATE_REQUESTED, RoR::MSG_APP_MODCACHE_PURGE_REQUESTED,
  RoR::MSG_APP_LOAD_SCRIPT_REQUESTED, RoR::MSG_APP_UNLOAD_SCRIPT_REQUESTED, RoR::MSG_APP_SCRIPT_THREAD_STATUS, RoR::MSG_APP_REINIT_INPUT_REQUESTED,
  RoR::MSG_NET_CONNECT_REQUESTED, RoR::MSG_NET_CONNECT_STARTED, RoR::MSG_NET_CONNECT_PROGRESS, RoR::MSG_NET_CONNECT_SUCCESS,
  RoR::MSG_NET_CONNECT_FAILURE, RoR::MSG_NET_SERVER_KICK, RoR::MSG_NET_DISCONNECT_REQUESTED, RoR::MSG_NET_USER_DISCONNECT,
  RoR::MSG_NET_RECV_ERROR, RoR::MSG_NET_REFRESH_SERVERLIST_SUCCESS, RoR::MSG_NET_REFRESH_SERVERLIST_FAILURE, RoR::MSG_NET_REFRESH_REPOLIST_SUCCESS,
  RoR::MSG_NET_OPEN_RESOURCE_SUCCESS, RoR::MSG_NET_REFRESH_REPOLIST_FAILURE, RoR::MSG_NET_FETCH_AI_PRESETS_SUCCESS, RoR::MSG_NET_FETCH_AI_PRESETS_FAILURE,
  RoR::MSG_SIM_PAUSE_REQUESTED, RoR::MSG_SIM_UNPAUSE_REQUESTED, RoR::MSG_SIM_LOAD_TERRN_REQUESTED, RoR::MSG_SIM_LOAD_SAVEGAME_REQUESTED,
  RoR::MSG_SIM_UNLOAD_TERRN_REQUESTED, RoR::MSG_SIM_SPAWN_ACTOR_REQUESTED, RoR::MSG_SIM_MODIFY_ACTOR_REQUESTED, RoR::MSG_SIM_DELETE_ACTOR_REQUESTED,
  RoR::MSG_SIM_SEAT_PLAYER_REQUESTED, RoR::MSG_SIM_TELEPORT_PLAYER_REQUESTED, RoR::MSG_SIM_HIDE_NET_ACTOR_REQUESTED, RoR::MSG_SIM_UNHIDE_NET_ACTOR_REQUESTED,
  RoR::MSG_SIM_SCRIPT_EVENT_TRIGGERED, RoR::MSG_SIM_SCRIPT_CALLBACK_QUEUED, RoR::MSG_SIM_ACTOR_LINKING_REQUESTED, RoR::MSG_SIM_ADD_FREEFORCE_REQUESTED,
  RoR::MSG_SIM_MODIFY_FREEFORCE_REQUESTED, RoR::MSG_SIM_REMOVE_FREEFORCE_REQUESTED, RoR::MSG_GUI_OPEN_MENU_REQUESTED, RoR::MSG_GUI_CLOSE_MENU_REQUESTED,
  RoR::MSG_GUI_OPEN_SELECTOR_REQUESTED, RoR::MSG_GUI_CLOSE_SELECTOR_REQUESTED, RoR::MSG_GUI_MP_CLIENTS_REFRESH, RoR::MSG_GUI_SHOW_MESSAGE_BOX_REQUESTED,
  RoR::MSG_GUI_HIDE_MESSAGE_BOX_REQUESTED, RoR::MSG_GUI_DOWNLOAD_PROGRESS, RoR::MSG_GUI_DOWNLOAD_FINISHED, RoR::MSG_GUI_REFRESH_TUNING_MENU_REQUESTED,
  RoR::MSG_EDI_MODIFY_GROUNDMODEL_REQUESTED, RoR::MSG_EDI_ENTER_TERRN_EDITOR_REQUESTED, RoR::MSG_EDI_LEAVE_TERRN_EDITOR_REQUESTED, RoR::MSG_EDI_LOAD_BUNDLE_REQUESTED,
  RoR::MSG_EDI_RELOAD_BUNDLE_REQUESTED, RoR::MSG_EDI_UNLOAD_BUNDLE_REQUESTED, RoR::MSG_EDI_CREATE_PROJECT_REQUESTED, RoR::MSG_EDI_MODIFY_PROJECT_REQUESTED,
  RoR::MSG_EDI_DELETE_PROJECT_REQUESTED
}
 Global gameplay message loop, see struct Message in GameContext.h. More...
 
enum  RoR::AppState {
  RoR::AppState::BOOTSTRAP, RoR::AppState::MAIN_MENU, RoR::AppState::SIMULATION, RoR::AppState::SHUTDOWN,
  RoR::AppState::PRINT_HELP_EXIT, RoR::AppState::PRINT_VERSION_EXIT
}
 
enum  RoR::MpState { RoR::MpState::DISABLED, RoR::MpState::CONNECTING, RoR::MpState::CONNECTED }
 
enum  RoR::SimState { RoR::SimState::OFF, RoR::SimState::RUNNING, RoR::SimState::PAUSED, RoR::SimState::EDITOR_MODE }
 
enum  RoR::SimGearboxMode {
  RoR::SimGearboxMode::AUTO, RoR::SimGearboxMode::SEMI_AUTO, RoR::SimGearboxMode::MANUAL, RoR::SimGearboxMode::MANUAL_STICK,
  RoR::SimGearboxMode::MANUAL_RANGES
}
 
enum  RoR::GfxShadowType { RoR::GfxShadowType::NONE, RoR::GfxShadowType::PSSM }
 
enum  RoR::GfxExtCamMode { RoR::GfxExtCamMode::NONE, RoR::GfxExtCamMode::STATIC, RoR::GfxExtCamMode::PITCHING }
 
enum  RoR::GfxTexFilter { RoR::GfxTexFilter::NONE, RoR::GfxTexFilter::BILINEAR, RoR::GfxTexFilter::TRILINEAR, RoR::GfxTexFilter::ANISOTROPIC }
 
enum  RoR::GfxVegetation { RoR::GfxVegetation::NONE, RoR::GfxVegetation::x20PERC, RoR::GfxVegetation::x50PERC, RoR::GfxVegetation::FULL }
 
enum  RoR::GfxFlaresMode {
  RoR::GfxFlaresMode::NONE, RoR::GfxFlaresMode::NO_LIGHTSOURCES, RoR::GfxFlaresMode::CURR_VEHICLE_HEAD_ONLY, RoR::GfxFlaresMode::ALL_VEHICLES_HEAD_ONLY,
  RoR::GfxFlaresMode::ALL_VEHICLES_ALL_LIGHTS
}
 
enum  RoR::GfxWaterMode {
  RoR::GfxWaterMode::NONE, RoR::GfxWaterMode::BASIC, RoR::GfxWaterMode::REFLECT, RoR::GfxWaterMode::FULL_FAST,
  RoR::GfxWaterMode::FULL_HQ, RoR::GfxWaterMode::HYDRAX
}
 
enum  RoR::GfxSkyMode { RoR::GfxSkyMode::SANDSTORM, RoR::GfxSkyMode::CAELUM, RoR::GfxSkyMode::SKYX }
 
enum  RoR::IoInputGrabMode { RoR::IoInputGrabMode::NONE, RoR::IoInputGrabMode::ALL, RoR::IoInputGrabMode::DYNAMIC }
 
enum  RoR::SimResetMode { RoR::SimResetMode::HARD = 0, RoR::SimResetMode::SOFT = 1 }
 
enum  RoR::VisibilityMasks { RoR::DEPTHMAP_ENABLED = BITMASK(1), RoR::DEPTHMAP_DISABLED = BITMASK(2), RoR::HIDE_MIRROR = BITMASK(3) }
 
enum  RoR::LoaderType {
  RoR::LT_None, RoR::LT_Terrain, RoR::LT_Vehicle, RoR::LT_Truck,
  RoR::LT_Car, RoR::LT_Boat, RoR::LT_Airplane, RoR::LT_Trailer,
  RoR::LT_Train, RoR::LT_Load, RoR::LT_Extension, RoR::LT_Skin,
  RoR::LT_AllBeam, RoR::LT_AddonPart, RoR::LT_Tuneup, RoR::LT_AssetPack
}
 < Search mode for ModCache::Query() & Operation mode for GUI::MainSelector More...
 
enum  RoR::HandleGenericExceptionFlags { RoR::HANDLEGENERICEXCEPTION_LOGFILE = BITMASK(1), RoR::HANDLEGENERICEXCEPTION_SCRIPTEVENT = BITMASK(2), RoR::HANDLEGENERICEXCEPTION_CONSOLE = BITMASK(3), RoR::HANDLEGENERICEXCEPTION_DEFAULT = HANDLEGENERICEXCEPTION_LOGFILE | HANDLEGENERICEXCEPTION_SCRIPTEVENT }
 < Flags for HandleGenericException() More...
 

Functions

const char * RoR::MsgTypeToString (MsgType type)
 
std::string RoR::ToLocalizedString (SimGearboxMode e)
 
std::string RoR::ToLocalizedString (GfxShadowType e)
 
std::string RoR::ToLocalizedString (GfxExtCamMode e)
 
std::string RoR::ToLocalizedString (GfxTexFilter e)
 
std::string RoR::ToLocalizedString (GfxVegetation e)
 
std::string RoR::ToLocalizedString (GfxFlaresMode e)
 
std::string RoR::ToLocalizedString (GfxWaterMode e)
 
std::string RoR::ToLocalizedString (GfxSkyMode e)
 
std::string RoR::ToLocalizedString (IoInputGrabMode e)
 
std::string RoR::ToLocalizedString (SimResetMode e)
 
AppContext * RoR::App::GetAppContext ()
 
ContentManager * RoR::App::GetContentManager ()
 
OverlayWrapper * RoR::App::GetOverlayWrapper ()
 
GUIManager * RoR::App::GetGuiManager ()
 
Console * RoR::App::GetConsole ()
 
InputEngine * RoR::App::GetInputEngine ()
 
CacheSystem * RoR::App::GetCacheSystem ()
 
MumbleIntegration * RoR::App::GetMumble ()
 
ThreadPool * RoR::App::GetThreadPool ()
 
CameraManager * RoR::App::GetCameraManager ()
 
GfxScene * RoR::App::GetGfxScene ()
 
SoundScriptManager * RoR::App::GetSoundScriptManager ()
 
LanguageEngine * RoR::App::GetLanguageEngine ()
 
ScriptEngine * RoR::App::GetScriptEngine ()
 
Network * RoR::App::GetNetwork ()
 
GameContext * RoR::App::GetGameContext ()
 
OutGauge * RoR::App::GetOutGauge ()
 
DiscordRpc * RoR::App::GetDiscordRpc ()
 
void RoR::App::CreateOverlayWrapper ()
 
void RoR::App::CreateGuiManager ()
 
void RoR::App::CreateInputEngine ()
 
void RoR::App::CreateMumble ()
 
void RoR::App::CreateThreadPool ()
 
void RoR::App::CreateCameraManager ()
 
void RoR::App::CreateGfxScene ()
 
void RoR::App::CreateSoundScriptManager ()
 
void RoR::App::CreateScriptEngine ()
 
void RoR::App::DestroyOverlayWrapper ()
 
void RoR::App::DestroyInputEngine ()
 
void RoR::HandleGenericException (const std::string &from, BitMask_t flags)
 
void RoR::HandleMsgQueueException (MsgType from)
 
void RoR::Log (const char *msg)
 The ultimate, application-wide logging function. Adds a line (any length) in 'RoR.log' file. More...
 
void RoR::LogFormat (const char *format,...)
 Improved logging utility. Uses fixed 2Kb buffer. More...
 

Variables

CVar * RoR::App::diag_trace_globals
 

Detailed Description

Central state/object manager and communications hub.

Author
Petr Ohlidal
Date
05/2014

Definition in file Application.h.

Macro Definition Documentation

◆ CHARACTER_ANIM_NAME_LEN

#define CHARACTER_ANIM_NAME_LEN   10

Definition at line 42 of file Application.h.

◆ HydraxLOG

#define HydraxLOG (   msg)    Ogre::LogManager::getSingleton().logMessage("[Hydrax] " + Ogre::String(msg));

Definition at line 59 of file Application.h.

◆ PARSEINT

#define PARSEINT (   x)    Ogre::StringConverter::parseInt(x)

Definition at line 57 of file Application.h.

◆ PARSEREAL

#define PARSEREAL (   x)    Ogre::StringConverter::parseReal(x)

Definition at line 58 of file Application.h.

◆ RGN_CACHE

#define RGN_CACHE   "Cache"

Definition at line 46 of file Application.h.

◆ RGN_CONFIG

#define RGN_CONFIG   "Config"

Definition at line 48 of file Application.h.

◆ RGN_CONTENT

#define RGN_CONTENT   "Content"

Definition at line 49 of file Application.h.

◆ RGN_LOGS

#define RGN_LOGS   "Logs"

Definition at line 53 of file Application.h.

◆ RGN_MANAGED_MATS

#define RGN_MANAGED_MATS   "ManagedMaterials"

Definition at line 51 of file Application.h.

◆ RGN_REPO

#define RGN_REPO   "Repo"

Definition at line 47 of file Application.h.

◆ RGN_SAVEGAMES

#define RGN_SAVEGAMES   "Savegames"

Definition at line 50 of file Application.h.

◆ RGN_SCRIPTS

#define RGN_SCRIPTS   "Scripts"

Definition at line 52 of file Application.h.

◆ RGN_TEMP

#define RGN_TEMP   "Temp"

Definition at line 45 of file Application.h.

◆ ROR_ASSERT

#define ROR_ASSERT (   _EXPR)    assert(_EXPR)

Definition at line 40 of file Application.h.

◆ TOSTRING

#define TOSTRING (   x)    Ogre::StringConverter::toString(x)

Definition at line 56 of file Application.h.