![]() |
vkmEngine 1.0.15
A C++ game engine · vkmengine.com
|
Canonical on-disk locations, split by who owns them. More...
Functions | |
| std::filesystem::path | engineRoot () |
| Directory holding the engine's own read-only data. | |
| void | setProjectRoot (const std::filesystem::path &path) |
Point the project root at path. | |
| std::filesystem::path | projectRoot () |
| Directory holding the project currently open. | |
| std::filesystem::path | userRoot () |
| Directory this user's own settings live in. | |
| std::filesystem::path | playerRoot (const std::string &game) |
| Directory a game keeps its player's own files in: settings, a profile, saves. | |
| std::filesystem::path | userLogs () |
| Directory a host writes its log to when the project cannot hold one. | |
| std::filesystem::path | resolveProjectPath (const std::string &path) |
| Turn a stored reference into a path that can be opened. | |
| std::string | toProjectRelative (const std::string &path) |
| The form of a path an asset should be named and recorded by. | |
| std::filesystem::path | engineContent () |
| The engine's content packs (see ContentPack). | |
| std::filesystem::path | projectBin () |
| Directory the project keeps its built gameplay module in. | |
Canonical on-disk locations, split by who owns them.
Project or user is the question "would you commit this?"
| std::filesystem::path Vkm::Engine::ProjectPaths::engineRoot | ( | ) |
Directory holding the engine's own read-only data.
Beside the executable or one level up when packaged; otherwise the repo root recorded at configure time.
| void Vkm::Engine::ProjectPaths::setProjectRoot | ( | const std::filesystem::path & | path | ) |
Point the project root at path.
Set before anything composes a project path: a path already built from the old root will not follow.
| path | Directory containing the project's project.json. |
| std::filesystem::path Vkm::Engine::ProjectPaths::projectRoot | ( | ) |
Directory holding the project currently open.
The path set by setProjectRoot(), else the engine root, where a packaged game keeps its data beside the executable.
| std::filesystem::path Vkm::Engine::ProjectPaths::userRoot | ( | ) |
Directory this user's own settings live in.
A vkmEngine folder under $XDG_CONFIG_HOME (or ~/.config) or APPDATA%; the engine root when there is no home or the folder cannot be created. Exists when this returns; resolved once.
| std::filesystem::path Vkm::Engine::ProjectPaths::playerRoot | ( | const std::string & | game | ) |
Directory a game keeps its player's own files in: settings, a profile, saves.
A game folder in the same platform directory as userRoot(), not inside the engine's: a player knows the game, not what it was made with. The project root when there is no home or no name, and when the folder cannot be created, which warns. Exists when this returns. readOwnFile and writeOwnFile read and write there.
| game | The folder's name, the game's own - its Project::name serves; only its last part counts. |
| std::filesystem::path Vkm::Engine::ProjectPaths::userLogs | ( | ) |
Directory a host writes its log to when the project cannot hold one.
Under $XDG_STATE_HOME (or ~/.local/state) or LOCALAPPDATA%: a log is state, not settings, and should not roam. Not created here; see bootHost.
| std::filesystem::path Vkm::Engine::ProjectPaths::resolveProjectPath | ( | const std::string & | path | ) |
Turn a stored reference into a path that can be opened.
A relative reference resolves against the project root, never the working directory (bootHost pins that to the engine root). An absolute one passes through.
| path | Reference as stored in a scene, a recipe or an asset name. |
| std::string Vkm::Engine::ProjectPaths::toProjectRelative | ( | const std::string & | path | ) |
The form of a path an asset should be named and recorded by.
Project-relative when under the project root, so identities do not carry the authoring machine's tree; absolute otherwise. Always generic-separated, so a reference authored on Windows resolves elsewhere.
| path | Absolute or relative path to a source file or folder. |
|
inline |
Directory the project keeps its built gameplay module in.