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
Filippos Karapetis
a0ee93ece5
SCI: Script exports and synonyms are now initialized when a script is loaded. Removed a sanity check inside script_instantiate_sci0 for a bug which no longer exists
...
svn-id: r49336
2010-05-30 21:49:07 +00:00
Filippos Karapetis
1fd3877ec7
Cleanup
...
svn-id: r49333
2010-05-30 20:18:42 +00:00
Filippos Karapetis
5cdb13b3e8
Made load_script() a member of the Script class
...
svn-id: r49328
2010-05-30 16:38:08 +00:00
Filippos Karapetis
c32e88fe0b
Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
...
svn-id: r49327
2010-05-30 16:14:31 +00:00
Filippos Karapetis
5f2ff0b1e7
Limit access to the _classTable array (now it's directly accessible only inside saveLoadWithSerializer()
...
svn-id: r49318
2010-05-29 23:56:37 +00:00
Max Horn
42d6ed880b
SCI: Make Script::_exportTable const (yay :-)
...
svn-id: r49315
2010-05-29 21:42:42 +00:00
Filippos Karapetis
a6156a6805
Removed the scriptRelocateExportsSci11() hack. The open spell in QFG1VGA works now (thanks to waltervn for all his help on this)
...
svn-id: r49311
2010-05-29 15:29:27 +00:00
Max Horn
0197e9f6a1
SCI: Making various object and script related things const
...
svn-id: r49246
2010-05-26 16:30:10 +00:00
Filippos Karapetis
bfaba64c6a
Made find_unique_script_block() a member of the Script class
...
svn-id: r49241
2010-05-26 14:25:51 +00:00
Filippos Karapetis
60dd310688
Cleanup
...
svn-id: r49227
2010-05-26 06:53:08 +00:00
Filippos Karapetis
9be4f6250c
Made shrink_execution_stack() a member of EngineState
...
svn-id: r49159
2010-05-23 16:44:36 +00:00
Filippos Karapetis
c874ff15a8
Cleaned up the game ID code:
...
- The game ID is now obtained from ScummVM ID directly, not by converting Sierra's internal ID
- Moved the code which reads the internal Sierra ID inside the resource manager
- Moved the code which converts the internal Sierra ID to ScummVM's IDs together with the rest of the detection code
svn-id: r49152
2010-05-23 10:28:03 +00:00
Martin Kiewitz
9b4f352870
SCI: cleanup soundcode - number renamed to resourceId, prio renamed to priority
...
svn-id: r49098
2010-05-19 14:19:16 +00:00
Filippos Karapetis
209798474b
Updated the save game format for the changes in #49093
...
svn-id: r49094
2010-05-19 09:39:11 +00:00
Filippos Karapetis
174a043aa7
Removed the exportsAreWide variable from the segment manager and save games, and moved validateExportFunc() in the Script class, thus resolving a TODO
...
svn-id: r49093
2010-05-19 08:50:24 +00:00
Filippos Karapetis
852cb16c49
Moved the breakpoint information inside the DebugState struct
...
svn-id: r49092
2010-05-19 07:25:06 +00:00
Martin Kiewitz
b05694b529
SCI: fix crash/heap issue when saving games (change was actually made by waltervn)
...
svn-id: r49007
2010-05-11 16:16:49 +00:00
Martin Kiewitz
aaa6e7ee54
SCI: key presses of extended chars (umlauts, etc.) will now get ignored in games that don't support them (which is all non-multilingual games)
...
svn-id: r48693
2010-04-17 20:43:09 +00:00
Max Horn
77592b5690
Fix warning
...
svn-id: r48222
2010-03-10 11:26:27 +00:00
Max Horn
da95a98203
SCI: Stop storing EngineState in SciGui32
...
svn-id: r48117
2010-02-23 22:41:20 +00:00
Filippos Karapetis
07e405588d
Moved the reference to AudioPlayer inside SciEngine (as it doesn't have a state, per se, and is static)
...
svn-id: r48059
2010-02-14 12:23:22 +00:00