![]() Reading and writing files is done mostly using Ogre::ResourceGroupManager().getSingleton().openResource(), eventually using helper functions in PlatformUtils.h. Initial configuration is done by RoR::AppContext::SetUpProgramPaths() and RoR::AppContext::SetUpResourcesDir(). For details visit Resource Management in OGRE manual.Loads resources automatically as needed.Each can have multiple 'resource locations' (ZIP archives or directories or both). Organizes resources into 'resource groups' (alias RGs).Transparently reads ZIP archives as if they were just directories.During simulation, sound script instances are updated using RoR::SoundScriptManager macros like SOUND_START(), SOUND_STOP() and SOUND_MODULATE().Īll file manipulations are done using OGRE's resource system, which has many useful features: ![]() Sound script 'trigger sources' are specified by RoR::SoundTriggers, 'pitch/gain sources' by RoR::ModulationSources. User creates soundscript files and RoR::SoundScriptManager parses them into individual objects RoR::SoundScriptTemplate (one per soundscript) and RoR::SoundScriptInstance (one per actor which uses it). Individual sound effects are defined as 'sound scripts'. Sound is done using OpenAL Soft library, managed by RoR::SoundManager. Rendering is configured by OGRE's own 'ogre.cfg' file. Note Ogre::FrameListener interface is not used, we roll our own rendering loop in main(). Window events are handled by RoR::AppContext via OGRE's OgreBites::WindowEventListener. Startup is done by RoR::AppContext::SetUpRendering(). Graphical output is done via OGRE 3D rendering engine (not to be confused with game engine). Gameplay inputs are defined by RoR::events and handled by RoR::InputEngine, which reads configuration files '*.map', the default being 'input.map'. Class RoR::AppContext is the sole listener for all inputs and serves as a dispatcher between various subsystems. Inputs are received via OIS library's listener mechanism. The entry point is a standard main() function which performs all initialization, message processing and cleanup. Rigs of Rods is a monolithic C++ program with it's own main input/rendering loop. This documentation intentionally displays the AngelScript interface alongside code to highlight that they match very closely and it's worthwile for the reader gain further insight into things and make/suggest enhancements. All developers are invited to try archieve their goal via scripting if possible. Rigs of Rods supports scripting with AngelScript. The target audience is everyone interested in the workings of the software - from developers, maintainers and contributors to script writers and advanced content creators.įor reference manual, see module Script-side APIs. This page is a reference guide to Rigs of Rods internal mechanics and features, as well as exposed interfaces such as scripting.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |