Commit graph

73387 commits

Author SHA1 Message Date
Alexander Tkachev
0ae4409138 GUI: Add ThemeLayoutTabWidget 2016-07-03 12:20:03 +02:00
Alexander Tkachev
24963ac97d GUI: Fix Dialog's and TabWidget's reflowLayout() 2016-07-03 12:19:48 +02:00
Alexander Tkachev
421f9826c8 GUI: Hide scrollbar in ScrollContainerWidget when needed 2016-07-03 12:19:31 +02:00
Alexander Tkachev
40fa9b4de3 GUI: Fix ScrollContainerWidget's reflowLayout() 2016-07-03 12:19:15 +02:00
Alexander Tkachev
ac25acbccc GUI: Update ScrollContainerWidget 2016-07-03 12:18:52 +02:00
Alexander Tkachev
9c1eab6415 GUI: Fix ScrollContainerWidget look a bit 2016-07-03 12:18:34 +02:00
Alexander Tkachev
cccf6eed78 GUI: Add drawRoundedSquareShadowClip() 2016-07-03 12:18:18 +02:00
Alexander Tkachev
e04e13de33 GUI: Remove unnecessary debug output 2016-07-03 12:18:00 +02:00
Alexander Tkachev
31e528c070 GUI: Make ScrollContainerWidget do full redraw 2016-07-03 12:17:43 +02:00
Alexander Tkachev
425d963bd3 GUI: Fix ThemeItemTextData's dirty rectangle 2016-07-03 12:17:26 +02:00
Alexander Tkachev
b946ef8598 GUI: Make ScrollContainerWidget hide children 2016-07-03 12:17:01 +02:00
Alexander Tkachev
fca0f0ed34 GUI: Make PopUpWidget clip 2016-07-03 12:16:43 +02:00
Alexander Tkachev
8f2d35b0b8 GUI: drawRoundedSquareClip() 2016-07-03 12:16:26 +02:00
Alexander Tkachev
3d2730a0dd GUI: clippingRect propagated deeper 2016-07-03 12:15:51 +02:00
Alexander Tkachev
d7278cc48b GUI: Prepare button to be clipped 2016-07-03 12:14:45 +02:00
Alexander Tkachev
34af71a8ef GUI: Remove _clippingArea from ScrollContainer 2016-07-03 12:14:23 +02:00
Alexander Tkachev
9bf2d65dd2 GUI: Cleanup in ScrollContainer 2016-07-03 12:13:57 +02:00
Alexander Tkachev
49caaf77a1 GUI: Add ScrollContainer 2016-07-03 12:10:56 +02:00
Alexander Tkachev
08727857bc GUI: Use boss's x/y/w/h instead of clippingArea 2016-07-03 12:10:26 +02:00
Colin Snover
948e448738 SCI32: Fix signed comparison warnings 2016-07-01 15:58:43 -05:00
Colin Snover
6c8661d144 SCI32: Fix bad rendering of subtitle backgrounds in Torin
The way dimensions of scaled screen items are calculated changed
over the lifetime of SSCI. In early low-resolution and
mixed-resolution games, scaled drawing needed to use at a global
cadence across the entire screen to ensure proper alignment, but
in later games (like Torin), local scaling of individual screen
items seems to be the way scaling is performed.
2016-07-01 15:54:27 -05:00
Colin Snover
b7dcf5f6c1 SCI32: Use better audio fading algorithm
Using the one from SCI2.1mid makes fades very slow because SDL has
a larger audio buffer than SSCI DOS. This new algorithm is based on
wall time so will always fade at the correct speed, although the
larger buffers will have a coarser granularity so the fades may
not be as smooth as in the original engine. If anyone cares, the
fade volume could be mixed into individual samples in `readBuffer`
instead of applying just once per complete buffer. SSCI did not
do this, however, so this implementation should be pretty accurate.
2016-07-01 12:43:39 -05:00
Colin Snover
e8552cf96c SCI32: Fix audio fading 2016-07-01 12:42:39 -05:00
Martin Kiewitz
17b3dc4584 SCI: Fix script patcher, so that it works on BE systems 2016-07-01 15:23:50 +02:00
Filippos Karapetis
9cf3566e27 Merge pull request #766 from OmerMor/qfg3_bounds
SCI: Script patch for QfG3 giant tree bounds
2016-07-01 07:58:55 +03:00
Willem Jan Palenstijn
7edc5cd891 Merge branch 'remap' 2016-07-01 00:50:44 +02:00
Colin Snover
ca279390a3 SCI32: Fix broken Remap implementation
Remap would crash SCI2.1early games with 19 remap slots, and
did not actually work in most cases in SCI2.1mid+ games.

1. Avoid accidental corruption of values from the VM that may be
   valid when signed or larger than 8 bits
2. Fix bad `matchColor` function.
3. Remove unnecessary initialisation of SingleRemaps
4. Update architecture to more closely mirror how SSCI worked
5. Split large `apply` function into smaller units
6. Fix buffer overrun when loading a SCI2.1early game with remap
7. Warn instead of crashing with an error on invalid input (to
    match SSCI more closely)
8. Add save/load function
2016-07-01 00:18:32 +02:00
Colin Snover
0c799e1bd9 SCI32: Move matchColor to GfxRemap32 2016-07-01 00:18:32 +02:00
Colin Snover
0aed08681e SCI32: Separate remap types 2016-07-01 00:18:32 +02:00
Colin Snover
14e57ac867 SCI32: Add missing remap CelObj calls 2016-07-01 00:18:32 +02:00
Colin Snover
ed64d5b020 SCI32: Move GfxRemap32 to separate files 2016-07-01 00:18:32 +02:00
Colin Snover
5a3d8337a6 SCI32: Change kRemapColors naming for consistency 2016-07-01 00:18:32 +02:00
Willem Jan Palenstijn
c6c9593840 Revert "SCI32: Fix broken Remap implementation"
This reverts commit cfda8b9ecd.

This is only to re-apply it immediately in a series of smaller commits.
2016-07-01 00:18:07 +02:00
Filippos Karapetis
a40e43f777 Merge pull request #770 from OmerMor/kgettime
SCI: Fixed KGetTime with SYSDATE subop in SCI0-LATE.
2016-07-01 00:54:44 +03:00
Colin Snover
28d97d0f55 SCI32: Specify default hardware rates
This normally happens in SSCI when the audio hardware is
initialised.

CID 1357048
2016-06-30 15:15:12 -05:00
Colin Snover
4ee1901706 SCI32: Add transparent pic plane type
It is not clear if this is ever actually used by game scripts,
though.
2016-06-30 14:04:57 -05:00
Colin Snover
e89bdf536d SCI32: Clean-up pass on rendering pipeline
This pass exposed two bugs, which have been fixed:

1. Checks of `_updated` and `_moved` were reversed in some areas,
   which lead to rendering bugs. In SQ6 the rendering bugs were
   subtle or non-existant, but in e.g. PQ:SWAT the Sierra logo and
   title screen animations were totally missing.

2. The renderer formerly kept reading from ScreenItemLists when
   new items were added in decrementScreenItemArrayCounts, but
   this was determined to be unnecessary.
2016-06-30 14:04:57 -05:00
Colin Snover
0310b4dc4d SCI32: Implement engine-accurate screen item list sorting
It seems highly probable that there are later SCI games that use
the "hi res" rendering path, so sorting and unsorting of
ScreenItemLists needs to be accurate.
2016-06-30 14:04:57 -05:00
Colin Snover
a785147d6c SCI32: Document & clean up extra rect argument for frameOut
This extra rect seems to probably only ever be used by VMD
playback in some SCI2.1 games.
2016-06-30 14:04:57 -05:00
Colin Snover
29f7a66af4 SCI32: Add low resolution constants
In a few places in the graphics system, fixed low-resolution values
are used instead of the game script resolution.
2016-06-30 14:04:56 -05:00
Willem Jan Palenstijn
d2f598cea6 CONFIGURE: Only open config.log after showing help
This prevents ./configure --help from clearing config.log.
2016-06-27 22:19:02 +02:00
Martin Kiewitz
9f789038b0 SCI: Add script patch for another Colonel's Bequest game bug
Command input stays disabled, when oiling the arm of the armor.
We fix this.
This script bug also happens, when using the original interpreter.

Fixes bug #7154
2016-06-27 21:42:18 +02:00
Omer Mor
36c7e7d252 SCI: Fixed KGetTime with SYSDATE subop in SCI0-LATE.
SSCI implementation of the SYSDATE subop of the GetTime kernel function was
changed between SCI0-LATE and SCI01: The base year used was changed from 1920 to
1980.
This subop is used in "Codename: Iceman" (Say "ask for date" to a passing girl
on the beach).

The Atari ST version of "Codename: Iceman" use the 1980 base year.
The Amiga version of "Codename: Iceman" appears to return the time instead of
date, with 0 for the YEAR part.
2016-06-27 08:16:58 +03:00
Colin Snover
1632bd50c8 SCI32: Fix benchmarking for QFG4 2016-06-26 12:44:36 -05:00
Colin Snover
60849a16cb SCI32: Change Color::operator!= to all operator== directly 2016-06-26 12:44:35 -05:00
Colin Snover
5e6f08d9fe SCI32: Enable aspect ratio correction on QFG4CD 2016-06-26 12:44:35 -05:00
Colin Snover
3ffde88b18 SCI32: Fix typo 2016-06-26 12:44:35 -05:00
Colin Snover
26e7d3d9e9 SCI32: Remove no-longer-relevant comment 2016-06-26 12:44:35 -05:00
Colin Snover
6feec9ed72 SCI32: Add more workarounds for SCI2.1early games
These games all share the same bad system script that always sends
NULL as a second argument to kDoSound(play).
2016-06-26 12:44:35 -05:00
Colin Snover
cfda8b9ecd SCI32: Fix broken Remap implementation
Remap would crash SCI2.1early games with 19 remap slots, and
did not actually work in most cases in SCI2.1mid+ games.

The SCI16 implementation was moved to its own separate file but
was otherwise touched as little as possible, so may still have
similar problems to the SCI32 code.

1. Split SCI16 and SCI32 code into separate files
2. Use -32 prefixes for SCI32 code and no prefix for SCI16 code,
   where possible, to match other existing code
3. Avoid accidental corruption of values from the VM that may be
   valid when signed or larger than 8 bits
4. Added documentation
5. Add missing remap CelObj calls
6. Inline where possible in performance-critical code paths
7. Fix bad `matchColor` function, and move it from GfxPalette to
   GfxRemap32 since it is only used by GfxRemap32
8. Fix bad capitalisation in getCycleMap
9. Remove unnecessary initialisation of SingleRemaps
10. Update architecture to more closely mirror how SSCI worked
11. Clarify the purpose of each type of remap type (and
    associated variable names)
12. Split large `apply` function into smaller units
13. Fix buffer overrun when loading a SCI2.1early game with remap
14. Remove use of `#define` constants
15. Warn instead of crashing with an error on invalid input (to
    match SSCI more closely)
16. Change the collision avoidance mechanism between the RemapType
    enum and remap kernel functions
17. Add save/load function
2016-06-26 12:42:58 -05:00