aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Turner2010-09-30 22:45:24 +0000
committerDavid Turner2010-09-30 22:45:24 +0000
commit4293dbb7f3665e905f9340d7e101607201e097a1 (patch)
treea0249fb0898882ba4aad326cb41e41c5ae1adc93
parentcc69fa8297e157d96aaa53f79c48febd710fa2fe (diff)
downloadscummvm-rg350-4293dbb7f3665e905f9340d7e101607201e097a1.tar.gz
scummvm-rg350-4293dbb7f3665e905f9340d7e101607201e097a1.tar.bz2
scummvm-rg350-4293dbb7f3665e905f9340d7e101607201e097a1.zip
TOOLS: Added engine patch for use with skycpt and updated skycpt README
This patch removes the description for required code modification to sky engine for generation of RESET.* files from the README and places it into a patch file. This patch also adds two modifications which are required to get RESET.* with current codebase not mentioned in the README. svn-id: r52961
-rw-r--r--tools/skycpt/README13
-rw-r--r--tools/skycpt/skycpt-engine.patch54
2 files changed, 63 insertions, 4 deletions
diff --git a/tools/skycpt/README b/tools/skycpt/README
index 8b9705033d..3339b189cc 100644
--- a/tools/skycpt/README
+++ b/tools/skycpt/README
@@ -32,12 +32,17 @@ If you still want to waste your time by creating this file:
v.0.00365: CD Demo
v.0.00368: Full CD version
v.0.00372: Final CD version
-4) Change scummvm/sky/logic.cpp, function fnSkipIntroCode
- so that it calls _skyControl->doLoadSavePanel()
+4) Apply the supplied skycpt-engine.patch to a clean copy of the ScummVM
+ codebase. This modifies the sky engine to allow savefiles to be generated
+ containing the required data for the skycpt tool.
5) Compile the patched ScummVM.
-6) Start each of the BASS versions, enjoy the intro over and over again.
+6) Start each of the BASS versions with this patched version, enjoy the intro
+ over and over again.
Afterwards, it'll automatically show the load/save dialog where you save the game.
-7) Rename the Savegame files you created to "RESET.*", depending on the version.
+ Except for Demo (v0.00356) which lacks the dialog, so this will autosave to slot 1
+ at the end of the intro.
+7) Rename the Savegame files you created (SKY-VM.000 etc., not the ASD or SAV
+ file) to "RESET.*", depending on the version.
e.g. RESET.288 for v.0.00288
8) Rename each file with a ".gz" suffix and run gunzip on it.
This removes the ScummVM gzip savefile compression.
diff --git a/tools/skycpt/skycpt-engine.patch b/tools/skycpt/skycpt-engine.patch
new file mode 100644
index 0000000000..077170142d
--- /dev/null
+++ b/tools/skycpt/skycpt-engine.patch
@@ -0,0 +1,54 @@
+Index: engines/sky/compact.cpp
+===================================================================
+--- engines/sky/compact.cpp (revision 52957)
++++ engines/sky/compact.cpp (working copy)
+@@ -138,11 +138,15 @@
+ if (fileVersion != 0)
+ error("unknown \"sky.cpt\" version");
+
++#if 0
++ // Disabled as sky.cpt / compact.dbg used during RESET.* generation is
++ // a different size from expected.
+ if (SKY_CPT_SIZE != _cptFile->size()) {
+ GUI::MessageDialog dialog("The \"sky.cpt\" file has an incorrect size.\nPlease (re)download it from www.scummvm.org", "OK", NULL);
+ dialog.runModal();
+ error("Incorrect sky.cpt size (%d, expected: %d)", _cptFile->size(), SKY_CPT_SIZE);
+ }
++#endif
+
+ // set the necessary data structs up...
+ _numDataLists = _cptFile->readUint16LE();
+Index: engines/sky/control.cpp
+===================================================================
+--- engines/sky/control.cpp (revision 52957)
++++ engines/sky/control.cpp (working copy)
+@@ -432,7 +432,8 @@
+ _lastButton = -1;
+ _curButtonText = 0;
+
+- saveRestorePanel(false);
++ // Parameter modified to true to ensure save dialog, not load is shown
++ saveRestorePanel(true);
+
+ memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT);
+ _system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT);
+Index: engines/sky/logic.cpp
+===================================================================
+--- engines/sky/logic.cpp (revision 52957)
++++ engines/sky/logic.cpp (working copy)
+@@ -2376,6 +2376,15 @@
+
+ bool Logic::fnSkipIntroCode(uint32 a, uint32 b, uint32 c) {
+ SkyEngine::_systemVars.pastIntro = true;
++
++ // Demo (v0.0365) lacks Save/Load Panel resources, so
++ // automatically save to Slot 1, rather than displaying dialog
++ if (SkyEngine::isDemo()) {
++ _skyControl->_selectedGame = 1;
++ _skyControl->saveGameToFile();
++ } else {
++ _skyControl->doLoadSavePanel();
++ }
+ return true;
+ }
+