|
RLLib
0.1
|
This class represents the game itself. More...
#include <Game.hpp>
Public Member Functions | |
| Game (FilePath path) | |
| Creates and loads the game from the specified path. More... | |
| void | load (FilePath path) |
| Loads the game from the specified path. More... | |
| Bundle & | getBundle () noexcept |
| Returns the bundle file associated with the game. More... | |
| ByteStream | getAsset (const FilePath &path) |
| Extracts an asset from the game files. More... | |
| Scene | getScene (const FilePath &path) |
| Returns a scene loaded from an asset. More... | |
| void | updateAsset (const FilePath &path, const ByteStream &data) |
| Overwrites an asset in the game files. More... | |
| void | patchAsset (const FilePath &path, const ByteStream &data) |
| Creates a patch for a specific asset, leaving the original content unmodified. More... | |
| void | removePatch () |
| Deletes the current existing patch. | |
| int | run (const FilePath &path="") |
| Launches a specific scene in the game engine and displays the logs. More... | |
| int | run (const Scene &scene) |
| Launches the given scene in the game engine and displays the logs. More... | |
This class represents the game itself.
It provides features to extract, patch or run scenes in the game engine.
|
explicit |
Creates and loads the game from the specified path.
| path | The path to the game executable file |
| ByteStream rl::Game::getAsset | ( | const FilePath & | path | ) |
Extracts an asset from the game files.
| path | The path to the asset |
|
noexcept |
Returns the bundle file associated with the game.
Returns a scene loaded from an asset.
Use rl::Game::updateAsset or rl::Game::patchAsset to overwrite or patch the scene.
| path | The path to the asset |
| void rl::Game::load | ( | FilePath | path | ) |
Loads the game from the specified path.
| path | The path to the game executable file |
| void rl::Game::patchAsset | ( | const FilePath & | path, |
| const ByteStream & | data | ||
| ) |
Creates a patch for a specific asset, leaving the original content unmodified.
Use rl::Game::removePatch to revert the changes.
| path | The path to the scene file |
| data | The scene object |
| int rl::Game::run | ( | const FilePath & | path = "" | ) |
Launches a specific scene in the game engine and displays the logs.
If the specified scene does not exists, the game is launched normally.
| path | The path to the scene file |
| int rl::Game::run | ( | const Scene & | scene | ) |
Launches the given scene in the game engine and displays the logs.
| scene | The scene object |
| void rl::Game::updateAsset | ( | const FilePath & | path, |
| const ByteStream & | data | ||
| ) |
Overwrites an asset in the game files.
The file path to the asset must already exist.
| path | The path to the asset |
| data | The asset data |