aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/dialogs_nebular.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-06-26 22:07:33 -0400
committerPaul Gilbert2014-06-26 22:07:33 -0400
commit456ce2a678557c7b9e15493448a18be3040efcf7 (patch)
treec5b7ea6742e7524053b9103a59e51d007b0a3437 /engines/mads/nebular/dialogs_nebular.cpp
parentbdee71f27922d1ba146323374e4501ec462d687d (diff)
downloadscummvm-rg350-456ce2a678557c7b9e15493448a18be3040efcf7.tar.gz
scummvm-rg350-456ce2a678557c7b9e15493448a18be3040efcf7.tar.bz2
scummvm-rg350-456ce2a678557c7b9e15493448a18be3040efcf7.zip
MADS: Implement the difficulty selection dialog
Diffstat (limited to 'engines/mads/nebular/dialogs_nebular.cpp')
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 36858a4940..6f75c21fd4 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -270,11 +270,9 @@ void DialogsNebular::showDialog() {
//GameMenuDialog::show();
break;
case DIALOG_DIFFICULTY: {
-/*
DifficultyDialog *dlg = new DifficultyDialog(_vm);
dlg->show();
delete dlg;
-*/
break;
}
default:
@@ -526,7 +524,7 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm) {
scene._priorSceneId = priorSceneId;
scene._currentSceneId = currentSceneId;
scene._nextSceneId = nextSceneId;
- scene._posAdjust.y = 22;
+ _vm->_screen._offset.y = 22;
_vm->_sound->pauseNewCommands();
_vm->_events->initVars();
game._kernelMode = KERNEL_ROOM_INIT;
@@ -544,7 +542,8 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm) {
}
_vm->_screen.empty();
- _vm->_screen.hLine(0, 0, MADS_SCREEN_WIDTH, 2);
+ _vm->_screen.hLine(0, 20, MADS_SCREEN_WIDTH, 2);
+ _vm->_screen.hLine(0, 179, MADS_SCREEN_WIDTH, 2);
game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
game._trigger = 0;
@@ -560,6 +559,10 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm) {
_lineIndex = -1;
}
+ScreenDialog::~ScreenDialog() {
+ _vm->_screen._offset.y = 0;
+}
+
void ScreenDialog::clearLines() {
Scene &scene = _vm->_game->_scene;
_v2 = 0;
@@ -704,11 +707,17 @@ void ScreenDialog::chooseBackground() {
void ScreenDialog::setFrame(int frameNumber, int depth) {
Scene &scene = _vm->_game->_scene;
+ SpriteAsset *menuSprites = scene._sprites[_menuSpritesIndex];
+ MSprite *frame = menuSprites->getFrame(frameNumber - 1);
+
SpriteSlot &spriteSlot = scene._spriteSlots[scene._spriteSlots.add()];
spriteSlot._flags = IMG_UPDATE;
spriteSlot._seqIndex = 1;
spriteSlot._spritesIndex = _menuSpritesIndex;
spriteSlot._frameNumber = frameNumber;
+ spriteSlot._position = frame->_offset;
+ spriteSlot._depth = depth;
+ spriteSlot._scale = 100;
}
void ScreenDialog::show() {
@@ -861,13 +870,13 @@ void DifficultyDialog::show() {
switch (_selectedLine) {
case 1:
- game._difficulty = Nebular::DIFFICULTY_HARD;
+ game._difficulty = Nebular::DIFFICULTY_EASY;
break;
case 2:
game._difficulty = Nebular::DIFFICULTY_MEDIUM;
break;
case 3:
- game._difficulty = Nebular::DIFFICULTY_EASY;
+ game._difficulty = Nebular::DIFFICULTY_HARD;
break;
default:
_vm->quitGame();