aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/menu.cpp37
-rw-r--r--engines/hdb/menu.h132
2 files changed, 167 insertions, 2 deletions
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp
index 4b65a8ba60..f0d42e5db1 100644
--- a/engines/hdb/menu.cpp
+++ b/engines/hdb/menu.cpp
@@ -26,9 +26,42 @@
namespace HDB {
bool Menu::init() {
- _starWarp = 0;
+// _starWarp = 0;
+ _titleActive = false;
+ _menuActive = false;
+ _optionsActive = false;
+ _gamefilesActive = false;
+ _newgameActive = false;
+ _warpActive = false;
+ _optionsScrolling = false;
+ _optionsScrollX = kMenuX;
+ _rocketX = kMRocketX;
+ _sayHDB = false;
- warning("STUB: Menu::init()");
+ _nebulaY = 0; // Used as a flag
+ _fStars[0].y = 0; // Used as a flag
+
+ _keyAssignUp = Common::KEYCODE_UP;
+ _keyAssignDown = Common::KEYCODE_DOWN;
+ _keyAssignLeft = Common::KEYCODE_LEFT;
+ _keyAssignRight = Common::KEYCODE_RIGHT;
+ _keyAssignUse = Common::KEYCODE_RETURN;
+
+ _gCheckEmpty = g_hdb->_gfx->loadPic(G_CHECK_EMPTY);
+ _gCheckOff = g_hdb->_gfx->loadPic(G_CHECK_OFF);
+ _gCheckOn = g_hdb->_gfx->loadPic(G_CHECK_ON);
+ _gCheckLeft = g_hdb->_gfx->loadPic(G_CHECK_LEFT);
+ _gCheckRight = g_hdb->_gfx->loadPic(G_CHECK_RIGHT);
+
+ _contArrowUp = g_hdb->_gfx->loadPic(CTRL_ARROWUP);
+ _contArrowDown = g_hdb->_gfx->loadPic(CTRL_ARROWDN);
+ _contArrowLeft = g_hdb->_gfx->loadPic(CTRL_ARROWLEFT);
+ _contArrowRight = g_hdb->_gfx->loadPic(CTRL_ARROWRIGHT);
+ _contAssign = g_hdb->_gfx->loadPic(CTRL_ASSIGN);
+
+ _waitingForKey = false;
+ _warpPlaque = g_hdb->_gfx->loadPic(WARP_PLAQUE);
+ _hdbLogoScreen = g_hdb->_gfx->loadPic(TITLESCREEN);
return true;
}
diff --git a/engines/hdb/menu.h b/engines/hdb/menu.h
index ebf1e5a5ff..3e49051795 100644
--- a/engines/hdb/menu.h
+++ b/engines/hdb/menu.h
@@ -32,6 +32,98 @@ namespace HDB {
#define STARS_MONKEYSTONE_21 0x77ace3 // <same> for the Monkeystone #21
#define STARS_MONKEYSTONE_21_FAKE 0x3548fe // fake value that means it hasn't been unlocked
+enum {
+ kMenuX = 48 * 8,
+ kMenuY = 80,
+
+ kMenuItemWidth = 88,
+ kMenuItemHeight = 40,
+
+ kMResumeY = 48 * 4,
+ kMQuitY = 48 * 3,
+ kMOptionsY = 48 * 2,
+ kMLoadY = 48 * 1,
+ kMControlsY = 270,
+
+ kMenuExitY = kScreenHeight - 80,
+ kMenuExitXLeft = 60,
+ kMenuExitYTop = 48,
+ kMenuVortSaveY = 220,
+ kMenuVortSaveX = 76,
+
+ kMRocketX = 18 * 8,
+ kMRocketY = 48,
+ kMRocketYBottom = 28 * 8,
+ kMRocketEXHX = 6 * 8 - 4,
+ kMRocketEXHX2 = 11 * 8 - 4,
+ kMTitleY = 34 * 8,
+ kOohOhhX = 256,
+ kOohOhhY = 224,
+
+ kNewGameX = 220,
+ kNewGameX2 = kNewGameX + 50,
+
+ kModePuzzleY = 130,
+ kModeActionY = 220,
+
+ kOptionsX = 8 * 26,
+ kOptionsY = 8 * 10,
+
+ kVortSaveX = 200 - 44,
+ kVortSaveTextX = kVortSaveX + 40,
+ kVortSaveTextY = 72,
+ kSaveSlotX = 200,
+ kSaveSlotY = 80,
+
+ kQuitX = 0,
+ kQuitY = 0,
+ kQuitYesX1 = 30 * 8,
+ kQuitYesX2 = 38 * 8 + 4,
+ kQuitYesY1 = 50 * 8,
+ kQuitYesY2 = 53 * 8 + 4,
+ kQuitNoX1 = 41 * 8,
+ kQuitNoX2 = 49 * 8 + 4,
+ kQuitNoY1 = 50 * 8,
+ kQuitNoY2 = 53 * 8 + 4,
+
+ kControlX = 60,
+ kControlY = 40,
+ kControlUpX = 276 + kControlX,
+ kControlUpY = 114 + kControlY,
+ kControlDownX = 276 + kControlX,
+ kControlDownY = 129 + kControlY,
+ kControlLeftX = 396 + kControlX,
+ kControlLeftY = 114 + kControlY,
+ kControlRightX = 396 + kControlX,
+ kControlRightY = 129 + kControlY,
+ kControlUseX = 330 + kControlX,
+ kControlUseY = 209 + kControlY,
+ kControlWidth = 32,
+ kControlHeight = 16,
+
+ kAssignX = kControlX + 20 * 8,
+ kAssignY = kControlY + 150,
+
+ kBackoutX = 0,
+ kBackoutY = kScreenHeight - 32,
+
+ kWarpBackoutX = kBackoutX,
+ kWarpBackoutY = kBackoutY,
+
+ kWarpX = 214,
+ kWarpY = 160,
+
+ kScreenFade = 512,
+ kNebulaCount = 7,
+ kMaxStars = 10
+};
+
+struct Star {
+ int x, y, speed, anim, delay;
+
+ Star() : x(0), y(0), speed(0), anim(0), delay(0) {}
+};
+
class Menu {
public:
@@ -42,6 +134,46 @@ public:
void fillSavegameSlots();
int _starWarp;
+ int _titleCycle;
+ uint32 _titleDelay;
+ bool _titleActive;
+ SoundType _resumeSong; // the song that was playing before entering the Options screen
+
+ Picture *_ohhOhhGfx;
+ Picture *_titleScreen, *_titleLogo, *_hdbLogoScreen, *_menuBackoutGfx, *_controlButtonGfx, *_controlsGfx, *_menuBackspaceGfx;
+
+ int _rocketY, _rocketYVel, _rocketEx; // Rocket Vars
+ Picture *_rocketEx1, *_rocketEx2, *_rocketMain, *_rocketSecond;
+ int _rocketX;
+
+ int _nebulaX, _nebulaY, _nebulaYVel, _nebulaWhich;
+ Picture *_nebulaGfx[kNebulaCount];
+
+ Picture *_newGfx, *_loadGfx, *_optionsGfx, *_quitGfx, *_resumeGfx, *_slotGfx;
+ Picture *_modePuzzleGfx, *_modeActionGfx, *_modeLoadGfx, *_modeSaveGfx, *_quitScreen;
+ Tile *_vortexian[3];
+ Picture *_star[3], *_warpGfx;
+ uint32 _quitTimer;
+ Picture *_starRedGfx[2], *_starGreenGfx[2], *_starBlueGfx[2], *_versionGfx;
+
+ bool _menuActive, _optionsScrolling, _newgameActive, _sayHDB;
+ int _gamefilesActive, _clickDelay, _saveSlot, _optionsActive, _quitActive, _warpActive;
+ int _optionsScrollX, _optionsXV, _oBannerY;
+ int _nextScreen, _loadOrSave;
+
+ Common::KeyCode _keyAssignUp, _keyAssignDown, _keyAssignLeft, _keyAssignRight, _keyAssignUse;
+ Picture *_contArrowUp, *_contArrowDown, *_contArrowLeft, *_contArrowRight, *_contAssign, *_warpPlaque;
+// void ShowControl(int x, int y, short key);
+
+ bool _waitingForKey;
+ int _whichKey;
+
+ Picture *_sliderLeft, *_sliderMid, *_sliderRight, *_sliderKnob;
+ Picture *_gCheckEmpty, *_gCheckOn, *_gCheckOff, *_gCheckLeft, *_gCheckRight;
+
+ SoundType _introSong, _titleSong;
+
+ Star _fStars[kMaxStars];
};
} // End of Namespace