|
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
|
Classes | |
| struct | FileHeader |
| struct | DisplaySettings |
| struct | RuntimeSettings |
Functions | |
| bool | Load (const uint8_t *data, size_t size) |
| Reads project settings from the bytes of a project_data.bin. | |
| int32_t | GetTargetFPS () |
| Target frame rate, 0 for no limit. | |
| Storage::Location | GetAssetStorage () |
| Whether this build's assets are on internal or external storage. | |
| const char * | GetStartupScene () |
| Startup scene path, empty when not set. | |
| const char * | GetRenderPipeline () |
| Renderer name, such as "standard2d"; "standard2d" when not set. | |
| int | GetPassCount () |
| Number of render passes, 0 when not set. | |
| const char * | GetPassName (int index) |
| Name of render pass index (such as "clip2d"), or "" when out of range. | |
| bool | LoadFromFile (const char *path=nullptr) |
| Loads project settings from path, or from kFilename when it is nullptr. | |
| bool | ReadPackageSettingBool (const char *section, const char *key, bool &out) |
| Reads one package setting from the last Load(). | |
| bool | ReadPackageSettingInt32 (const char *section, const char *key, int32_t &out) |
| bool | ReadPackageSettingFloat (const char *section, const char *key, float &out) |
| std::vector< uint8_t > | Write (Storage::Location assetStorage, int32_t targetFPS=0, const char *startupScene=nullptr, const char *rendererName=nullptr, const char *const *passNames=nullptr, int passCount=0) |
| Builds a project_data.bin image (editor only). | |
Variables | |
| constexpr const char * | kFilename = "F:/project_data.bin" |
| constexpr const char * | kExportFilename = "project_data.bin" |
| constexpr uint32_t | kMagic = 0x444B5052 |
| constexpr uint16_t | kVersion = 7 |
| constexpr uint16_t | kFlagAssetsExternal = 1u << 0 |
| constexpr size_t | kMaxFileSize = 16384 |
| bool Deki::ProjectSettings::Load | ( | const uint8_t * | data, |
| size_t | size ) |
Reads project settings from the bytes of a project_data.bin.
Returns false on failure.
| int32_t Deki::ProjectSettings::GetTargetFPS | ( | ) |
Target frame rate, 0 for no limit.
| Storage::Location Deki::ProjectSettings::GetAssetStorage | ( | ) |
Whether this build's assets are on internal or external storage.
| const char * Deki::ProjectSettings::GetStartupScene | ( | ) |
Startup scene path, empty when not set.
| const char * Deki::ProjectSettings::GetRenderPipeline | ( | ) |
Renderer name, such as "standard2d"; "standard2d" when not set.
| int Deki::ProjectSettings::GetPassCount | ( | ) |
Number of render passes, 0 when not set.
| const char * Deki::ProjectSettings::GetPassName | ( | int | index | ) |
Name of render pass index (such as "clip2d"), or "" when out of range.
| bool Deki::ProjectSettings::LoadFromFile | ( | const char * | path = nullptr | ) |
Loads project settings from path, or from kFilename when it is nullptr.
Returns false on failure.
| bool Deki::ProjectSettings::ReadPackageSettingBool | ( | const char * | section, |
| const char * | key, | ||
| bool & | out ) |
Reads one package setting from the last Load().
section is the DEKI_PROJECT_SETTINGS_SECTION name (such as "Rendering"), key the reflected field name. Works without the settings registry, which device builds lack; editor builds should read the registry instance instead. Returns false when no file is loaded, the section or key is missing, or the stored type is a different one.
| bool Deki::ProjectSettings::ReadPackageSettingInt32 | ( | const char * | section, |
| const char * | key, | ||
| int32_t & | out ) |
| bool Deki::ProjectSettings::ReadPackageSettingFloat | ( | const char * | section, |
| const char * | key, | ||
| float & | out ) |
| std::vector< uint8_t > Deki::ProjectSettings::Write | ( | Storage::Location | assetStorage, |
| int32_t | targetFPS = 0, | ||
| const char * | startupScene = nullptr, | ||
| const char * | rendererName = nullptr, | ||
| const char *const * | passNames = nullptr, | ||
| int | passCount = 0 ) |
Builds a project_data.bin image (editor only).
targetFPS 0 means no limit; startupScene may be nullptr. Returns the bytes, rather than filling a caller's buffer, because the packageSettings chunk grows with the settings registry and no caller can know the size. Empty only when nothing could be written.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |