Workarounds for this excellent fan patch were deliberately
excluded because previous versions were distributed with a full
version of the game, but 1.3 is distributed as a true patch set.
Confirmed that this version is now completable.
In SCI 1.1 most palette operations copy entry 0 to the system palette,
such as when drawing a view. This continues an earlier fix which
included entry 0 when drawing a pic and exposed that this needs to
happen in other places too: 3de471de36
Fixes bug #11544 where a KQ6 RAVE resource ended up with the wrong
color in room 380. System palette entry 0 ended up as [7,7,7] when
the RAVE was drawn instead of black, the expected color, causing the
RAVE palette to merge incorrectly. [7,7,7] comes from pic 380's
palette, after which entry 0 should be set to black when drawing
view 5 and copying its palette, which is what now happens.
When drawing a pic while pal-very isn't active, SSCI 1.1 sets the
first 255 palette colors, as opposed to skipping the first when
normally inserting a palette. Without this, a palette cycle that
includes the first color will permanently alter the system palette,
such as in Hoyle4 when winning the Klondike game with certain
table backgrounds.
Fixes bugs #11164 and #11195
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.
These issues were identified by the STACK tool.
By default, the C++ new operator will throw an exception on allocation
failure, rather than returning a null pointer.
The result is that testing the returned pointer for null is redundant
and _may_ be removed by the compiler. This is thus optimization
unstable and may result in incorrect behaviour at runtime.
However, we do not use exceptions as they are not supported by all
compilers and may be disabled.
To make this stable without removing the null check, you could qualify
the new operator call with std::nothrow to indicate that this should
return a null, rather than throwing an exception.
However, using (std::nothrow) was not desirable due to the Symbian
toolchain lacking a <new> header.
A global solution to this was also not easy by redefining "new" as "new
(std::nothrow)" due to custom constructors in NDS toolchain and various
common classes.
Also, this would then need explicit checks for OOM adding to all new
usages as per C malloc which is untidy.
For now to remove this optimisation unstable code is best as it is
likely to not be present anyway, and OOM will cause a system library
exception instead, even without exceptions enabled in the application
code.
behaviour wasn't changed in SCI1, instead it seems that SSCI draws overlays to separate memory and then copies them over. Previous commit caused regression in qfg1vga (funny room)
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
Before only 255 was treated this way. This fixes part of the broken
dialog boxes in Jones CD (bug #3297111) which use priority 254,
and matches Jones CD disassembly.
In EGA games a pixel in the framebuffer is only 4 bits. We store a full
byte per pixel to allow undithering, but when comparing pixels for
flood-fill purposes, we should only compare the visible color of a
pixel.
This fixes bug #3078365 in Iceman.
fixes qfg3: right guard on top of the palace having wrong priority
fixes sq5 and all sorts of sci1.1 games: when loading wrong priority for some actors that fixed itself after one frame
svn-id: r51397