diff --git a/include/ui/citymappixmapitem.h b/include/ui/citymappixmapitem.h index a3c48faa..5fe285de 100644 --- a/include/ui/citymappixmapitem.h +++ b/include/ui/citymappixmapitem.h @@ -9,6 +9,10 @@ class CityMapPixmapItem : public QObject, public QGraphicsPixmapItem { Q_OBJECT + +private: + using QGraphicsPixmapItem::paint; + public: CityMapPixmapItem(QString fname, TilemapTileSelector *tile_selector) { this->file = fname; @@ -25,7 +29,7 @@ public: void init(); void save(); void create(QString); - virtual void paint(QGraphicsSceneMouseEvent*); + virtual void paint(QGraphicsSceneMouseEvent *); virtual void draw(); int getIndexAt(int, int); int width(); diff --git a/include/ui/collisionpixmapitem.h b/include/ui/collisionpixmapitem.h index 63af0f6c..5fc2820b 100644 --- a/include/ui/collisionpixmapitem.h +++ b/include/ui/collisionpixmapitem.h @@ -35,6 +35,9 @@ protected: void mousePressEvent(QGraphicsSceneMouseEvent*); void mouseMoveEvent(QGraphicsSceneMouseEvent*); void mouseReleaseEvent(QGraphicsSceneMouseEvent*); + +//private: +// using MapPixmapItem::paint; }; #endif // COLLISIONPIXMAPITEM_H diff --git a/include/ui/cursortilerect.h b/include/ui/cursortilerect.h index 21bac12a..dfe8ed95 100644 --- a/include/ui/cursortilerect.h +++ b/include/ui/cursortilerect.h @@ -27,8 +27,7 @@ public: height + penWidth * 2); } - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget) override + void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override { if (!(*enabled)) return; int width = this->width; diff --git a/include/ui/mappixmapitem.h b/include/ui/mappixmapitem.h index e5723890..0b61fff8 100644 --- a/include/ui/mappixmapitem.h +++ b/include/ui/mappixmapitem.h @@ -8,6 +8,10 @@ class MapPixmapItem : public QObject, public QGraphicsPixmapItem { Q_OBJECT + +private: + using QGraphicsPixmapItem::paint; + public: MapPixmapItem(Map *map_, MetatileSelector *metatileSelector, Settings *settings) { this->map = map_; diff --git a/include/ui/movablerect.h b/include/ui/movablerect.h index 8668ad50..f73e360a 100644 --- a/include/ui/movablerect.h +++ b/include/ui/movablerect.h @@ -18,8 +18,7 @@ public: 20 * 8 + penWidth * 2); } - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget) override + void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override { painter->setPen(this->color); painter->drawRect(-2, -2, this->width + 3, this->height + 3); diff --git a/include/ui/regionmappixmapitem.h b/include/ui/regionmappixmapitem.h index 0fc11b8c..2f8bc9af 100644 --- a/include/ui/regionmappixmapitem.h +++ b/include/ui/regionmappixmapitem.h @@ -7,6 +7,10 @@ class RegionMapPixmapItem : public QObject, public QGraphicsPixmapItem { Q_OBJECT + +private: + using QGraphicsPixmapItem::paint; + public: RegionMapPixmapItem(RegionMap *rmap, TilemapTileSelector *tile_selector) { this->region_map = rmap; @@ -16,8 +20,8 @@ public: RegionMap *region_map; TilemapTileSelector *tile_selector; - virtual void paint(QGraphicsSceneMouseEvent*); - virtual void select(QGraphicsSceneMouseEvent*); + virtual void paint(QGraphicsSceneMouseEvent *); + virtual void select(QGraphicsSceneMouseEvent *); virtual void draw(); signals: @@ -26,11 +30,11 @@ signals: void hoveredRegionMapTileCleared(); protected: - void hoverMoveEvent(QGraphicsSceneHoverEvent*); - void hoverLeaveEvent(QGraphicsSceneHoverEvent*); - void mousePressEvent(QGraphicsSceneMouseEvent*); - void mouseMoveEvent(QGraphicsSceneMouseEvent*); - void mouseReleaseEvent(QGraphicsSceneMouseEvent*); + void hoverMoveEvent(QGraphicsSceneHoverEvent *); + void hoverLeaveEvent(QGraphicsSceneHoverEvent *); + void mousePressEvent(QGraphicsSceneMouseEvent *); + void mouseMoveEvent(QGraphicsSceneMouseEvent *); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *); }; #endif // REGIONMAPPIXMAPITEM_H diff --git a/include/ui/tilemaptileselector.h b/include/ui/tilemaptileselector.h index 293ad3af..95650e4b 100644 --- a/include/ui/tilemaptileselector.h +++ b/include/ui/tilemaptileselector.h @@ -34,7 +34,7 @@ protected: private: int numTilesWide; - int numTiles; + size_t numTiles; void updateSelectedTile(); unsigned getTileId(int x, int y); QPoint getTileIdCoords(unsigned); diff --git a/porymap.pro b/porymap.pro index 76a0433f..8a9574df 100644 --- a/porymap.pro +++ b/porymap.pro @@ -12,7 +12,7 @@ TARGET = porymap TEMPLATE = app RC_ICONS = resources/icons/porymap-icon-1.ico ICON = resources/icons/porymap.icns -QMAKE_CXXFLAGS += -std=c++11 +QMAKE_CXXFLAGS += -std=c++11 -Wall SOURCES += src/core/block.cpp \ src/core/blockdata.cpp \ diff --git a/src/editor.cpp b/src/editor.cpp index e209f0aa..fb062005 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -467,7 +467,7 @@ void Editor::onMapStartPaint(QGraphicsSceneMouseEvent *event, MapPixmapItem *ite } } -void Editor::onMapEndPaint(QGraphicsSceneMouseEvent *event, MapPixmapItem *item) { +void Editor::onMapEndPaint(QGraphicsSceneMouseEvent *, MapPixmapItem *item) { if (!item->paintingEnabled) { return; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 61a022cc..5a93e0ed 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -161,6 +161,8 @@ void MainWindow::setProjectSpecificUIVisibility() ui->label_AllowBiking->setVisible(true); ui->label_AllowEscapeRope->setVisible(true); break; + case BaseGameVersion::pokefirered: + break; } } @@ -2122,7 +2124,7 @@ void MainWindow::on_pushButton_DeleteCustomHeaderField_clicked() } } -void MainWindow::on_tableWidget_CustomHeaderFields_cellChanged(int row, int column) +void MainWindow::on_tableWidget_CustomHeaderFields_cellChanged(int, int) { this->editor->updateCustomMapHeaderValues(this->ui->tableWidget_CustomHeaderFields); } diff --git a/src/project.cpp b/src/project.cpp index 8f5d73a6..dfd13e93 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -671,7 +671,7 @@ void Project::saveTilesetTilesImage(Tileset *tileset) { tileset->tilesImage.save(tileset->tilesImagePath); } -void Project::saveTilesetPalettes(Tileset *tileset, bool primary) { +void Project::saveTilesetPalettes(Tileset *tileset, bool /*primary*/) { PaletteUtil paletteParser; for (int i = 0; i < Project::getNumPalettesTotal(); i++) { QString filepath = tileset->palettePaths.at(i); diff --git a/src/ui/newmappopup.cpp b/src/ui/newmappopup.cpp index 2b01784e..5b306856 100644 --- a/src/ui/newmappopup.cpp +++ b/src/ui/newmappopup.cpp @@ -93,6 +93,8 @@ void NewMapPopup::setDefaultValues(int groupNum, QString mapSec) { ui->label_NewMap_Allow_Biking->setVisible(true); ui->label_NewMap_Allow_Escape_Rope->setVisible(true); break; + case BaseGameVersion::pokefirered: + break; } } diff --git a/src/ui/regionmapeditor.cpp b/src/ui/regionmapeditor.cpp index b48a344f..90790f7e 100644 --- a/src/ui/regionmapeditor.cpp +++ b/src/ui/regionmapeditor.cpp @@ -445,11 +445,6 @@ void RegionMapEditor::mouseEvent_region_map(QGraphicsSceneMouseEvent *event, Reg } void RegionMapEditor::mouseEvent_city_map(QGraphicsSceneMouseEvent *event, CityMapPixmapItem *item) { - QPointF pos = event->pos(); - int x = static_cast(pos.x()) / 8; - int y = static_cast(pos.y()) / 8; - int index = this->city_map_item->getIndexAt(x, y); - if (cityMapFirstDraw) { RegionMapHistoryItem *commit = new RegionMapHistoryItem( RegionMapEditorBox::CityMapImage, this->city_map_item->getTiles(), this->city_map_item->file @@ -548,7 +543,7 @@ void RegionMapEditor::on_spinBox_RM_Entry_height_valueChanged(int height) { this->hasUnsavedChanges = true; } -void RegionMapEditor::on_lineEdit_RM_MapName_textEdited(const QString &text) { +void RegionMapEditor::on_lineEdit_RM_MapName_textEdited(const QString &) { this->hasUnsavedChanges = true; } diff --git a/src/ui/regionmapentriespixmapitem.cpp b/src/ui/regionmapentriespixmapitem.cpp index 08f07aa8..1b001632 100644 --- a/src/ui/regionmapentriespixmapitem.cpp +++ b/src/ui/regionmapentriespixmapitem.cpp @@ -115,7 +115,7 @@ void RegionMapEntriesPixmapItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } } -void RegionMapEntriesPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { +void RegionMapEntriesPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *) { this->draggingEntry = false; } @@ -123,7 +123,7 @@ void RegionMapEntriesPixmapItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) event->ignore(); } -void RegionMapEntriesPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) { +void RegionMapEntriesPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { event->ignore(); } diff --git a/src/ui/regionmaplayoutpixmapitem.cpp b/src/ui/regionmaplayoutpixmapitem.cpp index f9f6c2fc..36770053 100644 --- a/src/ui/regionmaplayoutpixmapitem.cpp +++ b/src/ui/regionmaplayoutpixmapitem.cpp @@ -70,7 +70,7 @@ void RegionMapLayoutPixmapItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) mousePressEvent(event); } -void RegionMapLayoutPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {} +void RegionMapLayoutPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *) {} void RegionMapLayoutPixmapItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { QPoint pos = this->getCellPos(event->pos()); @@ -78,7 +78,7 @@ void RegionMapLayoutPixmapItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) emit this->hoveredTileChanged(tileId); } -void RegionMapLayoutPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) { +void RegionMapLayoutPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *) { emit this->hoveredTileCleared(); } diff --git a/src/ui/tilemaptileselector.cpp b/src/ui/tilemaptileselector.cpp index a18185ab..6ae51c14 100644 --- a/src/ui/tilemaptileselector.cpp +++ b/src/ui/tilemaptileselector.cpp @@ -33,7 +33,7 @@ unsigned TilemapTileSelector::getSelectedTile() { } unsigned TilemapTileSelector::getTileId(int x, int y) { - int index = y * this->numTilesWide + x; + unsigned index = y * this->numTilesWide + x; return index < this->numTiles ? index : this->numTiles % index; } @@ -72,6 +72,6 @@ void TilemapTileSelector::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { emit this->hoveredTileChanged(tileId); } -void TilemapTileSelector::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) { +void TilemapTileSelector::hoverLeaveEvent(QGraphicsSceneHoverEvent *) { emit this->hoveredTileCleared(); }