Martin Kiewitz
e5f22da051
SCI: added objectname and method name printed out when uninitialized temps are read
...
svn-id: r50212
2010-06-24 12:25:47 +00:00
Martin Kiewitz
f93ca1e424
SCI: implement detection for uninitialized temp variable reads and implement 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-24 11:54:33 +00:00
Filippos Karapetis
afffcec96e
Turned two hacks inside validate_property() into errors till we find out 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-24 11:29:26 +00:00
Filippos Karapetis
bbb29e2650
Fixed script 140 in the Island of Dr. Brain by adding a workaround for it inside op_link
...
svn-id: r50203
2010-06-24 07:54:02 +00:00
Filippos Karapetis
3a394793b6
Fixed 2 crashes in QFG1VGA, when dying:
...
- 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-22 18:25:15 +00:00
Filippos Karapetis
97dd94019c
When loading or restarting, stop script processing if the game is being 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-21 20:17:59 +00:00
Matthew Hoops
9ecbffe11a
Add a workaround for a MUMG script bug, MUMG now works again.
...
svn-id: r50117
2010-06-21 15:51:04 +00:00
Filippos Karapetis
874eeb2370
Added hints inside validate_arithmetic(), together with some code useful for debugging. Some cleanup
...
svn-id: r50020
2010-06-18 14:48:39 +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
Max Horn
78cd1aa145
SCI: Remove hack related to compiled kernel signatures.
...
Also change some things to comply to our code formatting conventions.
svn-id: r49967
2010-06-17 23:13:54 +00:00
Filippos Karapetis
701d69d6e2
Don't show warnings for a known script bug in SQ4CD with the Sq4GlobalNarrator object
...
svn-id: r49950
2010-06-17 20:52:53 +00:00
Filippos Karapetis
01d53a6216
Disabled two cases of findObjectByName() in SCI0 early games
...
svn-id: r49639
2010-06-13 22:01:10 +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
eb4ec596cd
Use the SELECTOR() macro for readability
...
svn-id: r49563
2010-06-10 09:18:57 +00:00
Filippos Karapetis
9b8e4e8359
Moved all of the game init/run/exit logic inside the SciEngine class
...
svn-id: r49559
2010-06-10 07:32:05 +00:00
Filippos Karapetis
2c629a04dd
Merged script_init_engine() and game_init() and cleaned up SciEngine::run() a bit
...
svn-id: r49537
2010-06-09 10:45:54 +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
10aeb33a42
Merged restAdjust and restAdjustCur, as we don't save the restAdjust 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-09 07:32:17 +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
67690e89a3
Merged _game_run() inside game_run(). Some cleanup
...
svn-id: r49513
2010-06-08 18:44:27 +00:00
Filippos Karapetis
2c950b321c
Fixed regression from commit #49465 - there are in fact two restAdjust variables, the current and global one
...
svn-id: r49486
2010-06-07 15:14:58 +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
b5a2e3c758
Fixed operator precedence warning
...
svn-id: r49353
2010-05-31 12:43:28 +00:00
Filippos Karapetis
cc025ace18
The code that loads saved game from the launcher
...
can now load SCI2 saved games. Added an explanation
why the injected call is necessary
svn-id: r49349
2010-05-31 12:13:50 +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
67de5b1bd3
Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
...
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase
svn-id: r49317
2010-05-29 23:37:15 +00:00
Filippos Karapetis
5b12fda059
Added some more info when severe script errors occur
...
svn-id: r49293
2010-05-28 12:37:54 +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
65fa2f5af8
Formatting
...
svn-id: r49233
2010-05-26 10:37:54 +00:00
Filippos Karapetis
1bee6daff0
Added more info to the warning thrown when argc > 1 while modifying a variable selector in send_selector()
...
svn-id: r49232
2010-05-26 10:35:54 +00:00
Filippos Karapetis
9a66bfb575
After running some tests, it appears that modifying argc inside send_selector() was a bad idea. Reverting the relevant code, and putting the warning back, with some extra comments
...
svn-id: r49231
2010-05-26 09:59:40 +00:00
Filippos Karapetis
1818fa137f
Silence a warning inside send_selector(): argc > 0 means "write selector". Added code do make sure that argc is always either 0 or 1 when referencing variable selectors (this isn't strictly necessary, but better safe than sorry...). Some cleanup
...
svn-id: r49230
2010-05-26 09:33:33 +00:00
Filippos Karapetis
1c0bbb10cb
More work on controlling access to members of the Object class:
...
- Moved the code for initializing the object class, species and base object inside the Object class
- Made propertyOffsetToId() a method of the Object class
- Made relocateObject() a method of the Object class
- The Object getVariable() method now returns a reference to the requested variable
Only SegManager::reconstructScripts() is left needing direct access to the members of the Object class
svn-id: r49228
2010-05-26 08:27:24 +00:00
Filippos Karapetis
7cd9a23c0d
Remove the unused SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE flag
...
svn-id: r49161
2010-05-23 17:03:16 +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
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
Filippos Karapetis
46af5a5162
- Moved kernel_lookup_text inside the Kernel class
...
- Added a pointer to the segment manager from within the Kernel class, thus simplifying the calls to it
svn-id: r49076
2010-05-18 12:16:48 +00:00
Filippos Karapetis
75f4791a4a
- Moved determine_reg_type() and kernel_matches_signature() inside the Kernel class, where they belong
...
- Moved the kernel signature defines inside kernel.h
- Removed some unused references to EngineState
svn-id: r49075
2010-05-18 11:23:13 +00:00
Filippos Karapetis
8b7c29a4ad
Moved breakpointWasHit inside the DebugState struct, thus resolving a FIXME
...
svn-id: r49071
2010-05-18 09:18:27 +00:00
Matthew Hoops
3dda73d9a2
Add initial support for KQ6 Mac. Wrapper functions for read/writing to pointers are now used (found in util.*) for code that has different endianness in SCI1.1+ Mac games. Add support for Mac 'snd ' and 'CURS' resources. QFG1 Mac is not yet playable due to script compression.
...
svn-id: r49070
2010-05-18 04:17:58 +00:00
Max Horn
970745e60c
Move DebugChannel related code to new header
...
svn-id: r48935
2010-05-04 11:59:22 +00:00
Max Horn
460d69e885
COMMON: Move DebugChannel stuff into a new DebugMan singleton
...
svn-id: r48821
2010-04-27 21:40:52 +00:00
Torbjörn Andersson
65585f6433
Silenced some harmless cppcheck warnings about unreachable code after a return.
...
In this case, it was always a break after a return in a switch case. There are
similar cases which cppcheck didn't detect, and a couple of cases where we have
a break after a continue in a switch case (where the continue refers to an
outer loop), but I didn't touch those. Not yet, at least.
svn-id: r48218
2010-03-10 06:39:23 +00:00
Max Horn
e45f0f309a
SCI: Remove EngineState::_kernel, use SciEngine::_kernel instead
...
svn-id: r48050
2010-02-13 17:45:40 +00:00
Max Horn
9575cc08a2
SCI: Move GameFeatures from EngineState to SciEngine
...
svn-id: r48049
2010-02-13 17:44:58 +00:00