Age | Commit message (Collapse) | Author |
|
|
|
Bitmaps in ScrollWindow and Robot code are managed by the kernel
and not by game scripts, although they must be able to be
referenced through a reg_t. To prevent incorrect GC of bitmaps
that are in use but not referenced by any game script, explicit
memory management of hunk entries can be enabled.
|
|
|
|
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
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Not all SCI2.1late/SCI3 function signatures are fully known yet,
but all subops are now represented in the kernel tables.
|
|
This implementation is not 100% engine accurate, but it is
more accurate than what was there, and hopefully the differences
between this and the engine code are merely cosmetic.
The known (intentional) differences are:
1. Uses ScummVM rects inside the engine code, converting to/from
SCI rects on the kernel edges and when scaling
2. Fewer side effects when performing operations that *should*
have been pure from the start (like text dimension calculation).
Still not side-effect-free, but at least things like colours
and alignment do not need to be reset every time a measurement
is taken, unlike in the actual engine.
Editor controls and some other kBitmap code are temporarily
disabled as a result of changes to GfxText32 until they can be
updated to be engine-accurate.
|
|
This replaces "colour" to "color"
|
|
This at least prevents SQ6 from crashing when going into the
introduction
|
|
|
|
This is used in LSL6 hires and SQ6. This initial implementation is hackish
and only works in SQ6 (nothing is shown in LSL6)
|
|
This fixes occasional crashes when going to the map in GK1. Many thanks
to digitall for finding this through Valgrind
|
|
|
|
|
|
Also, removed duplicate code
|
|
|
|
|
|
- Initial implementation of kBitmap(0)
- Bugfixes for fonts in upscaled games
|
|
|
|
|
|
|
|
The old behavior is currently hacked in inside kernelTextSize(), as the
top of the subtitles frame is wrong if kTextWidth() is properly working...
|
|
This includes kCreateTextBitmap, and moves all of the text drawing code
into the new GfxText32 class
|