HUGO: Fix registration messages for H1 Dos Freeware version (in intro)

This commit is contained in:
strangerke 2011-03-07 19:40:20 +01:00
parent 4ddc66d68e
commit 29b5b4afa6
4 changed files with 16 additions and 4 deletions

View File

@ -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");

View File

@ -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;

View File

@ -125,6 +125,12 @@ enum HugoDebugChannels {
kDebugMusic = 1 << 9
};
enum HugoRegistered {
kRegShareware = 0,
kRegRegistered,
kRegFreeware
};
/**
* Ways to dismiss a text/prompt box
*/

View File

@ -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);
}