GRIM: Move some hacks from engine to patches

This commit is contained in:
Andrea Corna 2011-12-30 19:16:09 +01:00
parent dd1806afdb
commit 235463e947
9 changed files with 26 additions and 10 deletions

View File

@ -241,7 +241,7 @@ endif
DIST_FILES_THEMES:=$(addprefix $(srcdir)/gui/themes/,$(DIST_FILES_THEMES)) DIST_FILES_THEMES:=$(addprefix $(srcdir)/gui/themes/,$(DIST_FILES_THEMES))
# Engine data files # Engine data files
DIST_FILES_ENGINEDATA= DIST_FILES_ENGINEDATA=residual-grim-patch.lab
DIST_FILES_ENGINEDATA:=$(addprefix $(srcdir)/dists/engine-data/,$(DIST_FILES_ENGINEDATA)) DIST_FILES_ENGINEDATA:=$(addprefix $(srcdir)/dists/engine-data/,$(DIST_FILES_ENGINEDATA))

View File

@ -11,6 +11,7 @@
IDI_ICON ICON DISCARDABLE "icons/residualvm.ico" IDI_ICON ICON DISCARDABLE "icons/residualvm.ico"
IDI_COUNT ICON DISCARDABLE "icons/count.ico" IDI_COUNT ICON DISCARDABLE "icons/count.ico"
residual-grim-patch.lab FILE "patches/residual-grim-patch.lab"
modern.zip FILE "gui/themes/modern.zip" modern.zip FILE "gui/themes/modern.zip"
#ifdef USE_TRANSLATION #ifdef USE_TRANSLATION
translations.dat FILE "gui/themes/translations.dat" translations.dat FILE "gui/themes/translations.dat"

View File

@ -11,6 +11,7 @@
IDI_ICON ICON DISCARDABLE "icons/residualvm.ico" IDI_ICON ICON DISCARDABLE "icons/residualvm.ico"
IDI_COUNT ICON DISCARDABLE "icons/count.ico" IDI_COUNT ICON DISCARDABLE "icons/count.ico"
residual-grim-patch.lab FILE "patches/residual-grim-patch.lab"
modern.zip FILE "gui/themes/modern.zip" modern.zip FILE "gui/themes/modern.zip"
#ifdef USE_TRANSLATION #ifdef USE_TRANSLATION
translations.dat FILE "gui/themes/translations.dat" translations.dat FILE "gui/themes/translations.dat"

View File

@ -23,6 +23,7 @@ Source: "README.txt"; DestDir: "{app}"; Flags: ignoreversion isreadme
Source: "README-SDL.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "README-SDL.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "residualvm.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "residualvm.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "modern.zip"; DestDir: "{app}"; Flags: ignoreversion Source: "modern.zip"; DestDir: "{app}"; Flags: ignoreversion
Source: "residual-grim-patch.lab"; DestDir: "{app}"; Flags: ignoreversion
Source: "SDL.dll"; DestDir: "{app}" Source: "SDL.dll"; DestDir: "{app}"
[Icons] [Icons]

View File

@ -290,11 +290,7 @@ int LuaBase::bundle_dofile(const char *filename) {
Common::SeekableReadStream *stream; Common::SeekableReadStream *stream;
stream = g_resourceloader->openNewStreamFile(filename); stream = g_resourceloader->openNewStreamFile(filename);
if (!stream) { if (!stream) {
// Don't print warnings on Scripts\foo.lua, Debug::warning(Debug::Engine, "Cannot find script %s", filename);
// d:\grimFandango\Scripts\foo.lua
if (!strstr(filename, "Scripts\\"))
Debug::warning(Debug::Engine, "Cannot find script %s", filename);
return 2; return 2;
} }

View File

@ -236,10 +236,6 @@ static void io_writeto() {
setreturn(id, FOUTPUT); setreturn(id, FOUTPUT);
} else { } else {
const char *s = Common::lastPathComponent(luaL_check_string(FIRSTARG), '\\').c_str(); const char *s = Common::lastPathComponent(luaL_check_string(FIRSTARG), '\\').c_str();
if (Common::String(s).hasSuffix("bino.txt")) {
pushresult(0);
return;
}
LuaFile *current; LuaFile *current;
Common::WriteStream *outFile = NULL; Common::WriteStream *outFile = NULL;
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();

View File

@ -0,0 +1,8 @@
List of fixed bug in GF scripts:
+Various bugs
-Issues with cd check:
The cd check function doesn't work correctly, so we skip it.
-Fix the behaviour of dofile statement
In _system.lua there is a re-definition of dofile, used to load scripts from some others positions ("Scripts\" and "d:\\grimFandango\\Scripts\\"). This cause a lot of warnings when an non-existant file is required. Moreover this function is bugged: it returns everytime nil, even if the file has correctly loaded. So it's has been modified to load scripts only from the main path and it returns nil when the file has succesfully loaded, otherwise the numer one (which is a boolean true). The last modification is requied, since the others scripts expect this behavior.

View File

@ -0,0 +1,13 @@
#Fix issue with cd check function and the lua override of dofile (which cause a lot of warnings)
BEGIN 9ca3e57ac3a372da8e3f610053f980d3 #v1.00
REPLACE A945 6D 3B #Cd check
REPLACE 941F 68 #DoFile
FILL 9420 24 FF
END
BEGIN 00cad86d3eba11c54a2515381a1169d5 #v1.01
REPLACE AA2C 6D 3B #Cd check
REPLACE 9506 68 #DoFile
FILL 9507 24 FF
END

Binary file not shown.