Commit Graph
110 Commits
Author SHA1 Message Date
Eugene Sandulenko 7e298f13a1 SCI: Fix copy/paste error 2011-11-03 01:06:56 +00:00
Filippos Karapetis 7708a4ddbb SCI: Added some hacks related to new functionality in Phantasmagoria 2
The game will now start (but won't do anything exciting - it'll display
its main menu, which doesn't work yet)
2011-10-18 03:10:19 +03:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Filippos Karapetis 32d7e687ee SCI: debugC calls no longer require a debug level of 2 to show output
svn-id: r55086
2011-01-01 12:48:12 +00:00
Filippos Karapetis d44a105e7f SCI: Disable continuous list checking by default
svn-id: r55085
2011-01-01 12:43:09 +00:00
Filippos Karapetis 5a3ed29a4b SCI: Changed the check for NULL values inside kArray(Cpy) to only ignore such values in SCI3
svn-id: r55002
2010-12-22 13:17:19 +00:00
Filippos Karapetis 7680ed0be7 Added back the null check in kArray(cpy): it happens in SCI3
svn-id: r54990
2010-12-21 20:54:33 +00:00
Filippos Karapetis de2ef2edc0 SCI: Removed the system strings code and replaced it with a much more simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
2010-12-07 00:47:05 +00:00
Filippos Karapetis ac7c488c7c SCI: kArray wasn't changed in late SCI2.1/SCI3 games (thanks to waltervn)
svn-id: r54402
2010-11-21 02:06:20 +00:00
Filippos Karapetis cd69472be9 SCI: Adapted kArray/kString to use the new heuristic for late SCI2.1/SCI3 games, and updated their subops accordingly
svn-id: r54399
2010-11-21 00:47:56 +00:00
Filippos Karapetis 5d53673e93 SCI: Also send system strings to kString(). This makes LSL7 continue into the actual game! :D
svn-id: r54377
2010-11-19 13:23:20 +00:00
Lars Skovlund 84d4a4a89f Implement a couple of NULL checks in kArray
svn-id: r54373
2010-11-19 12:49:46 +00:00
Filippos Karapetis 6ec8ec416b SCI: Added support for script -> string copying (used by late SCI2.1 and SCI3 games)
svn-id: r54364
2010-11-19 10:27:22 +00:00
Filippos Karapetis c2bdba2ea6 SCI2: Treat SCI2 raw arrays (type 3) as strings in kArray
SCI2 strings inherit from arrays, plus kArray and kString are almost the
same, so this is all possible. This is needed, as SCI scripts copy 
strings on arrays and then process them as such (e.g. in RAMA and LSL7)
However, we really need to merge SCI2 array types with the SCI2 string
types, and ultimately merge the code with the SCI1 array and string types.

svn-id: r54340
2010-11-18 19:18:11 +00:00
Filippos Karapetis bd844a8c92 SCI: Call lookupArray() after allocateArray() when duplicating arrays
This ensures that the pointer to the element that lookupArray() returned
won't be invalidated in case the array is reallocated because of
allocateArray() - same issue as in kClone()

svn-id: r54306
2010-11-17 21:47:05 +00:00
Filippos Karapetis 98a8c01dbb SCI: Fixed bug #3038433 - "HOYLE1: Crashes"
svn-id: r52182
2010-08-18 07:14:17 +00:00
Filippos Karapetis 50c2fbbb48 SCI: Also allow checkListPointer() to check the result of lookupNode() itself
svn-id: r51156
2010-07-22 18:13:05 +00:00
Filippos Karapetis b4a704c342 SCI: allow isSaneNodePointer to handle invalid node references itself
svn-id: r51153
2010-07-22 17:41:42 +00:00
Filippos Karapetis 9862f3fe24 SCI: Moved the SCI32 kernel functions out of kernel32.cpp and into their respective files
svn-id: r51108
2010-07-21 21:18:21 +00:00
Martin Kiewitz cb4072f978 SCI: added special case for iceman when plotting course inside isSaneNodePointer
svn-id: r50960
2010-07-17 13:27:07 +00:00
Filippos Karapetis 2bfee401d2 SCI:
- Split SCI2 from SCI2.1 signature checks
- Added signature checking for the subops of the SCI2.1 kernel call kList
- Added support for calls to kAddToFront and kAddToEnd with 3 parameters (unimplemented code uncovered by the signature checks)
- Added a FIXME for a potential incorrect subop (uncovered by the signature checks), which might be related to the crashes in the demo of Torin's Passage

svn-id: r50861
2010-07-14 00:57:48 +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 b85fd471a6 Added support for kAddAfter with 4 parameters (used in Torin's Passage, for example)
svn-id: r50537
2010-06-30 17:36:52 +00:00
Filippos Karapetis cb897a1a15 Changed an error back to a warning - Torin's Passage calls kAddAfter with 4 parameters, and we don't know what the 4th parameter is yet
svn-id: r50528
2010-06-30 11:08:23 +00:00
Filippos Karapetis 8752eed8f2 SCI: Reverting r50516, SSCI didn't reset the node value when deleting the node. Also, a slight fix in VM debug code.
svn-id: r50521
2010-06-30 09:51:21 +00:00
Filippos Karapetis 1e8b74f9de Updated incorrect comment
svn-id: r50517
2010-06-30 07:34:37 +00:00
Filippos Karapetis 7c5b31eb6d Also erase the value of the list node itself when deleting it inside kDeleteKey, as it might be referenced again before the GC is invoked
svn-id: r50516
2010-06-30 07:28:30 +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
Max Horn 8ae9774a00 SCI: Turn more warnings into errors.
If one of these is triggered for you, you can add an exception to
the error, together with a comment explaining why this exception
is necessary. Ideally after verifying that the cause is a script
bug and not a bug in our code...

svn-id: r50442
2010-06-28 12:29:06 +00:00
Filippos Karapetis 4785e1fd3f Renamed some variables
svn-id: r50284
2010-06-25 19:09:19 +00:00
Filippos Karapetis 0fb5429318 Initialize the stack with 'S' or 's' characters, like SSCI does (ultimately, we should not change the stack again like we do in op_link - this is what Sierra is doing). Some cleanup
svn-id: r50207
2010-06-24 09:52:08 +00:00
Filippos Karapetis 01cb1cf011 Turned more warnings into errors, some cleanup
svn-id: r49990
2010-06-18 02:03:28 +00:00
Filippos Karapetis 39e77edbb7 Process kAddAfter with 4 parameters (Torin's Passage)
svn-id: r49976
2010-06-18 00:05:41 +00:00
Filippos Karapetis a4ac9347d4 Fixed regression from commit #49251, and added an explanation. Calls to kNewNode with 1 parameter are handled properly again. Fixes the demo of Phantasmagoria 1. Thanks to lskovlun and waltervn for spotting this
svn-id: r49638
2010-06-13 21:43:13 +00:00
Filippos Karapetis cc6f5eb3e4 Unified invokeSelector() and invokeSelectorArgv(), and removed the INV_SEL kludge. Also, removed the selectorInvocation parameter - if invokeSelector() fails, the error is in most cases unrecoverable, and the error description thrown covers all cases where kContinueOnInvalidSelector was used. This uncovered a bug too: in some places, non reg_t parameters were parsed
svn-id: r49564
2010-06-10 09:22:30 +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 2c2a1fa1ba Made _k_new_node() a method of the segment manager, and fixed a bug with the rarely used SCI0 kernel function kSort in the process (_k_new_node was called with key, value instead of value, key inside kSort)
svn-id: r49251
2010-05-26 22:05:51 +00:00
Max Horn 38bf3d0d3c SCI: Make EngineState parameter to INV_SEL explicit
svn-id: r48202
2010-03-08 21:54:07 +00:00
Max Horn 5e8743d0d6 SCI: Made some stuff static
svn-id: r48199
2010-03-08 20:12:17 +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
Filippos Karapetis 788f375703 Added a sanity check for kListAt and made the hack for displaying text work in SCI2 only
svn-id: r47931
2010-02-06 16:12:19 +00:00
Max Horn f86618f92b SCI: Add a 'SELECTOR' macro
svn-id: r47918
2010-02-05 22:55:18 +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
Max Horn 4ffec28103 SCI: Move selector stuff to new header; reorder k_argc & k_argp param of invoke_selector
svn-id: r47665
2010-01-29 11:03:54 +00:00
Filippos Karapetis a83fca1430 kDisposeList() is not needed according to waltervn, as the garbage collector automatically clears unused objects
svn-id: r47653
2010-01-28 21:05:42 +00:00
Filippos Karapetis 3c46bc33aa Disabled the automatic list fixing feature, introduced in rev. #47636 (there's no point in fixing lists created by game scripts)
svn-id: r47650
2010-01-28 20:53:33 +00:00
Walter van Niftrik 639fb4c389 SCI: Cleanup
svn-id: r47649
2010-01-28 20:29:45 +00:00
Lars Skovlund 1ceaf34948 Handle calls to NewNode() with just one parameter.
Takes care of Phantasmagoria, Torin, etc.

svn-id: r47643
2010-01-28 15:01:28 +00:00
Filippos Karapetis a408a025b6 Since we fix the list problems inside isSaneNodePointer(), don't abort processing of the list
svn-id: r47637
2010-01-28 10:04:54 +00:00
Filippos Karapetis 383019c518 - The list checks now throw more verbose warnings
- Some obvious list problems are now fixed automatically when found, after the relevant warnings are shown
- kDisposeList now clears all the nodes in the list
- Some cleanup

svn-id: r47636
2010-01-28 09:49:54 +00:00