aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/vm.cpp
AgeCommit message (Collapse)Author
2010-06-25When loading a game, stop all running VMs recursively, and also stop ↵Filippos Karapetis
kAnimate's current recursion. This fixes the invalid execution stack frame in SQ1, when loading from the death screen after dying from the acid drops in Kerona. This should also fix the invalid hunk pointers, thus the warning about invalid hunk pointers has been turned into an error, as it shouldn't occur anymore svn-id: r50277
2010-06-25Do not allow the VM to run on non-existent scripts (which shouldn't be ↵Filippos Karapetis
happening anymore) svn-id: r50276
2010-06-25Removed all of the non-validating code - there's no real point in removing ↵Filippos Karapetis
script validations svn-id: r50275
2010-06-25SCI: Introduce SciGameId enumMax Horn
svn-id: r50273
2010-06-25SCI: when writing to a temp, check for segment 0xFFFF and remove it. This ↵Martin Kiewitz
fixes a false-positive uninitialized read error in room 44 sq1 svn-id: r50269
2010-06-25Removed the checking of parameters again (it's wrong, as it happens after, ↵Filippos Karapetis
instead of before) and restored the workaround for SQ1 in op_add again svn-id: r50268
2010-06-25SCI: changes to the op GT workaroundMartin Kiewitz
svn-id: r50266
2010-06-25Extended validate_read_var to check for parameters too, and fixed the ↵Filippos Karapetis
uninitialized variable in SQ1 there svn-id: r50263
2010-06-25Added workarounds for two issues which appear when throwing the water at ↵Filippos Karapetis
Orat in SQ1, room 28 svn-id: r50262
2010-06-24SCI: better initialize temp variables with FFFF:0 instead. foreign lsl3 uses ↵Martin Kiewitz
kFileIO(readraw) and then kReadNumber directly. In that case we would produce many warnings because no terminating 0 is found svn-id: r50235
2010-06-24SCI: fixing the tortoisegit commit disaster :PMartin Kiewitz
svn-id: r50231
2010-06-24SCI: removing debug warning to show processes opcodes, accidentaly commitedMartin Kiewitz
svn-id: r50230
2010-06-24SCI: partly reverting r50208, iceman has script code (fred::canBeHere) that ↵Martin Kiewitz
asks for property 380. sierra also returned a zero when going out of bounds (see gregs engine object.cpp, ::getPropertyN - fixes iceman, lsl3 and probably more svn-id: r50229
2010-06-24Fixed the LSL3 binoculars scene again, by fixing the invalid varselector ↵Filippos Karapetis
reference svn-id: r50227
2010-06-24SCI: added uninitialized workaround for sq4cdMartin Kiewitz
svn-id: r50226
2010-06-24Cleanup uninitialized read workaround(s).Matthew Hoops
svn-id: r50225
2010-06-24SCI: added uninitialized read for room 720 in lsl1Martin Kiewitz
svn-id: r50222
2010-06-24Added more information concerning the Dr. Brain uninitialized readFilippos Karapetis
svn-id: r50219
2010-06-24SCI: removing warning for known uninitialized readsMartin Kiewitz
svn-id: r50217
2010-06-24SCI: change fix for island to make it workMartin Kiewitz
svn-id: r50216
2010-06-24SCI: fixed workaround table from r50214 to have a valid terminator, also ↵Martin Kiewitz
added another fix for pharkas svn-id: r50215
2010-06-24SCI: created a workaround table for uninitialized reads, removing old ↵Martin Kiewitz
commented out workarounds for pharkas and laura bow 2 svn-id: r50214
2010-06-24SCI: added currently known object/methodnames in comments for uninitialized ↵Martin Kiewitz
reads svn-id: r50213
2010-06-24SCI: added objectname and method name printed out when uninitialized temps ↵Martin Kiewitz
are read svn-id: r50212
2010-06-24SCI: implement detection for uninitialized temp variable reads and implement ↵Martin Kiewitz
direct fixes for them, i couldnt figure out a valid replacement for island, pharkas and laurabow2 work that way. this should also get changed to a replacement table svn-id: r50211
2010-06-24Turned two hacks inside validate_property() into errors till we find out ↵Filippos Karapetis
where and why they occur (they shouldn't occur). Also turned an error inside send_selector() when argc > 1 into a warning - these are usually script bugs and aren't fatal svn-id: r50208
2010-06-24Fixed script 140 in the Island of Dr. Brain by adding a workaround for it ↵Filippos Karapetis
inside op_link svn-id: r50203
2010-06-22Fixed 2 crashes in QFG1VGA, when dying:Filippos Karapetis
- Ignoring a non-game breaking script bug (modifying the "longSong" object with argc = 2) - Don't pop the callk stack frame if the stack is empty - fixes a crash when restoring from the death screen svn-id: r50157
2010-06-21When loading or restarting, stop script processing if the game is being ↵Filippos Karapetis
loaded or is restarting and the stack position has changed (it's always changed when loading) - fixes the case where the VM is trying to parse an invalid script svn-id: r50121
2010-06-21Add a workaround for a MUMG script bug, MUMG now works again.Matthew Hoops
svn-id: r50117
2010-06-18Added hints inside validate_arithmetic(), together with some code useful for ↵Filippos Karapetis
debugging. Some cleanup svn-id: r50020
2010-06-17Strict mode: Changed several warnings due to logic bugs into errors. If an ↵Filippos Karapetis
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-17SCI: Remove hack related to compiled kernel signatures.Max Horn
Also change some things to comply to our code formatting conventions. svn-id: r49967
2010-06-17Don't show warnings for a known script bug in SQ4CD with the ↵Filippos Karapetis
Sq4GlobalNarrator object svn-id: r49950
2010-06-13Disabled two cases of findObjectByName() in SCI0 early gamesFilippos Karapetis
svn-id: r49639
2010-06-10camelCase changesFilippos Karapetis
svn-id: r49570
2010-06-10Resolved a FIXME with getSciLanguage(), by creating a separate setter. Also, ↵Filippos Karapetis
some camelCase changes svn-id: r49568
2010-06-10Use the SELECTOR() macro for readabilityFilippos Karapetis
svn-id: r49563
2010-06-10Moved all of the game init/run/exit logic inside the SciEngine classFilippos Karapetis
svn-id: r49559
2010-06-09Merged script_init_engine() and game_init() and cleaned up SciEngine::run() ↵Filippos Karapetis
a bit svn-id: r49537
2010-06-09Globals from script 0 are now initialized in script_init_engine(), and are ↵Filippos Karapetis
accessed from the relevant variables pointer. Removed direct reference to script 0 from the engine state svn-id: r49536
2010-06-09Merged restAdjust and restAdjustCur, as we don't save the restAdjust ↵Filippos Karapetis
modifier inside saved games (rightfully so). Also, the segment manager is now reset inside the main loop, when the game is restarted, not in game_exit() svn-id: r49533
2010-06-08CleanupFilippos Karapetis
svn-id: r49521
2010-06-08Merged the restarting_flags, script_abort_flag, and restoring members of the ↵Filippos Karapetis
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-08Merged _game_run() inside game_run(). Some cleanupFilippos Karapetis
svn-id: r49513
2010-06-07Fixed regression from commit #49465 - there are in fact two restAdjust ↵Filippos Karapetis
variables, the current and global one svn-id: r49486
2010-06-06Now that EngineState is not deleted when loading games, we can move some ↵Filippos Karapetis
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-01Stop reconstructing the engine state when restoring, but reset it insteadFilippos Karapetis
svn-id: r49376
2010-05-31Fixed operator precedence warningFilippos Karapetis
svn-id: r49353
2010-05-31The code that loads saved game from the launcherFilippos Karapetis
can now load SCI2 saved games. Added an explanation why the injected call is necessary svn-id: r49349