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
Max Horn
a82939c9be
SCI: Get rid of EngineState::resMan
...
svn-id: r48048
2010-02-13 17:44:19 +00:00
Max Horn
ac4d325e0d
SCI: Add global g_sci pointer to the active SciEngine instance
...
svn-id: r48046
2010-02-13 17:42:49 +00:00
Walter van Niftrik
a3a07f19fc
SCI: Revert r47929 (bad idea, as we may run out of offsets). Instead, adapt SCI32 list iteration code to store node successor before invoking.
...
svn-id: r48036
2010-02-12 02:23:28 +00:00
Max Horn
024e762bdb
SCI: Move bulk of op_callk code to new func callKernelFunc()
...
svn-id: r47979
2010-02-07 17:57:51 +00:00
Max Horn
95b90fc40d
SCI: cleanup; try to unify var names when reading PMachine instructions a bit
...
svn-id: r47978
2010-02-07 17:57:25 +00:00
Max Horn
2cc301e449
SCI: Simplify yet another case of weird 'unsigned to signed' conversion
...
svn-id: r47977
2010-02-07 17:56:57 +00:00
Max Horn
e0218d1ba3
SCI: Get rid of GET_OP_ macros
...
svn-id: r47957
2010-02-07 12:14:26 +00:00
Max Horn
3b4c54f0e5
SCI: Add function readPMachineInstruction()
...
svn-id: r47956
2010-02-07 12:13:59 +00:00
Walter van Niftrik
742ddb7979
SCI: Run GC only when execution_stack_base is 0.
...
svn-id: r47929
2010-02-06 12:50:50 +00:00
Filippos Karapetis
2fb37063a4
Placed all the game feature detection code in a separate class
...
svn-id: r47850
2010-02-03 11:02:43 +00:00
Max Horn
09046947d4
SCI: Make add_exec_stack_entry & add_exec_stack_varselector static / private
...
svn-id: r47837
2010-02-03 01:34:39 +00:00
Max Horn
4ecaf4d4ac
SCI: restoring param of run_vm is a bool, not an int
...
svn-id: r47834
2010-02-03 01:33:23 +00:00
Max Horn
bb5e34a014
SCI: Get rid of EngineState::stack_segment
...
svn-id: r47833
2010-02-03 01:32:59 +00:00
Max Horn
b2d69649f7
SCI: Rearrange members of class EngineState
...
svn-id: r47832
2010-02-03 01:32:27 +00:00
Max Horn
4b19acf255
SCI: Use Common::List and Common::String to simplify breakpoint handling (untested)
...
svn-id: r47824
2010-02-02 22:52:41 +00:00
Max Horn
6c322506dd
SCI: Move some code around (no code changes)
...
svn-id: r47823
2010-02-02 22:50:32 +00:00
Filippos Karapetis
8b9cdd671f
Removed an unused parameter from _game_run()
...
svn-id: r47734
2010-01-31 01:15:05 +00:00
Filippos Karapetis
4a4b69dbeb
Fixed loading of saved games
...
svn-id: r47729
2010-01-30 23:40:29 +00:00
Max Horn
87856c545c
SCI: Don't mess with save_slot just to be able to decide whether we already honored a load request or not
...
svn-id: r47726
2010-01-30 19:08:00 +00:00
Max Horn
4f4b559d1c
SCI: Correct comments which talked about 'loading from GMM' when they really meant 'loading from launcher'
...
svn-id: r47725
2010-01-30 19:06:24 +00:00
Max Horn
d0bcf4d281
SCI: Mark scriptState as one of the many evil global vars in the SCI engine
...
svn-id: r47724
2010-01-30 19:04:21 +00:00
Willem Jan Palenstijn
06bd17ee71
SCI: Remove extra '\n's in debugC messages
...
svn-id: r47707
2010-01-30 11:59:05 +00:00
Willem Jan Palenstijn
9449585893
Fix warning
...
svn-id: r47706
2010-01-30 11:17:08 +00:00
Filippos Karapetis
28aee9c5f3
Silenced a very annoying warning
...
svn-id: r47704
2010-01-30 07:11:38 +00:00