From 0d33c3aa6491824c82346a8cd047cd6cceaa61a3 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Mon, 24 Sep 2018 19:12:29 -0500 Subject: [PATCH] Move event to core/ --- core/block.cpp | 2 +- core/blockdata.cpp | 2 +- event.cpp => core/event.cpp | 520 ++++++++++++++++++------------------ event.h => core/event.h | 174 ++++++------ core/metatile.cpp | 4 +- core/parseutil.h | 2 +- core/tile.cpp | 2 +- core/tileset.cpp | 4 +- core/tileset.h | 4 +- editor.cpp | 2 +- editor.h | 6 +- mainwindow.cpp | 2 +- map.cpp | 4 +- map.h | 12 +- porymap.pro | 4 +- project.cpp | 10 +- project.h | 4 +- ui/metatileselector.h | 2 +- 18 files changed, 380 insertions(+), 380 deletions(-) rename event.cpp => core/event.cpp (96%) mode change 100755 => 100644 rename event.h => core/event.h (94%) mode change 100755 => 100644 diff --git a/core/block.cpp b/core/block.cpp index 27747f00..c064399a 100644 --- a/core/block.cpp +++ b/core/block.cpp @@ -1,4 +1,4 @@ -#include "core/block.h" +#include "block.h" Block::Block() { } diff --git a/core/blockdata.cpp b/core/blockdata.cpp index e9285201..34aff306 100644 --- a/core/blockdata.cpp +++ b/core/blockdata.cpp @@ -1,4 +1,4 @@ -#include "core/blockdata.h" +#include "blockdata.h" Blockdata::Blockdata(QObject *parent) : QObject(parent) { diff --git a/event.cpp b/core/event.cpp old mode 100755 new mode 100644 similarity index 96% rename from event.cpp rename to core/event.cpp index 80928d97..5fcafd73 --- a/event.cpp +++ b/core/event.cpp @@ -1,260 +1,260 @@ -#include "event.h" -#include "map.h" - -QString EventType::Object = "event_object"; -QString EventType::Warp = "event_warp"; -QString EventType::CoordScript = "event_trap"; -QString EventType::CoordWeather = "event_trap_weather"; -QString EventType::Sign = "event_sign"; -QString EventType::HiddenItem = "event_hidden_item"; -QString EventType::SecretBase = "event_secret_base"; -QString EventType::HealLocation = "event_heal_location"; - -Event::Event() -{ - this->spriteWidth = 16; - this->spriteHeight = 16; -} - -Event* Event::createNewEvent(QString event_type, QString map_name) -{ - Event *event = new Event; - if (event_type == EventType::Object) { - event = createNewObjectEvent(); - } else if (event_type == EventType::Warp) { - event = createNewWarpEvent(map_name); - } else if (event_type == EventType::HealLocation) { - event = createNewHealLocationEvent(map_name); - } else if (event_type == EventType::CoordScript) { - event = createNewCoordScriptEvent(); - } else if (event_type == EventType::CoordWeather) { - event = createNewCoordWeatherEvent(); - } else if (event_type == EventType::Sign) { - event = createNewSignEvent(); - } else if (event_type == EventType::HiddenItem) { - event = createNewHiddenItemEvent(); - } else if (event_type == EventType::SecretBase) { - event = createNewSecretBaseEvent(); - } - - event->setX(0); - event->setY(0); - event->put("elevation", 3); - return event; -} - -Event* Event::createNewObjectEvent() -{ - Event *event = new Event; - event->put("event_group_type", "object_event_group"); - event->put("event_type", EventType::Object); - event->put("sprite", "EVENT_OBJ_GFX_BOY_1"); - event->put("movement_type", "MOVEMENT_TYPE_LOOK_AROUND"); - event->put("radius_x", 0); - event->put("radius_y", 0); - event->put("script_label", "NULL"); - event->put("event_flag", "0"); - event->put("replacement", "0"); - event->put("is_trainer", "FALSE"); - event->put("sight_radius_tree_id", 0); - return event; -} - -Event* Event::createNewWarpEvent(QString map_name) -{ - Event *event = new Event; - event->put("event_group_type", "warp_event_group"); - event->put("event_type", EventType::Warp); - event->put("destination_warp", 0); - event->put("destination_map_name", map_name); - return event; -} - -Event* Event::createNewHealLocationEvent(QString map_name) -{ - Event *event = new Event; - event->put("event_group_type", "heal_event_group"); - event->put("event_type", EventType::HealLocation); - event->put("loc_name", QString(Map::mapConstantFromName(map_name)).remove(0,4)); - return event; -} - -Event* Event::createNewCoordScriptEvent() -{ - Event *event = new Event; - event->put("event_group_type", "coord_event_group"); - event->put("event_type", EventType::CoordScript); - event->put("script_label", "NULL"); - event->put("script_var", "VAR_TEMP_0"); - event->put("script_var_value", "0"); - return event; -} - -Event* Event::createNewCoordWeatherEvent() -{ - Event *event = new Event; - event->put("event_group_type", "coord_event_group"); - event->put("event_type", EventType::CoordWeather); - event->put("weather", "COORD_EVENT_WEATHER_SUNNY"); - return event; -} - -Event* Event::createNewSignEvent() -{ - Event *event = new Event; - event->put("event_group_type", "bg_event_group"); - event->put("event_type", EventType::Sign); - event->put("player_facing_direction", "BG_EVENT_PLAYER_FACING_ANY"); - event->put("script_label", "NULL"); - return event; -} - -Event* Event::createNewHiddenItemEvent() -{ - Event *event = new Event; - event->put("event_group_type", "bg_event_group"); - event->put("event_type", EventType::HiddenItem); - event->put("item", "ITEM_POTION"); - event->put("flag", "FLAG_HIDDEN_ITEM_0"); - return event; -} - -Event* Event::createNewSecretBaseEvent() -{ - Event *event = new Event; - event->put("event_group_type", "bg_event_group"); - event->put("event_type", EventType::SecretBase); - event->put("secret_base_id", "SECRET_BASE_RED_CAVE2_1"); - return event; -} - -int Event::getPixelX() -{ - return (this->x() * 16) - qMax(0, (this->spriteWidth - 16) / 2); -} - -int Event::getPixelY() -{ - return (this->y() * 16) - qMax(0, this->spriteHeight - 16); -} - -QString Event::buildObjectEventMacro(int item_index) -{ - int radius_x = this->getInt("radius_x"); - int radius_y = this->getInt("radius_y"); - uint16_t x = this->getU16("x"); - uint16_t y = this->getU16("y"); - - QString text = ""; - text += QString("\tobject_event %1").arg(item_index + 1); - text += QString(", %1").arg(this->get("sprite")); - text += QString(", %1").arg(this->get("replacement")); - text += QString(", %1").arg(x); - text += QString(", %1").arg(y); - text += QString(", %1").arg(this->get("elevation")); - text += QString(", %1").arg(this->get("movement_type")); - text += QString(", %1").arg(radius_x); - text += QString(", %1").arg(radius_y); - text += QString(", %1").arg(this->get("is_trainer")); - text += QString(", %1").arg(this->get("sight_radius_tree_id")); - text += QString(", %1").arg(this->get("script_label")); - text += QString(", %1").arg(this->get("event_flag")); - text += "\n"; - return text; -} - -QString Event::buildWarpEventMacro(QMap *mapNamesToMapConstants) -{ - QString text = ""; - text += QString("\twarp_def %1").arg(this->get("x")); - text += QString(", %1").arg(this->get("y")); - text += QString(", %1").arg(this->get("elevation")); - text += QString(", %1").arg(this->get("destination_warp")); - text += QString(", %1").arg(mapNamesToMapConstants->value(this->get("destination_map_name"))); - text += "\n"; - return text; -} - -HealLocation Event::buildHealLocation() -{ - HealLocation hl; - hl.name = this->get("loc_name"); - try { - hl.index = this->get("index").toInt(); - } - catch(...) { - hl.index = 0; - } - hl.x = this->getU16("x"); - hl.y = this->getU16("y"); - return hl; -} - -QString Event::buildCoordScriptEventMacro() -{ - QString text = ""; - text += QString("\tcoord_event %1").arg(this->get("x")); - text += QString(", %1").arg(this->get("y")); - text += QString(", %1").arg(this->get("elevation")); - text += QString(", %1").arg(this->get("script_var")); - text += QString(", %1").arg(this->get("script_var_value")); - text += QString(", %1").arg(this->get("script_label")); - text += "\n"; - return text; -} - -QString Event::buildCoordWeatherEventMacro() -{ - QString text = ""; - text += QString("\tcoord_weather_event %1").arg(this->get("x")); - text += QString(", %1").arg(this->get("y")); - text += QString(", %1").arg(this->get("elevation")); - text += QString(", %1").arg(this->get("weather")); - text += "\n"; - return text; -} - -QString Event::buildSignEventMacro() -{ - QString text = ""; - text += QString("\tbg_event %1").arg(this->get("x")); - text += QString(", %1").arg(this->get("y")); - text += QString(", %1").arg(this->get("elevation")); - text += QString(", %1").arg(this->get("player_facing_direction")); - text += QString(", %1").arg(this->get("script_label")); - text += "\n"; - return text; -} - -QString Event::buildHiddenItemEventMacro() -{ - QString text = ""; - text += QString("\tbg_hidden_item_event %1").arg(this->get("x")); - text += QString(", %1").arg(this->get("y")); - text += QString(", %1").arg(this->get("elevation")); - text += QString(", %1").arg(this->get("item")); - text += QString(", %1").arg(this->get("flag")); - text += "\n"; - return text; -} - -QString Event::buildSecretBaseEventMacro() -{ - QString text = ""; - text += QString("\tbg_secret_base_event %1").arg(this->get("x")); - text += QString(", %1").arg(this->get("y")); - text += QString(", %1").arg(this->get("elevation")); - text += QString(", %1").arg(this->get("secret_base_id")); - text += "\n"; - return text; -} - -void Event::setPixmapFromSpritesheet(QImage spritesheet, int spriteWidth, int spriteHeight) -{ - // Set first palette color fully transparent. - QImage img = spritesheet.copy(0, 0, spriteWidth, spriteHeight); - img.setColor(0, qRgba(0, 0, 0, 0)); - pixmap = QPixmap::fromImage(img); - this->spriteWidth = spriteWidth; - this->spriteHeight = spriteHeight; -} +#include "event.h" +#include "map.h" + +QString EventType::Object = "event_object"; +QString EventType::Warp = "event_warp"; +QString EventType::CoordScript = "event_trap"; +QString EventType::CoordWeather = "event_trap_weather"; +QString EventType::Sign = "event_sign"; +QString EventType::HiddenItem = "event_hidden_item"; +QString EventType::SecretBase = "event_secret_base"; +QString EventType::HealLocation = "event_heal_location"; + +Event::Event() +{ + this->spriteWidth = 16; + this->spriteHeight = 16; +} + +Event* Event::createNewEvent(QString event_type, QString map_name) +{ + Event *event = new Event; + if (event_type == EventType::Object) { + event = createNewObjectEvent(); + } else if (event_type == EventType::Warp) { + event = createNewWarpEvent(map_name); + } else if (event_type == EventType::HealLocation) { + event = createNewHealLocationEvent(map_name); + } else if (event_type == EventType::CoordScript) { + event = createNewCoordScriptEvent(); + } else if (event_type == EventType::CoordWeather) { + event = createNewCoordWeatherEvent(); + } else if (event_type == EventType::Sign) { + event = createNewSignEvent(); + } else if (event_type == EventType::HiddenItem) { + event = createNewHiddenItemEvent(); + } else if (event_type == EventType::SecretBase) { + event = createNewSecretBaseEvent(); + } + + event->setX(0); + event->setY(0); + event->put("elevation", 3); + return event; +} + +Event* Event::createNewObjectEvent() +{ + Event *event = new Event; + event->put("event_group_type", "object_event_group"); + event->put("event_type", EventType::Object); + event->put("sprite", "EVENT_OBJ_GFX_BOY_1"); + event->put("movement_type", "MOVEMENT_TYPE_LOOK_AROUND"); + event->put("radius_x", 0); + event->put("radius_y", 0); + event->put("script_label", "NULL"); + event->put("event_flag", "0"); + event->put("replacement", "0"); + event->put("is_trainer", "FALSE"); + event->put("sight_radius_tree_id", 0); + return event; +} + +Event* Event::createNewWarpEvent(QString map_name) +{ + Event *event = new Event; + event->put("event_group_type", "warp_event_group"); + event->put("event_type", EventType::Warp); + event->put("destination_warp", 0); + event->put("destination_map_name", map_name); + return event; +} + +Event* Event::createNewHealLocationEvent(QString map_name) +{ + Event *event = new Event; + event->put("event_group_type", "heal_event_group"); + event->put("event_type", EventType::HealLocation); + event->put("loc_name", QString(Map::mapConstantFromName(map_name)).remove(0,4)); + return event; +} + +Event* Event::createNewCoordScriptEvent() +{ + Event *event = new Event; + event->put("event_group_type", "coord_event_group"); + event->put("event_type", EventType::CoordScript); + event->put("script_label", "NULL"); + event->put("script_var", "VAR_TEMP_0"); + event->put("script_var_value", "0"); + return event; +} + +Event* Event::createNewCoordWeatherEvent() +{ + Event *event = new Event; + event->put("event_group_type", "coord_event_group"); + event->put("event_type", EventType::CoordWeather); + event->put("weather", "COORD_EVENT_WEATHER_SUNNY"); + return event; +} + +Event* Event::createNewSignEvent() +{ + Event *event = new Event; + event->put("event_group_type", "bg_event_group"); + event->put("event_type", EventType::Sign); + event->put("player_facing_direction", "BG_EVENT_PLAYER_FACING_ANY"); + event->put("script_label", "NULL"); + return event; +} + +Event* Event::createNewHiddenItemEvent() +{ + Event *event = new Event; + event->put("event_group_type", "bg_event_group"); + event->put("event_type", EventType::HiddenItem); + event->put("item", "ITEM_POTION"); + event->put("flag", "FLAG_HIDDEN_ITEM_0"); + return event; +} + +Event* Event::createNewSecretBaseEvent() +{ + Event *event = new Event; + event->put("event_group_type", "bg_event_group"); + event->put("event_type", EventType::SecretBase); + event->put("secret_base_id", "SECRET_BASE_RED_CAVE2_1"); + return event; +} + +int Event::getPixelX() +{ + return (this->x() * 16) - qMax(0, (this->spriteWidth - 16) / 2); +} + +int Event::getPixelY() +{ + return (this->y() * 16) - qMax(0, this->spriteHeight - 16); +} + +QString Event::buildObjectEventMacro(int item_index) +{ + int radius_x = this->getInt("radius_x"); + int radius_y = this->getInt("radius_y"); + uint16_t x = this->getU16("x"); + uint16_t y = this->getU16("y"); + + QString text = ""; + text += QString("\tobject_event %1").arg(item_index + 1); + text += QString(", %1").arg(this->get("sprite")); + text += QString(", %1").arg(this->get("replacement")); + text += QString(", %1").arg(x); + text += QString(", %1").arg(y); + text += QString(", %1").arg(this->get("elevation")); + text += QString(", %1").arg(this->get("movement_type")); + text += QString(", %1").arg(radius_x); + text += QString(", %1").arg(radius_y); + text += QString(", %1").arg(this->get("is_trainer")); + text += QString(", %1").arg(this->get("sight_radius_tree_id")); + text += QString(", %1").arg(this->get("script_label")); + text += QString(", %1").arg(this->get("event_flag")); + text += "\n"; + return text; +} + +QString Event::buildWarpEventMacro(QMap *mapNamesToMapConstants) +{ + QString text = ""; + text += QString("\twarp_def %1").arg(this->get("x")); + text += QString(", %1").arg(this->get("y")); + text += QString(", %1").arg(this->get("elevation")); + text += QString(", %1").arg(this->get("destination_warp")); + text += QString(", %1").arg(mapNamesToMapConstants->value(this->get("destination_map_name"))); + text += "\n"; + return text; +} + +HealLocation Event::buildHealLocation() +{ + HealLocation hl; + hl.name = this->get("loc_name"); + try { + hl.index = this->get("index").toInt(); + } + catch(...) { + hl.index = 0; + } + hl.x = this->getU16("x"); + hl.y = this->getU16("y"); + return hl; +} + +QString Event::buildCoordScriptEventMacro() +{ + QString text = ""; + text += QString("\tcoord_event %1").arg(this->get("x")); + text += QString(", %1").arg(this->get("y")); + text += QString(", %1").arg(this->get("elevation")); + text += QString(", %1").arg(this->get("script_var")); + text += QString(", %1").arg(this->get("script_var_value")); + text += QString(", %1").arg(this->get("script_label")); + text += "\n"; + return text; +} + +QString Event::buildCoordWeatherEventMacro() +{ + QString text = ""; + text += QString("\tcoord_weather_event %1").arg(this->get("x")); + text += QString(", %1").arg(this->get("y")); + text += QString(", %1").arg(this->get("elevation")); + text += QString(", %1").arg(this->get("weather")); + text += "\n"; + return text; +} + +QString Event::buildSignEventMacro() +{ + QString text = ""; + text += QString("\tbg_event %1").arg(this->get("x")); + text += QString(", %1").arg(this->get("y")); + text += QString(", %1").arg(this->get("elevation")); + text += QString(", %1").arg(this->get("player_facing_direction")); + text += QString(", %1").arg(this->get("script_label")); + text += "\n"; + return text; +} + +QString Event::buildHiddenItemEventMacro() +{ + QString text = ""; + text += QString("\tbg_hidden_item_event %1").arg(this->get("x")); + text += QString(", %1").arg(this->get("y")); + text += QString(", %1").arg(this->get("elevation")); + text += QString(", %1").arg(this->get("item")); + text += QString(", %1").arg(this->get("flag")); + text += "\n"; + return text; +} + +QString Event::buildSecretBaseEventMacro() +{ + QString text = ""; + text += QString("\tbg_secret_base_event %1").arg(this->get("x")); + text += QString(", %1").arg(this->get("y")); + text += QString(", %1").arg(this->get("elevation")); + text += QString(", %1").arg(this->get("secret_base_id")); + text += "\n"; + return text; +} + +void Event::setPixmapFromSpritesheet(QImage spritesheet, int spriteWidth, int spriteHeight) +{ + // Set first palette color fully transparent. + QImage img = spritesheet.copy(0, 0, spriteWidth, spriteHeight); + img.setColor(0, qRgba(0, 0, 0, 0)); + pixmap = QPixmap::fromImage(img); + this->spriteWidth = spriteWidth; + this->spriteHeight = spriteHeight; +} diff --git a/event.h b/core/event.h old mode 100755 new mode 100644 similarity index 94% rename from event.h rename to core/event.h index 0c3293a1..35a59f7d --- a/event.h +++ b/core/event.h @@ -1,87 +1,87 @@ -#ifndef EVENT_H -#define EVENT_H - -#include "core/heallocation.h" -#include -#include -#include -#include - -class EventType -{ -public: - static QString Object; - static QString Warp; - static QString CoordScript; - static QString CoordWeather; - static QString Sign; - static QString HiddenItem; - static QString SecretBase; - static QString HealLocation; -}; - -class Event -{ -public: - Event(); -public: - int x() { - return getInt("x"); - } - int y() { - return getInt("y"); - } - int elevation() { - return getInt("elevation"); - } - void setX(int x) { - put("x", x); - } - void setY(int y) { - put("y", y); - } - QString get(QString key) { - return values.value(key); - } - int getInt(QString key) { - return values.value(key).toInt(nullptr, 0); - } - uint16_t getU16(QString key) { - return values.value(key).toUShort(nullptr, 0); - } - void put(QString key, int value) { - put(key, QString("%1").arg(value)); - } - void put(QString key, QString value) { - values.insert(key, value); - } - - static Event* createNewEvent(QString, QString); - static Event* createNewObjectEvent(); - static Event* createNewWarpEvent(QString); - static Event* createNewHealLocationEvent(QString); - static Event* createNewCoordScriptEvent(); - static Event* createNewCoordWeatherEvent(); - static Event* createNewSignEvent(); - static Event* createNewHiddenItemEvent(); - static Event* createNewSecretBaseEvent(); - - QString buildObjectEventMacro(int); - QString buildWarpEventMacro(QMap*); - HealLocation buildHealLocation(); - QString buildCoordScriptEventMacro(); - QString buildCoordWeatherEventMacro(); - QString buildSignEventMacro(); - QString buildHiddenItemEventMacro(); - QString buildSecretBaseEventMacro(); - void setPixmapFromSpritesheet(QImage, int, int); - int getPixelX(); - int getPixelY(); - - QMap values; - QPixmap pixmap; - int spriteWidth; - int spriteHeight; -}; - -#endif // EVENT_H +#ifndef EVENT_H +#define EVENT_H + +#include "heallocation.h" +#include +#include +#include +#include + +class EventType +{ +public: + static QString Object; + static QString Warp; + static QString CoordScript; + static QString CoordWeather; + static QString Sign; + static QString HiddenItem; + static QString SecretBase; + static QString HealLocation; +}; + +class Event +{ +public: + Event(); +public: + int x() { + return getInt("x"); + } + int y() { + return getInt("y"); + } + int elevation() { + return getInt("elevation"); + } + void setX(int x) { + put("x", x); + } + void setY(int y) { + put("y", y); + } + QString get(QString key) { + return values.value(key); + } + int getInt(QString key) { + return values.value(key).toInt(nullptr, 0); + } + uint16_t getU16(QString key) { + return values.value(key).toUShort(nullptr, 0); + } + void put(QString key, int value) { + put(key, QString("%1").arg(value)); + } + void put(QString key, QString value) { + values.insert(key, value); + } + + static Event* createNewEvent(QString, QString); + static Event* createNewObjectEvent(); + static Event* createNewWarpEvent(QString); + static Event* createNewHealLocationEvent(QString); + static Event* createNewCoordScriptEvent(); + static Event* createNewCoordWeatherEvent(); + static Event* createNewSignEvent(); + static Event* createNewHiddenItemEvent(); + static Event* createNewSecretBaseEvent(); + + QString buildObjectEventMacro(int); + QString buildWarpEventMacro(QMap*); + HealLocation buildHealLocation(); + QString buildCoordScriptEventMacro(); + QString buildCoordWeatherEventMacro(); + QString buildSignEventMacro(); + QString buildHiddenItemEventMacro(); + QString buildSecretBaseEventMacro(); + void setPixmapFromSpritesheet(QImage, int, int); + int getPixelX(); + int getPixelY(); + + QMap values; + QPixmap pixmap; + int spriteWidth; + int spriteHeight; +}; + +#endif // EVENT_H diff --git a/core/metatile.cpp b/core/metatile.cpp index 41ae927f..6dff9dc6 100644 --- a/core/metatile.cpp +++ b/core/metatile.cpp @@ -1,6 +1,6 @@ -#include "core/metatile.h" +#include "metatile.h" +#include "tileset.h" #include "project.h" -#include "core/tileset.h" Metatile::Metatile() { diff --git a/core/parseutil.h b/core/parseutil.h index 6bebd4a2..e85469c1 100644 --- a/core/parseutil.h +++ b/core/parseutil.h @@ -1,7 +1,7 @@ #ifndef PARSEUTIL_H #define PARSEUTIL_H -#include "core/heallocation.h" +#include "heallocation.h" #include #include diff --git a/core/tile.cpp b/core/tile.cpp index 3f404907..93398fd5 100644 --- a/core/tile.cpp +++ b/core/tile.cpp @@ -1,4 +1,4 @@ -#include "core/tile.h" +#include "tile.h" Tile::Tile() { diff --git a/core/tileset.cpp b/core/tileset.cpp index 608dcb9a..6aa6a0a0 100644 --- a/core/tileset.cpp +++ b/core/tileset.cpp @@ -1,5 +1,5 @@ -#include "core/tileset.h" -#include "core/metatile.h" +#include "tileset.h" +#include "metatile.h" #include "project.h" #include diff --git a/core/tileset.h b/core/tileset.h index ce6233ed..99a58850 100644 --- a/core/tileset.h +++ b/core/tileset.h @@ -1,8 +1,8 @@ #ifndef TILESET_H #define TILESET_H -#include "core/metatile.h" -#include "core/tile.h" +#include "metatile.h" +#include "tile.h" #include class Tileset diff --git a/editor.cpp b/editor.cpp index cdc20cdb..67559f7f 100755 --- a/editor.cpp +++ b/editor.cpp @@ -1,6 +1,6 @@ #include "editor.h" #include "event.h" -#include "core/mapconnection.h" +#include "mapconnection.h" #include #include #include diff --git a/editor.h b/editor.h index d48a297c..dce06a6a 100755 --- a/editor.h +++ b/editor.h @@ -9,9 +9,9 @@ #include #include -#include "core/mapconnection.h" -#include "ui/metatileselector.h" -#include "ui/movementpermissionsselector.h" +#include "mapconnection.h" +#include "metatileselector.h" +#include "movementpermissionsselector.h" #include "project.h" #include "ui_mainwindow.h" diff --git a/mainwindow.cpp b/mainwindow.cpp index 8938cb4f..af9d9992 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2,7 +2,7 @@ #include "ui_mainwindow.h" #include "project.h" #include "editor.h" -#include "ui/eventpropertiesframe.h" +#include "eventpropertiesframe.h" #include "ui_objectpropertiesframe.h" #include diff --git a/map.cpp b/map.cpp index abc5c1f5..b3926b66 100755 --- a/map.cpp +++ b/map.cpp @@ -1,5 +1,5 @@ -#include "core/history.h" -#include "core/historyitem.h" +#include "history.h" +#include "historyitem.h" #include "map.h" #include "project.h" diff --git a/map.h b/map.h index 79a6a0e5..d6e11cb8 100755 --- a/map.h +++ b/map.h @@ -1,12 +1,12 @@ #ifndef MAP_H #define MAP_H -#include "core/blockdata.h" -#include "core/history.h" -#include "core/historyitem.h" -#include "core/mapconnection.h" -#include "core/maplayout.h" -#include "core/tileset.h" +#include "blockdata.h" +#include "history.h" +#include "historyitem.h" +#include "mapconnection.h" +#include "maplayout.h" +#include "tileset.h" #include "event.h" #include diff --git a/porymap.pro b/porymap.pro index 9a3ef231..5cf5014c 100755 --- a/porymap.pro +++ b/porymap.pro @@ -16,6 +16,7 @@ ICON = resources/icons/porymap-icon-1.ico SOURCES += core/block.cpp \ core/blockdata.cpp \ + core/event.cpp \ core/heallocation.cpp \ core/historyitem.cpp \ core/maplayout.cpp \ @@ -31,7 +32,6 @@ SOURCES += core/block.cpp \ ui/noscrollspinbox.cpp \ ui/selectablepixmapitem.cpp \ editor.cpp \ - event.cpp \ graphicsview.cpp \ main.cpp \ mainwindow.cpp \ @@ -40,6 +40,7 @@ SOURCES += core/block.cpp \ HEADERS += core/block.h \ core/blockdata.h \ + core/event.h \ core/heallocation.h \ core/history.h \ core/historyitem.h \ @@ -57,7 +58,6 @@ HEADERS += core/block.h \ ui/noscrollspinbox.h \ ui/selectablepixmapitem.h \ editor.h \ - event.h \ graphicsview.h \ mainwindow.h \ map.h \ diff --git a/project.cpp b/project.cpp index 18db5b18..52be0852 100755 --- a/project.cpp +++ b/project.cpp @@ -1,9 +1,9 @@ #include "project.h" -#include "core/history.h" -#include "core/historyitem.h" -#include "core/parseutil.h" -#include "core/tile.h" -#include "core/tileset.h" +#include "history.h" +#include "historyitem.h" +#include "parseutil.h" +#include "tile.h" +#include "tileset.h" #include "event.h" #include diff --git a/project.h b/project.h index 4db52a89..cb1a10ee 100755 --- a/project.h +++ b/project.h @@ -2,8 +2,8 @@ #define PROJECT_H #include "map.h" -#include "core/blockdata.h" -#include "core/heallocation.h" +#include "blockdata.h" +#include "heallocation.h" #include #include diff --git a/ui/metatileselector.h b/ui/metatileselector.h index afeed238..2027d9fd 100644 --- a/ui/metatileselector.h +++ b/ui/metatileselector.h @@ -2,7 +2,7 @@ #define METATILESELECTOR_H #include "selectablepixmapitem.h" -#include "core/tileset.h" +#include "tileset.h" class MetatileSelector: public SelectablePixmapItem { Q_OBJECT