It is a regression from the recent Unicode font caching.
Do not store fonts that were not loaded (nullptr). Otherwise,
nullptr will be returned on a subsequent call.
This reverts commit 0f85939bc5.
Embarrassingly, my benchmark code was broken. move16 very much does
help, both in VRAM<->TT RAM and TT RAM<->TT RAM copying.
- Check for null pointer before handling any operations in getChunkNum function.
- Check for empty chunks to avoid extra operations.
- avoid signed/unsigned issue in chunk position.
- avoid possible overflow in cursor restoration logic
Added some checks to make sure The line continuations are not empty before adding them to the current line's word continuation to ensure consistency.
Also added some comments on previous code.
Made sure to append the chunks if it is within bounds.
Added the newChunk as a pointer to the current chunk.
That one was a bit heavy-handed: enums really shouldn't be passed as
const references.
Revert changes of:
- Common::CodePage
- Common::EventType
- Common::Keycode
- Common::Language
- Common::Platform
Additionally change ProjectDescription::setLanguage and
ProjectDescription::getLanguage in engines/mtropolis/runtime.{cpp,h} as
those used a Common::Language reference, too.
The TGL_TRIANLE_FAN was looping past the valid array size due to the way the
loop is written, relying on i and i+1 to draw the fan. Reducing iteration to
cnt - 1 fixes the access violation and the triangle fan draws properly.
Triangle fans need to use a vertex from the previous triangle to create the next
one. The original TGL code does this properly but it was edited at some time and
the iteration changed to move on to the next triangle rather than using the previous
vertex, causing the triangle fan to skip a triangle and render a weird rays thing.
The Cinepak decoder had an unweighted euclidean color distance calculation for palette matching. This was moved and rewritten to a color distance method on the palette class.
The original patch courtecy of IRC user grib. The original comment:
Try to coordinate using windows bitmap fonts in the MacFontManager needs to consider
pixels, points, and DPI
Font sizes are usually described in terms of "point" sizes, and rendered
as a number of pixels.
Windows fonts and Macintosh fonts used different DPI (dots per inch).
Bitmap fonts on Mac mostly used 72 dpi, so 72-point font would be about 72 pixels high.
Windows bitmap fonts mostly assumed 96 dpi, so a 72-point font would be 96 pixels high.
director:trektech loads a Windows bitmap font file that is nominally 12 point at 96 dpi. It is 14 pixels high.
Since we cache windows an mac fonts, this ensures that we check both caches
before attempting to generate substitutes, whuch affects greatly
performance in Windows Director games
We required version 110 for OpenGL backend shaders while we only checked
for version 100, although this version is not expected to work without
proper ARB extension support.
Increase minimum supported version to 1.10 which matches OpenGL 2.0
Disabled menus can still be opened. Menu items in disabled menus will
look and act as if they were individually disabled. Enabling the menu
will restore it to its pre-disabled state.