|
Scarab
A thin, game-agnostic 2D engine host built on the sunlight tile-map engine
|
Packaging-tool support for content encryption - see the root README.md's own "Content encryption" section and tools/README.md. Backs tools/pack.lua, the Lua script that actually walks a game's source tree and produces an encrypted .zip bundle (calling crypto_encrypt_data - see LuaCryptoApi - on each file's bytes before adding it here).
More...
#include <luapackapi.h>
Static Public Member Functions | |
| static void | Register (lua_State *pLuaState) |
| Register the packaging-tool Lua-callable functions. | |
Packaging-tool support for content encryption - see the root README.md's own "Content encryption" section and tools/README.md. Backs tools/pack.lua, the Lua script that actually walks a game's source tree and produces an encrypted .zip bundle (calling crypto_encrypt_data - see LuaCryptoApi - on each file's bytes before adding it here).
Every primitive here reads/writes a genuine native OS path, resolved exactly the way a plain C fopen() would
SunLight::FileSystem) every other resource load in this engine uses. That's deliberate: packaging runs against a real, not-yet-bundled source directory on disk, before any of Scarab's own runtime mounting concepts (APP_DIR, a loaded .zip) are even relevant. These primitives exist purely for tools/pack.lua - no running game should ever call them.pack_create_archive/pack_add_entry/pack_close_archive share one integer-handle convention: 0 always means failure (the same "0 is never a valid handle" shape sprite_acquire already uses), a real handle otherwise. Always call pack_close_archive once done with a handle
|
static |
Register the packaging-tool Lua-callable functions.