Commit graph

215 commits

Author SHA1 Message Date
Kawa
ca2209cb5f SCI: Add support for The Dating Pool (#1403) 2018-12-02 22:56:19 +02:00
Filippos Karapetis
7f83640894 SCI32: Add a game option to double the videos in KQ7 by default
Scaling works correctly with the Windows variant, which uses AVI files,
but the DOS variant uses Robot videos, and the way scaling is done
there is different, and is not working yet with KQ7 DOS. Nonetheless,
both versions are included in the game, so it's not a major issue.
2018-09-01 13:14:38 +03:00
Filippos Karapetis
941869c466 SCI32: Remove reg32_t and use reg_t in all cases
reg32_t was a transitive solution, before reg_t's were
adapted to use 32-bit addresses internally, and before
support for SCI3 was added. It was introduced as another
way to handle large script offsets in SCI3, and was only
used for the program counter (PC). It's no longer
needed, as we now support SCI3 script offsets using
reg_t's, so we can use make_reg32 in all cases where
we need to access offsets over 64KB
2018-08-25 12:39:12 +03:00
Daniel Wolf
999cf71dcf SCI: Add game option for enabling/disabling LarryScale in LSL7
All other SCI games continue using the default scaler.
2018-03-16 22:33:06 +01:00
Colin Snover
f11b0a4ff5 SCI32: Toggle Phant2 content censoring from game options
To enable the optional content censoring mode, Phant2 looks
for a RESDUK.PAT file, which is normally placed by the game's
installer if the user chose to enable censorship. If the file
exists, the game reads an unlock password out of the file and
asks the user to enter the password when starting a new game to
create an uncensored game, or to click a "less intense" button
to start the game with censoring. The censorship state of the
game is then persisted in the save game file, and installations
with the RESDUK.PAT file need to enter the password again in
order to restore any of the uncensored saves.

Since we do not have an installer that can enable this feature,
add a game option toggle to enable/disable censoring (for the
releases that have the optional censorship mode) instead so the
censored content feature is available for anyone that wants to use
it. This flag is restored from ScummVM whenever a save game is
loaded, so it can be toggled on or off at any point without
needing a separate save game, unlike in the original interpreter.
2017-09-08 16:03:24 -05:00
Colin Snover
8cb35442c0 SCI32: Improve kShowMovieWin (AVI) rendering
1. Added a new game option for linear interpolation when scaling
   video in ScummVM builds with USE_RGB_COLOR;
2. 8bpp videos that put black in a palette index other than 0
   (KQ7) should now always render correctly without the earlier
   game-specific workarounds which did not work very well;
3. Data from game scripts regarding video size and position are
   now ignored, since games always just try to show videos in the
   middle of the screen, but frequently get this a little bit
   wrong, causing either bad aspect ratios or off-center videos;
4. Builds without USE_RGB_COLOR support will not crash when
   attempting to play >8bpp AVIs, like those from KQ7 2.00b.

Fixes Trac#9843, Trac#9762.
2017-07-06 19:12:38 -05:00
Willem Jan Palenstijn
e2e3f7c4c5 SCI: Move bpk/logkernel to main breakpoint infrastructure
This changes the syntax for bpk and logkernel:

Enable breakpoint on kernel call:

bpk FrameOut

Enable logging for kernel call:

bpk FrameOut log
For backward compatibility this has an alias: logkernel FrameOut

Removing a kernel call breakpoint is done with bp_del/bc now.
2017-06-10 21:32:35 +02:00
Colin Snover
57d257b36a SCI32: Fix audio sync recursion
Calling to SciEngine::syncSoundSettings from GuestAdditions
recurses back into GuestAdditions, which is obviously not
desirable. Even when it didn't manage to cause infinite recursion
(as in SQ6 demo), it would make the UI behave in broken ways (e.g.
the +/- buttons on the music slider in SQ6 would not work because
the UI would just get updated immediately back to the closest
rounded value).
2017-06-09 23:30:10 -05:00
Colin Snover
ec12c5a342 SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32 2017-04-22 13:01:16 -05:00
Colin Snover
3303a88139 SCI: Improve audio volume & settings sync code
This patch includes enhancements to the ScummVM integration with
SCI engine, with particular focus on SCI32 support.

1. Fixes audio volumes syncing erroneously to ScummVM in games
   that modify the audio volume without user action (e.g. SCI1.1
   talkies that reduce music volume during speech playback). Now,
   volumes will only be synchronised when the user interacts with
   the game's audio settings. This mechanism works by looking for
   a known volume control object in the stack, and only syncing
   when the control object is present. (Ports and planes were
   researched and found unreliable.)

2. Fixes audio syncing in SCI32 games that do not set game
   volumes through kDoSoundMasterVolume/kDoAudioVolume, like GK1,
   GK2, Phant1, and Torin.

3. Fixes speech/subtitles syncing in SCI32 games that do not use
   global 90, like LSL6hires.

4. Fixes in-game volume controls in SCI32 games reflecting
   outdated audio volumes when a change is made during the game
   from the ScummVM launcher.

5. Fixes SCI32 games that would restore volumes from save games
   or reset volumes on startup, which caused game volumes to be
   out-of-sync with ScummVM when started.

6. ScummVM integration code for audio sync has been abstracted
   into a new GuestAdditions class. This keeps the ScummVM-
   specific code all in one place, with only small hooks into the
   engine code. ScummVM integrated save/load code should probably
   also go here in the future.

Fixes Trac#9700.
2017-04-21 19:00:27 -05:00
Colin Snover
0e77471467 SCI: Remove unused SciEngine::speechAndSubtitlesEnabled method 2017-01-16 12:16:12 -06:00
Colin Snover
92f185c83c SCI32: Add Hoyle5 to the list of game versions 2017-01-12 13:14:25 -06:00
Colin Snover
770bd66cbc SCI: Update engine status comment 2016-12-03 12:21:56 -06:00
Colin Snover
9380b54120 SCI: Add code-address breakpoints to debugger 2016-11-20 12:31:43 -06:00
Colin Snover
bd4b0dbbfd SCI32: Fix QFG4 version comments 2016-10-20 11:33:30 -05:00
Colin Snover
02540b8d38 SCI32: Add support for kPrintDebug 2016-09-29 19:39:16 -05:00
Colin Snover
4e1a9be816 SCI32: Remove CoordAdjuster32, at least for the moment
This may come back in the future to deduplicate some gfx code,
but SCI32 had two different inlined ways of doing coordinate
conversions with different rounding methods, so CoordAdjuster32
didn't get used when the graphics system was rewritten.

At the moment, SCI32 code uses the mulru/mulinc methods from
helper.h for scaling up/down coordinates.
2016-08-19 15:23:10 -05:00
Colin Snover
0f2748b15a SCI32: Implement kRobot 2016-08-19 14:08:22 -05:00
Colin Snover
80d9182554 SCI32: Implement SCI32 cursor support 2016-08-19 13:57:40 -05:00
Martin Kiewitz
ece303d7e3 SCI: Move GUI-options to sci.h 2016-08-15 19:59:46 +02: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
593560e876 SCI32: Add detection for Hoyle 5 demo 2016-07-11 13:02:27 -05:00
Colin Snover
4d91b458e5 SCI32: Implement kPlayVMD 2016-07-10 09:35:24 -05:00
Omer Mor
445b690a6f SCI: Add detection for the ImagiNation Network (INN) Demo 2016-07-06 00:40:33 +03:00
Martin Kiewitz
cedcdbc48d SCI: Add getGameObjectName to fix compilation
Is needed for 80462b3 (Fix auto-saving in the fan-made Cascade Quest)
2016-06-25 23:59:46 +02:00
Colin Snover
a613a27b44 SCI32: Implement line drawing (kAddLine/kUpdateLine/kRemoveLine)
This line drawing code lives in a remodelled GfxPaint32 class
that is totally separate from GfxPaint16.
2016-06-21 08:14:12 -05:00
Colin Snover
46551fd4b5 SCI32: Rewrite digital audio engine
This provides a complete implementation of kDoAudio through
SCI2.1mid, plus partial implementation of SCI3 features.

Digital audio calls shunted through kDoSound have also been
updated to go through the SCI32 audio mixer, though these shunts
are a bit hacky because the ScummVM implementation of kDoSound
does not currently match how SSCI kDoSound is designed.

It is probably possible in the future to just replace the SCI1.1
audio code (audio.cpp) with the new SCI32 code, since the major
differences seem to be that (1) SCI1.1 only supported one digital
audio playback channel (this is configurable already), (2) it
had extra commands for CD audio playback and queued sample
playback.
2016-06-20 21:02:21 -05:00
Colin Snover
5d3385750d SCI: Split audio sync to its own class
SCI32 has its own audio handling code, but audio sync code is the
same as SCI16.
2016-06-19 14:48:33 -05:00
Eugene Sandulenko
33abb6118f ALL: Change main engine header guard defines to <directory>_<engine>_H
Recently we started to use this as new semantics, although in the past
we used simly <engine>_H. Now these guard defines are consistent with
rest of the files which are used in the engines.
2016-05-17 18:21:30 +02:00
Colin Snover
f8cea91890 SCI32: Correct KQ7 version split
The information in the wiki was wrong, KQ7 1.51 is always SCI
2.1 early.
2016-03-17 14:02:18 -05:00
Colin Snover
8748fd7eec SCI32: Clarify game engine version comments for split-version games 2016-03-17 10:43:07 -05:00
Filippos Karapetis
f450ca0ebf SCI: Split color remapping functionality into a separate class
Currently, only the SCI16 remapping functionality is implemented
(used in the QFG4 demo)
2016-03-08 20:36:03 +02:00
Filippos Karapetis
6958aa9890 SCI: Separate the demos of QFG4, PQ4 and GK1 from their full versions
The demo versions of these games were using a very different engine -
SCI1.1 vs SCI2/SCI2.1. Thus, we split them into different game IDs,
to avoid mixing specific game checks for them, as well as specific
game workarounds, which are different for the demos than the full
versions. Also, the demos should be working when SCI32 is disabled.
For these games, we don't use ADGF_DEMO, to avoid game IDs like
foodemo-demo
2016-03-08 20:36:02 +02:00
Martin Kiewitz
82165bb6f6 SCI: Improve kAnimate fastcast detection, Remove EQ1 hack
- Add "kAnimate fast cast state" to "version" debug command
- Make it possible for script patcher signatures to get fully
used outside of the regular script patcher
- Remove previous fastcast detections and replace them with
a signature heuristic
- Remove object name checking, when fastcast global is set
- Heuristic detects "fast cast" support incorrectly for multilingual
KQ5, but it seems the game never sets the global, so it won't
matter. KQ5 CD (also SCI1 late) has fastcast support.
- Remove hack in GfxView::draw
- Add lots of comments to ScriptPatcher class

This fixes EcoQuest 1 Floppy showing the anemone on top of the
message box (see bug #5170)
2016-02-23 20:17:18 +01:00
Martin Kiewitz
0aa9924df1 SCI: add user option for high resolution graphics
Instead of choosing Windows as platform, users can now also simply
click this option for Gabriel Knight 1 + King's Quest 6
Defaults to high resolution graphics
2016-01-22 02:01:28 +01:00
Colin Snover
76bd2eeb2e SCI: Use tick-based timing more consistently
This means tick-based times are saved to save games, as in SCI32
engine, instead of seconds, which are not accurate enough. It
also means places in SCI engine that need to access game ticks
should do so through g_sci instead of g_system or g_engine.
2016-01-14 16:13:22 -06:00
Willem Jan Palenstijn
22796e559f SCI: Fix compilation when SCI32 is disabled
Thanks bSr43
2016-01-10 12:38:10 +01:00
Colin Snover
aeee621e44 SCI32: Add initial support for palette cycling (kPalCycle) and fading (kPalFade)
Graphics palette code was rewritten between SCI1 and SCI2, so
SCI32 palette engine code has been moved to a separate GfxPalette32
class.
2016-01-07 16:35:09 -06: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
Martin Kiewitz
83c6e1543e SCI: add debug level for workarounds
It's called "Workarounds"
2015-04-18 23:13:11 +02:00
Martin Kiewitz
eff78c4424 SCI: fix Japanese Space Quest 4 (intro + buttons)
At least SQ4 uses #j text prefix as signal for the
interpreter to not use the PC9801 hires font, but
to use the internal low res font instead
2014-11-04 22:01:21 +01:00
Filippos Karapetis
4736c490e1 SCI: Separate the rest of the detection-only functions
This should fix bug #6717 - "SCI fallback detection assert failure"
2014-10-18 16:03:49 +03: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
4e2b1f0200 SCI: script patch for laura bow 2 for audio+text
at the same time
needs indepth testing
2013-11-20 23:31:36 +01:00
Martin Kiewitz
f1abc0c302 SCI: improved patcher, inventory patch for kq6/mac
Also added new debug flag for script patcher
2013-11-01 13:25:31 +01:00
Filippos Karapetis
f9bbc2ca37 SCI: Update ScummVM's game audio options for SCI1.1 CD games
This ensures that ScummVM's game audio options for speech and subtitles
get updated when they are changed in the game GUI
2013-10-31 07:25:25 +02:00
Filippos Karapetis
bd945bc756 SCI: Add support for the King's Questions mini-game
This can be found in the KQ collection
2013-08-20 19:48:33 +03:00
Filippos Karapetis
146d00a799 SCI: Add the Inside the Chest / Benind the Developer's Shield demo 2012-10-22 12:19:13 +03:00
Filippos Karapetis
dbb09fe984 SCI: Add documentation regarding all SCI1.1 CD games in syncIngameAudioOptions() 2012-10-08 23:50:47 +03:00