[Scummvm-cvs-logs] scummvm master -> 2b8820f3f6e66afb5b689cc01086c94ff735d970

dreammaster dreammaster at scummvm.org
Sat Jun 7 20:11:17 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2b8820f3f6 MADS: More setup code for the difficulty dialog


Commit: 2b8820f3f6e66afb5b689cc01086c94ff735d970
    https://github.com/scummvm/scummvm/commit/2b8820f3f6e66afb5b689cc01086c94ff735d970
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-06-07T14:10:31-04:00

Commit Message:
MADS: More setup code for the difficulty dialog

Changed paths:
    engines/mads/game.cpp
    engines/mads/nebular/dialogs_nebular.cpp
    engines/mads/nebular/dialogs_nebular.h



diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index b631c8e..8639f59 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -59,7 +59,8 @@ Game *Game::init(MADSEngine *vm) {
 Game::Game(MADSEngine *vm)
 	: _vm(vm), _surface(nullptr), _objects(vm), _scene(vm),
 	  _screenObjects(vm), _player(vm) {
-	_sectionNumber = _priorSectionNumber = 0;
+	_sectionNumber = 1;
+	_priorSectionNumber = 0;
 	_loadGameSlot = -1;
 	_lastSave = -1;
 	_saveFile = nullptr;
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index fdf3ee1..99fa01c 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -274,8 +274,8 @@ void DialogsNebular::showDialog() {
 		DifficultyDialog *dlg = new DifficultyDialog(_vm);
 		dlg->show();
 		delete dlg;
-		break;
 */
+		break;
 	}
 	default:
 		break;
@@ -487,8 +487,7 @@ ScreenDialog::DialogLine::DialogLine(const Common::String &s) {
 
 /*------------------------------------------------------------------------*/
 
-ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm),
-		_savedSurface(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT) {
+ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm) {
 	Game &game = *_vm->_game;
 	Scene &scene = game._scene;
 
@@ -500,6 +499,7 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm),
 	_textLineCount = 0;
 	_screenId = 920;
 
+	chooseBackground();
 	game.loadQuoteSet(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
 		17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
 		34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 0);
@@ -524,7 +524,7 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm),
 	scene._priorSceneId = priorSceneId;
 	scene._currentSceneId = currentSceneId;
 	scene._nextSceneId = nextSceneId;
-	_vm->_screen._offset.y = 22;
+	scene._posAdjust.y = 22;
 	_vm->_sound->pauseNewCommands();
 	_vm->_events->initVars();
 	game._kernelMode = KERNEL_ROOM_INIT;
@@ -541,17 +541,10 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm),
 		_vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16);
 	}
 
-	_vm->_screen.copyTo(&_savedSurface);
-	/*
+	_vm->_screen.empty();
 	_vm->_screen.hLine(0, 0, MADS_SCREEN_WIDTH, 2);
-	_vm->_screen.copyRectToScreen(Common::Rect(0, _vm->_screen._offset.y,
-		MADS_SCREEN_WIDTH, _vm->_screen._offset.y + 1));
-	_vm->_screen.copyRectToScreen(Common::Rect(0, _vm->_screen._offset.y + 157,
-		MADS_SCREEN_WIDTH, _vm->_screen._offset.y + 157));
-	*/
-
-	game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ?
-		kCenterVertTransition : kTransitionFadeIn;
+
+	game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
 	game._trigger = 0;
 	_vm->_events->setCursor(CURSOR_ARROW);
 
@@ -714,7 +707,6 @@ void ScreenDialog::setFrame(int frameNumber, int depth) {
 	spriteSlot._seqIndex = 1;
 	spriteSlot._spritesIndex = _menuSpritesIndex;
 	spriteSlot._frameNumber = frameNumber;
-
 }
 
 void ScreenDialog::show() {
@@ -768,7 +760,7 @@ void ScreenDialog::handleEvents() {
 	}
 
 	int line = -1;
-	if (objIndex == 0 || events._mouseButtons) {
+	if (objIndex > 0 || events._mouseButtons) {
 		line = screenObjects[objIndex]._descId;
 		if (dialogs._pendingDialog == DIALOG_SAVE || dialogs._pendingDialog == DIALOG_RESTORE) {
 			if (line > 7 && line <= 14) {
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index 881c76a..a144ee9 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -118,7 +118,6 @@ class ScreenDialog {
 	};
 protected:
 	MADSEngine *_vm;
-	MSurface _savedSurface;
 	Common::Array<DialogLine> _lines;
 	int _v1;
 	int _v2;






More information about the Scummvm-git-logs mailing list