From a7832856252828450a63fdd1d10c337cc8fb671e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 25 Oct 2010 23:19:39 +0000 Subject: SWORD25: Simplify FS 'wrapper' code a bit, add FIXME comments The save system of this engine currently partially bypasses the SaveFileManager API, by (abusing) the fact that the Lua engine allows creating files in arbitrary places (it exposes fopen, fread, fwrite etc.). This is used to create a 'config.lua' configuration file. This makes it non-portable. In addition, the filenames used for the savestates ("0.b25s") do not comply with our naming conventions for engine savestates. It should be possible to overcome all this, but it might require hacking the Lua engine; or we could try to replace some of the BS2.5 script functions with our own, dynamically. svn-id: r53838 --- engines/sword25/package/packagemanager_script.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'engines/sword25/package/packagemanager_script.cpp') diff --git a/engines/sword25/package/packagemanager_script.cpp b/engines/sword25/package/packagemanager_script.cpp index afab573511..9367ae3071 100644 --- a/engines/sword25/package/packagemanager_script.cpp +++ b/engines/sword25/package/packagemanager_script.cpp @@ -90,17 +90,15 @@ static int getAbsolutePath(lua_State *L) { } static int getFileSize(lua_State *L) { - PackageManager *pPM = getPM(); - - lua_pushnumber(L, pPM->getFileSize(luaL_checkstring(L, 1))); + // This function apparently is not used by the game scripts + lua_pushnumber(L, 0); return 1; } static int getFileType(lua_State *L) { - PackageManager *pPM = getPM(); - - lua_pushnumber(L, pPM->getFileType(luaL_checkstring(L, 1))); + // This function apparently is not used by the game scripts + lua_pushnumber(L, 0); return 1; } -- cgit v1.2.3