Commit Graph
176 Commits
Author SHA1 Message Date
Martin Kiewitz 0dd760724e SCI32: split up SCI2.1 into EARLY/MIDDLE/LATE
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
2015-12-29 01:44:11 +01:00
Filippos Karapetis 3a29dfaebf SCI: Fix object init in SCI3 scripts which are larger than 64kb 2015-07-13 01:35:26 +03:00
Martin Kiewitz 3b092e5d60 SCI: identifyOffsets() counter variables 2015-05-17 18:51:22 +02:00
Martin Kiewitz 3698ca8cf7 SCI: adjust SCI3 offset identify thx lskovlun 2015-05-15 23:46:25 +02:00
Martin Kiewitz c787560acb SCI: add SCI3 support for debug cmd scro 2015-05-14 20:58:14 +02:00
Martin Kiewitz 3183ef0854 SCI: add said-details to script_said debug cmd 2015-05-14 20:41:21 +02:00
Martin Kiewitz bfab4c4cbe SCI: debug commands scro, scrs and script_said
implement string collecting for SCI3
implement object offset collecting for SCI0-SCI2
implement said-str offset collecting for SCI0-SCI1
add new debug command scro / script_objects
add new debug command script_said
string without terminating NUL now a warning
the latter happens in qfg2 for amiga room 84
2015-05-14 20:33:21 +02:00
Martin Kiewitz f1a75991ed SCI: fix bug in new string identifying code
fixes string identifying in mac SCI1.1 games
2015-05-04 21:50:42 +02:00
Martin Kiewitz ed7007162a SCI: Scripts: identify strings + debug command
debug command is called "script_strings" / "scrs"
2015-05-04 21:19:05 +02:00
Martin Kiewitz cb8e40c116 SCI: QFG3 fix priority of chief in hut bug #5173
this is a script issue and also happens
in Sierra's SCI. Gets solved by script patch.
2015-04-16 01:26:23 +02:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Martin Kiewitz 8bdffcb2fb SCI: script patcher is now a separate class 2013-12-04 20:42:16 +01:00
Martin Kiewitz 3fbbdbc2da SCI: improved script patcher
Gabriel Knight + King's Quest 6 patches now also work for Mac versions of those games
added support for selectors instead of using hardcoded values
2013-11-03 23:49:31 +01:00
Willem Jan Palenstijn 8f754ced42 SCI: Flip assert
This way the assert is checking that the allocated buffer is large enough
for the memcpy that follows it.
2012-10-07 12:27:14 +02:00
Filippos Karapetis cc77688696 SCI: Remove an incorrect error check in validateExportFunc() 2012-06-28 03:29:34 +03:00
Filippos Karapetis 7e66cbd468 SCI: Rename a parameter in validateExportFunc()
This ensures that it won't be confused with a function with the same name
2012-06-26 11:13:14 +03:00
Filippos Karapetis 20b6770808 SCI: Change the program counter (PC) to be a 32-bit variable
This is needed for future support of large SCI3 scripts. The program
counter is isolated and does not interfere with other parts of the VM,
plus it does not get stored in saved games, so it's pretty straightforward
to convert
2012-06-23 21:45:26 +03:00
Filippos Karapetis c1eb93bc5a SCI: Clean up validateExportFunc() and related functions
Also renamed some SCI3 related code to indicate when it's SCI3 specific
2012-06-23 21:45:24 +03:00
Filippos Karapetis 2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Filippos Karapetis a0add53c60 SCI: Change getClassAddress() to only require the caller segment
The caller offset is never actually used inside the function
2012-06-15 22:32:17 +03:00
Filippos Karapetis 041b1447c0 SCI: Replace RAW_IS_OBJECT with a method 2012-06-15 22:32:15 +03:00
Filippos Karapetis 5ca22a1104 SCI: Fix warnings
Thanks to DrMcCoy for reporting them
2012-06-15 22:32:15 +03:00
Filippos Karapetis 160732b2f7 Revert "SCI: Change Script::getObject() to accept a reg_t"
This reverts commit 577d7e41c9.
2012-06-15 22:32:14 +03:00
Filippos Karapetis 562a8a980c SCI: Further cleanup of the script code
Merge the init() and load() Script methods and reset the script when
necessary
2012-06-15 12:53:17 +03:00
Filippos Karapetis 9aaefbd536 SCI: _propertyOffsetsSci3 and classpos should be 32-bit integers
These are needed for future handling of large SCI3 script files
2012-06-15 12:24:18 +03:00
Filippos Karapetis e1ae110860 SCI: Clean up the script initialization code 2012-06-15 12:24:16 +03:00
Filippos Karapetis 577d7e41c9 SCI: Change Script::getObject() to accept a reg_t
This is needed for upcoming changes to the Script class
2012-06-15 12:24:14 +03:00
Filippos Karapetis 9c8ff41181 SCI: Add known large SCI3 scripts 2012-06-14 12:20:41 +03: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 88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Matthew Hoops 9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Willem Jan Palenstijn c01fed7159 SCI: Avoid incrementing lockers of deleted script
Having a deleted script with non-zero lockers had the side effect of
making the deleted script re-appear in the GC's work list, including
any (deleted) objects in the script.

This should be the root cause of bugs #3299458 and #3295849, so
also delete the workaround added for that in 35086fe1.
2011-05-13 23:09:04 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Willem Jan Palenstijn eb8b1a962b SCI: Fix precedence (bug #3087872) 2011-04-20 23:38:28 +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 c3d8f5610f SCI: Fixed script bug #3059871 - "SCI Fanmade - Ocean Battle: Crash while playing" 2011-03-02 08:25:35 +02:00
Filippos Karapetis 2d5dc8c638 SCI: Cleanup
svn-id: r55123
2011-01-04 23:19:04 +00:00
Filippos Karapetis f2234f8ee3 SCI: Fixed part of bug #3150767 - "KQ5 French crash on startup, only partial English text"
This is a regression from r54510

svn-id: r55122
2011-01-04 23:11:19 +00: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
Lars Skovlund f1cd95e462 Simplify SCI3 relocation code, also making it correct.
svn-id: r54985
2010-12-21 15:34:02 +00:00
Filippos Karapetis 3485d433c5 SCI: Fixed bug #3034713 - "ICEMAN Demo: Fails to find base object"
This could happen because objects in scripts can be in the wrong order.
Same thing happens in the French and German version of KQ5 (bug #3035396).
Removed the scriptObjRemove() method, which is in fact a hack.

svn-id: r54510
2010-11-27 18:08:47 +00:00
Filippos Karapetis 7fc171e3bc SCI: Some slight changes to get the "find_callk" console command working in KQ5
- Ignore invalid object in KQ5 script 784
- Script 980 looks to be an unused leftover, as its object contain references to
classes placed in script 988, which is missing

svn-id: r54455
2010-11-24 11:57:11 +00:00
Johannes Schickel b593b15c50 SCI: Slight formatting fix.
svn-id: r54330
2010-11-18 17:25:09 +00:00
Lars Skovlund c5252071db SCI3: Add proper support for the calle instruction
svn-id: r54327
2010-11-18 17:04:00 +00:00
Lars Skovlund 1621e7d5c0 Fix operator precedence problem
svn-id: r54324
2010-11-18 16:58:25 +00:00
Filippos Karapetis ba6de1bcdf SCI: Added sanity checks for SCI3 scripts bigger than 64KB
- Extended the "verify_scripts" console command for SCI3 scripts
- Added a check for such large scripts when scripts are loaded, with
an error for now, till a mechanism to support such scripts with a
16-bit addressing scheme is in place (e.g. overlaying, or splitting
scripts). Either way, such scripts should span over more than one segment

svn-id: r54304
2010-11-17 20:46:59 +00:00
Lars Skovlund e551f3bf33 SCI3: Handle script exports correctly
svn-id: r54302
2010-11-17 20:37:13 +00:00
Max Horn 3d7f7b49fe SCI: Make class table size OB1 workaround slightly more readable
svn-id: r54290
2010-11-17 13:01:58 +00:00
Filippos Karapetis b707d6e7dc SCI: More work on SCI3, based on a patch by lskovlun
- Added SCI3 equivalents for access to object selectors
- Added SCI3 implementation of object relocation
- Added SCI3 implementation of Script::initialiseClasses()

svn-id: r54283
2010-11-17 11:15:52 +00:00
Filippos Karapetis 59ad5085bc SCI: Some more work on SCI3, based on a patch by lskovlun
- Added a SCI3 implementation of Script::load()
- Added a SCI3 implementation of Script::initialiseClasses()
- Removed some duplicate code

svn-id: r54282
2010-11-17 09:28:04 +00:00