From 34cbdd8a1deddfc8d04263ec90c546a906543366 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 1 Aug 2016 12:26:58 +0300 Subject: TITANIC: Fix warnings --- engines/titanic/pet_control/pet_glyphs.cpp | 6 +++--- engines/titanic/pet_control/pet_inventory_glyphs.cpp | 8 ++++---- engines/titanic/pet_control/pet_rooms.cpp | 14 +++++++------- engines/titanic/pet_control/pet_rooms_glyphs.cpp | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'engines/titanic/pet_control') diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp index c36bae6545..bd05342095 100644 --- a/engines/titanic/pet_control/pet_glyphs.cpp +++ b/engines/titanic/pet_control/pet_glyphs.cpp @@ -32,7 +32,7 @@ bool CPetGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) { return true; } -void CPetGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted) { +void CPetGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted_) { _element.translate(pt.x, pt.y); _element.draw(screenManager); _element.translate(-pt.x, -pt.y); @@ -149,7 +149,7 @@ void CPetGlyphs::draw(CScreenManager *screenManager) { } } - // Iterate through displaying glyphs on the screen + // Iterate through displaying glyphs on the screen int listSize = size(); for (int index = 0; index < _numVisibleGlyphs; ++index) { int itemIndex = getItemIndex(index); @@ -267,7 +267,7 @@ void CPetGlyphs::setFirstVisible(int index) { if ((_flags & GFLAG_8) && _highlightIndex != -1) { CPetGlyph *glyph = getGlyph(_highlightIndex); - + if (glyph) { int idx = getHighlightedIndex(_highlightIndex); if (idx != -1) { diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp index deea8eebca..ae306649a2 100644 --- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp +++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp @@ -43,13 +43,13 @@ void CPetInventoryGlyph::leave() { stopMovie(); } -void CPetInventoryGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted) { +void CPetInventoryGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted_) { if (!_field34) return; if (_image) { if (_image->hasActiveMovie()) { - if (isHighlighted) + if (isHighlighted_) _image->draw(screenManager); else _image->draw(screenManager, pt); @@ -57,14 +57,14 @@ void CPetInventoryGlyph::drawAt(CScreenManager *screenManager, const Point &pt, } _image = nullptr; - if (_background && isHighlighted) { + if (_background && isHighlighted_) { _background->setPosition(pt); startBackgroundMovie(); } } if (_background) { - if (isHighlighted) + if (isHighlighted_) _background->draw(screenManager); else _background->draw(screenManager, pt); diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index dfaa0405e4..fcf8238eb6 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -235,7 +235,7 @@ void CPetRooms::resetHighlight() { uint CPetRooms::getRoomFlags() const { CRoomFlags roomFlags; CString roomName = _petControl->getRoomName(); - + uint flags = roomFlags.getSpecialRoomFlags(roomName); if (flags) return flags; @@ -258,7 +258,7 @@ uint CPetRooms::getRoomFlags() const { roomFlags.setElevatorNum(_elevatorNum == 1 || _elevatorNum == 2 ? 2 : 4); } - roomFlags.setRoomBits(((_roomNum - 1) & 1) + (_field1CC > 1 ? 3 : 2)); + roomFlags.setRoomBits(((_roomNum - 1) & 1) + (_field1CC > 1 ? 3 : 2)); } else { roomFlags.setRoomBits(0); } @@ -292,11 +292,11 @@ void CPetRooms::reassignRoom(int passClassNum) { } } -CPetRoomsGlyph *CPetRooms::addRoom(uint roomFlags, bool highlight) { +CPetRoomsGlyph *CPetRooms::addRoom(uint roomFlags, bool highlight_) { // Ensure that we don't add room if the room is already present if (_glyphs.hasFlags(roomFlags)) return nullptr; - + if (_glyphs.size() >= 32) // Too many rooms already return nullptr; @@ -312,17 +312,17 @@ CPetRoomsGlyph *CPetRooms::addRoom(uint roomFlags, bool highlight) { } // Add the glyph - return addGlyph(roomFlags, highlight); + return addGlyph(roomFlags, highlight_); } -CPetRoomsGlyph *CPetRooms::addGlyph(uint roomFlags, bool highlight) { +CPetRoomsGlyph *CPetRooms::addGlyph(uint roomFlags, bool highlight_) { CPetRoomsGlyph *glyph = new CPetRoomsGlyph(roomFlags); if (!glyph->setup(_petControl, &_glyphs)) { delete glyph; return nullptr; } else { _glyphs.push_back(glyph); - if (highlight) + if (highlight_) _glyphs.highlight(glyph); return glyph; diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp index 810342a23e..851ca0cb7a 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp +++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp @@ -57,7 +57,7 @@ bool CPetRoomsGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) { return true; } -void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted) { +void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted_) { // Clear background Rect rect(pt.x, pt.y, pt.x + 52, pt.y + 52); screenManager->fillRect(SURFACE_BACKBUFFER, &rect, 0, 0, 0); @@ -74,7 +74,7 @@ void CPetRoomsGlyph::drawAt(CScreenManager *screenManager, const Point &pt, bool CGameObject *obj4 = _object4; CGameObject *obj5 = _object5; - if (_field38 == 1 || isHighlighted) { + if (_field38 == 1 || isHighlighted_) { _object0 = _object2; _object1 = _object3; _object4 = _object6; @@ -203,7 +203,7 @@ int CPetRoomsGlyph::getSelection(const Point &topLeft, const Point &pt) { for (int i = 0; i < 4; ++i) { if (rects[i].contains(pt)) return btnIndex - i; - + rects[i].translate(0, 10); } } -- cgit v1.2.3