[Scummvm-git-logs] scummvm master -> 512078bc9d9891124eac441d067d3a0aa7e03c7d
sluicebox
noreply at scummvm.org
Mon Feb 9 06:02:23 UTC 2026
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
1948712212 HUGO: Adjust HUGO3 Windows introduction for font
51f7085a82 HUGO: Remove font data from HUGO.DAT
512078bc9d HUGO: Add HUGO1 DOS introduction logo text
Commit: 1948712212e24dcae540f55fbcb5363696e505ad
https://github.com/scummvm/scummvm/commit/1948712212e24dcae540f55fbcb5363696e505ad
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2026-02-08T22:01:21-08:00
Commit Message:
HUGO: Adjust HUGO3 Windows introduction for font
We use a different font than the original to draw "X" characters on a
map, so we need to adjust the coordinates or else they are too low.
Changed paths:
engines/hugo/intro.cpp
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index 7b93fccf221..b2e528a2d9d 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -540,7 +540,9 @@ void intro_v3w::introInit() {
_vm->_file->readBackground(22); // display screen MAP_3w
_vm->_screen->displayBackground();
_introTicks = 0;
- _vm->_screen->loadFont(0);
+ // WORKAROUND: The original used Windows GDI to draw "X" on the map
+ // using the "Small Fonts" font. We use the game's smallest font.
+ _vm->_screen->loadFont(U_FONT5);
}
/**
@@ -553,7 +555,11 @@ bool intro_v3w::introPlay() {
if (_introTicks < getIntroSize()) {
// Scale viewport x_intro,y_intro to screen (offsetting y)
- _vm->_screen->writeStr(_introX[_introTicks], _introY[_introTicks] - kDibOffY, "x", _TBRIGHTWHITE);
+ // WORKAROUND: We apply our own additional offset to adjust
+ // for using a different font than the original. The original
+ // used Windows GDI to draw "X" with the "Small Font" font.
+ const int kMapFontOffset = 4;
+ _vm->_screen->writeStr(_introX[_introTicks], _introY[_introTicks] - kDibOffY - kMapFontOffset, "x", _TBRIGHTWHITE);
_vm->_screen->displayBackground();
// Text boxes at various times
Commit: 51f7085a820ab94d1fbff15ee771ddb752649d5e
https://github.com/scummvm/scummvm/commit/51f7085a820ab94d1fbff15ee771ddb752649d5e
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2026-02-08T22:01:21-08:00
Commit Message:
HUGO: Remove font data from HUGO.DAT
- Removes Windows font data from HUGO.DAT
- Uses Graphics::DosFont for Windows interface in DOS versions
The font data in HUGO.DAT was a temporary workaround until
DOS versions could draw their own font.
(HUGO.DAT regenerated in next commit)
Changed paths:
R devtools/create_hugo/staticfont.h
devtools/create_hugo/create_hugo.cpp
devtools/create_hugo/create_hugo.h
engines/hugo/display.cpp
engines/hugo/display.h
engines/hugo/hugo.cpp
engines/hugo/hugo.h
diff --git a/devtools/create_hugo/create_hugo.cpp b/devtools/create_hugo/create_hugo.cpp
index 87c06e74ca6..8e74d396d10 100644
--- a/devtools/create_hugo/create_hugo.cpp
+++ b/devtools/create_hugo/create_hugo.cpp
@@ -41,7 +41,6 @@
#include "staticmouse.h"
#include "staticparser.h"
#include "staticutil.h"
-#include "staticfont.h"
static void writeByte(FILE *fp, uint8 b) {
fwrite(&b, 1, 1, fp);
@@ -93,29 +92,6 @@ int main(int argc, char *argv[]) {
writeByte(outFile, _palette[i]);
}
- // The following fonts info have been added to avoid temporarly the .FON
- // used in the DOS version
- // font5
- nbrElem = sizeof(font5) / sizeof(byte);
- writeUint16BE(outFile, nbrElem);
-
- for (int j = 0; j < nbrElem; j++)
- writeByte(outFile, font5[j]);
-
- // font6
- nbrElem = sizeof(font6) / sizeof(byte);
- writeUint16BE(outFile, nbrElem);
-
- for (int j = 0; j < nbrElem; j++)
- writeByte(outFile, font6[j]);
-
- // font8
- nbrElem = sizeof(font8) / sizeof(byte);
- writeUint16BE(outFile, nbrElem);
-
- for (int j = 0; j < nbrElem; j++)
- writeByte(outFile, font8[j]);
-
// Write textData
// textData_1w
nbrElem = sizeof(textData_1w) / sizeof(char *);
diff --git a/devtools/create_hugo/create_hugo.h b/devtools/create_hugo/create_hugo.h
index 3b98df8d261..df9773a6291 100644
--- a/devtools/create_hugo/create_hugo.h
+++ b/devtools/create_hugo/create_hugo.h
@@ -27,7 +27,7 @@
#define DATAALIGNMENT 4
#define HUGO_DAT_VER_MAJ 0 // 1 byte
-#define HUGO_DAT_VER_MIN 42 // 1 byte
+#define HUGO_DAT_VER_MIN 43 // 1 byte
typedef unsigned char uint8;
typedef unsigned char byte;
diff --git a/devtools/create_hugo/staticfont.h b/devtools/create_hugo/staticfont.h
deleted file mode 100644
index 2d5ac6b267c..00000000000
--- a/devtools/create_hugo/staticfont.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef STATICFONT_H
-#define STATICFONT_H
-
-byte font5[] = {
- 6, 7, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7,
- 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0,
- 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7,
- 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0,
- 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7,
- 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0,
- 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7,
- 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0,
- 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7,
- 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0,
- 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7,
- 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0,
- 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 6, 2, 0, 0, 0, 0, 0, 0, 5, 1,
- 128, 128, 128, 0, 128, 2, 3, 160, 160, 3, 3, 160, 0, 160, 5, 3, 64, 224, 64, 224,
- 64, 5, 3, 160, 32, 64, 128, 160, 5, 3, 64, 160, 64, 160, 96, 2, 2, 64, 128, 5,
- 2, 64, 128, 128, 128, 64, 5, 2, 128, 64, 64, 64, 128, 4, 3, 0, 160, 64, 160, 4,
- 3, 0, 64, 224, 64, 5, 2, 0, 0, 0, 64, 128, 3, 3, 0, 0, 224, 5, 1, 0,
- 0, 0, 0, 128, 5, 3, 32, 32, 64, 128, 128, 5, 3, 224, 160, 160, 160, 224, 5, 1,
- 128, 128, 128, 128, 128, 5, 3, 224, 32, 224, 128, 224, 5, 3, 224, 32, 96, 32, 224, 5,
- 3, 160, 160, 224, 32, 32, 5, 3, 224, 128, 224, 32, 224, 5, 3, 224, 128, 224, 160, 224,
- 5, 3, 224, 32, 64, 64, 64, 5, 3, 224, 160, 224, 160, 224, 5, 3, 224, 160, 224, 32,
- 224, 4, 2, 0, 128, 0, 128, 5, 2, 0, 64, 0, 64, 128, 5, 3, 32, 64, 128, 64,
- 32, 4, 3, 0, 224, 0, 224, 5, 3, 128, 64, 32, 64, 128, 5, 3, 192, 32, 64, 0,
- 64, 5, 3, 64, 160, 160, 128, 96, 5, 3, 64, 160, 224, 160, 160, 5, 3, 192, 160, 192,
- 160, 192, 5, 3, 96, 128, 128, 128, 96, 5, 3, 192, 160, 160, 160, 192, 5, 3, 224, 128,
- 192, 128, 224, 5, 3, 224, 128, 192, 128, 128, 5, 3, 224, 128, 160, 160, 224, 5, 3, 160,
- 160, 224, 160, 160, 5, 3, 224, 64, 64, 64, 224, 5, 3, 32, 32, 32, 160, 64, 5, 3,
- 160, 160, 192, 160, 160, 5, 3, 128, 128, 128, 128, 224, 5, 3, 160, 224, 224, 160, 160, 5,
- 3, 160, 224, 224, 224, 160, 5, 3, 64, 160, 160, 160, 64, 5, 3, 192, 160, 192, 128, 128,
- 5, 3, 64, 160, 160, 64, 32, 5, 3, 192, 160, 192, 160, 160, 5, 3, 96, 128, 64, 32,
- 192, 5, 3, 224, 64, 64, 64, 64, 5, 3, 160, 160, 160, 160, 224, 5, 3, 160, 160, 160,
- 64, 64, 5, 3, 160, 160, 224, 224, 160, 5, 3, 160, 160, 64, 160, 160, 5, 3, 160, 160,
- 96, 32, 192, 5, 3, 224, 32, 64, 128, 224, 5, 2, 192, 128, 128, 128, 192, 5, 3, 128,
- 128, 64, 32, 32, 5, 2, 192, 64, 64, 64, 192, 2, 3, 64, 160, 5, 3, 0, 0, 0,
- 0, 224, 2, 2, 128, 64, 5, 3, 64, 160, 224, 160, 160, 5, 3, 192, 160, 192, 160, 192,
- 5, 3, 96, 128, 128, 128, 96, 5, 3, 192, 160, 160, 160, 192, 5, 3, 224, 128, 192, 128,
- 224, 5, 3, 224, 128, 192, 128, 128, 5, 3, 224, 128, 160, 160, 224, 5, 3, 160, 160, 224,
- 160, 160, 5, 3, 224, 64, 64, 64, 224, 5, 3, 32, 32, 32, 160, 64, 5, 3, 160, 160,
- 192, 160, 160, 5, 3, 128, 128, 128, 128, 224, 5, 3, 160, 224, 224, 160, 160, 5, 3, 160,
- 224, 224, 224, 160, 5, 3, 64, 160, 160, 160, 64, 5, 3, 192, 160, 192, 128, 128, 5, 3,
- 64, 160, 160, 64, 32, 5, 3, 192, 160, 192, 160, 160, 5, 3, 96, 128, 64, 32, 192, 5,
- 3, 224, 64, 64, 64, 64, 5, 3, 160, 160, 160, 160, 224, 5, 3, 160, 160, 160, 64, 64,
- 5, 3, 160, 160, 224, 224, 160, 5, 3, 160, 160, 64, 160, 160, 5, 3, 160, 160, 96, 32,
- 192, 5, 3, 224, 32, 64, 128, 224, 5, 3, 96, 64, 192, 64, 96, 5, 1, 128, 128, 0,
- 128, 128, 5, 3, 192, 64, 96, 64, 192, 1, 2, 64, 6, 1, 0, 0, 0, 0, 0, 0
-};
-
-byte font6[] = {
- 11, 11, 7, 6, 4, 12, 12, 24, 216, 112, 48, 7, 8, 0, 35, 99, 255, 96, 32, 0,
- 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6,
- 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0,
- 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0,
- 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0,
- 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7,
- 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0,
- 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0,
- 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0,
- 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0,
- 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6,
- 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0,
- 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0,
- 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 0,
- 0, 7, 3, 0, 0, 0, 0, 0, 0, 0, 7, 2, 192, 192, 192, 192, 0, 192, 192, 3,
- 7, 102, 102, 204, 5, 5, 80, 248, 80, 248, 80, 7, 6, 48, 124, 208, 120, 44, 248, 48,
- 7, 7, 194, 198, 12, 24, 48, 102, 198, 7, 6, 112, 216, 112, 116, 216, 216, 108, 3, 3,
- 96, 96, 192, 7, 3, 96, 192, 192, 192, 192, 192, 96, 7, 3, 192, 96, 96, 96, 96, 96,
- 192, 5, 5, 0, 0, 80, 32, 80, 6, 6, 0, 48, 48, 252, 48, 48, 8, 3, 0, 0,
- 0, 0, 0, 96, 96, 192, 4, 6, 0, 0, 0, 120, 7, 2, 0, 0, 0, 0, 0, 192,
- 192, 7, 7, 2, 6, 12, 24, 48, 96, 192, 7, 6, 120, 204, 204, 204, 204, 204, 120, 7,
- 4, 96, 224, 96, 96, 96, 96, 240, 7, 6, 120, 204, 12, 56, 96, 192, 252, 7, 6, 120,
- 204, 12, 56, 12, 204, 120, 7, 6, 204, 204, 204, 252, 12, 12, 12, 7, 6, 252, 192, 192,
- 248, 12, 204, 120, 7, 6, 60, 96, 192, 248, 204, 204, 120, 7, 6, 252, 12, 12, 24, 24,
- 48, 48, 7, 6, 120, 204, 204, 120, 204, 204, 120, 7, 6, 120, 204, 204, 124, 12, 24, 48,
- 7, 2, 0, 192, 192, 0, 192, 192, 0, 7, 3, 0, 96, 96, 0, 96, 96, 192, 7, 5,
- 24, 48, 96, 192, 96, 48, 24, 5, 6, 0, 0, 120, 0, 120, 7, 5, 192, 96, 48, 24,
- 48, 96, 192, 7, 6, 120, 204, 12, 24, 48, 0, 48, 7, 6, 120, 204, 204, 220, 216, 192,
- 124, 7, 6, 120, 204, 204, 252, 204, 204, 204, 7, 6, 248, 204, 204, 248, 204, 204, 248, 7,
- 6, 120, 204, 192, 192, 192, 204, 120, 7, 6, 248, 204, 204, 204, 204, 204, 248, 7, 6, 252,
- 192, 192, 248, 192, 192, 252, 7, 6, 252, 192, 192, 248, 192, 192, 192, 7, 6, 120, 204, 192,
- 220, 204, 204, 120, 7, 6, 204, 204, 204, 252, 204, 204, 204, 7, 6, 252, 48, 48, 48, 48,
- 48, 252, 7, 6, 12, 12, 12, 12, 12, 204, 120, 7, 6, 204, 204, 216, 240, 216, 204, 204,
- 7, 6, 192, 192, 192, 192, 192, 192, 252, 7, 8, 195, 231, 255, 219, 219, 195, 195, 7, 8,
- 195, 227, 243, 219, 207, 199, 195, 7, 6, 120, 204, 204, 204, 204, 204, 120, 7, 6, 248, 204,
- 204, 248, 192, 192, 192, 7, 6, 120, 204, 204, 204, 204, 216, 108, 7, 6, 248, 204, 204, 248,
- 240, 216, 204, 7, 6, 120, 204, 192, 120, 12, 204, 120, 7, 6, 252, 48, 48, 48, 48, 48,
- 48, 7, 6, 204, 204, 204, 204, 204, 204, 120, 7, 6, 204, 204, 204, 204, 204, 120, 48, 7,
- 8, 195, 195, 195, 219, 219, 255, 102, 7, 6, 204, 204, 120, 48, 120, 204, 204, 7, 6, 204,
- 204, 204, 120, 48, 48, 48, 7, 6, 252, 12, 24, 48, 96, 192, 252, 7, 4, 240, 192, 192,
- 192, 192, 192, 240, 7, 7, 128, 192, 96, 48, 24, 12, 6, 7, 4, 240, 48, 48, 48, 48,
- 48, 240, 3, 6, 48, 120, 204, 10, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 3,
- 3, 192, 192, 96, 7, 6, 0, 0, 120, 204, 204, 220, 108, 7, 6, 192, 192, 248, 204, 204,
- 204, 248, 7, 6, 0, 0, 120, 204, 192, 204, 120, 7, 6, 12, 12, 124, 204, 204, 204, 124,
- 7, 6, 0, 0, 120, 204, 248, 192, 124, 7, 6, 120, 204, 192, 240, 192, 192, 192, 10, 6,
- 0, 0, 124, 204, 204, 220, 108, 12, 204, 120, 7, 6, 192, 192, 216, 236, 204, 204, 204, 7,
- 2, 192, 0, 192, 192, 192, 192, 192, 10, 6, 12, 0, 12, 12, 12, 12, 12, 12, 204, 120,
- 7, 6, 192, 192, 204, 216, 240, 216, 204, 7, 2, 192, 192, 192, 192, 192, 192, 192, 7, 10,
- 0, 0, 0, 0, 219, 128, 238, 192, 204, 192, 204, 192, 204, 192, 7, 6, 0, 0, 248, 204,
- 204, 204, 204, 7, 6, 0, 0, 120, 204, 204, 204, 120, 10, 6, 0, 0, 248, 204, 204, 204,
- 248, 192, 192, 192, 10, 6, 0, 0, 124, 204, 204, 220, 108, 12, 12, 12, 7, 6, 0, 0,
- 248, 204, 192, 192, 192, 7, 6, 0, 0, 124, 192, 120, 12, 248, 7, 4, 96, 96, 240, 96,
- 96, 96, 96, 7, 6, 0, 0, 204, 204, 204, 204, 120, 7, 6, 0, 0, 204, 204, 204, 120,
- 48, 7, 8, 0, 0, 195, 195, 219, 255, 102, 7, 6, 0, 0, 204, 120, 48, 120, 204, 10,
- 6, 0, 0, 204, 204, 204, 204, 124, 12, 204, 120, 7, 6, 0, 0, 252, 24, 48, 96, 252,
- 7, 4, 112, 192, 96, 240, 96, 192, 112, 7, 2, 192, 192, 192, 0, 192, 192, 192, 7, 5,
- 224, 48, 96, 248, 96, 48, 224, 7, 7, 0, 0, 96, 146, 12, 0, 0, 7, 6, 0, 0,
- 0, 0, 0, 0, 0
-};
-
-byte font8[] = {
- 9, 8, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0,
- 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2,
- 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1,
- 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0,
- 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 3, 0, 7, 7,
- 192, 192, 192, 192, 0, 192, 192, 2, 3, 160, 160, 5, 5, 80, 248, 80, 248, 80, 7, 7,
- 40, 126, 168, 124, 42, 252, 40, 7, 7, 194, 196, 8, 16, 32, 70, 134, 1, 7, 0, 2,
- 2, 64, 128, 7, 3, 96, 192, 192, 192, 192, 192, 96, 7, 3, 192, 96, 96, 96, 96, 96,
- 192, 6, 6, 0, 72, 48, 252, 48, 72, 6, 5, 0, 32, 32, 248, 32, 32, 8, 3, 0,
- 0, 0, 0, 0, 96, 96, 192, 4, 5, 0, 0, 0, 248, 7, 2, 0, 0, 0, 0, 0,
- 192, 192, 7, 7, 2, 4, 8, 16, 32, 64, 128, 7, 6, 120, 204, 204, 204, 204, 204, 120,
- 7, 3, 96, 224, 96, 96, 96, 96, 96, 7, 7, 124, 198, 12, 24, 48, 96, 254, 7, 7,
- 124, 198, 6, 28, 6, 198, 124, 7, 7, 198, 198, 198, 254, 6, 6, 6, 7, 7, 254, 192,
- 192, 252, 6, 198, 124, 7, 7, 124, 198, 192, 252, 198, 198, 124, 7, 7, 254, 6, 6, 12,
- 12, 24, 24, 7, 7, 124, 198, 198, 124, 198, 198, 124, 7, 7, 124, 198, 198, 126, 6, 198,
- 124, 6, 2, 0, 192, 192, 0, 192, 192, 7, 3, 0, 96, 96, 0, 96, 96, 192, 7, 5,
- 24, 48, 96, 192, 96, 48, 24, 5, 5, 0, 0, 248, 0, 248, 7, 5, 192, 96, 48, 24,
- 48, 96, 192, 7, 7, 124, 198, 6, 12, 24, 0, 24, 1, 7, 0, 7, 7, 124, 198, 198,
- 254, 198, 198, 198, 7, 7, 252, 198, 198, 252, 198, 198, 252, 7, 7, 124, 198, 192, 192, 192,
- 198, 124, 7, 7, 252, 198, 198, 198, 198, 198, 252, 7, 7, 254, 192, 192, 248, 192, 192, 254,
- 7, 7, 254, 192, 192, 248, 192, 192, 192, 7, 7, 124, 198, 192, 206, 198, 198, 124, 7, 7,
- 198, 198, 198, 254, 198, 198, 198, 7, 6, 252, 48, 48, 48, 48, 48, 252, 7, 7, 6, 6,
- 6, 6, 6, 198, 124, 7, 7, 198, 198, 204, 248, 204, 198, 198, 7, 7, 192, 192, 192, 192,
- 192, 192, 254, 7, 7, 198, 238, 254, 214, 198, 198, 198, 7, 7, 198, 230, 246, 214, 222, 206,
- 198, 7, 7, 124, 198, 198, 198, 198, 198, 124, 7, 7, 252, 198, 198, 252, 192, 192, 192, 7,
- 7, 124, 198, 198, 198, 198, 204, 118, 7, 7, 252, 198, 198, 252, 204, 198, 198, 7, 7, 126,
- 192, 192, 124, 6, 6, 252, 7, 6, 252, 48, 48, 48, 48, 48, 48, 7, 7, 198, 198, 198,
- 198, 198, 198, 124, 7, 7, 198, 198, 198, 108, 108, 56, 16, 7, 7, 198, 198, 198, 214, 254,
- 238, 198, 7, 7, 198, 198, 108, 56, 108, 198, 198, 7, 7, 204, 204, 204, 120, 48, 48, 48,
- 7, 6, 252, 12, 24, 48, 96, 192, 252, 7, 3, 224, 192, 192, 192, 192, 192, 224, 7, 7,
- 128, 64, 32, 16, 8, 4, 2, 7, 3, 224, 96, 96, 96, 96, 96, 224, 3, 5, 32, 80,
- 136, 8, 7, 0, 0, 0, 0, 0, 0, 0, 254, 2, 2, 128, 64, 7, 7, 0, 0, 124,
- 198, 198, 198, 126, 7, 7, 192, 192, 252, 198, 198, 198, 252, 7, 7, 0, 0, 124, 198, 192,
- 198, 124, 7, 7, 6, 6, 126, 198, 198, 198, 126, 7, 7, 0, 0, 124, 198, 254, 192, 126,
- 7, 6, 120, 204, 192, 240, 192, 192, 192, 8, 7, 0, 0, 124, 198, 198, 126, 6, 124, 7,
- 7, 192, 192, 220, 230, 198, 198, 198, 7, 2, 0, 192, 0, 192, 192, 192, 192, 8, 6, 0,
- 12, 0, 12, 12, 12, 204, 120, 7, 7, 192, 192, 198, 204, 248, 204, 198, 7, 2, 192, 192,
- 192, 192, 192, 192, 192, 7, 7, 0, 0, 252, 214, 214, 214, 198, 7, 7, 0, 0, 220, 230,
- 198, 198, 198, 7, 7, 0, 0, 124, 198, 198, 198, 124, 8, 7, 0, 0, 124, 198, 198, 252,
- 192, 192, 8, 7, 0, 0, 124, 198, 198, 126, 6, 6, 7, 7, 0, 0, 220, 230, 192, 192,
- 192, 7, 7, 0, 0, 126, 192, 124, 6, 252, 7, 7, 96, 248, 96, 96, 96, 102, 60, 7,
- 7, 0, 0, 198, 198, 198, 198, 124, 7, 7, 0, 0, 198, 198, 108, 56, 16, 7, 7, 0,
- 0, 198, 198, 214, 214, 124, 7, 7, 0, 0, 198, 108, 56, 108, 198, 8, 7, 0, 0, 198,
- 198, 198, 126, 6, 252, 7, 6, 0, 0, 252, 24, 48, 96, 252, 7, 4, 48, 96, 96, 192,
- 96, 96, 48, 7, 2, 192, 192, 192, 0, 192, 192, 192, 7, 4, 192, 96, 96, 48, 96, 96,
- 192, 1, 2, 0, 1, 2, 0
-};
-
-#endif //STATICFONT_H
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index 9270777af10..d75f3bfe868 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -86,10 +86,6 @@ Screen::Screen(HugoEngine *vm) : _vm(vm) {
_dlAddIndex = 0;
_dlRestoreIndex = 0;
- for (int i = 0; i < kNumFonts; i++) {
- _arrayFont[i] = nullptr;
- fontLoadedFl[i] = false;
- }
for (int i = 0; i < kBlitListSize; i++) {
_dlBlistList[i]._x = 0;
_dlBlistList[i]._y = 0;
@@ -106,7 +102,6 @@ Screen::Screen(HugoEngine *vm) : _vm(vm) {
_dlRestoreList[i]._dx = 0;
_dlRestoreList[i]._dy = 0;
}
- _fnt = 0;
_paletteSize = 0;
_frontSurface.init(320, 200, 320, _frontBuffer, Graphics::PixelFormat::createFormatCLUT8());
@@ -361,56 +356,6 @@ void Screen::displayList(int update, ...) {
}
}
-/**
- * Write supplied character (font data) at sx,sy in supplied color
- * Font data as follows:
- * *(fontdata+1) = Font Height (pixels)
- * *(fontdata+1) = Font Width (pixels)
- * *(fontdata+x) = Font Bitmap (monochrome)
- */
-void Screen::writeChr(const int sx, const int sy, const byte color, const char *local_fontdata){
- debugC(2, kDebugDisplay, "writeChr(%d, %d, %d, %d)", sx, sy, color, local_fontdata[0]);
-
- byte height = local_fontdata[0];
- byte width = 8; //local_fontdata[1];
-
- // This can probably be optimized quite a bit...
- for (int y = 0; y < height; ++y) {
- for (int x = 0; x < width; ++x) {
- int pixel = y * width + x;
- int bitpos = pixel % 8;
- int offset = pixel / 8;
- byte bitTest = (1 << bitpos);
- if ((local_fontdata[2 + offset] & bitTest) == bitTest)
- _frontBuffer[(sy + y) * 320 + sx + x] = color;
- }
- }
-}
-
-/**
- * Returns height of characters in current font
- */
-int16 Screen::fontHeight() const {
- debugC(2, kDebugDisplay, "fontHeight()");
-
- static const int16 height[kNumFonts] = {5, 7, 8};
- return height[_fnt - kFirstFont];
-}
-
-/**
- * Returns length of supplied string in pixels
- */
-int16 Screen::stringLength(const char *s) const {
- debugC(2, kDebugDisplay, "stringLength(%s)", s);
-
- byte *const*fontArr = _font[_fnt];
- int16 sum = 0;
- for (; *s; s++)
- sum += *(fontArr[(uint)*s] + 1) + 1;
-
- return sum;
-}
-
/**
* Return x which would center supplied string
*/
@@ -420,23 +365,6 @@ int16 Screen::center(const char *s) const {
return (int16)((kXPix - stringLength(s)) >> 1);
}
-/**
- * Write string at sx,sy in supplied color in current font
- * If sx == CENTER, center it
- */
-void Screen::writeStr(int16 sx, const int16 sy, const char *s, const byte color) {
- debugC(2, kDebugDisplay, "writeStr(%d, %d, %s, %d)", sx, sy, s, color);
-
- if (sx == kCenter)
- sx = center(s);
-
- byte *const*font = _font[_fnt];
- for (; *s; s++) {
- writeChr(sx, sy, color, (char *)font[(uint)*s]);
- sx += *(font[(uint)*s] + 1) + 1;
- }
-}
-
/**
* Shadowed version of writestr
*/
@@ -897,11 +825,6 @@ void Screen::initNewScreenDisplay() {
void Screen::freeScreen() {
free(_curPalette);
free(_mainPalette);
-
- for (int i = 0; i < kNumFonts; i++) {
- if (_arrayFont[i])
- free(_arrayFont[i]);
- }
}
void Screen::selectInventoryObjId(const int16 objId) {
@@ -988,54 +911,28 @@ Screen_v1d::~Screen_v1d() {
}
/**
- * Load font file, construct font ptrs and reverse data bytes
- * TODO: This uses hardcoded fonts in hugo.dat, it should be replaced
- * by a proper implementation of .FON files
+ * Load font file. There is no font file in DOS, we use
+ * Graphics::DosFont to implement the Windows interface.
*/
void Screen_v1d::loadFont(const int16 fontId) {
- debugC(2, kDebugDisplay, "loadFont(%d)", fontId);
-
- assert(fontId < kNumFonts);
-
- _fnt = fontId - kFirstFont; // Set current font number
-
- if (fontLoadedFl[_fnt]) // If already loaded, return
- return;
-
- fontLoadedFl[_fnt] = true;
-
- memcpy(_fontdata[_fnt], _arrayFont[_fnt], _arrayFontSize[_fnt]);
- _font[_fnt][0] = _fontdata[_fnt]; // Store height,width of fonts
-
- int16 offset = 2; // Start at fontdata[2] ([0],[1] used for height,width)
-
- // Setup the font array (127 characters)
- for (int i = 1; i < 128; i++) {
- _font[_fnt][i] = _fontdata[_fnt] + offset;
- byte height = *(_fontdata[_fnt] + offset);
- byte width = *(_fontdata[_fnt] + offset + 1);
+}
- int16 size = height * ((width + 7) >> 3);
- for (int j = 0; j < size; j++)
- Utils::reverseByte(&_fontdata[_fnt][offset + 2 + j]);
+/**
+ * Returns height of characters in current font
+ */
+int16 Screen_v1d::fontHeight() const {
+ debugC(2, kDebugDisplay, "fontHeight()");
- offset += 2 + size;
- }
+ return _dosFont.getFontHeight();
}
/**
- * Load fonts from Hugo.dat
- * These fonts are a workaround to avoid handling TTF fonts used by DOS versions
- * TODO: Get rid of this function when the win1 fonts are supported
+ * Returns length of supplied string in pixels
*/
-void Screen_v1d::loadFontArr(Common::ReadStream &in) {
- for (int i = 0; i < kNumFonts; i++) {
- _arrayFontSize[i] = in.readUint16BE();
- _arrayFont[i] = (byte *)malloc(sizeof(byte) * _arrayFontSize[i]);
- for (int j = 0; j < _arrayFontSize[i]; j++) {
- _arrayFont[i][j] = in.readByte();
- }
- }
+int16 Screen_v1d::stringLength(const char *s) const {
+ debugC(2, kDebugDisplay, "stringLength(%s)", s);
+
+ return _dosFont.getStringWidth(s);
}
/**
@@ -1128,7 +1025,23 @@ void Screen_v1d::loadPalette(Common::SeekableReadStream &in) {
memcpy(_curPalette, egaPalette.data(), _paletteSize);
}
+void Screen_v1d::writeStr(int16 sx, const int16 sy, const char *s, const byte color) {
+ debugC(2, kDebugDisplay, "writeStr(%d, %d, %s, %d)", sx, sy, s, color);
+
+ if (sx == kCenter)
+ sx = center(s);
+
+ for (; *s; s++) {
+ _dosFont.drawChar(&_frontSurface, (byte)*s, sx, sy, color);
+ sx += 8;
+ }
+}
+
Screen_v1w::Screen_v1w(HugoEngine *vm) : Screen(vm) {
+ for (int i = 0; i < kNumFonts; i++) {
+ fontLoadedFl[i] = false;
+ }
+ _fnt = 0;
}
Screen_v1w::~Screen_v1w() {
@@ -1168,14 +1081,27 @@ void Screen_v1w::loadFont(const int16 fontId) {
}
/**
- * Skips the fonts used by the DOS versions
+ * Returns height of characters in current font
*/
-void Screen_v1w::loadFontArr(Common::ReadStream &in) {
- for (int i = 0; i < kNumFonts; i++) {
- uint16 numElem = in.readUint16BE();
- for (int j = 0; j < numElem; j++)
- in.readByte();
- }
+int16 Screen_v1w::fontHeight() const {
+ debugC(2, kDebugDisplay, "fontHeight()");
+
+ static const int16 height[kNumFonts] = {5, 7, 8};
+ return height[_fnt - kFirstFont];
+}
+
+/**
+ * Returns length of supplied string in pixels
+ */
+int16 Screen_v1w::stringLength(const char *s) const {
+ debugC(2, kDebugDisplay, "stringLength(%s)", s);
+
+ byte *const*fontArr = _font[_fnt];
+ int16 sum = 0;
+ for (; *s; s++)
+ sum += *(fontArr[(uint)*s] + 1) + 1;
+
+ return sum;
}
/**
@@ -1244,4 +1170,47 @@ void Screen_v1w::loadPalette(Common::SeekableReadStream &in) {
_curPalette[i] = _mainPalette[i] = in.readByte();
}
+/**
+ * Write string at sx,sy in supplied color in current font
+ * If sx == CENTER, center it
+ */
+void Screen_v1w::writeStr(int16 sx, const int16 sy, const char *s, const byte color) {
+ debugC(2, kDebugDisplay, "writeStr(%d, %d, %s, %d)", sx, sy, s, color);
+
+ if (sx == kCenter)
+ sx = center(s);
+
+ byte *const*font = _font[_fnt];
+ for (; *s; s++) {
+ writeChr(sx, sy, color, (char *)font[(uint)*s]);
+ sx += *(font[(uint)*s] + 1) + 1;
+ }
+}
+
+/**
+ * Write supplied character (font data) at sx,sy in supplied color
+ * Font data as follows:
+ * *(fontdata+1) = Font Height (pixels)
+ * *(fontdata+1) = Font Width (pixels)
+ * *(fontdata+x) = Font Bitmap (monochrome)
+ */
+void Screen_v1w::writeChr(const int sx, const int sy, const byte color, const char *local_fontdata){
+ debugC(2, kDebugDisplay, "writeChr(%d, %d, %d, %d)", sx, sy, color, local_fontdata[0]);
+
+ byte height = local_fontdata[0];
+ byte width = 8; //local_fontdata[1];
+
+ // This can probably be optimized quite a bit...
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int pixel = y * width + x;
+ int bitpos = pixel % 8;
+ int offset = pixel / 8;
+ byte bitTest = (1 << bitpos);
+ if ((local_fontdata[2 + offset] & bitTest) == bitTest)
+ _frontBuffer[(sy + y) * 320 + sx + x] = color;
+ }
+ }
+}
+
} // End of namespace Hugo
diff --git a/engines/hugo/display.h b/engines/hugo/display.h
index 8aa696a66ce..a3c52cf8308 100644
--- a/engines/hugo/display.h
+++ b/engines/hugo/display.h
@@ -57,10 +57,9 @@ public:
virtual ~Screen();
virtual void loadFont(int16 fontId) = 0;
- virtual void loadFontArr(Common::ReadStream &in) = 0;
- int16 fontHeight() const;
- int16 stringLength(const char *s) const;
+ virtual int16 fontHeight() const = 0;
+ virtual int16 stringLength(const char *s) const = 0;
void displayBackground();
virtual void displayFrame(const int sx, const int sy, Seq *seq, const bool foreFl) = 0;
@@ -91,7 +90,7 @@ public:
void shadowStr(int16 sx, const int16 sy, const char *s, const byte color);
void showCursor();
void userHelp() const;
- void writeStr(int16 sx, const int16 sy, const char *s, const byte color);
+ virtual void writeStr(int16 sx, const int16 sy, const char *s, const byte color) = 0;
Common::Rect drawDosText(byte x, byte y, const char *text, byte color);
byte getDosMessageBoxBorder() const;
Common::KeyState dosMessageBox(const Common::String &text, bool protect = false, TtsOptions ttsOptions = kTtsReplaceNewlines);
@@ -110,20 +109,9 @@ protected:
static const int kRectListSize = 16; // Size of add/restore rect lists
static const int kBlitListSize = kRectListSize * 2; // Size of dirty rect blit list
static const int kShapeSize = 24;
- static const int kFontLength = 128; // Number of chars in font
- static const int kFontSize = 1200; // Max size of font data
- static const int kNumFonts = 3; // Number of dib fonts
static const byte stdMouseCursorHeight = 20;
static const byte stdMouseCursorWidth = 12;
- bool fontLoadedFl[kNumFonts];
-
- // Fonts used in dib (non-GDI)
- byte *_arrayFont[kNumFonts];
- byte _fnt; // Current font number
- byte _fontdata[kNumFonts][kFontSize]; // Font data
- byte *_font[kNumFonts][kFontLength]; // Ptrs to each char
- int16 _arrayFontSize[kNumFonts];
byte *_mainPalette;
byte *_curPalette;
byte _paletteSize;
@@ -137,13 +125,14 @@ protected:
inline bool isInY(const int16 y, const Rect *rect) const;
inline bool isOverlapping(const Rect *rectA, const Rect *rectB) const;
+ int16 center(const char *s) const;
+
private:
byte _iconImage[kInvDx * kInvDy];
Icondib _iconBuffer; // Inventory icon DIB
int16 mergeLists(Rect *list, Rect *blist, const int16 len, int16 blen);
- int16 center(const char *s) const;
Viewdib _backBuffer;
Viewdib _GUIBuffer; // User interface images
@@ -159,7 +148,6 @@ private:
void createPal();
void merge(const Rect *rectA, Rect *rectB);
- void writeChr(const int sx, const int sy, const byte color, const char *local_fontdata);
};
class Screen_v1d : public Screen {
@@ -168,11 +156,14 @@ public:
~Screen_v1d() override;
void loadFont(int16 fontId) override;
- void loadFontArr(Common::ReadStream &in) override;
+ int16 fontHeight() const override;
+ int16 stringLength(const char *s) const override;
void displayFrame(const int sx, const int sy, Seq *seq, const bool foreFl) override;
void loadPalette(Common::SeekableReadStream &in) override;
+
+ void writeStr(int16 sx, const int16 sy, const char *s, const byte color) override;
protected:
OverlayState findOvl(Seq *seqPtr, ImagePtr dstPtr, uint16 y);
};
@@ -183,13 +174,29 @@ public:
~Screen_v1w() override;
void loadFont(int16 fontId) override;
- void loadFontArr(Common::ReadStream &in) override;
+ int16 fontHeight() const override;
+ int16 stringLength(const char *s) const override;
void displayFrame(const int sx, const int sy, Seq *seq, const bool foreFl) override;
void loadPalette(Common::SeekableReadStream &in) override;
+
+ void writeStr(int16 sx, const int16 sy, const char *s, const byte color) override;
protected:
+ static const int kFontLength = 128; // Number of chars in font
+ static const int kFontSize = 1200; // Max size of font data
+ static const int kNumFonts = 3; // Number of dib fonts
+
+ bool fontLoadedFl[kNumFonts];
+
+ // Fonts used in dib (non-GDI)
+ byte _fnt; // Current font number
+ byte _fontdata[kNumFonts][kFontSize]; // Font data
+ byte *_font[kNumFonts][kFontLength]; // Ptrs to each char
+
OverlayState findOvl(Seq *seqPtr, ImagePtr dstPtr, uint16 y);
+private:
+ void writeChr(const int sx, const int sy, const byte color, const char *local_fontdata);
};
} // End of namespace Hugo
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index ce3338f5088..b7a2964440d 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -489,7 +489,6 @@ bool HugoEngine::loadHugoDat() {
_numVariant = in.readUint16BE();
_screen->loadPalette(in);
- _screen->loadFontArr(in);
_text->loadAllTexts(in);
_intro->loadIntroData(in);
_parser->loadArrayReqs(in);
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 8105ab7c577..553aea8d56d 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -31,7 +31,7 @@
#include "hugo/detection.h"
#define HUGO_DAT_VER_MAJ 0 // 1 byte
-#define HUGO_DAT_VER_MIN 42 // 1 byte
+#define HUGO_DAT_VER_MIN 43 // 1 byte
#define DATAALIGNMENT 4
namespace Common {
Commit: 512078bc9d9891124eac441d067d3a0aa7e03c7d
https://github.com/scummvm/scummvm/commit/512078bc9d9891124eac441d067d3a0aa7e03c7d
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2026-02-08T22:01:22-08:00
Commit Message:
HUGO: Add HUGO1 DOS introduction logo text
Changed paths:
devtools/create_hugo/create_hugo.cpp
devtools/create_hugo/create_hugo.h
devtools/create_hugo/staticintro.h
dists/engine-data/hugo.dat
engines/hugo/hugo.h
engines/hugo/intro.cpp
engines/hugo/intro.h
diff --git a/devtools/create_hugo/create_hugo.cpp b/devtools/create_hugo/create_hugo.cpp
index 8e74d396d10..6d52293d12b 100644
--- a/devtools/create_hugo/create_hugo.cpp
+++ b/devtools/create_hugo/create_hugo.cpp
@@ -361,6 +361,12 @@ int main(int argc, char *argv[]) {
writeByte(outFile, y_intro_v3[i]);
}
+ nbrElem = sizeof(logo_intro_v1d) / sizeof(byte);
+ writeUint16BE(outFile, nbrElem);
+ for (i = 0; i < nbrElem; i++) {
+ writeByte(outFile, logo_intro_v1d[i]);
+ }
+
// arrayReqs_1w
nbrElem = sizeof(arrayReqs_1w) / sizeof(uint16 *);
writeUint16Array(outFile, arrayReqs_1w, nbrElem);
diff --git a/devtools/create_hugo/create_hugo.h b/devtools/create_hugo/create_hugo.h
index df9773a6291..8ef890602f8 100644
--- a/devtools/create_hugo/create_hugo.h
+++ b/devtools/create_hugo/create_hugo.h
@@ -27,7 +27,7 @@
#define DATAALIGNMENT 4
#define HUGO_DAT_VER_MAJ 0 // 1 byte
-#define HUGO_DAT_VER_MIN 43 // 1 byte
+#define HUGO_DAT_VER_MIN 44 // 1 byte
typedef unsigned char uint8;
typedef unsigned char byte;
diff --git a/devtools/create_hugo/staticintro.h b/devtools/create_hugo/staticintro.h
index 81eb08ce0f2..820d9fea753 100644
--- a/devtools/create_hugo/staticintro.h
+++ b/devtools/create_hugo/staticintro.h
@@ -77,4 +77,34 @@ const char *textIntro_v3[NUM_INTRO_TEXT_V3] = {
"Finally, hopelessly lost over a\nSouth American Jungle, the plane\nabout to run out of gas, Hugo\nspots a clearing just big enough\nto land it.\n\nWith fingers clenching the controls\nhe shouts: Hold on Penelope, we're\ngoing down...!"
};
+// Hugo1 DOS "Hugo's" logo. Original drew this using the "Script" vector font
+// and the Microsoft QuickC runtime. This can be removed if Graphics::WinFont
+// ever supports Win 1.0 vector fonts (there are only three), using the same
+// line drawing algorithm as QuickC, the same resizing algorithm as QuickC,
+// while also supporting characters that extend beyond their bounding box.
+const byte logo_intro_v1d[] = {
+ 0x07, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x08, 0xc0, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
+ 0x10, 0x20, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
+ 0x10, 0x20, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x08, 0x20, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x06, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x03, 0x81, 0x01, 0x01, 0x03, 0xc4, 0x0f, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x81, 0x01, 0x01, 0x0c, 0x34, 0x32, 0xc0, 0x00, 0x60, 0x00,
+ 0x01, 0x01, 0x0b, 0x02, 0x08, 0x08, 0x62, 0x21, 0x00, 0x98, 0x20,
+ 0x02, 0x02, 0x11, 0x06, 0x18, 0x08, 0xa1, 0x26, 0x00, 0x04, 0x40,
+ 0x84, 0x02, 0x22, 0x1c, 0x28, 0x13, 0x20, 0xf8, 0x00, 0x04, 0x80,
+ 0x88, 0x02, 0x42, 0x64, 0xc8, 0x74, 0x21, 0x80, 0x01, 0x0f, 0x00,
+ 0x70, 0x01, 0x83, 0x83, 0x07, 0xf8, 0x1e, 0x00, 0x00, 0xfc, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
#endif
diff --git a/dists/engine-data/hugo.dat b/dists/engine-data/hugo.dat
index 99fc8e17360..a57e1b5e3a3 100644
Binary files a/dists/engine-data/hugo.dat and b/dists/engine-data/hugo.dat differ
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 553aea8d56d..72c3d12c340 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -31,7 +31,7 @@
#include "hugo/detection.h"
#define HUGO_DAT_VER_MAJ 0 // 1 byte
-#define HUGO_DAT_VER_MIN 43 // 1 byte
+#define HUGO_DAT_VER_MIN 44 // 1 byte
#define DATAALIGNMENT 4
namespace Common {
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index b2e528a2d9d..613bad0d68c 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -57,7 +57,7 @@ byte IntroHandler::getIntroSize() const {
}
/**
- * Read _introX and _introY from hugo.dat
+ * Read _introX and _introY and _logo_v1d from hugo.dat
*/
void IntroHandler::loadIntroData(Common::SeekableReadStream &in) {
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
@@ -74,12 +74,20 @@ void IntroHandler::loadIntroData(Common::SeekableReadStream &in) {
in.skip(numRows * 2);
}
}
+
+ int logo_v1d_size = in.readUint16BE();
+ _logo_v1d = (byte *)malloc(sizeof(byte) * logo_v1d_size);
+ for (int i = 0; i < logo_v1d_size; i++) {
+ _logo_v1d[i] = in.readByte();
+ }
}
void IntroHandler::freeIntroData() {
free(_introX);
free(_introY);
_introX = _introY = nullptr;
+ free(_logo_v1d);
+ _logo_v1d = nullptr;
}
/**
@@ -203,15 +211,7 @@ bool intro_v1d::introPlay() {
}
// SCRIPT, size 24-16
- Common::strcpy_s(buffer, "Hugo's");
-
- if (_font.loadFromFON("SCRIPT.FON")) {
- _font.drawString(&_surf, buffer, 0, 20, 320, _TMAGENTA, Graphics::kTextAlignCenter);
- } else {
- // Workaround: SCRIPT.FON doesn't load properly at the moment
- _vm->_screen->loadFont(2);
- _vm->_screen->writeStr(kCenter, 20, buffer, _TMAGENTA);
- }
+ drawLogo(119, 22, _TMAGENTA); // "Hugo's"
// TROMAN, size 30-24
if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 24)))
@@ -333,6 +333,23 @@ bool intro_v1d::introPlay() {
return (++_introTicks >= introSize);
}
+void intro_v1d::drawLogo(int left, int top, int color) {
+ const int width = 11;
+ const int height = 22;
+
+ int logoIndex = 0;
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ byte b = _logo_v1d[logoIndex++];
+ for (int i = 0; i < 8; i++) {
+ if (b & (1 << (7 - i))) {
+ _surf.setPixel(left + (x * 8) + i, top + y, color);
+ }
+ }
+ }
+ }
+}
+
intro_v2d::intro_v2d(HugoEngine *vm) : IntroHandler(vm) {
}
diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h
index ad06a71764c..5daeae219bd 100644
--- a/engines/hugo/intro.h
+++ b/engines/hugo/intro.h
@@ -63,6 +63,7 @@ protected:
byte *_introY;
byte _introXSize;
int16 _introTicks; // Count calls to introPlay()
+ byte *_logo_v1d;
bool wait(uint32 delay);
};
@@ -86,6 +87,8 @@ public:
void introInit() override;
bool introPlay() override;
private:
+ void drawLogo(int left, int top, int color);
+
int _introState;
};
More information about the Scummvm-git-logs
mailing list