Commit Graph
7940 Commits
Author SHA1 Message Date
Colin Snover bd7a62e996 SCI: Fix typo in comment 2017-03-30 19:46:27 -05:00
Colin Snover 9a637ec324 SCI32: Skip bad map 405 on CD 1 of PQ:SWAT
The resources on CD 1 are corrupt and point to invalid locations
in the CD 1 RESOURCE.AUD. This can be noticed during the briefing
on the Lucy Long callup, where descriptions of the map are missing
and eventually the game gets stuck waiting for missing audio to
finish playback.
2017-03-30 19:46:27 -05:00
Colin Snover 77a4074106 SCI: Protect and clarify the purpose of Resource _header data 2017-03-30 19:46:27 -05:00
Colin Snover 0826501ef6 SCI32: Fix audio, wave, VMD, Duck, CLUT, TGA, ZZZ, Etc patches
Specifically, audio patches are used in at least PQ:SWAT
(40103.AUD), Lighthouse (9103.AUD), and the GK2 demo (300.AUD).
2017-03-30 19:46:27 -05:00
Colin Snover 4c942758c0 SCI32: Use built-in system font as default font for GfxText32
Fixes the non-interactive Lighthouse demo.
2017-03-30 19:46:27 -05:00
Colin Snover ceacf7df12 SCI: Handle >64KiB offsets in parse_reg_t 2017-03-30 19:46:27 -05:00
Colin Snover f4d3664d3f SCI: Replace magic numbers in reg_t handling with symbols 2017-03-30 19:46:27 -05:00
Colin Snover 3b34f17fb3 SCI32: Add kWebConnect and kWinExec
Used by Phant2.
2017-03-30 19:46:27 -05:00
Colin Snover 766d46153a SCI32: Implement known-used portions of kPlayDuck 2017-03-30 19:46:27 -05:00
Colin Snover 65fe7bcfd8 SCI: Print more detailed information on audio header size mismatch 2017-03-30 19:46:27 -05:00
Colin Snover d0e9724ae1 SCI32: Support reading sound effects from normal resource bundles 2017-03-30 19:46:27 -05:00
Colin Snover 0be9ace649 SCI: Fix incorrect read of LB2/MG256 audio sizes
This happened to work previously because the size was not checked
for validity, and because the audio player calculates its own size
so this value was never actually used.
2017-03-30 19:46:27 -05:00
Colin Snover 477e31cea6 SCI32: Ignore invalid audio map entries in GK2
The invalid entries, which are on CD 6, appear to correspond to
audio that's on CD 4 (though not with the correct offset for CD
4's RESOURCE.AUD).

Skipping the invalid map entries on CD 6 should cause these audio
files to be loaded from the CD 4 audio bundle if they are
requested during chapter six since ScummVM combines resources from
all CDs and matches on their IDs.
2017-03-30 19:46:27 -05:00
Willem Jan Palenstijn ee86a74cd3 SCI: Fix remaining format string warning 2017-03-30 22:00:27 +02:00
Colin Snover cb4f06fb70 SCI: Avoid shadow warnings in old GCC 2017-03-30 14:23:41 -05:00
Colin Snover a233696212 SCI: Update formatting strings to match updated Span API 2017-03-30 14:23:41 -05:00
Colin Snover 532828c143 SCI: Remove old SCI32 check from SCI16 drawing code 2017-03-27 19:42:31 -05:00
Colin Snover 323e74bda9 SCI: Simplify calculation of locals size in SCI0/1 2017-03-27 19:42:31 -05:00
Colin Snover 816296fd25 SCI: Remove unused boilerplate from SciSpan 2017-03-27 19:42:31 -05:00
Colin Snover 6600fb77ea SCI: Use containers in GfxView and remove some SCI32 code 2017-03-27 19:42:31 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Martin Kiewitz c315065503 SCI: Add Colonel's Bequest patch and extend patcher functionality
Add Colonel's Bequest patch to fix an issue in room 35.
When you tell Lilly about Gertie in act 2, Lilly will then
walk out of the room. In case Laura (ego) is in her way, the game
will effectively block and will appear frozen.
This also happened, when using the original interpreter.

This also adds a new functionality to the script patcher.
PATCH_GETORIGINALUINT16 is able to get a full UINT16 from
original script data and insert it somewhere else.
PATCH_GETORIGINALBYTE and PATCH_GETORIGINALBYTEADJUST commands
were merged internally and use the same internal command now.
Some script patches were adjusted accordingly.

Thanks again to wjp for helping on the script issue.
2017-03-19 17:14:33 +01:00
Martin Kiewitz 2e91d8cd9b SCI: Add script patch for Laura Bow 2 to fix museum party room (350)
When clicking anywhere while entering the middle museum party room
(which has a large golden Egyptian head inside of it), the game
will keep the script for entering active, which will then make it
impossible to leave this room.

This script bug also happened, when using the original interpreter.

The patch applies to at least English + German floppy as well as
English CD.

Very many thanks to wjp for helping figuring the actual cause out.
2017-03-18 21:09:38 +01:00
Willem Jan Palenstijn 8bac8836b1 SCI: Fix up readString writing into too small buffer
This fixes QfG4 character import, which specifies a size of 52 for a
buffer of size 40.
2017-02-27 16:02:20 +01:00
Willem Jan Palenstijn 1b1fae6494 SCI: Clean up unnecessary casts 2017-02-26 14:23:36 +01:00
Bastien Bouclet c81a61eefe SIC32: Add RAMA French checksums 2017-02-26 07:07:50 +01:00
Bastien Bouclet e9d87117ba SCI32: Add Phantasmagoria 2 French checksums 2017-02-26 07:07:30 +01:00
Bastien Bouclet d991986944 SCI32: Add Lighthouse French checksums 2017-02-26 07:06:53 +01:00
Martin Kiewitz 26b6d450df SCI: Clean up kRandom + allow 0 parameters via signatures
Also added in depth comments about the currently known variations
Returning the RNG seed is now implemented (although it seems no
games actually use this functionality, it seems to be just script
bugs).
Also remove Torin kRandom workarounds.
2017-02-26 00:24:57 +01:00
Willem Jan Palenstijn cdfe5a3107 SCI: Remove check that is never triggered
Since blockSize is asserted to be positive, buf can never be equal to _buf.
2017-02-18 15:20:57 +01:00
Willem Jan Palenstijn 905feaa8c2 SCI: Fix unaligned read 2017-02-18 15:07:02 +01:00
Willem Jan Palenstijn 2f4f130918 SCI: Fix warnings 2017-02-07 21:45:17 +01:00
Colin Snover 10d97ce379 SCI: Fix more unsafe C-string usage 2017-02-05 12:38:21 -06:00
Colin Snover b1c3332fdd SCI: Use strnlen instead of strlen to avoid buffer overflows 2017-02-05 10:24:02 -06:00
Tarek Soliman 3dc565df26 SCI: Add more comments to SQ4-floppy workaround
I did a full-score playthrough of the game with a warning() on
the workaround condition as m_kiewitz suggested.
The following room numbers were logged:
* room#1: intro logo
* room#21: time rip (intro and ending)
* room#531: time pod time travel
* room#290: astro chicken star background
* room#376: right after astro chicken game over (called only once)
2017-01-31 20:55:34 -06:00
Tarek Soliman 6ef42cbe92 SCI: Expand workaround for script bug #3537232
More details in PR#889
2017-01-31 17:20:45 -06:00
Tarek Soliman 25614c60c8 SCI: Add more version info to SQ4 detection entry 2017-01-17 16:09:31 -06:00
Colin Snover 88981b8db6 SCI32: Script patch priority drawing bug in MGDX
This fixes the horse at the fountain drawing on top of the
fountain instead of behind it.
2017-01-16 12:54:39 -06:00
Colin Snover e695100708 SCI32: Add workarounds for MGDX 2017-01-16 12:16:14 -06:00
Colin Snover 600a9127de SCI32: Add pic cel to CelInfo32 debugging output 2017-01-16 12:16:14 -06:00
Colin Snover d9de55b2a9 SCI32: Fix handling of negative z-indexes
Fixes the ego disappearing behind the castle doors in MGDX.
2017-01-16 12:16:14 -06:00
Colin Snover f66c033d52 SCI32: Add workaround for Hoyle5 2017-01-16 12:16:13 -06:00
Colin Snover 8859c3ccae SCI32: Disable compression on Hoyle5 options files
Compression overhead takes up more space than uncompressed files,
plus the uncompressed files it creates are marginally quicker and
easier to debug with external tools.
2017-01-16 12:16:13 -06:00
Colin Snover c476341508 SCI32: Add workarounds for KQ7 2.00b 2017-01-16 12:16:13 -06:00
Colin Snover efa6b74cce SCI32: Clarify comment about empty code path in cursor code 2017-01-16 12:16:13 -06:00
Colin Snover d495267829 SCI32: Fix loading save games in KQ7 1.51 2017-01-16 12:16:12 -06:00
Colin Snover 0e77471467 SCI: Remove unused SciEngine::speechAndSubtitlesEnabled method 2017-01-16 12:16:12 -06:00
Colin Snover 0744dc4109 SCI32: Fix spinloop in Hoyle5
Hoyle5 will spin on kGetTime between 15 and 300 ticks in multiple
game scripts in order to delay execution (for example, after
choosing opponents and clicking "okay"). This causes ScummVM to
be unresponsive and wastes CPU time.

This commit patches the spin subroutines to instead call a kernel
function (kWait) that waits without a spin loop. This kernel
function was removed in SCI2, and has been added back in ScummVM
specifically for Hoyle5, so this patch will not work with the
original interpreter.
2017-01-16 12:16:12 -06:00
D G Turner 657e5414fe SCI: Fix Possible Uninitialized Variable Usages. 2017-01-16 07:22:32 +00:00
D G Turner d2dd942ad7 SCI: Fix Warnings about Copy Constructor Failing to Call Base Class. 2017-01-14 08:26:29 +00:00