Commit graph

484 commits

Author SHA1 Message Date
GriffinR
5f79f15554 Add onBlockHoverChanged and onBlockHoverCleared 2021-12-26 11:23:45 -06:00
GriffinR
0944f9888c Remove addTilesImage, add overloaded addTileImage, add transparency to addMetatileImage 2021-12-26 11:23:45 -06:00
GriffinR
f4ba4091ad Change API game version to string 2021-12-26 11:23:45 -06:00
GriffinR
574151aebb Clean up API changes 2021-12-26 11:23:45 -06:00
GriffinR
36dc1c6649 Move map cursor UI and grid to foreground 2021-12-26 11:23:45 -06:00
GriffinR
39cd1d335b Add map view tab to API 2021-12-26 11:23:45 -06:00
GriffinR
b39906c03f Add onMapShifted to API 2021-12-26 11:23:45 -06:00
GriffinR
8ed891d501 Add option to bypass the API image cache 2021-12-26 11:23:45 -06:00
GriffinR
fee9ffcd44 Add main tab to API 2021-12-26 11:23:45 -06:00
GriffinR
8f62268d00 Trigger onBlockChanged for blocks changed by undo/redo 2021-12-26 11:23:45 -06:00
GriffinR
a6395eefbb Add overlay x/y, split singular/plural overlay functions 2021-12-26 11:23:45 -06:00
GriffinR
206a1d12b3 Add onMapResized to scripting API callbacks 2021-12-26 11:23:45 -06:00
GriffinR
b16c971f00 Add some config settings to scripting API 2021-12-26 11:23:45 -06:00
GriffinR
03949d45a4 Add paletteId to createImage 2021-12-26 11:23:45 -06:00
GriffinR
eca84beae0 Add basic image cache to scripting API 2021-12-26 11:23:45 -06:00
GriffinR
1adc489bc0 Add transparency to addTileImage 2021-12-26 11:23:45 -06:00
GriffinR
ac988968b3 Add warn and error to script API 2021-12-26 11:23:45 -06:00
GriffinR
6c1e5b516d Add getMaxTilesetMetatiles to API 2021-12-26 11:23:45 -06:00
GriffinR
b5bdac8d36 Add tile/metatile to image functions to API, more tile->tileId/metatileId 2021-12-26 11:23:45 -06:00
GriffinR
6a5e4fe247 Split createImage from addImage 2021-12-26 11:23:45 -06:00
GriffinR
83a7ccac8b Add getNumTilesetMetatiles, getNumTilesInMetatile, and isPrimary/SecondaryTileset to API 2021-12-26 11:23:45 -06:00
GriffinR
6bae415fc1 Add onTilesetUpdated to scripting callbacks 2021-12-26 11:23:45 -06:00
GriffinR
5a5d16bdc6 Add overlay visibility toggle 2021-12-26 11:23:45 -06:00
GriffinR
af4c99537f Add layering to scripting overlay 2021-12-26 11:23:45 -06:00
GriffinR
630febff54 Expand addImage to allow image subsets, transformations, and transparency 2021-12-26 11:23:45 -06:00
GriffinR
ebd7af8846 Add get/setMetatileTiles array functions to API 2021-12-26 11:23:45 -06:00
GriffinR
6613318900 Disambiguate tile field names to tileId or metatileId 2021-12-26 11:23:45 -06:00
GriffinR
ce12a1e017 Add setMetatile functions to API (layerType, encounterType, terrainType, Behavior, Tile) 2021-12-26 11:23:45 -06:00
GriffinR
26f0042ff4 Add getMetatile functions to API (layerType, encounterType, terrainType, Behavior, Tile) 2021-12-26 11:23:45 -06:00
GriffinR
702497c4d8 Add function prototypes for metatile editing API functions 2021-12-26 11:23:45 -06:00
GriffinR
67af7e52da Add get/setMetatileLabel to API 2021-12-26 11:23:45 -06:00
GriffinR
9cf0575914 Log error when addImage API function fails 2021-12-26 11:23:45 -06:00
GriffinR
beb1f6ef27 Log more script errors 2021-12-26 11:23:45 -06:00
GriffinR
c6cec5f848 Preserve invalid metatile selections 2021-12-26 10:18:25 -06:00
GriffinR
7368f443f0 Add config options for showing border/grid 2021-11-08 13:11:16 -05:00
garak
f64b03d684
Merge pull request #306 from ultima-soul/import_amap_map
Add Import Map from Advance Map 1.92 feature.
2021-11-08 13:10:44 -05:00
garak
7bf07e72c2 better unsaved changes code, only block whitespace in combos 2021-09-08 17:39:38 -04:00
garak
0b63c438dd mark unsaved changes to map for heaeder and event edits
closes #305
closes #337
closes #347
2021-09-08 17:39:38 -04:00
garak
6c3ee3c46d order wild encounter json reading 2021-08-12 20:24:46 -04:00
ultima-soul
2d87a6222a Merge branch 'master' of github.com:huderlem/porymap into import_amap_map 2021-07-23 23:35:56 -07:00
ultima-soul
cdcf535894 Address review comments. 2021-07-23 16:20:41 -07:00
garak
fc0c404836 remove some commented old code 2021-07-22 12:23:21 -04:00
garak
df724a4682 find unused tiles 2021-07-22 12:23:21 -04:00
garak
601e671fc8 add options to count metatiles to tileset editor
- count the total number of usages across all maps of specific metatiles
- display the count and/or display unused metatiles
- this does not account for metatiles used in code (most of these are labeled)
2021-07-22 12:23:21 -04:00
Marcus Huderle
b35e1d9af9 Use more sensible zoom levels, which eliminates zoom rendering artifacts 2021-07-07 18:11:35 -05:00
Marcus Huderle
6f394ce39c Code fixes for Qt 6 2021-07-07 18:11:35 -05:00
garak
39648eed41 add copy paste to edit menu 2021-05-03 15:48:21 -04:00
garak
47887aca4d add edit command for event pastes 2021-05-03 15:48:21 -04:00
garak
296d697df0 add copy paste to some aspects of porymap
- can copy currently selected metatiles
  - can copy currently selected events
  - can copy an image of the current map
  - what is copied depends on the currently focused widget
  - copied objects can be pasted into other instances of porymap
  - copied images live on in the clipboard, cannot be pasted into porymap

TODO:
  - shortcut in Edit menu
  - other things can be copied?
2021-05-03 15:48:21 -04:00
BigBahss
e310732169 Make eventScriptLabelModel and eventScriptLabelCompleter into values rather than pointers 2021-04-16 09:04:38 -04:00
BigBahss
f72d4bda50 Fix duplicate event script label completions 2021-04-16 08:22:05 -04:00
BigBahss
61ffcc3259 Merge branch 'master' into script-editing 2021-04-16 07:28:09 -04:00
BigBahss
a9c7691a2e Rename DraggablePixmapItem::move() overload as moveTo to avoid confusion 2021-03-24 19:11:49 -04:00
BigBahss
5f292ea3cc Place new events in the center of the map 2021-03-24 19:11:49 -04:00
BigBahss
a68a9baf2e Fix Tileset copy construction/assignment 2021-03-07 19:17:17 -05:00
BigBahss
f166652ccc Revert 80c5f74368 and validate map group 2021-02-21 08:47:03 -06:00
BigBahss
b0e3b862e1 Remove unused addNewMapToGroup() overload 2021-02-21 08:44:41 -06:00
GriffinR
02af128913 Add setting to disable/enable map text file creation 2021-02-19 07:29:26 -06:00
BigBahss
d5270df3b6 Remove unnecessary QObject inheritance 2021-02-18 16:27:32 -06:00
huderlem
6ebf1b54a8
Merge pull request #352 from BigBahss/convert-to-namespace
Convert stateless classes into namespaces
2021-02-18 16:26:32 -06:00
BigBahss
f989563cc0 Correct UB in Map construction 2021-02-18 03:51:44 -05:00
BigBahss
c3718e28be Convert MetatileParser into a namespace 2021-02-18 03:38:34 -05:00
BigBahss
bc2cc7d089 Convert PaletteUtil into a namespace 2021-02-18 03:25:26 -05:00
Marcus Huderle
c351f069ff Merge remote-tracking branch 'origin/master' into metatile-leaks 2021-02-17 16:56:15 -06:00
BigBahss
fdd12cde25 Refactor ParseUtil to stop using pointers and output-parameters 2021-02-17 16:34:46 -06:00
BigBahss
fa8b387120 Fix some more memory leaks related to parseAsm() 2021-02-17 16:34:46 -06:00
BigBahss
d9340d3b73 Add parentWidget() to Project to avoid name-shadowing the parent member 2021-02-17 16:34:46 -06:00
BigBahss
9a9143500f Convert remaing pointers in Project to values 2021-02-17 16:34:46 -06:00
BigBahss
820b514f26 Change many pointer members in Project to values 2021-02-17 16:34:46 -06:00
BigBahss
cc7a5f5819 Fix memory leaks in Tileset 2021-02-16 21:45:54 -05:00
BigBahss
a3326a764b Simplify some usages of Blockdata 2021-02-16 16:51:00 -06:00
BigBahss
f09e28f06c Convert usages of Blockdata pointers 2021-02-16 16:51:00 -06:00
BigBahss
42b56edc9d Begin refactoring Blockdata to simply inherit QVector<Block> 2021-02-16 16:51:00 -06:00
BigBahss
6a825d0b39 Use implicit copy constructor/assignment for Metatile 2021-02-16 13:22:41 -05:00
BigBahss
8187b2d4bb Plug leaks in Metatile 2021-02-16 12:14:27 -05:00
BigBahss
40a7e23b34 Remove undefined functions in Editor 2021-02-16 09:22:26 -05:00
BigBahss
fe5d4982f7 Use QPointer when we need to set a nullptr on destruction 2021-02-16 08:26:09 -05:00
BigBahss
c103142c65 Silence deprecated-copy warning 2021-02-14 12:39:14 -05:00
Marcus Huderle
e9c4d5b73f Fix getBlock() memory leak 2021-02-13 15:16:52 -06:00
BigBahss
36a6212af6 Store recent map in ProjectConfig instead of PorymapConfig 2021-02-03 16:13:36 -06:00
BigBahss
3d394bc4bb Add option to open config folder 2021-02-03 16:01:54 -06:00
BigBahss
6335151c39 Add option to open log file 2021-02-03 16:01:54 -06:00
BigBahss
3ccf433d1e Add completion suggestions for global event scripts 2021-01-29 22:05:40 -05:00
BigBahss
d2386fac9b Add functions to parse all global event scripts labels in the project 2021-01-29 22:05:08 -05:00
Marcus Huderle
9439dc76d2 Only include relevant frames in the timelapse animation 2021-01-20 19:27:50 -06:00
Marcus Huderle
c354142f1b Add ability to export map timelapse GIFs 2021-01-20 19:27:50 -06:00
Marcus Huderle
d63bebee69 Merge remote-tracking branch 'origin/master' into fix827
# Conflicts:
#	src/mainwindow.cpp
2020-12-14 17:57:30 -06:00
BigBahss
3a04f59cb0 Fix QProcess::splitCommand() dependency on Qt 5.15.
Fix shortcut for Open Map Scripts (Due to merge).
2020-12-13 04:00:00 -05:00
BigBahss
1d29a53237 Merge remote-tracking branch 'origin/master' into script-editing 2020-12-13 00:30:22 -05:00
BigBahss
c0eb0503e2 Update CHANGELOG and docs.
Merge remote-tracking branch 'origin/master' into shortcuts-editor
2020-12-05 20:33:45 -05:00
BigBahss
7a4de9f3d9 Add support for finding and opening any event script 2020-12-04 09:29:38 -05:00
BigBahss
afc0c0c501 Add button next to script combo-box to open file to that script.
Revert the behavior of Open Map Scripts button.
2020-12-02 03:39:08 -05:00
BigBahss
789fe7d00c Merge remote-tracking branch 'origin/master' into script-editing 2020-12-01 16:43:53 -05:00
BigBahss
62f73bee04 Populate scripts comboboxes with scripts found in map.json 2020-12-01 16:32:08 -05:00
BigBahss
e704793350 Disable actionOpen_Project_in_Text_Editor when no command is set 2020-12-01 10:13:56 -05:00
BigBahss
dbafb99fd4 Add action to open the project root in a text editor 2020-12-01 07:12:32 -05:00
BigBahss
a4528fb0d9 Add support for opening .pory scripts to the selected event script 2020-11-26 06:09:58 -05:00
Ashley Coleman
49737d16cc Implement delete for wild encounter table 2020-11-22 16:34:30 -06:00
BigBahss
b9aaef24c6 MapRuler: Fix artifacting, fix centering for other thickness values 2020-11-22 08:37:16 -06:00
BigBahss
6ca4802948 Use QGraphicsObject's signalling to enable/disable MapRuler 2020-11-22 08:37:16 -06:00
BigBahss
bc0127430b Fix MapRuler dimensions tooltip and refactor 2020-11-22 08:37:16 -06:00
BigBahss
4aaae1a264 Add support for opening .inc scripts to the selected event script 2020-11-22 01:04:46 -05:00
BigBahss
3478846b60 Add Project::getMapScriptsFilePath() and rename text editor config members 2020-11-21 17:33:16 -05:00
BigBahss
662fb2a367 Move themes to PreferenceEditor 2020-11-16 09:35:55 -05:00
BigBahss
ea9cfa47e5 Add basic prefences window with text editor command field 2020-11-16 07:39:42 -05:00
BigBahss
0a15dfbf4c Add preferred text editor to PorymapConfig 2020-11-16 06:46:21 -05:00
BigBahss
300a41c149 Add clear button to MultiKeyEdit 2020-11-13 02:52:37 -05:00
BigBahss
bb6786f24e Add extra shortcuts to main window and sub-editors 2020-11-12 23:48:03 -05:00
BigBahss
f044672d2e Add support for sub-editor shortcut customization 2020-11-09 05:50:15 -05:00
BigBahss
2fb3bf4e26 Redesign ShortcutsEditor to take an obj list and refactor config to reflect that 2020-11-08 12:03:44 -05:00
BigBahss
f5964fbe7f Refactor ActionShortcutEdit into MultiKeyEdit 2020-11-06 10:20:31 -05:00
BigBahss
43d3257d89 Extract functions in ShortcutsConfig 2020-11-05 06:32:31 -05:00
BigBahss
eabd2d6618 Convert QShortcut's to Shortcut's and add them to config 2020-11-03 05:58:10 -05:00
BigBahss
ed2f8bf180 Add custom Shortcut class 2020-11-03 03:18:34 -05:00
BigBahss
88fbf9f28b Add ShortcutsEditor to customize shortcuts for QAction's 2020-11-01 09:16:27 -05:00
garakmon
f791157adc add #pragma once to include files 2020-10-24 15:51:10 -04:00
garakmon
d1af93f3b5 do not call initWindow() on failed load 2020-10-24 15:51:10 -04:00
BigBahss
9c57a5bc46 Refactor MapRuler event handling 2020-10-24 07:45:08 -04:00
BigBahss
40a155329e Merge branch 'master' into ruler-tool 2020-10-24 03:28:29 -04:00
Marcus Huderle
8ab5bfcdbd Merge remote-tracking branch 'origin/master' into better-map-zoom 2020-10-23 18:38:05 -05:00
Tyler
de43c64118
Merge branch 'master' into fix-window-size-issue 2020-10-22 19:59:11 -04:00
BigBahss
f47e8b1903 Refactor TilesetEditor 2020-10-22 18:44:22 -05:00
BigBahss
e4095130c5 Fix closing tileset editor not closing palette editor 2020-10-22 18:44:22 -05:00
BigBahss
8b7f4069cd Save & restore palette editor geometry & state from config 2020-10-22 18:44:22 -05:00
BigBahss
daae6fe52b Save & restore region map editor geometry & state from config 2020-10-22 18:44:22 -05:00
BigBahss
5624de750b Save & restore tileset editor geometry & state from config 2020-10-22 18:44:22 -05:00
BigBahss
bb61dc9b51 Add dynamic FlowLayout class 2020-10-20 14:41:51 -04:00
BigBahss
1ea50d7955 Cleanup large log file on startup 2020-10-14 19:21:41 -05:00
BigBahss
2f20a5d0b3 Hide connection tiles that cant be seen from current map 2020-10-14 01:57:59 -04:00
BigBahss
5247dd18c0 Refactor map zooming into the Editor 2020-10-13 06:07:31 -04:00
BigBahss
fb5e35bd5f Use Metatile::coordFromPixmapCoord() in all remaining cases 2020-10-02 15:32:22 -04:00
BigBahss
39aa420265 Turn MapRuler dimensions into a mouse-tracking tooltip, and show in status bar 2020-10-02 12:12:19 -04:00
BigBahss
84f920bb03 Add static Metatile::coordFromPixmapCoord() 2020-09-27 12:17:12 -04:00
BigBahss
9565b677d2 Add tick marks to MapRuler 2020-09-25 11:56:02 -04:00
BigBahss
ca6969564f Add MapRuler (right-click & drag in events view) 2020-09-25 11:53:07 -04:00
ultima-soul
38e7951f3e Add Import Map from Advance Map 1.92 feature. 2020-09-19 12:05:27 -07:00
garak
40078888f8 show or hide rects immediately with shortcuts 2020-09-07 14:06:07 -04:00
BigBahss
2fd3df9734 Remove straight paths checkbox and refactor 2020-09-07 13:12:15 -04:00
BigBahss
de2246e2fd Simplify some straight paths logic 2020-09-07 13:12:15 -04:00
BigBahss
27c9fec0b4 Fix collision straight paths and general improvement 2020-09-07 13:12:15 -04:00
BigBahss
b8bbfe60e8 Add straight paths to script api 2020-09-07 13:12:15 -04:00
BigBahss
5e09d7b965 Create ui checkbox for enabling straight paths 2020-09-07 13:12:15 -04:00
BigBahss
5da761ea94 Implement straight paths for map tiles and smart paths 2020-09-07 13:12:15 -04:00
garakmon
68098b8220 silence deprecation warnings 2020-08-26 20:42:42 -04:00
garakmon
3c5401551d add Map class destructor to manage Event memory 2020-08-26 20:03:47 -04:00
garakmon
1151f9fc26 make some performance improvements to event rendering 2020-08-26 20:03:47 -04:00
garakmon
2a11760afd fix error in script edit command 2020-08-26 20:03:47 -04:00
garakmon
d671470cb0 fix PaintMetatile subclass issues 2020-08-26 20:03:47 -04:00
garakmon
392e595a03 fix the scripting api and many other changes
- remove obsolete Map::commit()
- add ScriptEditMap command
- reorganize metatile history
- fix next selected event for multi event deletion
2020-08-26 20:03:47 -04:00
garakmon
6c2d035dfa more undo commands
- add edit command for duplicating map events
- add edit commands for painting map collision
- edit commands that delete events now select
  the proper next event
2020-08-26 20:03:47 -04:00