diff options
author | Eugene Sandulenko | 2011-11-03 00:48:14 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2011-11-03 00:48:14 +0000 |
commit | e1a311a236131b909d29f1e5cc6f5a369682bd07 (patch) | |
tree | 22e8ad1066109982a91a5db54fcfd523f8ed5bbb /engines/parallaction | |
parent | 86ba940bc804ecae014fff37fcca03b6840ea6c8 (diff) | |
download | scummvm-rg350-e1a311a236131b909d29f1e5cc6f5a369682bd07.tar.gz scummvm-rg350-e1a311a236131b909d29f1e5cc6f5a369682bd07.tar.bz2 scummvm-rg350-e1a311a236131b909d29f1e5cc6f5a369682bd07.zip |
PARALLACTION: Fix warnings. Fix nasty out-of-scope bug in parallaction_br.cpp
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/graphics.cpp | 24 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/saveload.cpp | 2 |
3 files changed, 15 insertions, 13 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 1da61b68ae..a006edf114 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -596,20 +596,22 @@ void Gfx::updateFloatingLabel() { Common::Rect r; _floatingLabel->getRect(0, r); + FloatingLabelTraits traits_NS = { + Common::Point(16 - r.width()/2, 34), + Common::Point(8 - r.width()/2, 21), + 0, 0, _vm->_screenWidth - r.width(), 190 + }; + + // FIXME: _maxY for BRA is not constant (390), but depends on _vm->_subtitleY + FloatingLabelTraits traits_BR = { + Common::Point(34 - r.width()/2, 70), + Common::Point(16 - r.width()/2, 37), + 0, 0, _vm->_screenWidth - r.width(), 390 + }; + if (_gameType == GType_Nippon) { - FloatingLabelTraits traits_NS = { - Common::Point(16 - r.width()/2, 34), - Common::Point(8 - r.width()/2, 21), - 0, 0, _vm->_screenWidth - r.width(), 190 - }; traits = &traits_NS; } else { - // FIXME: _maxY for BRA is not constant (390), but depends on _vm->_subtitleY - FloatingLabelTraits traits_BR = { - Common::Point(34 - r.width()/2, 70), - Common::Point(16 - r.width()/2, 37), - 0, 0, _vm->_screenWidth - r.width(), 390 - }; traits = &traits_BR; } diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 44a8899304..d850d406a2 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -289,7 +289,7 @@ void Parallaction_br::changeLocation() { _disk->selectArchive(_partNames[_part]); - memset(_counters, 0, ARRAYSIZE(_counters)); + memset(_counters, 0, sizeof(*_counters)); _globalFlagsNames = _disk->loadTable("global"); _objectsNames = _disk->loadTable("objects"); diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 5a1daa256b..3ab25f203f 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -49,7 +49,7 @@ Common::String SaveLoad::genSaveFileName(uint slot) { assert(slot < NUM_SAVESLOTS || slot == SPECIAL_SAVESLOT); char s[20]; - sprintf(s, "%s.%.3d", _saveFilePrefix.c_str(), slot); + sprintf(s, "%s.%.3u", _saveFilePrefix.c_str(), slot); return Common::String(s); } |