Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
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
|
|
Most of the time, we get a bitmap to draw on it. Exposing a buffer
avoids consumers having to create their own all the time, and
encourages use of common drawing code exposed by the buffer.
|
|
|
|
1. Inline borderSize constant in createFontBitmap for consistency
2. Fix "DrawTextBox GetLongest=0" warning to only appear in games
that actually had this check (SQ6 and MGDX)
3. "Fix" implementation of getTextSize for SCI2.1early, which
gave lines with word wrap disabled a height of 0
4. Add inlining hints to some methods in BitmapResource that were
missing them for some reason
|
|
This kernel call seems only to be used by KQ7 1.51 (which was
Windows-only) to send warnings to the user.
It was easy enough to do a basic implementation in the ScummVM
GUI rather than just make it an empty call, so now it is a thing.
|
|
These should be all the actually used subfunctions.
Co-authored-by: Colin Snover <github.com@zetafleet.com>
|
|
This line drawing code lives in a remodelled GfxPaint32 class
that is totally separate from GfxPaint16.
|
|
They were global in SSCI. This way secondary GfxText32 instances
(such as in ScrollWindow) use the correct scaling.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Titled text bitmaps do not appear to be used by any game scripts.
They seem to only be used by the error manager in SSCI, but
ScummVM has its own error handling, so we don’t need this
implementation.
|
|
CID 1351617, 1351618, 1351619, 1351620, 1351621, 1351622, 1354791.
|
|
This ensures that if there is a bug in the drawing code that causes
the row to be unset, it will not result in silently reading garbage
out of random memory.
CID 1354802
|
|
The previous implementation did not work properly, assigning the
next insertion index to the oldest object instead of filling empty
cache slots on a cache miss.
|
|
The old name matches the selector, but isn’t as clear.
|
|
These fields were written and never read in SSCI.
|
|
LSL6 hires sends rectangles to kernel calls that have negative
dimensions. SSCI did not care about this and would simply accept
these invalid rects, so we do the same, at least for now.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Thanks to snover for noticing this
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
The only calling code for this was removed in commit 3f2469c33ed6017d3c385fbbfd01a4e690987fbc
|