DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches
ProjectSettings.h File Reference

Classes

struct  Deki::ProjectSettings::DisplaySettings
 Display section of project_data.bin, after the FileHeader. More...
struct  Deki::ProjectSettings::FileHeader
 Header at the start of project_data.bin. More...
struct  Deki::ProjectSettings::RuntimeSettings
 Runtime section of project_data.bin: target frame rate and startup scene. More...

Namespaces

namespace  Deki
namespace  Deki::ProjectSettings
 Project-wide runtime settings, read from the project_data.bin the editor exports.

Functions

Storage::Location Deki::ProjectSettings::GetAssetStorage ()
 Whether this build's assets are on internal or external storage.
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.
const char * Deki::ProjectSettings::GetRenderPipeline ()
 Renderer name, such as "standard2d"; "standard2d" when not set.
float Deki::ProjectSettings::GetScreenDiagonalInches ()
 The screen's diagonal in inches, from the board's platform file; 0 when unknown.
const char * Deki::ProjectSettings::GetStartupScene ()
 Startup scene path, empty when not set.
int32_t Deki::ProjectSettings::GetTargetFPS ()
 Target frame rate, 0 for no limit.
bool Deki::ProjectSettings::Load (const uint8_t *data, size_t size)
 Reads project settings from the bytes of a project_data.bin.
bool Deki::ProjectSettings::LoadFromFile (const char *path=nullptr)
 Loads project settings from path, or from kFilename when it is nullptr.
bool Deki::ProjectSettings::ReadPackageSettingBool (const char *section, const char *key, bool &out)
 Reads one package setting from the last Load().
bool Deki::ProjectSettings::ReadPackageSettingEnum (const char *section, const char *key, size_t enumSize, int32_t &out)
 An enum setting, stored at the enum's own width: pass sizeof the enum (1, 2 or 4).
bool Deki::ProjectSettings::ReadPackageSettingFloat (const char *section, const char *key, float &out)
bool Deki::ProjectSettings::ReadPackageSettingInt32 (const char *section, const char *key, int32_t &out)
void Deki::ProjectSettings::Unload ()
 Frees what the last Load() kept (the packages' settings), so the engine's shutdown does not count it as a leak.
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, float screenDiagonalInches=0.0f)
 Builds a project_data.bin image (editor only).

Variables

constexpr const char * Deki::ProjectSettings::kExportFilename = "project_data.bin"
constexpr const char * Deki::ProjectSettings::kFilename = "F:/project_data.bin"
constexpr uint16_t Deki::ProjectSettings::kFlagAssetsExternal = 1u << 0
constexpr uint32_t Deki::ProjectSettings::kMagic = 0x444B5052
constexpr size_t Deki::ProjectSettings::kMaxFileSize = 16384
constexpr uint16_t Deki::ProjectSettings::kVersion = 7