diff options
author | Paul Gilbert | 2016-09-04 14:19:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-04 21:24:37 -0400 |
commit | 0c948b6bd0fc87cb57ee8939228435921a504803 (patch) | |
tree | 9e36ce7138682aebaf42cd9ed3548a189d015c51 /engines/xeen | |
parent | 63a4201541df77afcf71fffb67516f40a8c169ba (diff) | |
download | scummvm-rg350-0c948b6bd0fc87cb57ee8939228435921a504803.tar.gz scummvm-rg350-0c948b6bd0fc87cb57ee8939228435921a504803.tar.bz2 scummvm-rg350-0c948b6bd0fc87cb57ee8939228435921a504803.zip |
XEEN: Fix Travis identified warnings
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/combat.h | 2 | ||||
-rw-r--r-- | engines/xeen/dialogs_spells.cpp | 7 | ||||
-rw-r--r-- | engines/xeen/events.cpp | 5 | ||||
-rw-r--r-- | engines/xeen/events.h | 1 | ||||
-rw-r--r-- | engines/xeen/interface_map.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/resources.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/scripts.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/sound.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/sound.h | 1 | ||||
-rw-r--r-- | engines/xeen/xeen.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/xsurface.cpp | 7 | ||||
-rw-r--r-- | engines/xeen/xsurface.h | 4 |
12 files changed, 21 insertions, 22 deletions
diff --git a/engines/xeen/combat.h b/engines/xeen/combat.h index 1a1fc3a41b..8a7c676018 100644 --- a/engines/xeen/combat.h +++ b/engines/xeen/combat.h @@ -31,7 +31,7 @@ namespace Xeen { #define MAX_NUM_MONSTERS 107 -#define PARTY_AND_MONSTERS 11 +#define PARTY_AND_MONSTERS 12 enum DamageType { DT_PHYSICAL = 0, DT_MAGICAL = 1, DT_FIRE = 2, DT_ELECTRICAL = 3, diff --git a/engines/xeen/dialogs_spells.cpp b/engines/xeen/dialogs_spells.cpp index b17555260d..a10dab650b 100644 --- a/engines/xeen/dialogs_spells.cpp +++ b/engines/xeen/dialogs_spells.cpp @@ -191,8 +191,8 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int case Common::KEYCODE_7: case Common::KEYCODE_8: case Common::KEYCODE_9: - newSelection = topIndex + (_buttonValue == Common::KEYCODE_0) ? 9 : - (_buttonValue - Common::KEYCODE_1); + newSelection = topIndex + ((_buttonValue == Common::KEYCODE_0) ? 9 : + (_buttonValue - Common::KEYCODE_1)); if (newSelection < (int)_spells.size()) { int expenseFactor = 0; @@ -224,6 +224,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int break; } + warning("TODO: category -> SPELLS_ALLOWED category value"); int spellId = _spells[newSelection]._spellId; int spellIndex = _spells[newSelection]._spellIndex; int spellCost = spells.calcSpellCost(spellId, expenseFactor); @@ -233,7 +234,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int Common::String spellName = _spells[newSelection]._name; Common::String msg = (castingCopy & 0x80) ? Common::String::format(SPELLS_PRESS_A_KEY, msg.c_str()) : - Common::String::format(SPELLS_PURCHASE, msg.c_str(), spellCost); + Common::String::format(SPELLS_PURCHASE, spellName.c_str(), spellCost); if (Confirm::show(_vm, msg, castingCopy + 1)) { if (party.subtract(0, spellCost, 0, WT_FREEZE_WAIT)) { diff --git a/engines/xeen/events.cpp b/engines/xeen/events.cpp index 0c0a32be03..e50d689d9f 100644 --- a/engines/xeen/events.cpp +++ b/engines/xeen/events.cpp @@ -33,9 +33,8 @@ namespace Xeen { EventsManager::EventsManager(XeenEngine *vm) : _vm(vm), _frameCounter(0), _priorFrameCounterTime(0), _gameCounter(0), - _priorGameCounterTime(0), _keyCode(Common::KEYCODE_INVALID), - _leftButton(false), _rightButton(false), - _sprites("mouse.icn") { + _leftButton(false), _rightButton(false), _sprites("mouse.icn"), + _keyCode(Common::KEYCODE_INVALID) { Common::fill(&_gameCounters[0], &_gameCounters[6], 0); } diff --git a/engines/xeen/events.h b/engines/xeen/events.h index 6ebe46e6fe..7847ecd81c 100644 --- a/engines/xeen/events.h +++ b/engines/xeen/events.h @@ -40,7 +40,6 @@ private: uint32 _priorFrameCounterTime; uint32 _gameCounter; uint32 _gameCounters[6]; - uint32 _priorGameCounterTime; Common::KeyCode _keyCode; SpriteResource _sprites; diff --git a/engines/xeen/interface_map.cpp b/engines/xeen/interface_map.cpp index 6dd98efefd..af39f38c28 100644 --- a/engines/xeen/interface_map.cpp +++ b/engines/xeen/interface_map.cpp @@ -525,6 +525,8 @@ void InterfaceMap::drawMap() { _outdoorList[116]._sprites = nullptr; _outdoorList[117]._sprites = nullptr; monsterIndex = 3; + } else { + monsterIndex = 0; } drawOutdoors(); @@ -1157,7 +1159,7 @@ void InterfaceMap::setMazeBits() { ++_wo[143]; break; case 9: - ++_wo[3033]; + ++_wo[303]; break; case 10: ++_wo[243]; diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp index 0b30ce3e8b..c171a1717b 100644 --- a/engines/xeen/resources.cpp +++ b/engines/xeen/resources.cpp @@ -1534,8 +1534,6 @@ const char *const X_FOUND_Y = "\v060\t000\x3""c%s found: %s"; const char *const ON_WHO = "\x3""c\v009On Who?"; -const char *const WHICH_ELEMENT = ""; - const char *const WHICH_ELEMENT1 = "\r\x3""c\x1Which Element?\x2\v034\t014\f15F\fdire\t044" "\f15E\fdlec\t074\f15C\fdold\t104\f15A\fdcid\x1"; diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 03a24b434a..0e752529d5 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -1172,7 +1172,7 @@ void Scripts::cmdGiveEnchanted(Common::Array<byte> ¶ms) { cmdNoAction(params); return; } else { - party._gameFlags[6 + params[0]]++; + party._gameFlags[6 + params[0]] = true; } } @@ -1435,7 +1435,7 @@ bool Scripts::ifProc(int action, uint32 mask, int mode, int charIndex) { // Check if the character class can cast the particular spell for (int idx = 0; idx < 39; ++idx) { - if (SPELLS_ALLOWED[mode][idx] == mask) { + if (SPELLS_ALLOWED[category][idx] == mask) { // Can cast it. Check if the player has it in their spellbook if (ps._spells[idx]) v = mask; diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp index c0a49aeb22..2aed7da45b 100644 --- a/engines/xeen/sound.cpp +++ b/engines/xeen/sound.cpp @@ -47,7 +47,7 @@ void VOC::stop() { /*------------------------------------------------------------------------*/ -SoundManager::SoundManager(XeenEngine *vm, Audio::Mixer *mixer): _vm(vm), _mixer(mixer) { +SoundManager::SoundManager(XeenEngine *vm, Audio::Mixer *mixer): _mixer(mixer) { } void SoundManager::proc2(Common::SeekableReadStream &f) { diff --git a/engines/xeen/sound.h b/engines/xeen/sound.h index bcee6f2f45..96b02c4efe 100644 --- a/engines/xeen/sound.h +++ b/engines/xeen/sound.h @@ -56,7 +56,6 @@ public: class SoundManager { private: - XeenEngine *_vm; Audio::Mixer *_mixer; public: SoundManager(XeenEngine *vm, Audio::Mixer *mixer); diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index da7810c4cb..066f238fed 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -335,8 +335,8 @@ void XeenEngine::gameLoop() { } Common::String XeenEngine::printMil(uint value) { - return (value >= 1000000) ? Common::String::format("%lu mil", value / 1000000) : - Common::String::format("%lu", value); + return (value >= 1000000) ? Common::String::format("%u mil", value / 1000000) : + Common::String::format("%u", value); } Common::String XeenEngine::printK(uint value) { diff --git a/engines/xeen/xsurface.cpp b/engines/xeen/xsurface.cpp index 00d333d6d8..1793d76129 100644 --- a/engines/xeen/xsurface.cpp +++ b/engines/xeen/xsurface.cpp @@ -31,7 +31,8 @@ namespace Xeen { XSurface::XSurface() : Graphics::Surface(), _freeFlag(false) { } -XSurface::XSurface(int w, int h) : Graphics::Surface(), _freeFlag(false) { +XSurface::XSurface(int width, int height) : Graphics::Surface(), + _freeFlag(false) { create(w, h); } @@ -40,8 +41,8 @@ XSurface::~XSurface() { free(); } -void XSurface::create(uint16 w_, uint16 h_) { - Graphics::Surface::create(w_, h_, Graphics::PixelFormat::createFormatCLUT8()); +void XSurface::create(uint16 width, uint16 height) { + Graphics::Surface::create(width, height, Graphics::PixelFormat::createFormatCLUT8()); _freeFlag = true; } diff --git a/engines/xeen/xsurface.h b/engines/xeen/xsurface.h index 299cc51f1d..f562112e5c 100644 --- a/engines/xeen/xsurface.h +++ b/engines/xeen/xsurface.h @@ -37,10 +37,10 @@ public: virtual void addDirtyRect(const Common::Rect &r) {} public: XSurface(); - XSurface(int w, int h); + XSurface(int width, int height); virtual ~XSurface(); - void create(uint16 w_, uint16 h_); + void create(uint16 width, uint16 height); void create(XSurface *s, const Common::Rect &bounds); |