![]() |
vkmEngine 1.0.0
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 | 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 | 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 (a checkout is its own project; 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::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.