|
Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
|
Runtime project settings loaded from dproject.bin. More...
Classes | |
| struct | FileHeader |
| Binary file header for project settings. More... | |
| struct | DisplaySettings |
| Display/rendering settings. More... | |
| struct | RuntimeSettings |
| Runtime settings (version 3+). More... | |
| struct | PipelineConfig |
Functions | |
| bool | Load (const uint8_t *data, size_t size) |
| Load project settings from binary file. | |
| int32_t | GetTargetFPS () |
| Get the target FPS from loaded project settings. | |
| const char * | GetStartupScene () |
| Get the startup scene path from loaded project settings. | |
| const char * | GetRenderPipeline () |
| Get the render pipeline renderer name (version 4+). | |
| int | GetPassCount () |
| Get the number of render passes in the pipeline (version 4+). | |
| const char * | GetPassName (int index) |
| Get the name of a render pass by index (version 4+). | |
| bool | LoadFromFile (const char *path=nullptr) |
| Load project settings from filesystem. | |
| bool | ReadPackageSettingBool (const char *section, const char *key, bool &out) |
| Runtime lookup of 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 (int32_t displayWidth, int32_t displayHeight, uint8_t colorFormat, int32_t targetFPS=0, const char *startupScene=nullptr, const char *rendererName=nullptr, const char *const *passNames=nullptr, int passCount=0) |
| Serialize project settings to a dproject.bin image (editor only). | |
Variables | |
| constexpr const char * | FILENAME = "F:/dproject.bin" |
| constexpr const char * | EXPORT_FILENAME = "dproject.bin" |
| constexpr uint32_t | MAGIC = 0x444B5052 |
| constexpr uint16_t | VERSION = 5 |
| constexpr size_t | MAX_FILE_SIZE = 16384 |
| static constexpr int | MAX_PIPELINE_NAME = 32 |
| Render pipeline configuration (version 4+). | |
| static constexpr int | MAX_PASSES = 8 |
Runtime project settings loaded from dproject.bin.
This file is exported by the editor alongside scenes and contains project-wide settings that affect engine behavior at runtime.
| bool ProjectSettings::Load | ( | const uint8_t * | data, |
| size_t | size ) |
Load project settings from binary file.
| data | Pointer to file data |
| size | Size of file data |
| int32_t ProjectSettings::GetTargetFPS | ( | ) |
Get the target FPS from loaded project settings.
| const char * ProjectSettings::GetStartupScene | ( | ) |
Get the startup scene path from loaded project settings.
| const char * ProjectSettings::GetRenderPipeline | ( | ) |
Get the render pipeline renderer name (version 4+).
| int ProjectSettings::GetPassCount | ( | ) |
Get the number of render passes in the pipeline (version 4+).
| const char * ProjectSettings::GetPassName | ( | int | index | ) |
Get the name of a render pass by index (version 4+).
| index | Pass index (0-based) |
| bool ProjectSettings::LoadFromFile | ( | const char * | path = nullptr | ) |
Load project settings from filesystem.
| path | Path to dproject.bin file (optional, uses FILENAME if nullptr) |
| bool ProjectSettings::ReadPackageSettingBool | ( | const char * | section, |
| const char * | key, | ||
| bool & | out ) |
Runtime lookup of one package setting from the last Load().
section is the DEKI_PROJECT_SETTINGS_SECTION name (e.g. "Rendering"), key the reflected field name. Works without the settings registry, which device builds do not have (the generic hydration in Load() needs the registry's metadata); editor builds should read the registry instance. Returns false when no file is loaded, the section or key is absent, or the stored type is not the one asked for.
| bool ProjectSettings::ReadPackageSettingInt32 | ( | const char * | section, |
| const char * | key, | ||
| int32_t & | out ) |
| bool ProjectSettings::ReadPackageSettingFloat | ( | const char * | section, |
| const char * | key, | ||
| float & | out ) |
| std::vector< uint8_t > ProjectSettings::Write | ( | int32_t | displayWidth, |
| int32_t | displayHeight, | ||
| uint8_t | colorFormat, | ||
| int32_t | targetFPS = 0, | ||
| const char * | startupScene = nullptr, | ||
| const char * | rendererName = nullptr, | ||
| const char *const * | passNames = nullptr, | ||
| int | passCount = 0 ) |
Serialize project settings to a dproject.bin image (editor only).
Returns the bytes rather than filling a caller-supplied pointer. The v5 packageSettings chunk grows with the settings registry, so no call site can know the size up front — the previous signature took a bare uint8_t* with no capacity argument and a doc comment claiming 256 bytes would do, while the three call sites each guessed a 4096-byte stack array and LoadFromFile accepted files up to MAX_FILE_SIZE (16384) back.
| displayWidth | Target display width |
| displayHeight | Target display height |
| colorFormat | Color format (0=RGB565, 1=RGB888, 2=ARGB8888) |
| targetFPS | Target FPS (0 = no limit) |
| startupScene | Startup scene path (can be nullptr) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
staticconstexpr |
Render pipeline configuration (version 4+).
Baked from .rpipeline asset at export time. Specifies which renderer and render passes to activate.
|
staticconstexpr |