aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorArnaud Boutonné2010-09-25 12:45:12 +0000
committerArnaud Boutonné2010-09-25 12:45:12 +0000
commitbe4d61986426da1817443c54d2f7c748408e0ed2 (patch)
treecfa55b45f25480f266119925c7d7cff4aabf72be /engines
parenta8df677c0494eef00de304734dadda1e1ef593c7 (diff)
downloadscummvm-rg350-be4d61986426da1817443c54d2f7c748408e0ed2.tar.gz
scummvm-rg350-be4d61986426da1817443c54d2f7c748408e0ed2.tar.bz2
scummvm-rg350-be4d61986426da1817443c54d2f7c748408e0ed2.zip
HUGO: Add intro for H3 Dos
svn-id: r52877
Diffstat (limited to 'engines')
-rw-r--r--engines/hugo/display.cpp1
-rw-r--r--engines/hugo/display.h1
-rw-r--r--engines/hugo/game.h3
-rw-r--r--engines/hugo/hugo.cpp4
-rw-r--r--engines/hugo/intro.cpp63
5 files changed, 64 insertions, 8 deletions
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index 55f685de0f..78f99315c1 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -42,7 +42,6 @@
namespace Hugo {
-#define CENTER -1 // Used to center text in x
#define NUM_COLORS 16 // Num colors to save in palette
#define DMAX 16 // Size of add/restore rect lists
#define BMAX (DMAX * 2) // Size of dirty rect blit list
diff --git a/engines/hugo/display.h b/engines/hugo/display.h
index 8f5677faef..32519358f2 100644
--- a/engines/hugo/display.h
+++ b/engines/hugo/display.h
@@ -64,6 +64,7 @@ public:
icondib_t &getIconBuffer() {
return _iconBuffer;
}
+
viewdib_t &getBackBuffer() {
return _backBuffer;
}
diff --git a/engines/hugo/game.h b/engines/hugo/game.h
index 7b6713c1de..2138e123b0 100644
--- a/engines/hugo/game.h
+++ b/engines/hugo/game.h
@@ -48,7 +48,7 @@ namespace Hugo {
// Copy helpedit\hugow_?.hlp to .\hugowin?.hlp
// Type "PPG" in the game to enter cheat mode.
-#define COPYRIGHT "Copyright © 1995-97, David P. Gray"
+#define COPYRIGHT "Copyright 1989-1997 David P Gray, All Rights Reserved."
// Started code on 04/01/95
// Don't forget to update Hugowin.rc2 with version info
//#define VER "1.0" // 10/01/95 Initial Release
@@ -89,6 +89,7 @@ namespace Hugo {
#define WARNLEN 512
#define ERRLEN 512
#define STEP_DY 8 // Pixels per step movement
+#define CENTER -1 // Used to center text in x
// Only for non-database
#define BKGEXT ".PCX" // Extension of background files
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 9f6a933bbe..8219e18acf 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -223,8 +223,6 @@ Common::Error HugoEngine::run() {
while (!doQuitFl) {
g_system->updateScreen();
- // WORKAROUND: Force the mouse cursor to be displayed. This fixes the disappearing mouse cursor issue.
- g_system->showMouse(true);
runMachine();
// Handle input
Common::Event event;
@@ -295,6 +293,7 @@ void HugoEngine::runMachine() {
break;
case V_INTROINIT: // Initialization before intro begins
intro().introInit();
+ g_system->showMouse(false);
gameStatus.viewState = V_INTRO;
break;
case V_INTRO: // Do any game-dependant preamble
@@ -304,6 +303,7 @@ void HugoEngine::runMachine() {
}
break;
case V_PLAY: // Playing game
+ g_system->showMouse(true);
parser().charHandler(); // Process user cmd input
moveObjects(); // Process object movement
scheduler().runScheduler(); // Process any actions
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index 2b4d910183..e4da2030bd 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -139,7 +139,7 @@ bool intro_v3w::introPlay() {
//#endif //STORY
}
-intro_v1d::intro_v1d(HugoEngine &vm) : IntroHandler(_vm) {
+intro_v1d::intro_v1d(HugoEngine &vm) : IntroHandler(vm) {
}
intro_v1d::~intro_v1d() {
@@ -156,7 +156,7 @@ bool intro_v1d::introPlay() {
return true;
}
//TODO : Add code for intro H2 DOS
-intro_v2d::intro_v2d(HugoEngine &vm) : IntroHandler(_vm) {
+intro_v2d::intro_v2d(HugoEngine &vm) : IntroHandler(vm) {
}
intro_v2d::~intro_v2d() {
@@ -173,7 +173,7 @@ bool intro_v2d::introPlay() {
}
//TODO : Add code for intro H3 DOS
-intro_v3d::intro_v3d(HugoEngine &vm) : IntroHandler(_vm) {
+intro_v3d::intro_v3d(HugoEngine &vm) : IntroHandler(vm) {
}
intro_v3d::~intro_v3d() {
@@ -183,10 +183,65 @@ void intro_v3d::preNewGame() {
}
void intro_v3d::introInit() {
+ _vm.file().readBackground(25); // display splash screen
+ _vm.screen().displayBackground();
+
+ _vm.screen().loadFont(0);
+
+ char buffer[128];
+ if (_boot.registered)
+ sprintf(buffer, "%s Registered Version", COPYRIGHT);
+ else
+ sprintf(buffer,"%s Shareware Version", COPYRIGHT);
+
+// Center_text (190, buffer);
+ _vm.screen().writeStr(CENTER, 190, buffer, _TBRIGHTWHITE);
+
+ if (stricmp(_boot.distrib, "David P. Gray")) {
+// Center_text (0, buffer);
+ sprintf(buffer, "Distributed by %s.", _boot.distrib);
+ _vm.screen().writeStr(CENTER, 0, buffer, _TBRIGHTWHITE);
+ }
+
+ _vm.screen().displayBackground();
+ g_system->updateScreen();
+ g_system->delayMillis(5000);
+
+ _vm.file().readBackground(22); // display screen MAP_3d
+ _vm.screen().displayBackground();
+ introTicks = 0;
}
bool intro_v3d::introPlay() {
- return true;
+ byte introSize = _vm.getIntroSize();
+
+// Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane.
+// Called every tick. Returns TRUE when complete
+//TODO : Add proper check of story mode
+//#if STORY
+ if (introTicks < introSize) {
+ _vm.screen().writeStr(_vm._introX[introTicks], _vm._introY[introTicks] - DIBOFF_Y, "x", _TBRIGHTWHITE);
+ _vm.screen().displayBackground();
+
+
+ // Text boxes at various times
+ switch (introTicks) {
+ case 4:
+ Utils::Box(BOX_OK, "%s", _vm._textIntro[kIntro1]);
+ break;
+ case 9:
+ Utils::Box(BOX_OK, "%s", _vm._textIntro[kIntro2]);
+ break;
+ case 35:
+ Utils::Box(BOX_OK, "%s", _vm._textIntro[kIntro3]);
+ break;
+ }
+ }
+
+ return (++introTicks >= introSize);
+//#else //STORY
+// return true;
+//#endif //STORY
}
} // End of namespace Hugo