Commit graph

355 commits

Author SHA1 Message Date
Martin Kiewitz
c422e39bf8 SCI: implemented kPalette(save/restore)
svn-id: r51381
2010-07-27 17:51:44 +00:00
Filippos Karapetis
19042d7873 SCI: Actually sync kPalVary data when saving/loading
svn-id: r51198
2010-07-23 08:26:20 +00:00
Filippos Karapetis
9db77be9d4 SCI: Dropped support for the very old savegame versions 12 and 13 (hopefully, the last ones to be dropped)
svn-id: r51197
2010-07-23 08:22:13 +00:00
Martin Kiewitz
15eebdb061 SCI: some changes to kPalVary saving
still needs to get tested

svn-id: r51196
2010-07-23 08:08:27 +00:00
Filippos Karapetis
3aa4f76ee4 SCI: Now saving the kPalVary state inside savegames
svn-id: r51194
2010-07-23 07:36:55 +00:00
Filippos Karapetis
8eca9d6acb SCI: Fixed a bug when loading some saved games (sometimes, the execution stack wasn't cleared properly when loading and you couldn't save or restore)
svn-id: r51140
2010-07-22 12:38:48 +00:00
Martin Kiewitz
625af1260b SCI: checking if within kernel function before overwrite a save (thx @ digitall)
svn-id: r50962
2010-07-17 17:58:50 +00:00
Martin Kiewitz
ba776fb293 SCI: implemented subsignatures for kDoSound
svn-id: r50755
2010-07-09 12:06:41 +00:00
Filippos Karapetis
9add81aaf2 SCI: Dropped support for the very old saved game versions 9 - 11. Rationale: a lot has changed since then, we're still not stable, and this helps clean up the code, thus we're still in a position to drop support for old saved games
svn-id: r50738
2010-07-07 20:12:41 +00:00
Max Horn
afd2850058 SCI: Add version to obsolete string
This way, if we ever get rid of support for savegames with
version <= 23, we can also get rid of this syncString()
call. Without this change, it would have "infected" every
new savegame version, forever.

svn-id: r50730
2010-07-06 23:24:36 +00:00
Max Horn
aa6be750fb SCI: Invoke resetSegMan from SegManager::saveLoadWithSerializer, not from EngineState::saveLoadWithSerializer
svn-id: r50554
2010-07-01 16:06:04 +00:00
Max Horn
c822cd67cb SCI: Make SegManager::_classTable private.
This require a small tweak to the save/load code: I moved the syncing
logic for _classtable from EngineState::saveLoadWithSerializer to
SegManager::saveLoadWithSerializer, which in theory should have no
effect (luckily, _classtable was being synced right after the
segment manager).

svn-id: r50551
2010-07-01 16:05:10 +00:00
Max Horn
3f429d64a2 SCI: Rename some variables to match our naming conventions
svn-id: r50549
2010-07-01 16:04:29 +00:00
Filippos Karapetis
bff3e89e48 SCI: Removed the FreeSCI music code
svn-id: r50532
2010-06-30 13:49:05 +00:00
Filippos Karapetis
9f1413b338 When deleting a list node, erase its references to predecessor and successor nodes. Fixes cases where game scripts could reference a list node after it was deleted (e.g. QFG1 intro, Longbow when exiting the cave). Some slight cleanup
svn-id: r50515
2010-06-30 07:18:43 +00:00
Filippos Karapetis
9f1320d5cc SCI: Made the SoundCommandParser a member of the SciEngine class and removed it from the EngineState, since it's static throughout the course of a game
svn-id: r50484
2010-06-29 09:00:08 +00:00
Filippos Karapetis
ee6aebc780 Don't initialize graphics again when loading
svn-id: r50464
2010-06-28 22:08:46 +00:00
Max Horn
30218a2c32 SCI: Make Script member vars private; add const qualifiers
Only three Script members remain public (for now)

svn-id: r50428
2010-06-28 11:22:20 +00:00
Filippos Karapetis
0a102981f0 Moved the SelectorCache struct inside selector.h, where it belongs, and fixed some header dependencies in the process
svn-id: r50183
2010-06-23 15:23:37 +00:00
Filippos Karapetis
c28fa2cf19 Reverted the code which handles objects without a base object when loading, for now. This possibly indicates an issue related to the garbage collector
svn-id: r50142
2010-06-22 15:03:19 +00:00
Filippos Karapetis
53b82298e8 Stop saving the buffer, script and heap sizes of each script in saved games
svn-id: r50137
2010-06-22 08:57:25 +00:00
Martin Kiewitz
996bd693e0 SCI: resume when unable to locate base objects - fixes loading some saved games
svn-id: r50055
2010-06-19 19:04:35 +00:00
Filippos Karapetis
db70d66e4a Strict mode: Changed several warnings due to logic bugs into errors. If an error pops up from these ones, please add the game where it occurred and the steps to reproduce the error before turning it into a warning
svn-id: r49973
2010-06-17 23:50:28 +00:00
Martin Kiewitz
b25aba1d1e SCI: SciGui/SciGui32 gone for good...
svn-id: r49860
2010-06-15 15:44:24 +00:00
Martin Kiewitz
ba2de6dfa4 SCI: putting SciGui::init into SciEngine, removing it from SciGui(32)
svn-id: r49854
2010-06-15 13:34:40 +00:00
Filippos Karapetis
e64eb71ce8 Properly reconstruct the running stack when restoring (a regression from commits #49376 and #49525), some formatting
svn-id: r49689
2010-06-15 09:11:26 +00:00
Filippos Karapetis
ba3c43498b - Swapped the return value of gamestate_save (false = failed, true = succeeded)
- Removed some duplicate code inside Console::cmdSaveGame()

svn-id: r49688
2010-06-15 08:39:03 +00:00
Filippos Karapetis
0ad3bedf98 Added a signature of the game itself inside saved games (the size of script 0, as well as the offset of the game object, which are unique for each game), to prevent users from loading saved games across different versions of the same game. In the cases where we can't load a saved game, throw a nice GUI dialog instead of a console warning
svn-id: r49687
2010-06-15 08:25:51 +00:00
Filippos Karapetis
0dab9e0e1f Reorganized functions a bit
svn-id: r49685
2010-06-15 07:25:09 +00:00
Filippos Karapetis
e93f8902a8 Cleanup of the savegame code:
- Added a saveLoadWithSerializer() method to the reg_t class
- Moved SegManager::reconstructClones() inside savegame.cpp
- Moved SoundCommandParser::syncPlayList() and SoundCommandParser::reconstructPlayList() inside savegame.cpp

svn-id: r49683
2010-06-15 07:20:53 +00:00
Filippos Karapetis
cfdbfaa28e SCI: Limit the screen refresh rate to 60fps
svn-id: r49647
2010-06-14 08:36:52 +00:00
Filippos Karapetis
b5ebd40d61 The offset of script local variables is now calculated when the script is loaded, thus we no longer need to save it. Merged scriptInitialiseLocals() with scriptInitialiseLocalsZero()
svn-id: r49640
2010-06-13 22:15:30 +00:00
Filippos Karapetis
711f679b7f camelCase changes
svn-id: r49570
2010-06-10 11:43:20 +00:00
Filippos Karapetis
93f33c7dab Resolved a FIXME with getSciLanguage(), by creating a separate setter. Also, some camelCase changes
svn-id: r49568
2010-06-10 11:18:10 +00:00
Filippos Karapetis
a635b94823 Pic port saving/loading is only used in SCI0-SCI11
svn-id: r49567
2010-06-10 10:27:13 +00:00
Martin Kiewitz
8a5762c52d SCI: set picport when loading saved games
svn-id: r49565
2010-06-10 10:15:32 +00:00
Filippos Karapetis
5d71ae952f The EngineState is no longer recreated when a game is restored, thus we don't need to refresh pointers to it
svn-id: r49549
2010-06-09 20:12:25 +00:00
Filippos Karapetis
015262a0ee Fixed compilation when the old sound code is used
svn-id: r49540
2010-06-09 14:06:16 +00:00
Filippos Karapetis
536b2614e8 Globals from script 0 are now initialized in script_init_engine(), and are accessed from the relevant variables pointer. Removed direct reference to script 0 from the engine state
svn-id: r49536
2010-06-09 09:17:48 +00:00
Filippos Karapetis
81907a8e6f Don't shrink the stack after reconstructing it, when loading a saved game. Fixes game restoring in some games (e.g. LSL3), a regression from commit #49376
svn-id: r49525
2010-06-08 23:29:35 +00:00
Filippos Karapetis
eafc63e572 Cleanup
svn-id: r49521
2010-06-08 21:21:19 +00:00
Filippos Karapetis
9304b5fbeb Merged the restarting_flags, script_abort_flag, and restoring members of the EngineState class into one variable, abortScriptProcessing. The flag kept to signify a game restart has been placed in a boolean, gameWasRestarted
svn-id: r49518
2010-06-08 21:05:46 +00:00
Filippos Karapetis
3d0ac2a676 Merged sync_SegManagerPtr() inside EngineState::saveLoadWithSerializer()
svn-id: r49512
2010-06-08 18:23:38 +00:00
Filippos Karapetis
5ba761a687 Made reconstruct_stack() a member of SegManager
svn-id: r49503
2010-06-08 13:16:30 +00:00
Filippos Karapetis
3c82b6578f Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
svn-id: r49465
2010-06-06 23:00:33 +00:00
Filippos Karapetis
65f3cfcbd8 Stop reconstructing the engine state when restoring, but reset it instead
svn-id: r49376
2010-06-01 15:48:17 +00:00
Filippos Karapetis
9c92bd1b81 The parser vocabulary remains static throughout the game, thus it has been removed from the engine state
svn-id: r49373
2010-06-01 15:11:20 +00:00
Filippos Karapetis
e083c20da1 The system strings segment is a fixed segment of the segment manager, which doesn't change during the game, thus move all the system strings code and variables inside the segment manager
svn-id: r49372
2010-06-01 14:41:48 +00:00
Filippos Karapetis
3f4302214c The save/load object init code is now unified with the regular object init code
svn-id: r49346
2010-05-31 11:25:59 +00:00
Filippos Karapetis
693618d89a Slight cleanup
svn-id: r49339
2010-05-31 00:04:38 +00:00