aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hugo/file.cpp2
-rw-r--r--engines/hugo/hugo.cpp2
-rw-r--r--engines/hugo/hugo.h6
-rw-r--r--engines/hugo/intro.cpp10
4 files changed, 16 insertions, 4 deletions
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index 740513d7b2..c287ebf6e8 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -563,6 +563,8 @@ void FileManager::readBootFile() {
if (_vm->_gameVariant == kGameVariantH1Dos) {
//TODO initialize properly _boot structure
warning("readBootFile - Skipping as H1 Dos may be a freeware");
+ memset(_vm->_boot.distrib, '\0', sizeof(_vm->_boot.distrib));
+ _vm->_boot.registered = kRegFreeware;
return;
} else {
error("Missing startup file");
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 226009ec5a..9a622290f9 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -673,7 +673,7 @@ void HugoEngine::calcMaxScore() {
void HugoEngine::endGame() {
debugC(1, kDebugEngine, "endGame");
- if (!_boot.registered)
+ if (_boot.registered != kRegRegistered)
Utils::Box(kBoxAny, "%s", _text->getTextEngine(kEsAdvertise));
Utils::Box(kBoxAny, "%s\n%s", _episode, getCopyrightString());
_status.viewState = kViewExit;
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 44ec001447..2de442e0f7 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -125,6 +125,12 @@ enum HugoDebugChannels {
kDebugMusic = 1 << 9
};
+enum HugoRegistered {
+ kRegShareware = 0,
+ kRegRegistered,
+ kRegFreeware
+};
+
/**
* Ways to dismiss a text/prompt box
*/
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index 689dfbfd7c..7551476300 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -119,15 +119,19 @@ bool intro_v1d::introPlay() {
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8");
char buffer[80];
- if (_vm->_boot.registered)
+ if (_vm->_boot.registered == kRegRegistered)
strcpy(buffer, "Registered Version");
- else
+ else if (_vm->_boot.registered == kRegShareware)
strcpy(buffer, "Shareware Version");
+ else if (_vm->_boot.registered == kRegFreeware)
+ strcpy(buffer, "Freeware Version");
+ else
+ error("Unknown registration flag in hugo.bsf: %d", _vm->_boot.registered);
font.drawString(&surf, buffer, 0, 163, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
font.drawString(&surf, _vm->getCopyrightString(), 0, 176, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
- if (scumm_stricmp(_vm->_boot.distrib, "David P. Gray")) {
+ if ((*_vm->_boot.distrib != '\0') && (scumm_stricmp(_vm->_boot.distrib, "David P. Gray"))) {
sprintf(buffer, "Distributed by %s.", _vm->_boot.distrib);
font.drawString(&surf, buffer, 0, 75, 320, _TMAGENTA, Graphics::kTextAlignCenter);
}