|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
59 #include <Overlay/OgreOverlaySystem.h>
66 # include <curl/curl.h>
73 int main(
int argc,
char *argv[])
78 curl_global_init(CURL_GLOBAL_ALL);
142 Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
150 Ogre::OverlaySystem* overlay_system =
new Ogre::OverlaySystem();
153 int resolution = Ogre::StringConverter::parseInt(Ogre::StringUtil::split(ropts[
"Video Mode"].currentValue,
" x ")[0], 1024);
154 int fsaa = 2 * (Ogre::StringConverter::parseInt(ropts[
"FSAA"].currentValue, 0) / 4);
155 int res = std::pow(2, std::floor(std::log2(resolution)));
157 Ogre::TextureManager::getSingleton().createManual (
"EnvironmentTexture",
158 Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_CUBE_MAP, res / 4, res / 4, 0,
159 Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET, 0,
false, fsaa);
160 Ogre::TextureManager::getSingleton ().createManual (
"Refraction",
161 Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, res / 2, res / 2, 0,
162 Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET, 0,
false, fsaa);
163 Ogre::TextureManager::getSingleton ().createManual (
"Reflection",
164 Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, res / 2, res / 2, 0,
165 Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET, 0,
false, fsaa);
170 Ogre::uchar data[3] = {0};
171 Ogre::PixelBox pixels(1, 1, 1, Ogre::PF_BYTE_RGB, &data);
172 Ogre::TextureManager::getSingleton()._getWarningTexture()->getBuffer()->blitFromMemory(pixels);
201 #ifdef USE_ANGELSCRIPT
235 for (Ogre::String
const& scriptname: script_names)
237 LOG(
fmt::format(
"Loading startup script '{}' (from command line)", scriptname));
245 for (Ogre::String
const& scriptname: script_names)
247 LOG(
fmt::format(
"Loading startup script '{}' (from config file)", scriptname));
317 auto start_time = std::chrono::high_resolution_clock::now();
321 OgreBites::WindowEventUtilities::messagePump();
333 bool failed_m =
false;
354 #endif // USE_SOCKETW
386 _L(
"Display mode changed to fullscreen"));
401 _L(
"Display mode changed to windowed"));
433 RoR::Log(
"[RoR|ModCache] Cache update requested");
451 RoR::Log(
"[RoR|ModCache] Cache rebuild requested");
521 LOG(
fmt::format(
"[RoR] !! Reinitializing input engine !!"));
524 LOG(
fmt::format(
"[RoR] DONE Reinitializing input engine."));
570 #endif // USE_SOCKETW
670 #endif // USE_SOCKETW
684 _LC(
"Network",
"Multiplayer: connection failed"), m.
description.c_str());
690 #endif // USE_SOCKETW
807 actor->muteAllSounds();
824 actor->unmuteAllSounds();
882 #endif // USE_SOCKETW
950 if (terrn_filename ==
"")
965 Str<400> msg; msg <<
_L(
"Error while loading scene: Terrain mismatch");
975 RoR::LogFormat(
"[RoR|Savegame] Loading terrain '%s' ...", terrn_filename.c_str());
1064 Ogre::Vector3* pos =
static_cast<Ogre::Vector3*
>(m.
payload);
1342 int* percentage =
static_cast<int*
>(m.
payload);
1385 *live_gm = *modified_gm;
1403 _L(
"Entered terrain editing mode"));
1405 fmt::format(
_L(
"Press {} or middle mouse click to select an object"),
1426 _L(
"Left terrain editing mode"));
1444 (*entry_ptr)->resource_group);
1460 bool all_clear =
true;
1463 if (actor->GetGfxActor()->GetResourceGroup() == (*entry_ptr)->resource_group)
1477 (*entry_ptr)->resource_group);
1501 bool all_clear =
true;
1504 if (actor->GetGfxActor()->GetResourceGroup() == (*entry_ptr)->resource_group)
1601 const float min_frame_time = 1.0f / Ogre::Math::Clamp(
App::gfx_fps_limit->getInt(), 5, 240);
1602 float dt = std::chrono::duration<float>(std::chrono::high_resolution_clock::now() - start_time).count();
1603 while (dt < min_frame_time)
1605 dt = std::chrono::duration<float>(std::chrono::high_resolution_clock::now() - start_time).count();
1610 const auto now = std::chrono::high_resolution_clock::now();
1611 const float dt = std::chrono::duration<float>(now - start_time).count();
1619 if (!packets.empty())
1629 #endif // USE_SOCKETW
1712 actor->GetGfxActor()->UpdateDebugView();
1729 #endif // USE_MUMBLE
1733 #endif // USE_OPENAL
1735 #ifdef USE_ANGELSCRIPT
1737 #endif // USE_ANGELSCRIPT
1775 if (render_window->isClosed())
1782 if (!render_window->isActive() && render_window->isVisible())
1784 render_window->update();
1794 catch (Ogre::Exception& e)
1796 LOG(e.getFullDescription());
1799 catch (std::runtime_error& e)
1809 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
1810 INT WINAPI
WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
1812 return main(__argc, __argv);
@ MSG_EDI_MODIFY_PROJECT_REQUESTED
Payload = RoR::UpdateProjectRequest* (owner)
Represents a loaded script and all associated resources/handles.
#define ROR_ASSERT(_EXPR)
Game state manager and message-queue provider.
GUI::VehicleInfoTPanel VehicleInfoTPanel
void UpdateInputEvents(float dt)
@ MSG_SIM_LOAD_TERRN_REQUESTED
void setEventsEnabled(bool val)
@ SANDSTORM
Sandstorm (fastest)
@ ASMANIP_SCRIPT_UNLOADING
Triggered before unloading the script to let it clean up (important for missions).
void CreateScriptEngine()
@ MSG_SIM_REMOVE_FREEFORCE_REQUESTED
Payload = RoR::FreeForceID_t* (owner)
CVar * cli_force_cache_update
std::string lsr_filename
Load from resource (file). If buffer is supplied, use this as display name only.
ContentManager * GetContentManager()
SoundScriptManager * GetSoundScriptManager()
void InitContentManager()
void UnLoadResource(CacheEntryPtr &t)
Unloads associated bundle, destroying all spawned actors.
@ MSG_GUI_SHOW_MESSAGE_BOX_REQUESTED
Payload = MessageBoxConfig* (owner)
std::string ExtractSceneTerrain(std::string const &filename)
Returns terrain filename.
void UpdateInputEvents(float dt)
CVar * diag_warning_texture
LanguageEngine * GetLanguageEngine()
Args for eventCallbackEx() queued via MSG_SIM_SCRIPT_EVENT_TRIGGERED See descriptions at enum RoR::sc...
void handleStreamData(std::vector< RoR::NetRecvPacket > packet)
@ SE_ANGELSCRIPT_MANIPULATIONS
triggered when the user tries to dynamically use the scripting capabilities (prevent cheating) args: ...
void CreateCameraManager()
@ MSG_SIM_MODIFY_ACTOR_REQUESTED
Payload = RoR::ActorModifyRequest* (owner)
void setCamera(Ogre::Vector3 position, Ogre::Vector3 direction, Ogre::Vector3 up, Ogre::Vector3 velocity)
CVar * diag_preset_vehicle
void ModifyActor(ActorModifyRequest &rq)
CVar * cli_resume_autosave
@ MSG_EDI_RELOAD_BUNDLE_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
bool StartConnecting()
Launches connecting on background.
@ MSG_APP_REINIT_INPUT_REQUESTED
@ TRUCK
its a truck (or other land vehicle)
void DeleteProject(CacheEntryPtr &entry)
GUI::FrictionSettings FrictionSettings
@ MSG_SIM_SCRIPT_CALLBACK_QUEUED
Payload = RoR::ScriptCallbackArgs* (owner)
void ApplyGuiCaptureKeyboard()
Call after rendered frame to apply queued value.
CameraManager * GetCameraManager()
CVar * app_skip_main_menu
void DisplayRefreshFailed(CurlFailInfo *failinfo)
Generic UI dialog (not modal). Invocable from scripting. Any number of buttons. Configurable to fire ...
GUIManager * GetGuiManager()
@ MSG_EDI_CREATE_PROJECT_REQUESTED
Payload = RoR::CreateProjectRequest* (owner)
void UpdateServerlist(MpServerInfoVec *data)
void BufferSimulationData()
Run this when simulation is halted.
Estabilishing a physics linkage between 2 actors modifies a global linkage table and triggers immedia...
void SetProgressNetConnect(const std::string &net_status)
@ MSG_EDI_UNLOAD_BUNDLE_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
void HandleMsgQueueException(MsgType from)
static const ResourcePack WALLPAPERS
@ MSG_SIM_UNLOAD_TERRN_REQUESTED
void RemoveGfxActor(RoR::GfxActor *gfx_actor)
Ogre::RenderWindow * GetRenderWindow()
CVar * cli_preset_vehicle
AppContext * GetAppContext()
void cVarSetupBuiltins()
Create builtin vars and set defaults.
@ MSG_GUI_CLOSE_SELECTOR_REQUESTED
Truck file format(technical spec)
void AddFreeForce(FreeForceRequest *rq)
@ MSG_SIM_UNPAUSE_REQUESTED
std::vector< NetRecvPacket > GetIncomingStreamData()
@ MSG_NET_CONNECT_STARTED
@ MSG_GUI_DOWNLOAD_PROGRESS
CVar * app_force_cache_update
void UpdateCommonInputEvents(float dt)
void UpdateStats(float dt, ActorPtr actor)
Caution: touches live data, must be synced with sim. thread.
ActorLinkingRequestType alr_type
CVar * mp_join_on_startup
void TRIGGER_EVENT_ASYNC(scriptEvents type, int arg1, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
Asynchronously (via MSG_SIM_SCRIPT_EVENT_TRIGGERED) invoke script function eventCallbackEx(),...
@ EDITOR_MODE
Hacky, but whatever... added by Ulteq, 2016.
TerrainEditor * GetTerrainEditor()
OverlayWrapper * GetOverlayWrapper()
void LogFormat(const char *format,...)
Improved logging utility. Uses fixed 2Kb buffer.
@ SE_TRUCK_MOUSE_GRAB
triggered when the user uses the mouse to interact with the actor, the argument refers to the actor I...
System integration layer; inspired by OgreBites::ApplicationContext.
@ MSG_NET_REFRESH_SERVERLIST_FAILURE
Payload = RoR::CurlFailInfo* (owner)
CVar * gfx_fov_external_default
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
GUI::GameControls GameControls
@ SE_GENERIC_MODCACHE_ACTIVITY
Triggered when status of modcache changes, args: #1 type, #2 entry number, for other args see RoR::mo...
void TeleportPlayer(float x, float z)
GUI::MpClientList MpClientList
std::string lsr_buffer
Load from memory buffer.
Race direction arrow and text info (using OGRE Overlay)
ActorPtrVec & GetActors()
void ModifyProject(ModifyProjectRequest *request)
void UpdateScene(float dt_sec)
@ MSG_APP_LOAD_SCRIPT_REQUESTED
Payload = RoR::LoadScriptRequest* (owner)
ScriptUnitId_t loadScript(Ogre::String scriptname, ScriptCategory category=ScriptCategory::TERRAIN, ActorPtr associatedActor=nullptr, std::string buffer="")
Loads a script.
GUI::GameSettings GameSettings
void UpdateFiles(ResourcesCollection *data)
void Show(LoaderType type, std::string const &filter_guid="", CacheEntryPtr advertised_entry=nullptr)
void framestep(Ogre::Real dt)
Calls the script's framestep function to be able to use timed things inside the script.
@ MSG_NET_CONNECT_REQUESTED
GUI::DirectionArrow DirectionArrow
@ MSG_APP_DISPLAY_WINDOWED_REQUESTED
ScriptEngine * GetScriptEngine()
GUI::LoadingWindow LoadingWindow
Ogre::SceneManager * GetSceneManager()
GUI::RepositorySelector RepositorySelector
@ MSG_APP_DISPLAY_FULLSCREEN_REQUESTED
void LoadOverlay()
Must be called after meshes+overlays were loaded.
RoR::ForceFeedback & GetForceFeedback()
ActorPtr SpawnActor(ActorSpawnRequest &rq)
void NewImGuiFrame(float dt)
@ MSG_NET_REFRESH_SERVERLIST_SUCCESS
Payload = GUI::MpServerInfoVec* (owner)
@ MSG_GUI_DOWNLOAD_FINISHED
void UpdateGlobalInputEvents()
void Update()
Reads data from simulation.
ScriptCategory lsr_category
@ MSG_NET_FETCH_AI_PRESETS_FAILURE
Description = message.
void ChainMessage(Message m)
Add to last pushed message's chain.
SceneMouse & GetSceneMouse()
void LoadDefaultInertiaModels()
GUI::MultiplayerSelector MultiplayerSelector
ground_model_t * getGroundModelByString(const Ogre::String name)
void RemoveFreeForce(FreeForceID_t id)
void SetVisible(bool visible)
Ogre::Overlay * MenuWallpaper
void unloadScript(ScriptUnitId_t unique_id)
Unloads a script.
std::string PathCombine(std::string a, std::string b)
@ MSG_SIM_SEAT_PLAYER_REQUESTED
Payload = RoR::ActorPtr (owner) | nullptr.
void RegisterGfxActor(RoR::GfxActor *gfx_actor)
A database of user-installed content alias 'mods' (vehicles, terrains...)
@ MODCACHEACTIVITY_BUNDLE_UNLOADED
Args: #1 type, #2 entry number.
@ MSG_APP_MODCACHE_PURGE_REQUESTED
void HandleActorStreamData(std::vector< RoR::NetRecvPacket > packet)
static const ResourcePack FLAGS
void ChangePlayerActor(ActorPtr actor)
GUI::CollisionsDebug CollisionsDebug
@ MSG_GUI_MP_CLIENTS_REFRESH
static const ResourcePack SCRIPTS
void DeleteActor(ActorPtr actor)
CVar * sys_thumbnails_dir
ScriptCategory scriptCategory
@ MODCACHEACTIVITY_BUNDLE_RELOADED
Args: #1 type, #2 entry number, –, –, #5 rg name.
void PushMessage(Message m)
Doesn't guarantee order! Use ChainMessage() if order matters.
int ScriptUnitId_t
Unique sequentially generated ID of a loaded and running scriptin session. Use ScriptEngine::getScrip...
const char * ToCStr() const
void DrawSimulationGui(float dt)
Touches live data; must be called in sync with sim. thread.
void DestroyOverlayWrapper()
int FreeForceID_t
Unique sequentially generated ID of FreeForce; use ActorManager::GetFreeForceNextId().
Collisions * GetCollisions()
void SetProgress(int _percent, const std::string &_text="", bool render_frame=true)
CharacterFactory * GetCharacterFactory()
void envokeCallback(int functionId, eventsource_t *source, NodeNum_t nodenum=NODENUM_INVALID, int type=0)
void CreateFolder(const char *path)
Path must be UTF-8 encoded.
void hookToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::HOOK_TOGGLE, NodeNum_t mousenode=NODENUM_INVALID, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
@ MSG_NET_REFRESH_REPOLIST_FAILURE
Payload = RoR::CurlFailInfo* (owner)
@ MSG_GUI_OPEN_SELECTOR_REQUESTED
Payload = LoaderType* (owner), Description = GUID | empty.
CVar * cli_custom_scripts
#define SOUND_START(_ACTOR_, _TRIG_)
@ MSG_SIM_HIDE_NET_ACTOR_REQUESTED
Payload = ActorPtr* (owner)
SoundScriptInstancePtr createInstance(Ogre::String templatename, int actor_id, int soundLinkType=SL_DEFAULT, int soundLinkItemId=-1)
LoaderType
< Search mode for ModCache::Query() & Operation mode for GUI::MainSelector
@ MSG_GUI_REFRESH_TUNING_MENU_REQUESTED
@ MSG_SIM_ADD_FREEFORCE_REQUESTED
Payload = RoR::FreeForceRequest* (owner)
ActorInstanceID_t lsr_associated_actor
For ScriptCategory::ACTOR.
Central state/object manager and communications hub.
@ MSG_NET_OPEN_RESOURCE_SUCCESS
Payload = GUI::ResourcesCollection* (owner)
@ MSG_APP_MODCACHE_LOAD_REQUESTED
GameContext * GetGameContext()
@ MSG_APP_SCREENSHOT_REQUESTED
CVar * gfx_fov_internal_default
static const ResourcePack ICONS
@ AIRPLANE
its an airplane
void UpdateResources(ResourcesCollection *data)
@ MSG_NET_REFRESH_REPOLIST_SUCCESS
Payload = GUI::ResourcesCollection* (owner)
std::vector< Message > chain
Posted after the message is processed.
ActorState simbuf_actor_state
void triggerEvent(scriptEvents eventnum, int arg1=0, int arg2ex=0, int arg3ex=0, int arg4ex=0, std::string arg5ex="", std::string arg6ex="", std::string arg7ex="", std::string arg8ex="")
triggers an event; Not to be used by the end-user.
int es_script_handler
AngelScript function ID.
void DeleteAllCharacters()
@ MSG_SIM_TELEPORT_PLAYER_REQUESTED
Payload = Ogre::Vector3* (owner)
void toggleSlideNodeLock()
void CreateOverlayWrapper()
GUI::TopMenubar TopMenubar
void SetUpMenuWallpaper()
CacheEntryPtr CreateProject(CreateProjectRequest *request)
Creates subdirectory in 'My Games\Rigs of Rods\projects', pre-populates it with files and adds modcac...
@ MSG_EDI_ENTER_TERRN_EDITOR_REQUESTED
@ MSG_EDI_LOAD_BUNDLE_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
void SetMouseCursorVisibility(MouseCursorVisibility visi)
void HandleStreamData(std::vector< RoR::NetRecvPacket > packet_buffer)
@ MSG_NET_CONNECT_SUCCESS
Creates subdirectory in 'My Games\Rigs of Rods\projects', pre-populates it with files and adds modcac...
CVar * cli_preset_terrain
DiscordRpc * GetDiscordRpc()
void setActiveCol(const ground_model_t *gm)
@ MSG_NET_FETCH_AI_PRESETS_SUCCESS
Description = JSON string.
void ActivateFullscreen(bool val)
void SetUpObsoleteConfMarker()
CacheSystem * GetCacheSystem()
void AddResourcePack(ResourcePack const &resource_pack, std::string const &override_rgn="")
Loads resources if not already loaded.
void UpdateAirplaneInputEvents(float dt)
std::vector< MpServerInfo > MpServerInfoVec
Common for ADD and MODIFY requests; tailored for use with AngelScript thru GameScript::pushMessage().
CVar * diag_preset_veh_config
void SetCastShadows(bool value)
void showCommandLineVersion()
static const ResourcePack OGRE_CORE
eventsource_t * eventsource
@ MSG_EDI_DELETE_PROJECT_REQUESTED
Payload = RoR::CacheEntryPtr* (owner)
void LoadResource(CacheEntryPtr &t)
Loads the associated resource bundle if not already done.
@ MSG_SIM_ACTOR_LINKING_REQUESTED
Payload = RoR::ActorLinkingRequest* (owner)
Unified game event system - all requests and state changes are reported using a message.
void LoadGameplayResources()
Checks GVar settings and loads required resources.
void setSmokeEnabled(bool enabled)
Writes info to console/notify area.
@ MSG_GUI_OPEN_MENU_REQUESTED
void LoadScene(std::string const &filename)
Matching terrain must be already loaded.
void InitModCache(CacheValidity validity)
void tieToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::TIE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
void ropeToggle(int group=-1, ActorLinkingRequestType mode=ActorLinkingRequestType::ROPE_TOGGLE, ActorInstanceID_t forceunlock_filter=ACTORINSTANCEID_INVALID)
void ShowMessageBox(const char *title, const char *text, bool allow_close=true, const char *btn1_text="OK", const char *btn2_text=nullptr)
void UpdateInputEvents(float dt)
void regBuiltinCommands()
Register builtin commands.
@ MSG_EDI_LEAVE_TERRN_EDITOR_REQUESTED
@ MSG_SIM_SPAWN_ACTOR_REQUESTED
Payload = RoR::ActorSpawnRequest* (owner)
@ MSG_APP_MODCACHE_UPDATE_REQUESTED
InputEngine * GetInputEngine()
void ModifyFreeForce(FreeForceRequest *rq)
void ReLoadResource(CacheEntryPtr &t)
Forces reloading the associated bundle.
CVar * cli_preset_veh_config
Surface friction properties.
RefCountingObjectPtr< Actor > ActorPtr
ActorInstanceID_t alr_actor_instance_id
@ MSG_NET_CONNECT_FAILURE
@ MSG_SIM_DELETE_ACTOR_REQUESTED
Payload = RoR::ActorPtr* (owner)
void UpdateSimInputEvents(float dt)
void UpdateBoatInputEvents(float dt)
@ MSG_APP_SCRIPT_THREAD_STATUS
Payload = RoR::ScriptEventArgs* (owner)
@ MSG_EDI_MODIFY_GROUNDMODEL_REQUESTED
Payload = RoR::ground_model_t* (weak)
Ogre::Root * GetOgreRoot()
void DestroyInputEngine()
NodeNum_t alr_hook_mousenode
@ NETWORKED_HIDDEN
not simulated, not updated (remote)
void SaveScene(std::string const &filename)
GUI::MainSelector MainSelector
void showCommandLineUsage()
@ MSG_SIM_UNHIDE_NET_ACTOR_REQUESTED
Payload = ActorPtr* (owner)
@ MSG_APP_UNLOAD_SCRIPT_REQUESTED
Payload = RoR::ScriptUnitId_t* (owner)
RoR::CmdKeyInertiaConfig & GetInertiaConfig()
bool Update(float dt, ActorPtr truck)
CVar * diag_preset_terrain
@ CONSOLE_MSGTYPE_INFO
Generic message.
void SpawnPreselectedActor(std::string const &preset_vehicle, std::string const &preset_veh_config)
needs Character to exist
@ ASMANIP_SCRIPT_LOADED
Triggered after the script's main() completed; may trigger additional processing (for example,...
CVar * sim_terrain_gui_name
void UpdateInputEvents(float dt)
CVar * sys_screenshot_dir
CVar * app_custom_scripts
@ MSG_GUI_CLOSE_MENU_REQUESTED
@ MSG_NET_CONNECT_PROGRESS
MumbleIntegration * GetMumble()
void update(float dt_sec)
RepairMode & GetRepairMode()
static int ShowError(Ogre::UTFString title, Ogre::UTFString message)
shows a simple error message box
@ MSG_SIM_MODIFY_FREEFORCE_REQUESTED
Payload = RoR::FreeForceRequest* (owner)
void SetAllMeshesVisible(bool value)
@ MSG_SIM_PAUSE_REQUESTED
@ NETWORKED_OK
not simulated (remote) actor
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
void ShowError(CurlFailInfo *failinfo)
@ HIDDEN
Hidden as inactive, will re-appear the moment user moves mouse.
void UpdateTruckInputEvents(float dt)
void UpdateInputEvents(float dt)
#define SOUND_KILL(_ACTOR_, _TRIG_)
ScriptUnit & getScriptUnit(ScriptUnitId_t unique_id)
@ MSG_SIM_LOAD_SAVEGAME_REQUESTED
@ MODCACHEACTIVITY_BUNDLE_LOADED
Args: #1 type, #2 entry number, –, –, #5 rg name.
ActorSB & GetSimDataBuffer()
const ActorPtr & GetActorById(ActorInstanceID_t actor_id)
static const ResourcePack FONTS
void Log(const char *msg)
The ultimate, application-wide logging function. Adds a line (any length) in 'RoR....
CVar * app_force_cache_purge
@ CUSTOM
Loaded by user via either: A) ingame console 'loadscript'; B) RoR.cfg 'app_custom_scripts'; C) comman...
void CleanUpSimulation()
Call this after simulation loop finishes.
ActorManager * GetActorManager()
void setStr(std::string const &str)
@ SE_ANGELSCRIPT_THREAD_STATUS
Sent by background threads (i.e. CURL) when there's something important (like finishing a download)....
GUI::GameMainMenu GameMainMenu
@ MSG_APP_SHUTDOWN_REQUESTED
bool FileExists(const char *path)
Path must be UTF-8 encoded.
int main(int argc, char *argv[])
@ MSG_NET_DISCONNECT_REQUESTED
void processCommandLine(int argc, char *argv[])
@ VISIBLE
Visible, will be auto-hidden if not moving for a while.
void CreatePlayerCharacter()
Terrain must be loaded.
void UpdateSkyInputEvents(float dt)
const TerrainPtr & GetTerrain()
@ MSG_SIM_SCRIPT_EVENT_TRIGGERED
Payload = RoR::ScriptEventArgs* (owner)
void HandleSavegameHotkeys()