aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hugo/file.h16
-rw-r--r--engines/hugo/file_v1w.cpp28
-rw-r--r--engines/hugo/file_v2d.cpp46
-rw-r--r--engines/hugo/file_v3d.cpp60
-rw-r--r--engines/hugo/intro.cpp110
-rw-r--r--engines/hugo/intro.h6
-rw-r--r--engines/hugo/route.cpp22
-rw-r--r--engines/hugo/route.h4
8 files changed, 146 insertions, 146 deletions
diff --git a/engines/hugo/file.h b/engines/hugo/file.h
index 81d3c73f5a..817bf49daf 100644
--- a/engines/hugo/file.h
+++ b/engines/hugo/file.h
@@ -85,14 +85,14 @@ protected:
* Structure of scenery file lookup entry
*/
struct sceneBlock_t {
- uint32 _scene_off;
- uint32 _scene_len;
- uint32 _b_off;
- uint32 _b_len;
- uint32 _o_off;
- uint32 _o_len;
- uint32 _ob_off;
- uint32 _ob_len;
+ uint32 _sceneOffset;
+ uint32 _sceneLength;
+ uint32 _boundaryOffset;
+ uint32 _boundaryLength;
+ uint32 _overlayOffset;
+ uint32 _overlayLength;
+ uint32 _baseOffset;
+ uint32 _baseLength;
};
struct _PCCHeader_t { // Structure of PCX file header
diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp
index 3bb4b66367..fba13d6915 100644
--- a/engines/hugo/file_v1w.cpp
+++ b/engines/hugo/file_v1w.cpp
@@ -52,28 +52,28 @@ void FileManager_v1w::readOverlay(const int screenNum, image_pt image, ovl_t ove
_sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET);
sceneBlock_t sceneBlock; // Database header entry
- sceneBlock._scene_off = _sceneryArchive1.readUint32LE();
- sceneBlock._scene_len = _sceneryArchive1.readUint32LE();
- sceneBlock._b_off = _sceneryArchive1.readUint32LE();
- sceneBlock._b_len = _sceneryArchive1.readUint32LE();
- sceneBlock._o_off = _sceneryArchive1.readUint32LE();
- sceneBlock._o_len = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_off = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_len = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseLength = _sceneryArchive1.readUint32LE();
uint32 i = 0;
switch (overlayType) {
case kOvlBoundary:
- _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET);
- i = sceneBlock._b_len;
+ _sceneryArchive1.seek(sceneBlock._boundaryOffset, SEEK_SET);
+ i = sceneBlock._boundaryLength;
break;
case kOvlOverlay:
- _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET);
- i = sceneBlock._o_len;
+ _sceneryArchive1.seek(sceneBlock._overlayOffset, SEEK_SET);
+ i = sceneBlock._overlayLength;
break;
case kOvlBase:
- _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET);
- i = sceneBlock._ob_len;
+ _sceneryArchive1.seek(sceneBlock._baseOffset, SEEK_SET);
+ i = sceneBlock._baseLength;
break;
default:
error("Bad overlayType: %d", overlayType);
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index 009b0b0bb8..7239e5174a 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -81,16 +81,16 @@ void FileManager_v2d::readBackground(const int screenIndex) {
_sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET);
sceneBlock_t sceneBlock; // Read a database header entry
- sceneBlock._scene_off = _sceneryArchive1.readUint32LE();
- sceneBlock._scene_len = _sceneryArchive1.readUint32LE();
- sceneBlock._b_off = _sceneryArchive1.readUint32LE();
- sceneBlock._b_len = _sceneryArchive1.readUint32LE();
- sceneBlock._o_off = _sceneryArchive1.readUint32LE();
- sceneBlock._o_len = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_off = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_len = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseLength = _sceneryArchive1.readUint32LE();
- _sceneryArchive1.seek(sceneBlock._scene_off, SEEK_SET);
+ _sceneryArchive1.seek(sceneBlock._sceneOffset, SEEK_SET);
// Read the image into dummy seq and static dib_a
seq_t *dummySeq; // Image sequence structure for Read_pcx
@@ -108,28 +108,28 @@ void FileManager_v2d::readOverlay(const int screenNum, image_pt image, ovl_t ove
_sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET);
sceneBlock_t sceneBlock; // Database header entry
- sceneBlock._scene_off = _sceneryArchive1.readUint32LE();
- sceneBlock._scene_len = _sceneryArchive1.readUint32LE();
- sceneBlock._b_off = _sceneryArchive1.readUint32LE();
- sceneBlock._b_len = _sceneryArchive1.readUint32LE();
- sceneBlock._o_off = _sceneryArchive1.readUint32LE();
- sceneBlock._o_len = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_off = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_len = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseLength = _sceneryArchive1.readUint32LE();
uint32 i = 0;
switch (overlayType) {
case kOvlBoundary:
- _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET);
- i = sceneBlock._b_len;
+ _sceneryArchive1.seek(sceneBlock._boundaryOffset, SEEK_SET);
+ i = sceneBlock._boundaryLength;
break;
case kOvlOverlay:
- _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET);
- i = sceneBlock._o_len;
+ _sceneryArchive1.seek(sceneBlock._overlayOffset, SEEK_SET);
+ i = sceneBlock._overlayLength;
break;
case kOvlBase:
- _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET);
- i = sceneBlock._ob_len;
+ _sceneryArchive1.seek(sceneBlock._baseOffset, SEEK_SET);
+ i = sceneBlock._baseLength;
break;
default:
error("Bad overlayType: %d", overlayType);
diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp
index 99a3a68d9e..34c745efb6 100644
--- a/engines/hugo/file_v3d.cpp
+++ b/engines/hugo/file_v3d.cpp
@@ -53,22 +53,22 @@ void FileManager_v3d::readBackground(const int screenIndex) {
_sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET);
sceneBlock_t sceneBlock; // Read a database header entry
- sceneBlock._scene_off = _sceneryArchive1.readUint32LE();
- sceneBlock._scene_len = _sceneryArchive1.readUint32LE();
- sceneBlock._b_off = _sceneryArchive1.readUint32LE();
- sceneBlock._b_len = _sceneryArchive1.readUint32LE();
- sceneBlock._o_off = _sceneryArchive1.readUint32LE();
- sceneBlock._o_len = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_off = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_len = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseLength = _sceneryArchive1.readUint32LE();
seq_t *dummySeq; // Image sequence structure for Read_pcx
if (screenIndex < 20) {
- _sceneryArchive1.seek(sceneBlock._scene_off, SEEK_SET);
+ _sceneryArchive1.seek(sceneBlock._sceneOffset, SEEK_SET);
// Read the image into dummy seq and static dib_a
dummySeq = readPCX(_sceneryArchive1, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex));
} else {
- _sceneryArchive2.seek(sceneBlock._scene_off, SEEK_SET);
+ _sceneryArchive2.seek(sceneBlock._sceneOffset, SEEK_SET);
// Read the image into dummy seq and static dib_a
dummySeq = readPCX(_sceneryArchive2, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex));
}
@@ -113,30 +113,30 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove
_sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET);
sceneBlock_t sceneBlock; // Database header entry
- sceneBlock._scene_off = _sceneryArchive1.readUint32LE();
- sceneBlock._scene_len = _sceneryArchive1.readUint32LE();
- sceneBlock._b_off = _sceneryArchive1.readUint32LE();
- sceneBlock._b_len = _sceneryArchive1.readUint32LE();
- sceneBlock._o_off = _sceneryArchive1.readUint32LE();
- sceneBlock._o_len = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_off = _sceneryArchive1.readUint32LE();
- sceneBlock._ob_len = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._sceneLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._overlayLength = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseOffset = _sceneryArchive1.readUint32LE();
+ sceneBlock._baseLength = _sceneryArchive1.readUint32LE();
uint32 i = 0;
if (screenNum < 20) {
switch (overlayType) {
case kOvlBoundary:
- _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET);
- i = sceneBlock._b_len;
+ _sceneryArchive1.seek(sceneBlock._boundaryOffset, SEEK_SET);
+ i = sceneBlock._boundaryLength;
break;
case kOvlOverlay:
- _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET);
- i = sceneBlock._o_len;
+ _sceneryArchive1.seek(sceneBlock._overlayOffset, SEEK_SET);
+ i = sceneBlock._overlayLength;
break;
case kOvlBase:
- _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET);
- i = sceneBlock._ob_len;
+ _sceneryArchive1.seek(sceneBlock._baseOffset, SEEK_SET);
+ i = sceneBlock._baseLength;
break;
default:
error("Bad overlayType: %d", overlayType);
@@ -166,16 +166,16 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove
} else {
switch (overlayType) {
case kOvlBoundary:
- _sceneryArchive2.seek(sceneBlock._b_off, SEEK_SET);
- i = sceneBlock._b_len;
+ _sceneryArchive2.seek(sceneBlock._boundaryOffset, SEEK_SET);
+ i = sceneBlock._boundaryLength;
break;
case kOvlOverlay:
- _sceneryArchive2.seek(sceneBlock._o_off, SEEK_SET);
- i = sceneBlock._o_len;
+ _sceneryArchive2.seek(sceneBlock._overlayOffset, SEEK_SET);
+ i = sceneBlock._overlayLength;
break;
case kOvlBase:
- _sceneryArchive2.seek(sceneBlock._ob_off, SEEK_SET);
- i = sceneBlock._ob_len;
+ _sceneryArchive2.seek(sceneBlock._baseOffset, SEEK_SET);
+ i = sceneBlock._baseLength;
break;
default:
error("Bad overlayType: %d", overlayType);
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index 599d8f21d3..f2ae06eb39 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -86,12 +86,12 @@ void intro_v1d::preNewGame() {
void intro_v1d::introInit() {
_introState = 0;
- introTicks = 0;
- surf.w = 320;
- surf.h = 200;
- surf.pixels = _vm->_screen->getFrontBuffer();
- surf.pitch = 320;
- surf.format = Graphics::PixelFormat::createFormatCLUT8();
+ _introTicks = 0;
+ _surf.w = 320;
+ _surf.h = 200;
+ _surf.pixels = _vm->_screen->getFrontBuffer();
+ _surf.pitch = 320;
+ _surf.format = Graphics::PixelFormat::createFormatCLUT8();
_vm->_screen->displayList(kDisplayInit);
}
@@ -101,7 +101,7 @@ bool intro_v1d::introPlay() {
if (_vm->getGameStatus()._skipIntroFl)
return true;
- if (introTicks < introSize) {
+ if (_introTicks < introSize) {
switch (_introState++) {
case 0:
_vm->_screen->drawRectangle(true, 0, 0, 319, 199, _TMAGENTA);
@@ -113,7 +113,7 @@ bool intro_v1d::introPlay() {
_vm->_screen->drawShape(250,92,_TLIGHTMAGENTA,_TMAGENTA);
// TROMAN, size 10-5
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8");
char buffer[80];
@@ -126,19 +126,19 @@ bool intro_v1d::introPlay() {
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);
+ _font.drawString(&_surf, buffer, 0, 163, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, _vm->getCopyrightString(), 0, 176, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
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);
+ _font.drawString(&_surf, buffer, 0, 75, 320, _TMAGENTA, Graphics::kTextAlignCenter);
}
// SCRIPT, size 24-16
strcpy(buffer, "Hugo's");
- if (font.loadFromFON("SCRIPT.FON")) {
- font.drawString(&surf, buffer, 0, 20, 320, _TMAGENTA, Graphics::kTextAlignCenter);
+ 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);
@@ -146,78 +146,78 @@ bool intro_v1d::introPlay() {
}
// TROMAN, size 30-24
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 24)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 24)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 24");
strcpy(buffer, "House of Horrors !");
- font.drawString(&surf, buffer, 0, 50, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 50, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
break;
case 2:
_vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK);
// TROMAN, size 16-9
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 14");
strcpy(buffer, "S t a r r i n g :");
- font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
break;
case 3:
// TROMAN, size 20-9
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 18");
strcpy(buffer, "Hugo !");
- font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
break;
case 4:
_vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK);
// TROMAN, size 16-9
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 14");
strcpy(buffer, "P r o d u c e d b y :");
- font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
break;
case 5:
// TROMAN size 16-9
strcpy(buffer, "David P Gray !");
- font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
break;
case 6:
_vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK);
// TROMAN, size 16-9
strcpy(buffer, "D i r e c t e d b y :");
- font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
break;
case 7:
// TROMAN, size 16-9
strcpy(buffer, "David P Gray !");
- font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
break;
case 8:
_vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK);
// TROMAN, size 16-9
strcpy(buffer, "M u s i c b y :");
- font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter);
break;
case 9:
// TROMAN, size 16-9
strcpy(buffer, "David P Gray !");
- font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
break;
case 10:
_vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK);
// TROMAN, size 20-14
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 18");
strcpy(buffer, "E n j o y !");
- font.drawString(&surf, buffer, 0, 100, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 100, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter);
break;
}
@@ -226,7 +226,7 @@ bool intro_v1d::introPlay() {
g_system->delayMillis(1000);
}
- return (++introTicks >= introSize);
+ return (++_introTicks >= introSize);
}
intro_v2d::intro_v2d(HugoEngine *vm) : IntroHandler(vm) {
@@ -241,16 +241,16 @@ void intro_v2d::preNewGame() {
void intro_v2d::introInit() {
_vm->_screen->displayList(kDisplayInit);
_vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen
- surf.w = 320;
- surf.h = 200;
- surf.pixels = _vm->_screen->getFrontBuffer();
- surf.pitch = 320;
- surf.format = Graphics::PixelFormat::createFormatCLUT8();
+ _surf.w = 320;
+ _surf.h = 200;
+ _surf.pixels = _vm->_screen->getFrontBuffer();
+ _surf.pitch = 320;
+ _surf.format = Graphics::PixelFormat::createFormatCLUT8();
char buffer[128];
// TROMAN, size 10-5
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8");
if (_vm->_boot._registered)
@@ -258,12 +258,12 @@ void intro_v2d::introInit() {
else
sprintf(buffer, "%s Shareware Version", _vm->getCopyrightString());
- font.drawString(&surf, buffer, 0, 186, 320, _TLIGHTRED, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 186, 320, _TLIGHTRED, Graphics::kTextAlignCenter);
if ((*_vm->_boot._distrib != '\0') && (scumm_stricmp(_vm->_boot._distrib, "David P. Gray"))) {
// TROMAN, size 10-5
sprintf(buffer, "Distributed by %s.", _vm->_boot._distrib);
- font.drawString(&surf, buffer, 0, 1, 320, _TLIGHTRED, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 1, 320, _TLIGHTRED, Graphics::kTextAlignCenter);
}
_vm->_screen->displayBackground();
@@ -287,11 +287,11 @@ void intro_v3d::preNewGame() {
void intro_v3d::introInit() {
_vm->_screen->displayList(kDisplayInit);
_vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen
- surf.w = 320;
- surf.h = 200;
- surf.pixels = _vm->_screen->getFrontBuffer();
- surf.pitch = 320;
- surf.format = Graphics::PixelFormat::createFormatCLUT8();
+ _surf.w = 320;
+ _surf.h = 200;
+ _surf.pixels = _vm->_screen->getFrontBuffer();
+ _surf.pitch = 320;
+ _surf.format = Graphics::PixelFormat::createFormatCLUT8();
char buffer[128];
if (_vm->_boot._registered)
@@ -300,14 +300,14 @@ void intro_v3d::introInit() {
sprintf(buffer,"%s Shareware Version", _vm->getCopyrightString());
// TROMAN, size 10-5
- if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8)))
+ if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8)))
error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8");
- font.drawString(&surf, buffer, 0, 190, 320, _TBROWN, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 190, 320, _TBROWN, Graphics::kTextAlignCenter);
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, 0, 320, _TBROWN, Graphics::kTextAlignCenter);
+ _font.drawString(&_surf, buffer, 0, 0, 320, _TBROWN, Graphics::kTextAlignCenter);
}
_vm->_screen->displayBackground();
@@ -316,7 +316,7 @@ void intro_v3d::introInit() {
_vm->_file->readBackground(22); // display screen MAP_3d
_vm->_screen->displayBackground();
- introTicks = 0;
+ _introTicks = 0;
_vm->_sound->_DOSSongPtr = _vm->_sound->_DOSIntroSong;
}
@@ -328,12 +328,12 @@ bool intro_v3d::introPlay() {
if (_vm->getGameStatus()._skipIntroFl)
return true;
- if (introTicks < getIntroSize()) {
- font.drawString(&surf, ".", _introX[introTicks], _introY[introTicks] - kDibOffY, 320, _TBRIGHTWHITE);
+ if (_introTicks < getIntroSize()) {
+ _font.drawString(&_surf, ".", _introX[_introTicks], _introY[_introTicks] - kDibOffY, 320, _TBRIGHTWHITE);
_vm->_screen->displayBackground();
// Text boxes at various times
- switch (introTicks) {
+ switch (_introTicks) {
case 4:
Utils::notifyBox(_vm->_text->getTextIntro(kIntro1));
break;
@@ -346,7 +346,7 @@ bool intro_v3d::introPlay() {
}
}
- return (++introTicks >= getIntroSize());
+ return (++_introTicks >= getIntroSize());
}
intro_v1w::intro_v1w(HugoEngine *vm) : IntroHandler(vm) {
@@ -407,7 +407,7 @@ void intro_v3w::introInit() {
g_system->delayMillis(3000);
_vm->_file->readBackground(22); // display screen MAP_3w
_vm->_screen->displayBackground();
- introTicks = 0;
+ _introTicks = 0;
_vm->_screen->loadFont(0);
}
@@ -419,13 +419,13 @@ bool intro_v3w::introPlay() {
if (_vm->getGameStatus()._skipIntroFl)
return true;
- if (introTicks < getIntroSize()) {
+ if (_introTicks < getIntroSize()) {
// Scale viewport x_intro,y_intro to screen (offsetting y)
- _vm->_screen->writeStr(_introX[introTicks], _introY[introTicks] - kDibOffY, "x", _TBRIGHTWHITE);
+ _vm->_screen->writeStr(_introX[_introTicks], _introY[_introTicks] - kDibOffY, "x", _TBRIGHTWHITE);
_vm->_screen->displayBackground();
// Text boxes at various times
- switch (introTicks) {
+ switch (_introTicks) {
case 4:
Utils::notifyBox(_vm->_text->getTextIntro(kIntro1));
break;
@@ -438,6 +438,6 @@ bool intro_v3w::introPlay() {
}
}
- return (++introTicks >= getIntroSize());
+ return (++_introTicks >= getIntroSize());
}
} // End of namespace Hugo
diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h
index 1bb039216a..d5a5a4e4b4 100644
--- a/engines/hugo/intro.h
+++ b/engines/hugo/intro.h
@@ -42,8 +42,8 @@ enum seqTextIntro {
class IntroHandler {
public:
IntroHandler(HugoEngine *vm);
- Graphics::Surface surf;
- Graphics::WinFont font;
+ Graphics::Surface _surf;
+ Graphics::WinFont _font;
virtual ~IntroHandler();
@@ -62,7 +62,7 @@ protected:
byte *_introX;
byte *_introY;
byte _introXSize;
- int16 introTicks; // Count calls to introPlay()
+ int16 _introTicks; // Count calls to introPlay()
};
class intro_v1w : public IntroHandler {
diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp
index 552ddaf5c9..7f63ccac3b 100644
--- a/engines/hugo/route.cpp
+++ b/engines/hugo/route.cpp
@@ -286,9 +286,9 @@ void Route::segment(int16 x, int16 y) {
} else {
// Create segment
seg_p = &_segment[_segmentNumb];
- seg_p->y = y;
- seg_p->x1 = x1;
- seg_p->x2 = x2;
+ seg_p->_y = y;
+ seg_p->_x1 = x1;
+ seg_p->_x2 = x2;
_segmentNumb++;
}
}
@@ -368,9 +368,9 @@ bool Route::findRoute(const int16 cx, const int16 cy) {
_route[0].y = _destY;
// Make a final segment for hero's base (we left a spare)
- _segment[_segmentNumb].y = heroy;
- _segment[_segmentNumb].x1 = herox1;
- _segment[_segmentNumb].x2 = herox2;
+ _segment[_segmentNumb]._y = heroy;
+ _segment[_segmentNumb]._x1 = herox1;
+ _segment[_segmentNumb]._x2 = herox2;
_segmentNumb++;
Point *routeNode; // Ptr to route node
@@ -378,22 +378,22 @@ bool Route::findRoute(const int16 cx, const int16 cy) {
for (i = 0, _routeListIndex = 0; i < _segmentNumb - 1; i++) {
if ((routeNode = newNode()) == 0) // New node for new segment
return false; // Too many nodes
- routeNode->y = _segment[i].y;
+ routeNode->y = _segment[i]._y;
// Look ahead for furthest straight line
for (int16 j = i + 1; j < _segmentNumb; j++) {
segment_t *seg_p = &_segment[j];
// Can we get to this segment from previous node?
- if (seg_p->x1 <= routeNode->x && seg_p->x2 >= routeNode->x + _heroWidth - 1) {
- routeNode->y = seg_p->y; // Yes, keep updating node
+ if (seg_p->_x1 <= routeNode->x && seg_p->_x2 >= routeNode->x + _heroWidth - 1) {
+ routeNode->y = seg_p->_y; // Yes, keep updating node
} else {
// No, create another node on previous segment to reach it
if ((routeNode = newNode()) == 0) // Add new route node
return false; // Too many nodes
// Find overlap between old and new segments
- int16 x1 = MAX(_segment[j - 1].x1, seg_p->x1);
- int16 x2 = MIN(_segment[j - 1].x2, seg_p->x2);
+ int16 x1 = MAX(_segment[j - 1]._x1, seg_p->_x1);
+ int16 x2 = MIN(_segment[j - 1]._x2, seg_p->_x2);
// If room, add a little offset to reduce staircase effect
int16 dx = kHeroMaxWidth >> 1;
diff --git a/engines/hugo/route.h b/engines/hugo/route.h
index a95dd2151b..b20ac771d7 100644
--- a/engines/hugo/route.h
+++ b/engines/hugo/route.h
@@ -43,8 +43,8 @@ struct Point {
};
struct segment_t { // Search segment
- int16 y; // y position
- int16 x1, x2; // Range of segment
+ int16 _y; // y position
+ int16 _x1, _x2; // Range of segment
};
class Route {