From 260b8aaca5592dbaad2cf67b063742c3174b47df Mon Sep 17 00:00:00 2001 From: dreammaster Date: Wed, 22 Jan 2020 02:52:08 +0000 Subject: [PATCH] ULTIMA1: Fix gcc warnings --- engines/ultima/shared/gfx/text_input.cpp | 2 +- engines/ultima/ultima1/maps/map_city_castle.cpp | 4 ++-- engines/ultima/ultima1/maps/map_dungeon.cpp | 2 +- engines/ultima/ultima1/spells/kill_magic_missile.cpp | 4 ++-- engines/ultima/ultima1/widgets/overworld_monster.cpp | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/ultima/shared/gfx/text_input.cpp b/engines/ultima/shared/gfx/text_input.cpp index 80363d46ce2..3c3f3db6776 100644 --- a/engines/ultima/shared/gfx/text_input.cpp +++ b/engines/ultima/shared/gfx/text_input.cpp @@ -62,7 +62,7 @@ void TextInput::draw() { bool TextInput::KeypressMsg(CKeypressMsg &msg) { uint16 c = msg._keyState.ascii; - TreeItem *respondTo = _respondTo; + //TreeItem *respondTo = _respondTo; if (c >= ' ' && c <= 0x7f) { // Printable character diff --git a/engines/ultima/ultima1/maps/map_city_castle.cpp b/engines/ultima/ultima1/maps/map_city_castle.cpp index 392050f42dc..83f87a64669 100644 --- a/engines/ultima/ultima1/maps/map_city_castle.cpp +++ b/engines/ultima/ultima1/maps/map_city_castle.cpp @@ -244,14 +244,14 @@ void MapCityCastle::attack(int direction, int effectId, uint maxDistance, uint a Point delta = getDirectionDelta(); U1MapTile tile; Widgets::Person *person; - int currTile; + //int currTile; // Scan in the given direction for a person to attack uint distance = 1; do { Point pt = getPosition() + Point(delta.x * distance, delta.y * distance); getTileAt(pt, &tile); - currTile = tile._tileId == CTILE_63 ? -1 : tile._tileId; + //currTile = tile._tileId == CTILE_63 ? -1 : tile._tileId; person = dynamic_cast(tile._widget); } while (++distance <= maxDistance && !person && (tile._tileId == CTILE_GROUND || tile._tileId >= CTILE_POND_EDGE1)); diff --git a/engines/ultima/ultima1/maps/map_dungeon.cpp b/engines/ultima/ultima1/maps/map_dungeon.cpp index 10d5b21430c..d3218fb56d9 100644 --- a/engines/ultima/ultima1/maps/map_dungeon.cpp +++ b/engines/ultima/ultima1/maps/map_dungeon.cpp @@ -332,7 +332,7 @@ void MapDungeon::attack(int direction, int effectId) { } void MapDungeon::attack(int direction, int effectId, uint maxDistance, uint amount, uint agility, const Common::String &hitWidget) { - const Character &c = *static_cast(_game->_party); + //const Character &c = *static_cast(_game->_party); Widgets::DungeonMonster *monster = findCreatureInCurrentDirection(maxDistance); _game->playFX(effectId); diff --git a/engines/ultima/ultima1/spells/kill_magic_missile.cpp b/engines/ultima/ultima1/spells/kill_magic_missile.cpp index 429fb01bad6..9a32a6ee912 100644 --- a/engines/ultima/ultima1/spells/kill_magic_missile.cpp +++ b/engines/ultima/ultima1/spells/kill_magic_missile.cpp @@ -53,8 +53,8 @@ bool KillMagicMIssile::CharacterInputMsg(CCharacterInputMsg &msg) { } else { addInfoMsg(_game->_res->DIRECTION_NAMES[(int)dir - 1]); addInfoMsg(_game->_res->SPELL_PHRASES[_spellId == SPELL_MAGIC_MISSILE ? 12 : 13], false); - uint damage = _spellId == SPELL_MAGIC_MISSILE ? - c.equippedWeapon()->getMagicDamage() : 9999; + //uint damage = _spellId == SPELL_MAGIC_MISSILE ? + // c.equippedWeapon()->getMagicDamage() : 9999; if (c._class == CLASS_CLERIC || _game->getRandomNumber(1, 100) < c._wisdom) { _game->playFX(5); diff --git a/engines/ultima/ultima1/widgets/overworld_monster.cpp b/engines/ultima/ultima1/widgets/overworld_monster.cpp index 66d9b0dbaba..dd8ae2b0b78 100644 --- a/engines/ultima/ultima1/widgets/overworld_monster.cpp +++ b/engines/ultima/ultima1/widgets/overworld_monster.cpp @@ -68,10 +68,10 @@ void OverworldMonster::attackParty() { Point diff = playerPos - _position; Point delta(SGN(diff.x), SGN(diff.y)); Point tempDiff; - int maxDistance = attackDistance(); + //int maxDistance = attackDistance(); Shared::Maps::MapTile mapTile; - Shared::Character &c = *_game->_party; - uint threshold, damage; + //Shared::Character &c = *_game->_party; + //uint threshold, damage; // Print out the monster attacking