Commit Graph
6964 Commits
Author SHA1 Message Date
Colin Snover 12d1af66ef SCI32: Add QFG4 Windows signature 2016-08-04 09:52:56 -05:00
Eugene Sandulenko 6f87a2b2e8 SCI: Fix warnings 2016-08-01 23:56:32 +03:00
Colin Snover d5d42d5066 SCI32: Implement bitmap save routine 2016-08-01 10:37:14 -05:00
Colin Snover 6d1f8e8c87 SCI32: Fix invalid memory access after BitmapTable is extended
When new bitmaps are added and the underlying Common::Array needs
to move to expand, this invalidates all pointers to bitmaps, which
makes it basically impossible to use the bitmap segment since you
never know if a reference is going to be invalidated due to an
array move.

To solve this, BitmapTable is changed to hold pointers to
SciBitmaps that are allocated separately on the heap instead, so
when those bitmaps are looked up, the resulting pointers are valid
for the lifetime of the bitmap, instead of the lifetime of the
Common::Array used internally by BitmapTable.
2016-08-01 10:37:14 -05:00
Colin Snover 10f9cb7023 SCI32: Fix crash when destroying GfxTransitions32 2016-08-01 10:37:14 -05:00
Colin Snover 2071196f42 SCI32: Add bitmap segment and remove GC option from hunk segment 2016-08-01 10:37:14 -05:00
Colin Snover 4e31c9aaf4 SCI32: Don't crash on zero-dimension show rects
In the original engine this would have simply resulted in no draw,
but ScummVM is more strict about it. It is not 100% clear whether
these are normal and should be allowed or not, so for the moment
we'll emit a warning whenever a zero-dimension show rect is seen.

For now they only seem to be generated by plane transitions, and
these zero-dimension screen items cannot simply be omitted because
the 2.1early transitions code requires a fixed number of screen
items per step.
2016-08-01 10:37:14 -05:00
Colin Snover 0f535e79f5 SCI32: Add 6-argument signature of kAddPicAt
This is used by Torin in room 50900.
2016-08-01 10:37:14 -05:00
Colin Snover 156c68fe58 SCI32: Implement plane transitions (kSetShowStyle and kSetScroll)
This commit implements all of the known plane transitions from
SCI2 through SCI2.1mid games. Because kSetShowStyle is always
called indirectly via the Styler game script, it is difficult to
find all the places where transitions are used. As such,
transitions that appeared to never be used have been added as
stubs which will trigger a game crash with a message to report
what was being done, so any missed transition types can be
identified quickly and then implemented.
2016-08-01 10:37:14 -05:00
Colin Snover 4a637d65c3 SCI32: Enable optional explicit memory management of hunk entries
Bitmaps in ScrollWindow and Robot code are managed by the kernel
and not by game scripts, although they must be able to be
referenced through a reg_t. To prevent incorrect GC of bitmaps
that are in use but not referenced by any game script, explicit
memory management of hunk entries can be enabled.
2016-08-01 10:37:14 -05:00
Colin Snover 6b6ee74f00 SCI32: Fix crash in Torin when opening save dialog 2016-07-30 11:57:50 -05:00
Colin Snover ce0f1b9c33 SCI32: Give default skip color a name 2016-07-27 08:50:13 -05:00
Colin Snover 631d22c4ac SCI32: Remove dead placeholder rendering code 2016-07-27 08:50:03 -05:00
Colin Snover 4dc3b046c3 SCI32: Fix kShowMovie calls crashing SCI32
This will all be overhauled in the future but for now it is best
not to crash when playing AVI/SEQ files.
2016-07-27 08:49:56 -05:00
Colin Snover 272505fec1 SCI32: Re-enable the high resolution mode option for GK1 2016-07-27 08:49:51 -05:00
Colin Snover 49eed5dd24 SCI32: Use extern instead of #include frameout.h for splitRects 2016-07-27 08:49:44 -05:00
Colin Snover 20106fff7b SCI32: Fix backwards kFrameOut throttle timings 2016-07-27 08:49:38 -05:00
Colin Snover bb0d5e00d0 SCI32: Handle remap data outside the game's remap range 2016-07-27 08:49:33 -05:00
Martin Kiewitz d0b7907f83 Merge pull request #789 from OmerMor/hoyle5
Add detection to the Hoyle 5 family of games
2016-07-25 21:46:36 +02:00
Omer Mor 7c19e26610 SCI: Add detection to the Hoyle 5 family of games
Added games are:
  Hoyle Classic Games
  Hoyle Bridge
  Hoyle Children's Collection
  Hoyle Solitaire (CD and Hard Drive versions)

Additionaly, kGetConfig was modified to support two settings used by
these games: "laptop" and "jumpto".
2016-07-25 22:44:11 +03:00
Colin Snover 32531ac16a SCI32: Fix Video32 breaking when quitting during video playback 2016-07-24 12:07:04 -05:00
Colin Snover 1c228c488e SCI32: Fix bad VMD palettes in GK2 2016-07-24 11:36:48 -05:00
Colin Snover a6370aa688 SCI: Fix memory leaks in ResourceManager 2016-07-24 11:36:48 -05:00
Colin Snover 65ca749f0a SCI32: Improve behaviour of screen transitions
1. Use the same throttling speed as normal frameouts. The
   old throttling speed seemed a bit too slow.
2. Exit the event loop immediately if the engine is supposed to
   quit, instead of forcing the user to wait until the transition
   has finished before quitting.
2016-07-24 11:36:48 -05:00
Colin Snover b141ececdd SCI32: Fix KQ7 uninitialized read 2016-07-24 11:36:48 -05:00
Colin Snover a9b7b40c66 SCI32: Disable kernel call 0x23 on LSL6hires
LSL6hires calls 0x23 (Graph/Robot) from game scripts, but it is a
null function in the game's interpreter.
2016-07-12 14:43:56 -05:00
Colin Snover e133c74403 SCI32: Fix unnecessary palette updates
Some games load palettes that include color 255, but this is
hardcoded to white in SSCI, so just ignore it during merges since
it is ignored when the hardware palette is updated anyway.
2016-07-12 14:43:56 -05:00
Colin Snover efc12ffc5c SCI32: Avoid flash of incorrect colour when palettes are changed
Avoid forcing the screen to refresh after a palette change if the
screen is also about to be drawn to, as the palette change + draw
is intended to be an atomic operation.
2016-07-12 14:41:17 -05:00
Colin Snover 53ab0b2805 SCI32: Fix broken background volume in Torin during speech 2016-07-11 16:23:46 -05:00
Colin Snover b37ebb61eb Revert "SCI32: Add blackline option to KQ7 2.00b DOS"
This reverts commit 1ab87e3f8f.

VMD and DUK are the formats that get blacklined, not Robot.
2016-07-11 14:27:57 -05:00
Colin Snover 1cf1b88c7d SCI32: Add ADGF_DEMO flag to Hoyle 5 detection 2016-07-11 13:55:17 -05:00
Colin Snover 1ab87e3f8f SCI32: Add blackline option to KQ7 2.00b DOS
KQ7 DOS uses Robot video in place of AVI.
2016-07-11 13:55:17 -05:00
Martin Kiewitz d5dfd41ed1 SCI: Update script patch comments 2016-07-11 20:45:19 +02:00
Colin Snover 593560e876 SCI32: Add detection for Hoyle 5 demo 2016-07-11 13:02:27 -05:00
Martin Kiewitz 9dd5ee988b SCI32: Improve kq7 subtitle script patch
Subtitle box should now always use color 255, which should be
white all the time. Normally it uses color 7, which is white
most of the time, but for example pink/purple at the start of
chapter 5.
2016-07-11 19:04:18 +02:00
Colin Snover 08821cf4e3 SCI32: Give planes a default type
With the addition of the transparent pic type code, the _type
property would be read uninitialised by setType if _pictureId was
set to kPlanePic.

CID 1357230, 1357231.
2016-07-11 10:39:50 -05:00
Colin Snover f171db965c SCI32: Guard against no split count
CID 1357229.
2016-07-11 10:39:50 -05:00
Colin Snover e4588a7134 SCI32: Silence non-monitored channels while monitoring is active 2016-07-11 10:39:50 -05:00
Colin Snover 60c3663142 SCI32: Fix incorrect logic of cycler overflow 2016-07-11 10:39:50 -05:00
Colin Snover bc362e5b7c SCI32: Minor cleanup of GfxPalette32 2016-07-11 10:39:50 -05:00
Colin Snover 8fb55564a6 SCI32: Fix bad output caused by missing palette copies
Sometimes, games accidentally use palette entries that are not
marked as used and expect them to be a particular colour, like the
Phantasmagoria title screen, or the white palette entry (always
255 in DOS/Win).
2016-07-11 10:39:50 -05:00
Colin Snover 6a13adb638 SCI32: Fix sign comparison warning 2016-07-11 10:39:50 -05:00
Colin Snover 4cfc387602 SCI32: Split GfxPalette and GfxPalette32 + HunkPalette 2016-07-11 10:39:50 -05:00
Colin Snover 7f53a26d9e SCI32: Split kPalCycle into subop functions 2016-07-11 10:39:50 -05:00
Colin Snover ec73fa1e4a SCI32: Fix audio deadlocks
Several functions in Audio32 would call into the mixer to pause
or resume the audio handle, which would cause a deadlock if the
mixer's mixCallback timer fired while one of these functions was
running on the main thread.

To address this, calls to mixer to pause/unpause the digital audio
handle have been removed. Since this was just an optimisation to
prevent unnecessary calls to fill the audio buffer, the only
problem now is that a tiny amount of CPU is wasted on unnecessary
callbacks to read from the empty SCI mixer.
2016-07-11 10:39:50 -05:00
Colin Snover 1714cf8aa5 SCI32: Minor Audio32 cleanup 2016-07-11 10:39:50 -05:00
Martin Kiewitz eeafe230b9 SCI32: Fix an issue with the KQ7 subtitles script patch
Volume was lowered, but not raised afterwards for certain cases
Original script patch was commited in
b676530528
2016-07-11 00:26:05 +02:00
Martin Kiewitz b676530528 SCI32: Add script patch to fix/improve KQ7 subtitles
Needs lots of testing of course
Applies to 1.51 and 2.00
2016-07-10 23:40:29 +02:00
Colin Snover 46804fda15 SCI32: Re-enable KQ7 subtitles, but with a warning on game start 2016-07-10 11:46:19 -05:00
Colin Snover 774d0cbdb3 SCI32: Disable KQ7 subtitles
The subtitles in KQ7 were not finished and don't quite work right,
drawing off the screen and in weird positions. They could probably
be fixed with some aggressive script patching, but for now, they
are just disabled (as they are in the official release).
2016-07-10 10:50:05 -05:00