Commit Graph
4076 Commits
Author SHA1 Message Date
Colin Snover c9ad2062db SCI32: Fix wrong value passed to updateInfoFlagViewVisible
updateInfoFlagViewVisible accepts a property index, not a selector
ID.

Fixes Trac#9583.
2016-10-20 11:33:30 -05:00
Colin Snover 34bd1bcaa9 SCI32: Split out detection of features that cross SSCI versions 2016-10-20 11:33:29 -05:00
Colin Snover 55222ec06c SCI32: Fix zero-offset exports
Exports with a zero offset are supposed to point to the start of
the code block in the script hunk, but they were being ignored.

This may also apply to SCI1.1 games, but until that can be
verified, this fixes the zero-offset in only SCI32 games for now.
2016-10-20 11:33:08 -05:00
Colin Snover e704e5f3c8 SCI32: Fix crash when clicking around the arterial blockage in SQ6
Thanks @hpvb for the report.

Fixes Trac#9615. Closes #850.
2016-10-16 19:30:47 -05:00
Colin Snover abc4656cc0 SCI32: Fix workaround comment 2016-10-16 11:10:25 -05:00
Colin Snover 65d0c659ef SCI32: Fix crash clicking quit button during LSL6hires credits 2016-10-15 20:57:48 -05:00
Colin Snover 06d58c91b9 SCI32: Fix crash in LSL6hires ending
Fixes Trac#9613.
2016-10-15 19:29:00 -05:00
Colin Snover f35fafa525 SCI32: Fix kPalVary(SetVary) in SCI2.1early games
Game scripts pass an extra argument which is never used in SSCI.
This happens e.g. when warping from room 620 to room 860 in
LSL6hires.

Adding a signature for kPalVarySetVary for SCI2.1early games only
does not work because KQ7 1.51 is detected as SCI2.1early but the
interpreter includes kPalVary code that matches SCI2.1mid.

Fixes Trac#9611.
2016-10-15 18:00:37 -05:00
Colin Snover c3adfc065e SCI: Ensure export breakpoints always trigger on export calls
Previously, export calls to non-existing functions would act like
there was never an export call, and the breakpoint would never be
triggered.
2016-10-14 19:43:47 -05:00
Colin Snover a05ae2e24a SCI32: Fix slow transitions in SQ6 2016-10-14 19:43:47 -05:00
Willem Jan Palenstijn 699a147348 SCI: Make -propDict- unique for each class
Previously, this was using the offset of the property dict inside the
script. However, this isn't unique. For example, SQ6's DPath and
PolyPath classes both have their property dict at offset 8 of their
respective scripts. This would break Obj::isMemberOf.

Closes #846.
2016-10-14 19:43:32 -05:00
Willem Jan Palenstijn 3dc5431884 SCI: Add modified workaround for Simbani bridge room for GOG
The GOG version comes with a fan patch that uses rm470::name to
store a timer to rate-limit rm470::doit. This breaks the workaround
detection since that uses the name field.
2016-10-12 22:06:50 +02:00
Colin Snover 82c39aa6ad SCI32: Fix garbage collection of objects stored in IntArrays 2016-10-11 19:40:08 -05:00
Colin Snover 832979c2db SCI: Fix memory leak 2016-10-09 11:32:01 -05:00
Colin Snover 40444b0aeb SCI32: Clarify some identifiers
transparentColor -> skipColor
displace -> origin
scaledWidth -> xResolution
scaledHeight -> yResolution
2016-10-09 11:21:46 -05:00
Colin Snover 8c555200d9 SCI32: Change storage type of int16 arrays to hold reg_ts instead
Memory references and integers in SSCI are both 16-bit numbers,
so game scripts frequently (incorrectly) use an IntArray instead
of an IDArray for holding references. Since references in ScummVM
are 32-bit reg_ts, IntArray entries must be large enough to hold
reg_ts in order to be compatible with game scripts that store
references in integer arrays.

The alternative solution is to find and patch all incorrect use of
IntArray across all games. This is possible, but a bit risky from
a save game stability perspective, since incorrect IntArray usage
is sometimes not apparent until well after the array is
instantiated (like GK1's global interview array).

This change invalidates existing SCI32 save games.
2016-10-09 11:21:13 -05:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Willem Jan Palenstijn 379e3b80da SCI: Release SCI music mutex earlier in reconstructPlayList
This avoids a deadlock where the main thread (via reconstructPlayList)
tries to acquire the mixer lock (in soundPlay) while holding the SCI
music lock, and the audio thread is holding the mixer lock and tries to
acquire the SCI music lock (in miditimerCallback). Bug #6691.
2016-10-08 22:32:13 +02:00
Colin Snover 3f30e2dd06 SCI32: Fix uninitialized read when starting a new game in LSL6hires 2016-10-05 15:30:39 -05:00
Colin Snover ac95f2595b SCI32: Fix deleting save games in native save/load dialogue 2016-10-05 15:19:11 -05:00
Colin Snover 5cca33702d SCI32: Fix version file read failure in LSL6hires 2016-10-05 15:19:11 -05:00
Colin Snover 84978b7cab SCI32: Fix crash when trying to interrogate bartender in GK1 2016-10-01 15:26:34 -05:00
Colin Snover fb129116cd SCI32: Stub kGraph
This kernel call exists only in SCI2 and is a null subroutine. It
is called at the beginning of GK1.
2016-10-01 15:26:34 -05:00
Colin Snover 084dfe9e03 SCI32: Use selector lookup in Torin script patch instead of magic numbers 2016-10-01 14:07:26 -05:00
Colin Snover d527e75f32 SCI32: Fix signature of kString(ArraySetElements) to allow 0 args 2016-10-01 14:07:26 -05:00
Colin Snover 7d77a712d3 SCI32: Fix interrogation screen crash in GK1 2016-10-01 14:07:26 -05:00
Colin Snover 67acdb628b SCI32: Sync subtitle text speed with ScummVM GUI 2016-09-30 20:08:09 -05:00
Colin Snover 60be24d973 SCI: Bump save game number to fix save game compatibility
Version 38 save games were added to the 1.9 release branch with
only changes to SCI32 cursor support; shortly thereafter, changes
to the general (SCI16+SCI32) save game metadata were committed to
master -- without bumping the save game version number. This
prevented SCI16 save games from loading correctly in 1.10pre, since
the engine expected that version 38 games would have this extra
metadata, but they don't.
2016-09-30 19:05:14 -05:00
Colin Snover b6b9e2fce4 SCI32: Give savegame-only methods internal linkage 2016-09-30 13:54:10 -05:00
Colin Snover 988865cdc7 SCI32: Reset saved parts of GfxPalette32 when loading save games 2016-09-30 13:54:10 -05:00
Colin Snover 5baff4a1e5 SCI32: Fix some buildbot compiler warnings 2016-09-30 13:54:06 -05:00
Willem Jan Palenstijn d580b64c6e SCI32: Fix build 2016-09-30 09:19:59 +02:00
Colin Snover e412eaffbc SCI32: Clean up and document GfxPalette32 2016-09-29 19:39:16 -05:00
Colin Snover 8fd19f84c8 SCI: Deduplicate call origin formatting 2016-09-29 19:39:16 -05:00
Colin Snover 6290f1e5fc SCI: Add prefix to global variable constants 2016-09-29 19:39:16 -05:00
Colin Snover bde7090708 SCI32: Fix kArray signature 2016-09-29 19:39:16 -05:00
Colin Snover 015a62976c SCI32: Fix whitespace 2016-09-29 19:39:16 -05:00
Colin Snover 2035e21667 SCI32: Add workaround for kNumCels
This workaround may be able to be vastly simplified in the future
since, so far, simply returning the number of cels in loop 0 is
enough to make all the scripts with this bug work as expected.
2016-09-29 19:39:16 -05:00
Colin Snover 07e1dc3ca5 SCI32: Fix SQ6 crash using the special button in Stooge Fighter 3 2016-09-29 19:39:16 -05:00
Colin Snover 5877542d7e SCI32: Ease debugging of wrong array types 2016-09-29 19:39:16 -05:00
Colin Snover 3f6cfff225 SCI32: Fix SQ6 crash in Holocabana control panel 2016-09-29 19:39:16 -05:00
Colin Snover 9d2397e1e9 SCI32: Implement kBitmapCreateFromView and kBitmapGetInfo
Used by Torin room 40300 to perform pathfinding by bitmap.
2016-09-29 19:39:16 -05:00
Colin Snover 7011ee8f50 SCI32: Fix Torin inventory crash caused by wrong array type 2016-09-29 19:39:16 -05:00
Colin Snover 2c61569c62 SCI32: Disable "change directory" button in native save/load dialogue 2016-09-29 19:39:16 -05:00
Colin Snover 4d73736d1f SCI32: Fix compilation warnings 2016-09-29 19:39:16 -05:00
Colin Snover 1847b0f705 SCI32: Fix warnings and incompatible save games when built without SCI32 2016-09-29 19:39:16 -05:00
Colin Snover 3e75f42d85 SCI: Rename "until" to "thru" in kernel call signatures
Kernel calls with these signatures are inclusive of the engine
version given in the name; this change makes it clearer that
this is the case.
2016-09-29 19:39:16 -05:00
Colin Snover 7bae02e558 SCI32: Put brackets around rest parameters
The kernel signature * means "one or more", not "zero or more" as
might be expected from the otherwise regex-like syntax.
2016-09-29 19:39:16 -05:00
Colin Snover c644f817e3 SCI32: Add mark for KQ7 in script patches 2016-09-29 19:39:16 -05:00
Colin Snover 0c9d423497 SCI32: Emulate MGDX ego view metadata 2016-09-29 19:39:16 -05:00