Polyphase Game Engine
Loading...
Searching...
No Matches
EmbeddedFile.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
6{
7 const char* mName;
8 const char* mData;
9 uint32_t mSize;
10 bool mEngine;
11};
12
13// Embedded raw-asset VFS — runtime-registration model.
14//
15// The generated Generated/EmbeddedAssets.cpp (when linked into a shipped exe)
16// emits a static initializer that calls SYS_RegisterEmbeddedRawAssets with a
17// pointer to its gEmbeddedRawAssets[] array. Editor builds don't link the
18// generated cpp, so the registration never happens and lookups return null —
19// no weak-symbol dance, no per-toolchain pragmas.
20//
21// SYS_LookupEmbeddedRawAsset matches `path` against the registered table after
22// canonicalising both to forward-slashes and stripping a leading "./". Returns
23// a pointer aliasing the generated byte array on hit (callers must NOT free
24// it), nullptr on miss.
25void SYS_RegisterEmbeddedRawAssets(EmbeddedFile* table, uint32_t count);
26const char* SYS_LookupEmbeddedRawAsset(const char* path, uint32_t& outSize);
const char * SYS_LookupEmbeddedRawAsset(const char *path, uint32_t &outSize)
Definition SystemUtils.cpp:172
void SYS_RegisterEmbeddedRawAssets(EmbeddedFile *table, uint32_t count)
Definition SystemUtils.cpp:144
Definition EmbeddedFile.h:6
const char * mName
Definition EmbeddedFile.h:7
bool mEngine
Definition EmbeddedFile.h:10
uint32_t mSize
Definition EmbeddedFile.h:9
const char * mData
Definition EmbeddedFile.h:8