|
Scarab
A thin, game-agnostic 2D engine host built on the sunlight tile-map engine
|
Phase 12 prototype (bundled/archived distribution, game-engine repo) - overrides Lua's own built-in dofile() with a version that reads through SunLight::FileSystem::FileSystemFactory instead of it's standard fopen()-based one, matching every other subsystem already routed the same way (textures/sound/tilemaps/ load_json). This is the last piece: every resource this engine ever reads now goes through one mount, whether that mount is a real loose directory (today) or a real archive (later) - nothing above this needed to change to notice the difference, load_json/dofile call sites included. More...
#include <luafilesystemapi.h>
Static Public Member Functions | |
| static void | Register (lua_State *pLuaState) |
| Register the file-loading Lua overrides. Must run AFTER luaL_openlibs() - it's replacing that library's own dofile, not adding a new global. | |
Phase 12 prototype (bundled/archived distribution, game-engine repo) - overrides Lua's own built-in dofile() with a version that reads through SunLight::FileSystem::FileSystemFactory instead of it's standard fopen()-based one, matching every other subsystem already routed the same way (textures/sound/tilemaps/ load_json). This is the last piece: every resource this engine ever reads now goes through one mount, whether that mount is a real loose directory (today) or a real archive (later) - nothing above this needed to change to notice the difference, load_json/dofile call sites included.
require()/loadfile()/raw io.* file access are deliberately NOT overridden - confirmed, project-wide, that no script in this game ever calls any of them; dofile() is the only module-loading mechanism actually in use.
|
static |