[Scummvm-cvs-logs] scummvm master -> de575ca897384a6d1ea3a7061d1eb6aed529fa46
Strangerke
Strangerke at scummvm.org
Tue May 27 19:35:50 CEST 2014
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0eda31a6af MADS: Initialize variable in SceneTeleporter
25b20a0c00 MADS: Initialize a variable in ScreenDialog, remove a useless variable
de575ca897 MADS: Remove a couple of goto
Commit: 0eda31a6af286eb1f4524c1e4e078fe751ff7d1d
https://github.com/scummvm/scummvm/commit/0eda31a6af286eb1f4524c1e4e078fe751ff7d1d
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-05-27T18:48:57+02:00
Commit Message:
MADS: Initialize variable in SceneTeleporter
Changed paths:
engines/mads/nebular/nebular_scenes.cpp
engines/mads/nebular/nebular_scenes.h
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index cbfc055..52b5650 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -344,6 +344,19 @@ void SceneInfoNebular::loadCodes(MSurface &depthSurface, Common::SeekableReadStr
/*------------------------------------------------------------------------*/
+SceneTeleporter::SceneTeleporter(MADSEngine *vm) : NebularScene(vm) {
+ _buttonTyped = -1;
+ _curCode = -1;
+ _digitCount = -1;
+ _curMessageId = -1;
+ _handSpriteId = -1;
+ _handSequenceId = -1;
+ _finishedCodeCounter = -1;
+ _meteorologistNextPlace = -1;
+ _meteorologistCurPlace = -1;
+ _teleporterSceneId = -1;
+}
+
int SceneTeleporter::teleporterAddress(int code, bool working) {
int limit = working ? 6 : 10;
diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h
index 9f11291..6195395 100644
--- a/engines/mads/nebular/nebular_scenes.h
+++ b/engines/mads/nebular/nebular_scenes.h
@@ -1408,7 +1408,7 @@ protected:
/**
* Constructor
*/
- SceneTeleporter(MADSEngine *vm) : NebularScene(vm) {}
+ SceneTeleporter(MADSEngine *vm);
};
} // End of namespace Nebular
Commit: 25b20a0c003d775b8f242f04b1698d3a6435ca28
https://github.com/scummvm/scummvm/commit/25b20a0c003d775b8f242f04b1698d3a6435ca28
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-05-27T19:31:44+02:00
Commit Message:
MADS: Initialize a variable in ScreenDialog, remove a useless variable
Changed paths:
engines/mads/nebular/dialogs_nebular.cpp
engines/mads/nebular/dialogs_nebular.h
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 337cac8..6720205 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -547,6 +547,8 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm),
_vm->_palette->setEntry(13, 45, 45, 0);
_vm->_palette->setEntry(14, 63, 63, 63);
_vm->_palette->setEntry(15, 45, 45, 45);
+
+ _lineIndex = -1;
}
void ScreenDialog::clearLines() {
@@ -636,7 +638,6 @@ void ScreenDialog::initVars() {
_v1 = -1;
_selectedLine = -1;
_lineIndex = 0;
- _enterFlag = false;
_textLineCount = 0;
}
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index cb1ecfb..0554bec 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -123,7 +123,6 @@ protected:
int _screenId;
int _menuSpritesIndex;
int _lineIndex;
- bool _enterFlag;
int _textLineCount;
/**
Commit: de575ca897384a6d1ea3a7061d1eb6aed529fa46
https://github.com/scummvm/scummvm/commit/de575ca897384a6d1ea3a7061d1eb6aed529fa46
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-05-27T19:34:15+02:00
Commit Message:
MADS: Remove a couple of goto
Changed paths:
engines/mads/nebular/dialogs_nebular.cpp
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 6720205..d8a85d4 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -575,15 +575,19 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align,
DialogLine *line;
if (_lineIndex < (int)_lines.size()) {
- if (_lines.size() >= 20)
- goto finish;
+ if (_lines.size() >= 20) {
+ ++_lineIndex;
+ return;
+ }
_lines.push_back(msg);
line = &_lines[_lines.size() - 1];
} else {
line = &_lines[_lineIndex];
- if (msg.compareToIgnoreCase(msg))
- goto finish;
+ if (msg.compareToIgnoreCase(msg)) {
+ ++_lineIndex;
+ return;
+ }
if (line->_textDisplayIndex >= 0) {
TextDisplay &textDisplay = scene._textDisplay[line->_textDisplayIndex];
@@ -630,7 +634,6 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align,
break;
}
-finish:
++_lineIndex;
}
More information about the Scummvm-git-logs
mailing list