Skip to content

Commit

Permalink
Merge branch 'master' into fix-label-saving
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Sep 25, 2023
2 parents ba3a7af + f9a14c0 commit c42909d
Show file tree
Hide file tree
Showing 60 changed files with 3,147 additions and 521 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,29 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp
The **"Breaking Changes"** listed below are changes that have been made in the decompilation projects (e.g. pokeemerald), which porymap requires in order to work properly. It also includes changes to the scripting API that may change the behavior of existing porymap scripts. If porymap is used with a project or API script that is not up-to-date with the breaking changes, then porymap will likely break or behave improperly.

## [Unreleased]
### Added
- Adds an editor window under `Options -> Project Settings...` to customize the project-specific settings in `porymap.project.cfg` and `porymap.user.cfg`.
- Adds an editor window under `Options -> Custom Scripts...` for Porymap's API scripts.
- Support for 8BPP tileset tile images.

### Changed
- The Palette Editor now remembers the Bit Depth setting.
- The min/max levels on the Wild Pokémon tab will now adjust automatically if they invalidate each other.
- If the recent project directory doesn't exist Porymap will open an empty project instead of failing with a misleading error message.
- Settings under `Options` were relocated either to the `Preferences` window or `Options -> Project Settings`.
- Secret Base and Weather Trigger events are automatically disabled if their respective constants files fail to parse, instead of not opening the project.

### Fixed
- Fix text boxes in the Palette Editor calculating color incorrectly.
- Fix metatile labels being sorted incorrectly for tileset names with multiple underscores.
- Fix default object sprites retaining dimensions and transparency of the previous sprite.
- Fix connections not being deleted when the map name text box is cleared.
- Fix the map border not updating when a tileset is changed.
- Improve the poor speed of the API functions `setMetatileTile` and `setMetatileTiles`.
- Stop the Tileset Editor from scrolling to the initially selected metatile when saving.
- Fix `0x0`/`NULL` appearing more than once in the scripts dropdown.
- Fix the selection outline sticking in single-tile mode on the Prefab tab.
- Fix bad URL color contrast on dark themes.

## [5.1.1] - 2023-02-20
### Added
Expand Down
7 changes: 4 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ porymap requires Qt 5.14.2 & C++11.
The easiest way to get Qt is through [homebrew](https://brew.sh/).
Once homebrew is installed, run these commands in Terminal:

```
```bash
xcode-select --install

brew update
Expand All @@ -32,8 +32,9 @@ Install [Qt development tools](https://www.qt.io/download-qt-installer), and use
You need to install Qt. The minimum supported version is currently Qt 5.14.2. You can check your Qt version
with `qtdiag`.

```
sudo apt-get install qt5-default qtdeclarative5-dev
```bash
sudo apt-get install qt6-declarative-dev
# if your distro does not have qt6-declarative-dev, try sudo apt-get install qtdeclarative5-dev
qmake
make
./porymap
Expand Down
Binary file added docsrc/manual/images/project-files/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions docsrc/manual/project-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ Porymap relies on the user maintaining a certain level of integrity with their p
This is a list of files that porymap reads from and writes to. Generally, if porymap writes
to a file, it probably is not a good idea to edit yourself unless otherwise noted.

The filepath that Porymap expects for each file can be overridden with config options. The name of each config override is listed in the table, and should begin with ``path/``.
For example if you wanted to rename ``include/constants/items.h`` to ``headers/defines/stuff.h``, you would add ``path/constants_items=headers/defines/stuff.h`` to your project's ``porymap.project.cfg`` file.
The filepath that Porymap expects for each file can be overridden under the ``Project Files`` section of ``Options -> Project Settings``. A new path can be specified by entering it in the text box or choosing it with the folder button. Paths are expected to be relative to the root project folder. If no path is specified, or if the file/folder specified does not exist, then the default path will be used instead. The name of each setting in this section is listed in the table below under ``Override``.

.. figure:: images/project-files/settings.png
:align: center
:width: 75%
:alt: Settings


.. csv-table::
Expand Down
361 changes: 301 additions & 60 deletions docsrc/manual/settings-and-options.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion forms/aboutporymap.ui
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<item>
<widget class="QLabel" name="label_Manual">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Official Documentation: &lt;a href=&quot;https://huderlem.github.io/porymap/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://huderlem.github.io/porymap/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Official Documentation: &lt;a href=&quot;https://huderlem.github.io/porymap/&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;https://huderlem.github.io/porymap/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down
164 changes: 164 additions & 0 deletions forms/customscriptseditor.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CustomScriptsEditor</class>
<widget class="QMainWindow" name="CustomScriptsEditor">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>374</width>
<height>355</height>
</rect>
</property>
<property name="windowTitle">
<string>Custom Scripts Editor</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="window">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QFrame" name="header">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="button_AddNewScript">
<property name="text">
<string>Add New Script...</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/add.ico</normaloff>:/icons/add.ico</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_ReloadScripts">
<property name="text">
<string>Reload Scripts</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/refresh.ico</normaloff>:/icons/refresh.ico</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_header">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="label_Manual">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://huderlem.github.io/porymap/manual/scripting-capabilities.html&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;What are custom scripts?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_ListHeader">
<property name="text">
<string>Scripts</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="list">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::IgnoreAction</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="textElideMode">
<enum>Qt::ElideLeft</enum>
</property>
<property name="movement">
<enum>QListView::Free</enum>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
<resources>
<include location="../resources/images.qrc"/>
</resources>
<connections/>
</ui>
97 changes: 97 additions & 0 deletions forms/customscriptslistitem.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CustomScriptsListItem</class>
<widget class="QFrame" name="CustomScriptsListItem">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>129</width>
<height>34</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout">
<property name="topMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QToolButton" name="b_Choose">
<property name="toolTip">
<string>Choose a new filepath for this script</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/folder.ico</normaloff>:/icons/folder.ico</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_filepath">
<property name="minimumSize">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_Enable">
<property name="toolTip">
<string>If unchecked this script will be ignored</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="b_Edit">
<property name="toolTip">
<string>Open this script file</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/edit_document.ico</normaloff>:/icons/edit_document.ico</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="b_Delete">
<property name="toolTip">
<string>Remove this script</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/delete.ico</normaloff>:/icons/delete.ico</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../resources/images.qrc"/>
</resources>
<connections/>
</ui>
Loading

0 comments on commit c42909d

Please sign in to comment.