From b469cc047f56ddc85d27babd6cfebd256c0571a9 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 8 Jan 2019 10:28:20 -0600 Subject: [PATCH] Add 'About Porymap' window that contains useful information about the program --- forms/aboutporymap.ui | 158 ++++++++++++++++++++++++++++++++++++++ forms/mainwindow.ui | 12 +++ forms/newmappopup.ui | 2 +- include/mainwindow.h | 2 + include/ui/aboutporymap.h | 19 +++++ porymap.pro | 5 +- src/mainwindow.cpp | 8 ++ src/ui/aboutporymap.cpp | 14 ++++ 8 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 forms/aboutporymap.ui create mode 100644 include/ui/aboutporymap.h create mode 100644 src/ui/aboutporymap.cpp diff --git a/forms/aboutporymap.ui b/forms/aboutporymap.ui new file mode 100644 index 00000000..68632757 --- /dev/null +++ b/forms/aboutporymap.ui @@ -0,0 +1,158 @@ + + + AboutPorymap + + + + 0 + 0 + 582 + 287 + + + + About Porymap + + + + + + + + Segoe UI + 22 + 75 + true + false + true + + + + Porymap + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + Segoe UI + 12 + + + + Version 1.1.1 - January 8th, 2019 + + + Qt::AlignCenter + + + + + + + + Segoe UI + + + + Map editor for pokeruby and pokeemerald. + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This version of porymap is compatible with pokeruby and pokeemerald as of the following commit hashes:</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">pokeruby: e8b149e80e7b1411ce7a128e36ebc5d5490133e1</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">pokeemerald: a1ea3b5e394bc115ba9b86348c161094a00dcca7 </span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Please report any issues on GitHub: </span><a href="https://github.com/huderlem/porymap/issues"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">https://github.com/huderlem/porymap/issues</span></a></p> +<hr /> +<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="changelog"></a><span style=" font-size:8pt; font-weight:600;">C</span><span style=" font-size:8pt; font-weight:600;">hangelog</span><span style=" font-size:8pt;"> </span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">All notable changes to this project will be documented in this file. </span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">The format is based on </span><a href="https://keepachangelog.com/en/1.0.0/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">Keep a Changelog</span></a><span style=" font-size:8pt;">, and this project does </span><span style=" font-size:8pt; font-weight:600;">not</span><span style=" font-size:8pt;"> adhere to any strict versioning scheme, such as </span><a href="https://semver.org/spec/v2.0.0.html"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">Semantic Versioning</span></a><span style=" font-size:8pt;">. </span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">The </span><span style=" font-size:8pt; font-weight:600;">&quot;Breaking Changes&quot;</span><span style=" font-size:8pt;"> listed below are changes that have been made in the decompilation projects (e.g. pokeemerald), which porymap requires in order to work properly. If porymap is used on a project that is not up-to-date with the breaking changes, then porymap will likely break or behave improperly. </span></p> +<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="unreleased111preview"></a><span style=" font-size:8pt; font-weight:600;">[</span><span style=" font-size:8pt; font-weight:600;">Unreleased - 1.1.1 preview]</span><span style=" font-size:8pt;"> </span></p> +<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="added"></a><span style=" font-size:8pt; font-weight:600;">A</span><span style=" font-size:8pt; font-weight:600;">dded</span><span style=" font-size:8pt;"> </span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Add &quot;magic fill&quot; mode to fill tool (hold down CTRL key). This fills all matching metatiles on the map, rather than only the contiguous region. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Add ability to import tileset palettes (JASC, .pal, .tpl, .gpl, .act). </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Add ability to export tileset tiles as indexed .png images. The currently-selected palette is used. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Restore window sizes the next time the application is opened. </li></ul> +<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="changed"></a><span style=" font-size:8pt; font-weight:600;">C</span><span style=" font-size:8pt; font-weight:600;">hanged</span><span style=" font-size:8pt;"> </span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Collapse the map list by default. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Collision view now has a transparency slider to help make it easier to view the underlying metatiles. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When importing tileset tiles from an image that is not indexed, the user can also provide a palette for the image. This is for the scenario where the user exports tiles and a palette from Advance Map. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When creating a new map, the user specifies all of the map properties in a new window prompt. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">New maps can be created using existing layouts by right-clicking on oan existing layout folder in the map list panel when sorted by &quot;Layout&quot;. </li></ul> +<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="fixed"></a><span style=" font-size:8pt; font-weight:600;">F</span><span style=" font-size:8pt; font-weight:600;">ixed</span><span style=" font-size:8pt;"> </span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix bug where smart paths could bes auto-enabled, despite the checkbox being disabled. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix crash that could occur when changing the palette id in the tileset palette editor. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix crash that could occur when shrinking the number of metatiles in a tileset. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix bug where exported tile images from Advance Map were not handled correctly due to Advance Map using incorrect file extensions. </li></ul> +<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="11020181227"></a><span style=" font-size:8pt; font-weight:600;">[</span><span style=" font-size:8pt; font-weight:600;">1.1.0] - 2018-12-27</span><span style=" font-size:8pt;"> </span></p> +<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="breakingchanges"></a><span style=" font-size:8pt; font-weight:600;">B</span><span style=" font-size:8pt; font-weight:600;">reaking Changes</span><span style=" font-size:8pt;"> </span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">New map header format in pokeemerald from commit <a href="https://github.com/pret/pokeemerald/commit/a1ea3b5e394bc115ba9b86348c161094a00dcca7"><span style=" text-decoration: underline; color:#0000ff;">a1ea3b5e394bc115ba9b86348c161094a00dcca7</span></a>. </li></ul> +<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="added-1"></a><span style=" font-size:8pt; font-weight:600;">A</span><span style=" font-size:8pt; font-weight:600;">dded</span><span style=" font-size:8pt;"> </span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Add <span style=" font-family:'Courier New';">porymap.project.cfg</span> config file to project repos, in order to house project-specific settings, such as <span style=" font-family:'Courier New';">base_game_version=pokeemerald</span>. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Write all logs to <span style=" font-family:'Courier New';">porymap.log</span> file, so users can view any errors that porymap hits. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changelog </li></ul> +<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="changed-1"></a><span style=" font-size:8pt; font-weight:600;">C</span><span style=" font-size:8pt; font-weight:600;">hanged</span><span style=" font-size:8pt;"> </span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Add <span style=" font-family:'Courier New';">porymap.cfg</span> base config file, rather than using built-in system settings (e.g. registry on Windows). </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Properly read/write map headers for <span style=" font-family:'Courier New';">pokeemerald</span>. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Overhauled event editing pane, which now contains tabs for each different event. Events of the same type can be iterated through using the spinner at the top of the tab. This makes it possible to edit events that are outside the viewing window. </li></ul> +<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="fixed-1"></a><span style=" font-size:8pt; font-weight:600;">F</span><span style=" font-size:8pt; font-weight:600;">ixed</span><span style=" font-size:8pt;"> </span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-size:8pt;" style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Creating new hidden-item events now uses a valid default flag value. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix bug where tilesets were sometimes not displaying their bottom row of metatiles. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix bug where porymap crashes on startup due to missing map headers. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix tileset editor crash that only happened on macOS. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix minor bug when parsing C defines. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Write <span style=" font-family:'Courier New';">MAP_GROUPS_COUNT</span> define to <span style=" font-family:'Courier New';">maps.h</span>. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix bug where opening multiple projects and saving would cause junk to be written to <span style=" font-family:'Courier New';">layouts_table.inc</span>. </li> +<li style=" font-size:8pt;" style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix porymap icon on macOS. </li></ul> +<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="10020181026"></a><span style=" font-size:8pt; font-weight:600;">[</span><span style=" font-size:8pt; font-weight:600;">1.0.0] - 2018-10-26</span></p></body></html> + + + true + + + + + + + + + 0 + 0 + 582 + 21 + + + + + + + + diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui index 6e9c7450..1e8f7dac 100644 --- a/forms/mainwindow.ui +++ b/forms/mainwindow.ui @@ -2604,10 +2604,17 @@ + + + Help + + + + @@ -2796,6 +2803,11 @@ Sort by &Layout + + + About Porymap... + + diff --git a/forms/newmappopup.ui b/forms/newmappopup.ui index 118dcf5a..9cab8872 100644 --- a/forms/newmappopup.ui +++ b/forms/newmappopup.ui @@ -249,7 +249,7 @@ 0 0 410 - 22 + 21 diff --git a/include/mainwindow.h b/include/mainwindow.h index 8a679e34..b751f29d 100644 --- a/include/mainwindow.h +++ b/include/mainwindow.h @@ -155,6 +155,8 @@ private slots: void on_toolButton_CollapseAll_clicked(); + void on_actionAbout_Porymap_triggered(); + private: Ui::MainWindow *ui; TilesetEditor *tilesetEditor = nullptr; diff --git a/include/ui/aboutporymap.h b/include/ui/aboutporymap.h new file mode 100644 index 00000000..5e35032c --- /dev/null +++ b/include/ui/aboutporymap.h @@ -0,0 +1,19 @@ +#ifndef ABOUTPORYMAP_H +#define ABOUTPORYMAP_H + +#include + +namespace Ui { +class AboutPorymap; +} + +class AboutPorymap : public QMainWindow +{ +public: + explicit AboutPorymap(QWidget *parent = nullptr); + ~AboutPorymap(); +private: + Ui::AboutPorymap *ui; +}; + +#endif // ABOUTPORYMAP_H diff --git a/porymap.pro b/porymap.pro index c8d42948..2f440ee3 100644 --- a/porymap.pro +++ b/porymap.pro @@ -26,6 +26,7 @@ SOURCES += src/core/block.cpp \ src/core/parseutil.cpp \ src/core/tile.cpp \ src/core/tileset.cpp \ + src/ui/aboutporymap.cpp \ src/ui/bordermetatilespixmapitem.cpp \ src/ui/collisionpixmapitem.cpp \ src/ui/connectionpixmapitem.cpp \ @@ -70,6 +71,7 @@ HEADERS += include/core/block.h \ include/core/parseutil.h \ include/core/tile.h \ include/core/tileset.h \ + include/ui/aboutporymap.h \ include/ui/bordermetatilespixmapitem.h \ include/ui/collisionpixmapitem.h \ include/ui/connectionpixmapitem.h \ @@ -103,7 +105,8 @@ FORMS += forms/mainwindow.ui \ forms/eventpropertiesframe.ui \ forms/tileseteditor.ui \ forms/paletteeditor.ui \ - forms/newmappopup.ui + forms/newmappopup.ui \ + forms/aboutporymap.ui RESOURCES += \ resources/images.qrc diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2cc0f2e3..cd630a54 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1,5 +1,6 @@ #include "mainwindow.h" #include "ui_mainwindow.h" +#include "aboutporymap.h" #include "project.h" #include "log.h" #include "editor.h" @@ -1859,6 +1860,13 @@ void MainWindow::on_toolButton_CollapseAll_clicked() } } +void MainWindow::on_actionAbout_Porymap_triggered() +{ + AboutPorymap *window = new AboutPorymap(this); + window->setAttribute(Qt::WA_DeleteOnClose); + window->show(); +} + void MainWindow::closeEvent(QCloseEvent *event) { porymapConfig.setGeometry( this->saveGeometry(), diff --git a/src/ui/aboutporymap.cpp b/src/ui/aboutporymap.cpp new file mode 100644 index 00000000..5dcf0281 --- /dev/null +++ b/src/ui/aboutporymap.cpp @@ -0,0 +1,14 @@ +#include "aboutporymap.h" +#include "ui_aboutporymap.h" + +AboutPorymap::AboutPorymap(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::AboutPorymap) +{ + ui->setupUi(this); +} + +AboutPorymap::~AboutPorymap() +{ + delete ui; +}