[Scummvm-git-logs] scummvm master -> c0766fcd84183ad2f391fee84bf51aa3c581d207

Helco noreply at scummvm.org
Sat Feb 7 12:31:04 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
c0766fcd84 ALCACHOFA: Fix fake image handling in fonts


Commit: c0766fcd84183ad2f391fee84bf51aa3c581d207
    https://github.com/scummvm/scummvm/commit/c0766fcd84183ad2f391fee84bf51aa3c581d207
Author: Helco (hermann.noll at hotmail.com)
Date: 2026-02-07T13:30:50+01:00

Commit Message:
ALCACHOFA: Fix fake image handling in fonts

Changed paths:
    engines/alcachofa/graphics.cpp


diff --git a/engines/alcachofa/graphics.cpp b/engines/alcachofa/graphics.cpp
index ad3add55d5d..7849d71d177 100644
--- a/engines/alcachofa/graphics.cpp
+++ b/engines/alcachofa/graphics.cpp
@@ -679,7 +679,8 @@ void Font::load() {
 
 	Point cellSize;
 	for (auto image : _images) {
-		assert(image != nullptr); // no fake pictures in fonts please
+		if (image == nullptr)
+			continue; // the russian variant of adventuradecine-remastered unfortunately conatins fake images
 		if (g_engine->isV3() && image == _images[128])
 			continue;
 		cellSize.x = MAX(cellSize.x, image->w);
@@ -694,6 +695,7 @@ void Font::load() {
 	const float invWidth = 1.0f / atlasSurface.w;
 	const float invHeight = 1.0f / atlasSurface.h;
 	for (uint i = 0; i < _images.size(); i++) {
+		if (_images[i] == nullptr) continue;
 		if (g_engine->isV3() && i == 128) continue;
 
 		int offsetX = (i % 16) * cellSize.x + (cellSize.x - _images[i]->w) / 2;
@@ -742,6 +744,7 @@ void Font::drawCharacter(byte ch, Point centerPoint, Color color) {
 bool Font::isVisibleChar(byte ch) const {
 	return ch >= _charToImage &&
 		(uint)(ch - _charToImage) < _images.size() &&
+		_images[ch - _charToImage] != nullptr &&
 		ch - _charToImage != _spaceImageI;
 }
 




More information about the Scummvm-git-logs mailing list