aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-27 23:50:22 +0200
committerEugene Sandulenko2019-09-03 17:17:29 +0200
commit6c21dfbbe66fc046d56e1bf5ddf18c5c8c4e7591 (patch)
tree988d2fe2425af7b147ffe31e015f0d083393d2ab /engines
parent5fe9b6f6e77041e8fd57f6b76e261a8ae3c6041e (diff)
downloadscummvm-rg350-6c21dfbbe66fc046d56e1bf5ddf18c5c8c4e7591.tar.gz
scummvm-rg350-6c21dfbbe66fc046d56e1bf5ddf18c5c8c4e7591.tar.bz2
scummvm-rg350-6c21dfbbe66fc046d56e1bf5ddf18c5c8c4e7591.zip
HDB: Implemented demo differences for menu
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/menu.cpp77
-rw-r--r--engines/hdb/menu.h1
-rw-r--r--engines/hdb/mpc.h2
3 files changed, 68 insertions, 12 deletions
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp
index 64cf0401a5..7bd457aa26 100644
--- a/engines/hdb/menu.cpp
+++ b/engines/hdb/menu.cpp
@@ -109,6 +109,10 @@ Menu::Menu() {
_controlButtonGfx = NULL;
_controlsGfx = NULL;
+ _screenshots1gfx = NULL;
+ _screenshots1agfx = NULL;
+ _screenshots2gfx = NULL;
+ _demoPlaqueGfx = NULL;
_vortexian[0] = _vortexian[1] = _vortexian[2] = NULL;
@@ -284,6 +288,13 @@ void Menu::startMenu() {
_controlButtonGfx = g_hdb->_gfx->loadPic(MENU_CONTROLS);
_controlsGfx = g_hdb->_gfx->loadPic(PIC_CONTROLSSCREEN);
+ if (g_hdb->isDemo()) {
+ _screenshots1gfx = g_hdb->_gfx->loadPic(PIC_DEMOSCREEN);
+ _screenshots1agfx = g_hdb->_gfx->loadPic(PIC_DEMOSCREEN2);
+ _screenshots2gfx = g_hdb->_gfx->loadPic(PIC_DEMO_BUY);
+ _demoPlaqueGfx = g_hdb->_gfx->loadPic(PIC_DEMO);
+ }
+
_vortexian[0] = g_hdb->_gfx->loadTile(GROUP_ENT_VORTEXIAN_STANDDOWN"01");
_vortexian[1] = g_hdb->_gfx->loadTile(GROUP_ENT_VORTEXIAN_STANDDOWN"02");
_vortexian[2] = g_hdb->_gfx->loadTile(GROUP_ENT_VORTEXIAN_STANDDOWN"03");
@@ -379,6 +390,10 @@ void Menu::drawMenu() {
// draw version #
_versionGfx->drawMasked(kScreenWidth - 6 * 8, kScreenHeight - 8);
+ if (g_hdb->isDemo()) {
+ _demoPlaqueGfx->drawMasked(kScreenWidth / 2 - _demoPlaqueGfx->_width / 2, 2);
+ }
+
//
// see if the Options/GameFiles menu has scrolled off
//
@@ -671,7 +686,13 @@ void Menu::drawMenu() {
//-------------------------------------------------------------------
g_hdb->_gfx->draw3DStars();
drawNebula();
- {
+
+ if (_quitActive == 2) { // XXXX
+ _screenshots1gfx->drawMasked(kQuitX, kQuitY);
+ _screenshots2gfx->drawMasked(kQuitX, kScreenHeight - _screenshots2gfx->_height);
+ } else if (_quitActive == 1) {
+ _screenshots1agfx->drawMasked(kQuitX, kQuitY);
+ } else if (_quitActive == 3 || !g_hdb->isDemo()) {
if (!_quitScreen)
_quitScreen = g_hdb->_gfx->loadPic(PIC_QUITSCREEN);
_quitScreen->drawMasked(kQuitX, kQuitY);
@@ -726,6 +747,19 @@ void Menu::freeMenu() {
delete _hdbLogoScreen;
_hdbLogoScreen = NULL;
+ if (_screenshots1gfx)
+ delete _screenshots1gfx;
+ _screenshots1gfx = NULL;
+ if (_screenshots1agfx)
+ delete _screenshots1agfx;
+ _screenshots1agfx = NULL;
+ if (_screenshots2gfx)
+ delete _screenshots2gfx;
+ _screenshots2gfx = NULL;
+ if (_demoPlaqueGfx)
+ delete _demoPlaqueGfx;
+ _demoPlaqueGfx = NULL;
+
if (_nebulaGfx[0]) {
for (int i = 0; i < kNebulaCount; i++) {
delete _nebulaGfx[i];
@@ -1050,7 +1084,7 @@ void Menu::processInput(int x, int y) {
y >= kMenuY + kMQuitY && y < kMenuY + kMQuitY + kMenuItemHeight) {
g_hdb->_sound->playSound(SND_BYE);
_quitTimer = g_hdb->getTimeSlice() + 1000;
- _quitActive = true;
+ _quitActive = 1;
_menuActive = false;
return;
} else if (x >= kMenuX && x < kMenuX + kMenuItemWidth &&
@@ -1323,17 +1357,36 @@ void Menu::processInput(int x, int y) {
//-------------------------------------------------------------------
int xit = getMenuKey();
- if ((x >= kQuitNoX1 && x <= kQuitNoX2 && y > kQuitNoY1 && y < kQuitNoY2 && _quitTimer < g_hdb->getTimeSlice()) || xit) {
- g_hdb->_sound->playSound(SND_MENU_BACKOUT);
- delete _quitScreen;
- _quitScreen = NULL;
+ if (!g_hdb->isDemo()) {
+ if ((x >= kQuitNoX1 && x <= kQuitNoX2 && y > kQuitNoY1 && y < kQuitNoY2 && _quitTimer < g_hdb->getTimeSlice()) || xit) {
+ g_hdb->_sound->playSound(SND_MENU_BACKOUT);
+ delete _quitScreen;
+ _quitScreen = NULL;
- _menuActive = true;
- _quitActive = 0;
- } else if (_quitTimer < g_hdb->getTimeSlice()) {
- if (x >= kQuitYesX1 && x <= kQuitYesX2 && y > kQuitYesY1 && y < kQuitYesY2) {
- writeConfig();
- g_hdb->quitGame();
+ _menuActive = true;
+ _quitActive = 0;
+ } else if (_quitTimer < g_hdb->getTimeSlice()) {
+ if (x >= kQuitYesX1 && x <= kQuitYesX2 && y > kQuitYesY1 && y < kQuitYesY2) {
+ writeConfig();
+ g_hdb->quitGame();
+ }
+ }
+ } else {
+ if ((_quitActive == 1 || _quitActive == 2) && _quitTimer < g_hdb->getTimeSlice()) {
+ _quitActive++;
+ _quitTimer = g_hdb->getTimeSlice() + 1000;
+ } else {
+ if (_quitActive == 3 && (x >= kQuitNoX1 && x <= kQuitNoX2 && y > kQuitNoY1 && y < kQuitNoY2 && _quitTimer < g_hdb->getTimeSlice())) {
+ g_hdb->_sound->playSound(SND_MENU_BACKOUT);
+ delete _quitScreen;
+ _quitScreen = NULL;
+
+ _menuActive = true;
+ _quitActive = 0;
+ } else if (_quitActive == 3 && _quitTimer < g_hdb->getTimeSlice()){
+ writeConfig();
+ g_hdb->quitGame();
+ }
}
}
}
diff --git a/engines/hdb/menu.h b/engines/hdb/menu.h
index b9d5aeba98..7ce6450bab 100644
--- a/engines/hdb/menu.h
+++ b/engines/hdb/menu.h
@@ -216,6 +216,7 @@ public:
Picture *_star[3], *_warpGfx;
uint32 _quitTimer;
Picture *_starRedGfx[2], *_starGreenGfx[2], *_starBlueGfx[2], *_versionGfx;
+ Picture *_screenshots1gfx, *_screenshots1agfx, *_screenshots2gfx, *_demoPlaqueGfx;
bool _menuActive, _optionsScrolling, _newgameActive, _sayHDB;
int _gamefilesActive, _clickDelay, _saveSlot, _optionsActive, _quitActive, _warpActive;
diff --git a/engines/hdb/mpc.h b/engines/hdb/mpc.h
index 6f2b734add..f308139fda 100644
--- a/engines/hdb/mpc.h
+++ b/engines/hdb/mpc.h
@@ -567,6 +567,8 @@ namespace HDB {
#define MONKEYLOGO_SMILE "monkeylogo_smile"
#define PIC_DEMOSCREEN "pic_demoscreen"
#define PIC_DEMOSCREEN2 "pic_demoscreen2"
+#define PIC_DEMO "pic_demo"
+#define PIC_DEMO_BUY "pic_demo_buy"
#define BACKSCROLL_PLANET1 "backscroll_planet1"
#define BACKSCROLL_PLANET2 "backscroll_planet2"
#define BACKSCROLL_PLANET3 "backscroll_planet3"