[Scummvm-cvs-logs] SF.net SVN: scummvm:[52877] scummvm/trunk/engines/hugo
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Sat Sep 25 14:45:13 CEST 2010
Revision: 52877
http://scummvm.svn.sourceforge.net/scummvm/?rev=52877&view=rev
Author: strangerke
Date: 2010-09-25 12:45:12 +0000 (Sat, 25 Sep 2010)
Log Message:
-----------
HUGO: Add intro for H3 Dos
Modified Paths:
--------------
scummvm/trunk/engines/hugo/display.cpp
scummvm/trunk/engines/hugo/display.h
scummvm/trunk/engines/hugo/game.h
scummvm/trunk/engines/hugo/hugo.cpp
scummvm/trunk/engines/hugo/intro.cpp
Modified: scummvm/trunk/engines/hugo/display.cpp
===================================================================
--- scummvm/trunk/engines/hugo/display.cpp 2010-09-24 10:16:16 UTC (rev 52876)
+++ scummvm/trunk/engines/hugo/display.cpp 2010-09-25 12:45:12 UTC (rev 52877)
@@ -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
Modified: scummvm/trunk/engines/hugo/display.h
===================================================================
--- scummvm/trunk/engines/hugo/display.h 2010-09-24 10:16:16 UTC (rev 52876)
+++ scummvm/trunk/engines/hugo/display.h 2010-09-25 12:45:12 UTC (rev 52877)
@@ -64,6 +64,7 @@
icondib_t &getIconBuffer() {
return _iconBuffer;
}
+
viewdib_t &getBackBuffer() {
return _backBuffer;
}
Modified: scummvm/trunk/engines/hugo/game.h
===================================================================
--- scummvm/trunk/engines/hugo/game.h 2010-09-24 10:16:16 UTC (rev 52876)
+++ scummvm/trunk/engines/hugo/game.h 2010-09-25 12:45:12 UTC (rev 52877)
@@ -48,7 +48,7 @@
// Copy helpedit\hugow_?.hlp to .\hugowin?.hlp
// Type "PPG" in the game to enter cheat mode.
-#define COPYRIGHT "Copyright \xA9 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 @@
#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
Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp 2010-09-24 10:16:16 UTC (rev 52876)
+++ scummvm/trunk/engines/hugo/hugo.cpp 2010-09-25 12:45:12 UTC (rev 52877)
@@ -223,8 +223,6 @@
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 @@
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 @@
}
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
Modified: scummvm/trunk/engines/hugo/intro.cpp
===================================================================
--- scummvm/trunk/engines/hugo/intro.cpp 2010-09-24 10:16:16 UTC (rev 52876)
+++ scummvm/trunk/engines/hugo/intro.cpp 2010-09-25 12:45:12 UTC (rev 52877)
@@ -139,7 +139,7 @@
//#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 @@
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 @@
}
//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::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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list