Commit Graph
81 Commits
Author SHA1 Message Date
sluicebox 0069281c09 SCI: Fix SQ4CD hintbook text layout
Fixes #11070
2019-08-12 09:27:35 +03:00
sluicebox 5bb9174ad7 SCI: Fix regression in message workarounds
Reverts an unintended change to the message recursion loop introduced in
56ea963cea that breaks the message stack
2019-06-16 02:57:34 -07:00
sluicebox 56ea963cea SCI: Create message workaround system
Adds a new workaround system for known broken messages and their
corresponding audio and sync resources. This replaces all special
cases in c++ and several script patches with data structures and
generic handling.

Common message bugs:
- Wrong tuple requested by game script
- Wrong tuple in message resource
- Wrong message text that exists in another record
- Missing message text
- Audio or sync resource with different tuple than message
2019-06-09 15:35:57 -07:00
sluicebox 4dda6324b8 SCI: Fix FPFP CD 'Dummy Msg' message texts
Fixes 17 message texts, bug #10964
2019-05-26 13:01:25 +03:00
Vhati 77d06397f5 SCI32: Fix QFG4 statue item description
Fixes an inaccurate message when examining the statue, bug #10770
2018-12-29 11:46:54 +02:00
Vhati 2d75c6b271 SCI32: Fix QFG4 Rusalka flowers dialogue
Fixes mixed up text/audio when giving her flowers, bug #10849
2018-12-28 18:11:31 +02:00
Filippos Karapetis 8d4330a217 SCI: Add some TODOs for better handling of wrong / missing resources 2018-12-02 23:58:44 +02:00
sluicebox 0fee5b3ec5 SCI: Fix LB2 Yvette/Tut premature murder message
Fixes wrong message in floppy versions, bug #10723
2018-10-08 02:39:00 +03:00
Filippos Karapetis 27d9cd3281 SCI32: Fix a crash when talking with the Leshy in QFG4
Fixes bug #10137
2018-08-28 02:04:46 +03:00
Colin Snover 743082ac8c SCI32: Disable all SCI32 Mac code
This code is currently untestable and is almost certainly at least
partly based on guesswork & not actual reverse-engineering (as was
the case for all other pre-2015 SCI32 code), so future developers
interested in adding SCI32 Mac support should use it only as an
intermediate reference rather than as known good code.
2017-09-24 22:56:59 -05:00
Colin Snover a233696212 SCI: Update formatting strings to match updated Span API 2017-03-30 14:23:41 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover 10d97ce379 SCI: Fix more unsafe C-string usage 2017-02-05 12:38:21 -06:00
Willem Jan Palenstijn 2fe167afc3 SCI: Rename hexDigitToInt to indicate it's intentionally broken 2016-10-26 22:59:33 +02:00
Colin Snover eb6fa08311 SCI: Implement SSCI bug in hexadecimal escape sequences
In SSCI, strchr is called against a hex string with a duplicate 0
("01234567890abcdef") to determine the decimal value of hex digits,
which means the values A-F are incorrectly interpreted as 11-16
instead of 10-15.

All versions of SSCI with support for hexadecimal escape sequences
in messages (starting somewhere around Feb 1993) are buggy.

The native save/load dialog of SCI32 relies on this defect to
render the up and down arrows of the game selector.

Fixes Trac#9582.
2016-10-25 20:05:12 -05:00
Colin Snover 3f91726765 SCI32: Rewrite kArray & kString
This change invalidates earlier SCI32 save games, which separated
arrays and strings in an incompatible manner. Old save games
contain invalid references to a string segment which no longer
exists, and contain incompatible array structures that lack
critical type information.
2016-09-29 19:39:16 -05:00
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
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis abef7f64bd SCI: Fix a non-initialized variable in MessageReader - CID 1003120 2013-05-01 01:51:11 +03:00
Willem Jan Palenstijn 2c9fe1d2c6 SCI: Fix memory leak 2013-04-15 21:40:11 +02:00
Filippos Karapetis 5539323e16 SCI: Fix two script bugs in PQ1 (message tuple typos) - bug #3605654 2013-03-30 13:58:53 +02:00
Filippos Karapetis 61ec6c998f SCI: Fix bug #3538416 - "SCI: SQ4 CD text glitches in introduction" 2013-02-17 20:45:16 +02:00
Filippos Karapetis d830b27404 SCI: Fix bug #3604944 - "SCI: QFG1VGA: Missing dialogue when speaking to Kaspar" 2013-02-17 20:44:31 +02:00
Filippos Karapetis 4ced5ccf30 SCI: Handle calls from MessageState::outputString() to arrays
This happens during the intro of LSL6 hires (room 110)
2012-07-05 13:58:43 +03:00
Tarek Soliman a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Matthew Hoops 7c3d65912d SCI: Fix GK1 Mac messages
svn-id: r55750
2011-02-03 05:10:24 +00:00
Max Horn e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Johannes Schickel 92b0b384ea SCI: Fix memory leak.
svn-id: r51669
2010-08-02 22:35:29 +00:00
Filippos Karapetis 5d72193c51 Oops, removed leftover code
svn-id: r51457
2010-07-29 08:03:16 +00:00
Filippos Karapetis c40b9801df SCI: Silenced warning when exiting in LSL6 (bug report #3035533), and commented out a related unused variable in kSetQuitStr
svn-id: r51456
2010-07-29 07:58:48 +00:00
Martin Kiewitz 3c6639eb86 SCI: implemented kPalVary(reverse) for pharkas, although there is a bug somewhere, not working 100%
svn-id: r50089
2010-06-20 18:20:05 +00:00
Filippos Karapetis 9c1ec81d76 Strict mode: Turned several severe errors (almost all detection related) into errors, instead of warnings
svn-id: r49972
2010-06-17 23:45:38 +00:00
Matthew Hoops 8f55c4ddb4 Allow for digits in stage directions in SCI32 games: GK1 floppy uses them.
svn-id: r49582
2010-06-10 18:16:05 +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 92c896d883 Patch #2973290: Semicolon cleanup
svn-id: r48359
2010-03-22 20:28:08 +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
Matthew Hoops 5382aa1ab0 SCI32:
- Set signature for Array/String
	- Add the kernel table differences for the GK2 demo
	- Implement kMessage changes in SCI32
	- Use an empty string as the default path for all games now (and modify kValidPath to accept that only as valid)
	- Add dereferencing for Arrays

svn-id: r46756
2009-12-30 16:00:56 +00:00
Matthew Hoops 4be2788ffd Some SCI32 (minor) String bug fixes and cleanup.
svn-id: r46492
2009-12-23 05:10:16 +00:00
Matthew Hoops 35e91fbddf Add a TODO for the SCI 2.1 message version (5).
svn-id: r46465
2009-12-21 15:22:42 +00:00
Filippos Karapetis e4c23834dd Moved sci_ffs() inside iterator.cpp, the only place where it's actually used, and removed tools.*. Also, removed all the unused includes to tools.h from several places
svn-id: r45176
2009-10-16 23:29:00 +00:00
Walter van Niftrik f2db73e55d SCI: Fix bug in Message() recursion
svn-id: r44890
2009-10-11 03:40:11 +00:00
Walter van Niftrik bb381d3a52 SCI: Fixed bug in new Message() code
svn-id: r44873
2009-10-10 13:47:26 +00:00
Willem Jan Palenstijn 3aa8699874 SCI: Fix warnings
svn-id: r44869
2009-10-10 12:13:34 +00:00
Walter van Niftrik 6c1cac3956 SCI: kMessage() rewrite
svn-id: r44860
2009-10-10 02:16:23 +00:00
Martin Kiewitz 06f5393ed4 SCI: fixed crash in sq5/german (umlauts)
svn-id: r44587
2009-10-04 06:39:07 +00:00
Filippos Karapetis 1bbab8f191 Some renaming:
getresourceManager -> getResourceManger
resourceManager -> resMan
segmentManager ->segMan

svn-id: r43908
2009-09-02 12:02:37 +00:00
Walter van Niftrik 41e24b7495 SCI: Fix messages in QFG remake.
svn-id: r43850
2009-08-31 12:32:05 +00:00
Filippos Karapetis ed66cad677 - Simplified the parameters of some functions
- Replaced some EngineState parameters
- The SCI version is now obtained from the resource manager or the segment manager, thereby simplifying several functions
- Plugged 2 leaks in the fallback detector
- Renamed the segment manager and resource manager to "segmentManager" and "resourceManager" in all places, for consistency

svn-id: r43722
2009-08-25 08:38:14 +00:00