Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Only cursor remains to be updated to go through GfxFrameout, and
then we can let GfxScreen go back to being SCI16-only.
|
|
|
|
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.
|
|
This is used by Torin in room 50900.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
Controls that manage their own event loops and call frameOut
directly generally need to sleep in order to avoid 100% CPU,
just like the main VM event loop.
|
|
|
|
|
|
It is not clear if this is ever actually used by game scripts,
though.
|
|
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.
|
|
This extra rect seems to probably only ever be used by VMD
playback in some SCI2.1 games.
|
|
|
|
|
|
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
|
|
|
|
This line drawing code lives in a remodelled GfxPaint32 class
that is totally separate from GfxPaint16.
|
|
Most SCI32 games draw a "fred" object to the screen when the game
first starts to benchmark video performance. When framerate
throttling is enabled (which fixes many/most timing-related bugs
and reduces system load caused by unnecessary graphics updates),
the game's performance check will think that video card is slow,
causing some "high-performance" game features to be disabled.
To avoid this, we simply disable throttling during benchmarking by
detecting the "fred" object.
|
|
CID 1356125.
|
|
SSCI did not initialise minDiffIndex and would always flow into
the condition that sets it, but some compilers complain that the
value may be used uninitialised, so we will just set it to map
back to its original palette index by default.
|
|
CID 1351617, 1351618, 1351619, 1351620, 1351621, 1351622, 1354791.
|
|
These values are hard-coded in the engine executable for each game.
|
|
|
|
|
|
This code is engine-accurate now, not based on guesswork.
|
|
This code sneaked in with the graphics engine rewrite, but is not
ready yet to be used. It will return shortly, once it is enabled
and working.
|
|
|
|
|
|
The SCI2.1mid version of the game includes scripts designed for
SCI2.1early which means wrong parameters are sent to the kernel.
|
|
The priority map is not used at all in SCI32 at the engine level by
design, so all the relevant code that handles picture priority is
pretty much dead
|
|
|
|
Still not working
|
|
|
|
Error messages now contain the name of the failed function and
plane/screen item information that can be used to look up the
plane/screen item in a debugger, if the games ever crash in a
release in this code, per suggestion by @m-kiewitz.
Commented out messages that were used during the rearchitecture of
the main graphics engine are also removed, since that code is stable
now.
|
|
|
|
|
|
The implementation was not correctly rounding the scaled position
with mulru, leading to occasionally incorrect hit detection at
the boundaries of boxes.
|
|
If anything actually uses this feature, we should know about it
eventually.
|
|
|