Willem Jan Palenstijn
71566a4307
SCI: Fix style
2011-11-11 00:16:57 +01:00
Willem Jan Palenstijn
8c57e4bf43
SCI: Fix const cast
2011-11-11 00:07:27 +01:00
Filippos Karapetis
5969c6bd2e
SCI: Updated Script::getObjectMap()
...
It now returns a reference to the object list instead of copying it
2011-11-05 13:08:42 +02:00
Filippos Karapetis
58190c36b4
SCI: Made the object map hashmap of the Script class private
2011-11-05 10:07:03 +02:00
Filippos Karapetis
267c6f1756
SCI: Made more fields of the Script class private. Some cleanup.
2011-11-05 03:00:42 +02:00
Max Horn
529919e20b
SCI: Remove dead code
2011-08-08 20:33:42 +02:00
Matthew Hoops
9539017ee3
ALL: initialise -> initialize
2011-05-25 11:17:11 -04:00
Matthew Hoops
eea482fa43
ALL: behaviour -> behavior
2011-05-25 10:50:46 -04:00
strangerke
69b1485a22
GIT: Clean up: Suppress SVN tags, now useless
2011-05-12 01:16:22 +02:00
md5
ca1f9a075f
SCI: Got rid of VERIFY() and removed some newlines in error messages
2011-03-14 20:00:26 +02:00
md5
0929d1e12d
SCI: Don't try to uninstantiate scripts marked as deleted
...
Trying to delete a script marked as deleted should do nothing. Hoyle 3
tried to uninstantiate scripts more than once, and we incorrectly
decreased the reference count of associated scripts more than once,
thereby killing them. This properly fixes bug #3038837 (removed the
hack for it). Many many thanks to wjp for his help on this :)
2011-03-10 19:18:37 +02:00
md5
5c504739bd
SCI: Removed unnecessary parameter from deallocate()
2011-03-09 23:33:26 +02:00
Walter van Niftrik
f96e93047a
SCI: Use BE string handling for Mac games.
2011-03-04 21:12:00 +01:00
md5
4314a61ab4
SCI: Fixed a issue with signed characters in setChar()
...
This was visible in the password of LSL5 Amiga. Thanks to waltervn for
finding this
2011-03-04 14:26:23 +02:00
md5
0d555c497d
SCI: Moved hunk pointer handling to the GC, and removed some related workarounds
...
SCI scripts can contain stale pointers, which are used later on. We now delete
the contents of hunk entries without invalidating the relevant pointers and let
the GC clear the references. Many thanks to waltervn and wjp for all their work
and help on this.
2011-02-28 15:56:03 +02:00
Walter van Niftrik
386203a3d6
SCI: Do not try to dereference object name when it's not a pointer.
...
Stops flood of warnings in some Mac titles.
svn-id: r55849
2011-02-09 00:27:50 +00:00
Matthew Hoops
4088e735a9
SCI: Properly reset the array/string segment ids
...
svn-id: r55749
2011-02-03 04:06:22 +00:00
Filippos Karapetis
aa15235858
SCI: Slight cleanup
...
svn-id: r54925
2010-12-15 23:35:21 +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
0b5f6d4c97
SCI: Fixed bug #3034471 - "SCI, Castlebrain/Amiga: Invisible text in word search"
...
Fixed some endianness issues in Amiga versions, thanks to wjp. Amiga
versions expect a BE VM, thus we adjust accordingly in the places
where memory is accessed directly (i.e. kStrAt, kMemory and all places
that set/get characters from memory)
svn-id: r54521
2010-11-28 14:57:56 +00:00
Filippos Karapetis
e8e23a83e9
SCI: Removed the Shivers 2 hack from the segment manager (it isn't SCI)
...
svn-id: r54174
2010-11-09 22:20:36 +00:00
Filippos Karapetis
1a85ce8e03
SCI: Some slight work on SCI3
...
- Enabled the SCI3 game entries for testing purposes
- The resource manager is initialized fully now (with a slight hack)
- Added a hack for the demo of Shivers 2 (which seemingly has no
scripts or vocabularies)
- The engine will stop before parsing any game scripts in SCI3 games,
and opens the console for resource manager-related functionality
svn-id: r54167
2010-11-09 19:37:42 +00:00
Max Horn
ba3e826872
SCI: Remove any use of printf
...
svn-id: r54037
2010-11-02 09:49:47 +00:00
Filippos Karapetis
ce657cc0dc
SCI: Changed the script protection code to be a hack for Hoyle 3 only
...
This shouldn't be happening normally, but apparently it does, which would indicate
a potential issue with the object locking code
svn-id: r52703
2010-09-13 13:47:56 +00:00
Filippos Karapetis
e242814990
SCI: Proper fix for bug #3038837 - "HOYLE3: EGA/VGA Crashes" and some cleanup
...
System scripts (i.e. 0 and 900-999) are now protected and never destroyed during a
game
svn-id: r52702
2010-09-13 13:17:55 +00:00
Filippos Karapetis
3daf588e08
SCI: Janitorial - fixed spaces and typos
...
svn-id: r52527
2010-09-04 17:16:41 +00:00
Martin Kiewitz
83e51b0e92
SCI: removing pirated sq4 version from detection
...
"fixes" bug #3037800
fixing warning in seg_manager
svn-id: r51576
2010-08-01 12:38:07 +00:00
Filippos Karapetis
9699f8291d
SCI: Ignoring non-critical script bug in QFG1VGA, when closing any conversation dialog with esc (doesn't affect gameplay in any manner)
...
svn-id: r51572
2010-08-01 11:10:14 +00:00
Filippos Karapetis
634d959897
SCI: Fixed the crash in LSL2, room 42 (when arriving at the island). kAnimate may refer to unfrozen objects which have been deleted, thus handle that case accordingly.
...
svn-id: r51152
2010-07-22 17:25:21 +00:00
Filippos Karapetis
dcb92c8352
Add checks for null reference to strncpy() and strlen() - happens for example when trying to talk to inanimate objects in KQ6
...
svn-id: r50596
2010-07-02 10:38:42 +00:00
Filippos Karapetis
b252d5f0b9
getString() on a NULL pointer is an empty string (verified in SCI2.1)
...
svn-id: r50591
2010-07-02 08:53:51 +00:00
Matthew Hoops
8b0f49b801
Only print the ambiguous object notice in findObjectByName if we didn't specify an index.
...
svn-id: r50584
2010-07-01 23:13:42 +00:00
Max Horn
b8904a48ed
SCI: Make SegManager::_heap private
...
svn-id: r50552
2010-07-01 16:05:29 +00:00
Max Horn
36799dc83f
SCI: Add SegManager::getSystemString() method
...
svn-id: r50550
2010-07-01 16:04: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
Max Horn
e309f05162
SCI: Simplify SegManager::findObjectByName
...
svn-id: r50548
2010-07-01 16:04:04 +00:00
Max Horn
b3011faaef
SCI: Make various SegManager const
...
svn-id: r50439
2010-06-28 12:28:12 +00:00
Max Horn
30218a2c32
SCI: Make Script member vars private; add const qualifiers
...
Only three Script members remain public (for now)
svn-id: r50428
2010-06-28 11:22:20 +00:00
Filippos Karapetis
4a60ff4090
Made the script initialization/uninitialization methods part of the segment manager
...
svn-id: r50402
2010-06-27 21:18:19 +00:00
Filippos Karapetis
bb992b0b93
SCI: Moved all the script-related code inside script.cpp/.h, and all script opcode-related code inside vm.cpp/.h
...
svn-id: r50396
2010-06-27 20:38:43 +00:00
Filippos Karapetis
4785e1fd3f
Renamed some variables
...
svn-id: r50284
2010-06-25 19:09:19 +00:00
Filippos Karapetis
784f52a677
Removed the getHunkPointer error - it's valid SCI behavior (e.g. when loading/quitting sometimes, since hunks are not saved). We check for valid hunk pointers anyway, so there's no reason for the warning/error
...
svn-id: r50279
2010-06-25 17:59:49 +00:00
Filippos Karapetis
aedc77f0bd
When loading a game, stop all running VMs recursively, and also stop 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-25 17:25:00 +00:00
Martin Kiewitz
aa3bfe5489
SCI: doing the exact opposite of r50236 code-wise now, as it was meant to be
...
svn-id: r50237
2010-06-24 21:46:57 +00:00
Martin Kiewitz
f014c9ed7e
SCI: ignore segment 0xFFFF in segmanager getchar, when offset > 1 - so we dont write a warning, if the scripts use some uninitialized temp variable as terminator
...
svn-id: r50236
2010-06-24 21:42:08 +00:00
Martin Kiewitz
35b5da7e0f
SCI: reverting r50232, didnt make sense. thx @ wjp for noticing
...
svn-id: r50233
2010-06-24 20:52:35 +00:00
Martin Kiewitz
893429d092
SCI: correctly put NUL inside SegManager::strncpy() even when using n = 0xFFFFFFFFU
...
svn-id: r50232
2010-06-24 20:40:57 +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
680f7c897a
Fixed a problem in kAnimate which occurred when a list was modified by a call (e.g. in KQ1 demo, PQ2)
...
svn-id: r50022
2010-06-18 15:40:18 +00:00
Filippos Karapetis
7a22e491e3
Marked the KQ1 demo workaround as a workaround
...
svn-id: r49985
2010-06-18 01:29:07 +00:00