aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-06-28 22:56:51 -0400
committerPaul Gilbert2014-06-28 22:56:51 -0400
commitdd7b6f9c80ceb5964456ab08e0f9f0b9ddc585f1 (patch)
tree6ca2f3c0a28bf61d8e2e4a4f199484299e091242
parent92cc2a7bc8f844a49b7e43840282ca6c57a7a80b (diff)
downloadscummvm-rg350-dd7b6f9c80ceb5964456ab08e0f9f0b9ddc585f1.tar.gz
scummvm-rg350-dd7b6f9c80ceb5964456ab08e0f9f0b9ddc585f1.tar.bz2
scummvm-rg350-dd7b6f9c80ceb5964456ab08e0f9f0b9ddc585f1.zip
MADS: Cleanup of fields and constants usage
-rw-r--r--engines/mads/game.cpp4
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp14
-rw-r--r--engines/mads/nebular/dialogs_nebular.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index dde2b405ab..b544eff2db 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -580,8 +580,8 @@ void Game::createThumbnail() {
delete _saveThumb;
}
- uint8 thumbPalette[256 * 3];
- _vm->_palette->grabPalette(thumbPalette, 0, 256);
+ uint8 thumbPalette[PALETTE_SIZE];
+ _vm->_palette->grabPalette(thumbPalette, 0, PALETTE_COUNT);
_saveThumb = new Graphics::Surface();
::createThumbnail(_saveThumb, _vm->_screen.getData(), MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette);
}
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 86f979739f..80ce6cdad4 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -548,7 +548,7 @@ ScreenDialog::ScreenDialog(MADSEngine *vm) : _vm(vm) {
Game &game = *_vm->_game;
Scene &scene = game._scene;
- _v1 = 0;
+ _tempLine = 0;
_movedFlag = false;
_redrawFlag = false;
_selectedLine = -1;
@@ -738,7 +738,7 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align,
}
void ScreenDialog::initVars() {
- _v1 = -1;
+ _tempLine = -1;
_selectedLine = -1;
_lineIndex = 0;
_textLineCount = 0;
@@ -789,8 +789,8 @@ void ScreenDialog::show() {
while (_selectedLine < 1 && !_vm->shouldQuit()) {
handleEvents();
if (_redrawFlag) {
- if (!_v1)
- _v1 = -1;
+ if (!_tempLine)
+ _tempLine = -1;
refreshText();
scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
@@ -806,7 +806,7 @@ void ScreenDialog::handleEvents() {
ScreenObjects &screenObjects = _vm->_game->_screenObjects;
EventsManager &events = *_vm->_events;
Nebular::DialogsNebular &dialogs = *(Nebular::DialogsNebular *)_vm->_dialogs;
- int v1 = _v1;
+ int tempLine = _tempLine;
// Mark all the lines as initially unselected
for (uint i = 0; i < _lines.size(); ++i)
@@ -863,8 +863,8 @@ void ScreenDialog::handleEvents() {
_redrawFlag = true;
}
- _v1 = line;
- if (v1 != line || _selectedLine >= 0)
+ _tempLine = line;
+ if (tempLine != line || _selectedLine >= 0)
_redrawFlag = true;
}
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index d7ad09e935..44412797a1 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -123,7 +123,7 @@ class ScreenDialog {
protected:
MADSEngine *_vm;
Common::Array<DialogLine> _lines;
- int _v1;
+ int _tempLine;
bool _movedFlag;
bool _redrawFlag;
int _selectedLine;