Commit graph

537 commits

Author SHA1 Message Date
SBird
7bece548fb layer-scripting: fix layer transparency for reordered layers 2020-07-02 15:16:44 -05:00
Marcus Huderle
4557e22115 Fix wrong opacity layer assignment 2020-07-01 20:59:01 -05:00
Marcus Huderle
96ca895daa Add scripting api for metatile layer opacity 2020-07-01 20:43:19 -05:00
Marcus Huderle
dac4a0e8f7 Add scripting api for metatile layer draw order 2020-07-01 20:19:08 -05:00
GriffinR
08bc85dde0 Open tileset editor with selected metatile 2020-07-01 13:38:27 -05:00
Marcus Huderle
cc16440336 Allow Ctrl+Shift+Z to redo in the tileset editor 2020-06-30 18:55:13 -05:00
Marcus Huderle
64f9976d81 Fix bug where newly-created tileset couldn't be used 2020-06-30 18:20:07 -05:00
GriffinR
16f7373816 Fix crash when reducing tileset metatiles past current selection 2020-06-30 10:24:03 -05:00
GriffinR
1747a4bf2e Disable invalid metatile selection in tileset editor 2020-06-30 10:24:03 -05:00
GriffinR
2e29e19605 Fix sprite transparency not updating when changing object event graphics 2020-06-30 10:12:04 -05:00
SBird
18b9e5fbee triple-layer: fix creating tilesets 2020-06-30 10:10:44 -05:00
Marcus Huderle
b7d1db61a8 Remove pointless check on metatile layer mouse event 2020-06-28 16:36:55 -05:00
Marcus Huderle
7392105297 Early exit magic fill if it would be a no-op 2020-06-27 17:14:37 -05:00
Marcus Huderle
370221a974 Disable map zoom when middle button is pressed 2020-06-27 17:07:34 -05:00
ultima-soul
9183a297d4 Change layer slot labels when Triple Metatile Layers is enabled. 2020-06-26 16:22:15 -05:00
ultima-soul
4cc3d60dc4 Revert unecessary changes and hide Layer Type for Triple Metatile Layers. 2020-06-26 16:22:15 -05:00
ultima-soul
8ceb783056 Remove checkbox for enabling triple metatile layers. 2020-06-26 16:22:15 -05:00
ultima-soul
debb1c66ac Implement proper triple metatile layer support. 2020-06-26 16:22:15 -05:00
Marcus Huderle
b58ec89854 Properly filter the map search results when switching sort types 2020-06-25 18:34:46 -05:00
GriffinR
dd91e29e85 Fix exported tileset images using x/y flip 2020-06-15 16:43:21 -05:00
GriffinR
ee7978ea2d Open scripts.inc when scripts.pory doesn't exist 2020-06-15 16:42:00 -05:00
GriffinR
afb157beb3 Assign editor->map to nullptr after clearing map cache 2020-06-06 11:35:44 -05:00
GriffinR
c382190e8b Fix crash parsing C defines from unknown token 2020-06-04 19:11:15 -05:00
GriffinR
32726d4a6a Show mouse coords in map event editor 2020-06-02 18:21:23 -05:00
GriffinR
6cb1c532a4 Show metatile label names in map editor 2020-06-02 18:21:23 -05:00
GriffinR
90aa26197d Set project-specific config defaults 2020-05-27 18:58:43 -05:00
GriffinR
125a287b9c Add config options for some project-specific features 2020-05-27 18:58:43 -05:00
garak
aa2ce13551
Merge pull request #232 from GriffinRichards/monitor-labels
Monitor metatile_labels.h
2020-05-22 16:07:05 -04:00
GriffinR
febc788097 Ignore metatile_labels when saving 2020-05-22 16:02:11 -04:00
GriffinR
ed2777c397 Monitor metatile_labels.h 2020-05-22 15:52:34 -04:00
Marcus Huderle
2f533a86b2 Optimize displayMapEvents() 2020-05-21 19:11:37 -05:00
Marcus Huderle
81cd43933b Eliminate unnecessary expensive map redraws when saving or changing tilesets 2020-05-20 19:21:18 -05:00
Marcus Huderle
f6c86e0eed Eliminate unnecessary expensive map redraw when opening a map 2020-05-20 18:30:17 -05:00
Marcus Huderle
93661bbe1b Fix crash when painting an event when no existing events exist for the map 2020-05-18 17:25:53 -05:00
garakmon
4ee22fa06a decouple map and event edit modes 2020-05-18 17:25:53 -05:00
garakmon
9f5b13c287 use a more descriptive warning message for the new map dimensions 2020-05-18 17:25:53 -05:00
garakmon
482d3cd8fb fix map dimension checks in new map window 2020-05-18 17:25:53 -05:00
GriffinR
638ce5370f Typo fix 2020-05-16 18:26:39 -05:00
GriffinR
374020f94d Split readMaxMapDataSize, move mapDimensionsValid to project 2020-05-16 18:26:39 -05:00
GriffinR
731fbce6af Read MAX_MAP_DATA_SIZE 2020-05-16 18:26:39 -05:00
GriffinR
99b95882fe Object event coords from unsigned to signed 2020-05-15 15:57:27 -05:00
Marcus Huderle
23a20dd736 Clear scripting map overlay when closing project 2020-05-13 16:16:51 -05:00
GriffinR
a860f3f110 Support importing FRLG Advance Map metatilesets 2020-05-13 16:00:08 -05:00
GriffinR
53ba6f5ab9 Warn when closing with unsaved encounter changes 2020-05-11 17:11:01 -05:00
garakmon
fcb320bd79 fix crash when attempting to close project that is never opened 2020-05-11 17:12:37 -04:00
Marcus Huderle
2161312122 Add optional args to dictate map refresh and commit 2020-05-09 11:31:14 -05:00
Marcus Huderle
e0afb24002 Merge remote-tracking branch 'origin/master' into scripting 2020-05-08 11:35:58 -05:00
garakmon
37c849f9b5 allow current widget to dictate size of stacked widget for metatile/collision and events pages 2020-05-08 11:35:14 -05:00
GriffinR
ac92534576 Disallow drawing heal locations 2020-05-08 11:34:40 -05:00
GriffinR
399474c1f2 Fix heal loc duplicates, rename flyableMaps 2020-05-08 11:34:40 -05:00
Marcus Huderle
f139365faf Add log() to api 2020-05-08 11:29:39 -05:00
Marcus Huderle
998ea1fcc8 Add custom_scripts project config, and cleanup scripts when switching projects 2020-05-08 11:26:23 -05:00
Marcus Huderle
b8d0268d5d Move script api into separate file 2020-05-08 09:59:01 -05:00
Marcus Huderle
3c1549cc93 Add setTimeout to script api, and properly refresh scene when overlay is changed 2020-05-08 09:46:26 -05:00
Marcus Huderle
71242e5714 Add ability to set keyboard shortcuts for custom actions 2020-05-08 08:49:29 -05:00
Marcus Huderle
7072c001af Implement api for checkboxes 2020-05-07 20:13:56 -05:00
Marcus Huderle
bf64764103 Implement the rest of the palette api 2020-05-07 20:00:14 -05:00
Marcus Huderle
09a892f525 Add ability to register custom actions 2020-05-03 11:28:02 -05:00
Marcus Huderle
434bafe0b2 Call on_block_changed from more places 2020-05-03 10:48:48 -05:00
Marcus Huderle
0ef3c6a898 Add palette preview scripting commands 2020-05-03 10:31:44 -05:00
Marcus Huderle
8697adf186 Add true tileset scripting functions 2020-05-03 10:00:56 -05:00
Marcus Huderle
567a45b7e4 Implement some overlay functions and on_map_opened callback 2020-05-02 16:25:35 -05:00
Marcus Huderle
95012838fd Implement more map api functions 2020-04-30 18:30:24 -05:00
Marcus Huderle
d685718f8d Implement three map scripting functions 2020-04-29 20:41:19 -05:00
Marcus Huderle
267cd5e2cb Implement proof of concept for scripting capabilities 2020-04-29 19:46:01 -05:00
Marcus Huderle
16b451ab19 Extend min/max connection offsets to player's view 2020-04-28 19:38:40 -05:00
Marcus Huderle
6a27536cbb Automatically select the newly-created event via the Pencil tool 2020-04-26 19:47:57 -05:00
garakmon
333fe69dd8 keep selected tool when switching tabs 2020-04-26 18:55:18 -04:00
garakmon
f57ef7a819 change main tab for every click 2020-04-26 16:18:25 -04:00
garakmon
9e883a8a2f remember edit mode in map tab 2020-04-26 16:18:25 -04:00
garakmon
7e039121bb fix mainwindow ui conflicts 2020-04-26 16:18:25 -04:00
garak
ccccb7cec0 fix bug with adding new widget to event frame outside of a paint event 2020-04-26 16:17:51 -04:00
garak
b5adbe782d extend most toolbuttons for use in event editing 2020-04-26 16:17:51 -04:00
garak
bf58549666 update midnight theme disabled widgets, disable some ui in event tab 2020-04-26 16:17:51 -04:00
garak
fa42beac1d update ui so that map and events tabs share widgets
- use a programmatically created QTabBar to switch between pages of stacked widget
- use stacked widget to display selected objects and metatiles frames
- remove unique map events tab

this gives access to the toolbuttons while editing events (not functional yet)
2020-04-26 16:17:51 -04:00
huderlem
c0674d9676
Merge pull request #200 from garakmon/closeproject
Fix Open Project & Monitor Changed Project Files
2020-04-25 16:28:02 -05:00
GriffinR
a3d10ef306 Set border visibility after redo/undo 2020-04-25 16:15:34 -05:00
Marcus Huderle
b9522c24f5 Centralize file-changed logic in the callback. Ignore watched files for 5 seconds, when saving them. On Windows, there is a fuzzy delay between the time a file is written and when the signal fires in Qt, and we can't rely on blocking signals or temporarily removing the watched filepaths. It also fires three or four duplicate times for a single file. 2020-04-25 16:11:14 -05:00
GriffinR
d1853a576b Use first trainer type constant for new objects 2020-04-21 19:03:00 -04:00
GriffinR
1bd1db2a7d Re-enable RSE-specific events when switching projects 2020-04-21 16:31:24 -04:00
garak
03082e5920
Merge branch 'master' into closeproject 2020-04-20 22:05:28 -04:00
garakmon
4d2fa5ee38 show file changed warning once at a time 2020-04-20 22:02:14 -04:00
garakmon
401d2e4884 let user change some config settings
- use encounter json
    - use poryscript
    - monitor files
2020-04-20 21:54:20 -04:00
Marcus Huderle
f07422585b Fix typo 2020-04-20 20:29:07 -05:00
Marcus Huderle
bb6dbedabf Add ability to export map stitch images. 2020-04-20 20:29:07 -05:00
GriffinR
141f0fa773 Fix adding new mapsec regression 2020-04-20 17:45:34 -05:00
GriffinR
1b3d4a44e0 Forbid . and - in new tileset names 2020-04-20 17:39:31 -05:00
garak
4a23c90695
Merge pull request #205 from garakmon/encord
use ordered map for wild encounter json
2020-04-20 14:27:47 -04:00
garakmon
df8dac965f move fileWatcher signals to project class, block when saving 2020-04-20 14:08:32 -04:00
garakmon
96a870552e monitor files for changes
- add fileWatcher to project that monitors changes to most files
      (except map and layout json files)
    - add config setting whether to monitor files for changes (monitor_files)
2020-04-20 14:07:06 -04:00
garakmon
6026266afd add File>Reload Project 2020-04-20 14:07:06 -04:00
garakmon
ca5a0247f7 delete project with editor 2020-04-20 14:07:06 -04:00
garakmon
0e9deff4bc clear config data between loads 2020-04-20 14:07:06 -04:00
garakmon
c0bffa0107 add some destructors, prevent value set on combobox update
- add destructors to Project and Editor
    - properly close project when opening a new one
    - when reloading comboboxes, do not set map values
      with the new first item
2020-04-20 14:07:06 -04:00
garakmon
e5122ef94f use ordered map for wild encounter json 2020-04-20 14:04:34 -04:00
GriffinR
0c92dc05da Save metatile attributes label in new order for FRLG 2020-04-20 13:29:01 -04:00
GriffinR
d91107a07d Read callback_label for FRLG 2020-04-19 18:23:37 -04:00
GriffinR
f2ae83b33e Use metatile attributes path from header 2020-04-19 18:11:45 -04:00
GriffinR
5f16ae7dd0 Use value() instead of at() for defaults 2020-04-19 10:16:49 -04:00
GriffinR
8c428c578b
Merge branch 'master' into pokefirered 2020-04-19 09:48:21 -04:00
garakmon
799e5537f9 add tsl::ordered_map for json objects,
update project code to save json files with new ordered object
2020-04-19 07:55:51 -05:00
garakmon
12614a174a modify Json::dump to preserve our format 2020-04-19 07:55:51 -05:00
garakmon
7bef1eb1e1 convert to use QVector 2020-04-19 07:55:51 -05:00
garakmon
8cb2e6e2ba add json library, begin modifications 2020-04-19 07:55:51 -05:00
garakmon
ef5ba968b1 do not allow selection of invalid metatiles
- also display invalid metatiles as magenta to stand out more
2020-04-18 15:31:28 -05:00
garakmon
d3c212edb3 allow TAB key to navigate through encounter table widget 2020-04-08 22:12:20 -04:00
GriffinR
129db88453 Minor cleanup 2020-04-06 12:09:45 -04:00
GriffinR
c9b6f87e06 Apply undo/redo to border drawing 2020-04-05 11:56:13 -04:00
GriffinR
d5908c0045 Draw border up to players view 2020-04-05 00:03:36 -04:00
GriffinR
d4cf3edfc7 Use default tileset for invalid tilesets, fix segfault caused by loadMapLayout 2020-04-04 14:14:16 -04:00
GriffinR
e4a41cf201 Align border blocks 2020-04-03 16:29:40 -04:00
GriffinR
c28730e834 Fix crash with open windows when switching projects 2020-03-31 12:41:15 -04:00
GriffinR
e9210f96aa
Merge branch 'master' into pokefirered 2020-03-29 13:15:23 -04:00
GriffinR
76a8c0dc44 Read trainer type constants 2020-03-27 10:51:57 -04:00
GriffinR
1a2e7623ef Prefer oamtable name for sprite dimensions 2020-03-27 09:23:25 -04:00
GriffinR
0fb483b5d3 Editable trainer type, minor fixes 2020-03-26 15:11:42 -04:00
GriffinR
8e26f4c3f5 Enable readInitialFacingDirections for pokefirered 2020-03-26 14:59:33 -04:00
GriffinR
3ff5483267 Correctly initialize palette for palette editor 2020-03-23 21:12:56 -05:00
GriffinR
8137abd656 Disable respawn editing for pokeemerald/pokeruby 2020-03-20 13:52:30 -04:00
GriffinR
20b112de52 Support editing heal location respawns 2020-03-20 13:41:40 -04:00
GriffinR
d365ebb664 Support reading/saving pokefirered heal locations 2020-03-20 03:09:48 -04:00
GriffinR
083874ce9e Minor fixes 2020-03-18 03:12:43 -04:00
GriffinR
2a3b222e3e Locate tileset folders with _[0-9]* 2020-03-17 00:29:54 -04:00
GriffinR
f15d7102fc Remove dummied logInfo 2020-03-16 16:34:08 -04:00
GriffinR
bf72ecede9 Parse remaining pokefirered metatile attributes, allow editing/saving them 2020-03-16 16:31:08 -04:00
GriffinR
3fa77609c6 Remove hard-coded new map constants 2020-03-16 03:57:39 -04:00
GriffinR
ffddc35b60 Parse pokefirered metatile behaviors/layer types 2020-03-15 03:03:12 -04:00
GriffinR
c0a512803e Allow editing border dimensions 2020-03-14 18:06:35 -04:00
GriffinR
5cf0e35ffc Fix border block cache usage 2020-03-13 19:10:40 -05:00
GriffinR
629abd3c06 Support reading/displaying custom border sizes 2020-03-13 02:23:47 -04:00
GriffinR
d04f1e913a Fix blockdata_path error check 2020-03-12 22:38:36 -04:00
GriffinR
a5c47b6333 Disable RME(temporarily), secret bases, and weather triggers for pokefirered 2020-03-12 12:30:37 -04:00
GriffinR
a8b381a0b5 Match tileset names with underscores and unknown paths 2020-03-11 19:33:22 -04:00
GriffinR
a2f38341f5 Save changes to floor_number 2020-03-11 17:06:26 -04:00
GriffinR
8d89b370b4 Add in_connection to object events 2020-03-11 16:45:52 -04:00
GriffinR
7125cd7c8d Add underfoot and quantity to hidden items 2020-03-11 16:23:07 -04:00
GriffinR
eb44201f5b Skip MUS_DAN02 for pokefirered 2020-03-11 02:35:24 -04:00
GriffinR
3eca227d07 Basic pokefirered empty layout, floor number, version selection support 2020-03-11 02:06:13 -04:00
garakmon
79843c07b6 export tile image files as indexed 4bpp 2020-03-04 11:01:02 -06:00
Marcus Huderle
f2844c2ec0 Update grid tooltip and update object event filepaths 2020-02-12 18:13:48 -06:00
Marcus Huderle
85c21855ef Update C array regex to allow explicitly-sized arrays 2020-02-12 16:38:07 -06:00
garak
b83ead44d0 update to use new object event file and variable names 2020-02-12 15:56:03 -06:00
Marcus Huderle
342bcae174 Add better error handling for region map editor loading 2020-02-12 15:45:21 -06:00
Marcus Huderle
5978aedc30 Fix bug where dragging the metatile selector would visually extend beyond map boundary 2020-02-12 11:52:05 -06:00
Marcus Huderle
2df0ac7d16 Show alert windows when a fatal map-loading error occurs 2020-02-12 11:23:28 -06:00
Marcus Huderle
8b4970413d Log errors for invalid event types 2020-02-12 10:43:17 -06:00
Marcus Huderle
cd9b8b12a5 Validate map layout and tileset loading 2020-02-12 10:22:40 -06:00
Marcus Huderle
8a4456f7b0 Validate remaining data loads, and fix duplicating combobox data 2020-02-12 09:13:58 -06:00
Marcus Huderle
a152404ce8 Validate region map sections 2020-02-12 08:12:12 -06:00
Marcus Huderle
79c74b8814 Validate layouts 2020-02-11 18:34:08 -06:00
Marcus Huderle
cfaf23aa3e Copy collision properties when selecting metatiles from the map area 2020-02-02 16:25:37 -06:00
garak
7a84ca872c toggle grid in map view with CTRL+G 2020-01-15 20:44:01 -05:00
Diegoisawesome
67f8b09c6e Fix tileset image export on exact multiple of 16 tiles 2019-11-30 08:24:43 -06:00
garak
81d02f57a5
Merge pull request #171 from huderlem/fix-event-deletion-crash
Fix event deletion crash
2019-11-04 18:48:03 -05:00
garak
2f21f83217 draw map connections with current map tilesets 2019-11-04 18:44:57 -05:00
Marcus Huderle
654b788937 Guard against index out of bounds when deleting last event in group 2019-11-02 18:22:42 -05:00
Karathan
bc4d9e2276 add a switch for using .pory script files in the project config 2019-10-22 19:41:10 -05:00
garak
8f218c8c2b fix inconsistent table header text size 2019-10-16 20:04:19 -05:00
garak
a7e6dd9ebf add warning when encounter slot total exceeds 8 bytes 2019-10-16 20:04:19 -05:00
garak
6324980a8d don't save empty wild encounter field groups 2019-10-16 20:04:19 -05:00
garak
55573099b5 keep track of encounter data when navigating porymap 2019-10-16 20:04:19 -05:00
garak
9e03ac5e14 update pokemon constants path, error check level constants 2019-10-16 20:04:19 -05:00
garak
10c99dd0a2 add 'groups' field to encounter json to accomodate fishing 2019-10-16 20:04:19 -05:00
garak
09dd9380bb add Encounter Chance column to mon tables 2019-10-16 20:04:19 -05:00
garak
91b498ee62 configuring encounter JSON applies changes to all mon data 2019-10-16 20:04:19 -05:00
garak
911b30089c rename TokenType to TokenClass to fix Windows issues 2019-10-16 20:04:19 -05:00
garak
c816801429 change ComboBox::activated calls to currentTextChanged 2019-10-16 20:04:19 -05:00
garak
797ec63e23 encounter slot minimum chance is 1, not 0 2019-10-16 20:04:19 -05:00
jiangzhengwenjz
c29486063a fix build on qt 5.9.5 2019-09-21 17:31:47 -05:00
garak
b1509cb000 make wild encounter windows obey theme 2019-09-21 12:27:05 -05:00
garak
02d16b6a12 revamp dark theme colors, add new themes
new themes:
- midnight (the old dark theme)
- emerald green
- pink and blue
2019-09-21 12:27:05 -05:00
garak
230b018834 add themes to config so they persist between sessions 2019-09-21 12:27:05 -05:00
garak
376cfbf9c3 add light and dark themes 2019-09-21 12:27:05 -05:00
garak
ec98312340 change event object sprite when using completer 2019-09-21 13:04:17 -04:00
garak
303cf37b48 fix encounter field slot change config limits
- add min and max value limits *before* setting value
2019-09-21 12:37:02 -04:00
garak
96020c21dd change encounterRate slider to a spin box 2019-09-09 23:51:37 -04:00
garak
dc6f962292 silence warnings 2019-09-09 18:26:54 -04:00
garak
e623c22da8 use custom (faster) combos for species selectors 2019-09-09 18:26:54 -04:00
garak
088ad7453b add tooltip for mon field tabs 2019-09-09 18:26:54 -04:00
garak
d794dee8c0 add wild encounters to config 2019-09-09 18:26:54 -04:00
garak
c52b6fe4cd add wild encounter documentation 2019-09-09 18:26:54 -04:00
garak
7129510aea add read misc project values function 2019-09-09 18:26:54 -04:00
garak
267c71d40e clean wild encounter code 2019-09-09 18:26:54 -04:00
garak
78a6944a3c configure field JSON 2019-09-09 18:26:54 -04:00
garak
3c2b7a8df7 fix copy from existing encounter group function 2019-09-09 18:26:54 -04:00
garak
f7022fc3d2 allow saving new encounter groups to maps 2019-09-09 18:26:54 -04:00
garak
eb3fb44542 custom table widget for mon data, add new encounter fields to maps 2019-09-09 18:26:54 -04:00
garak
d7dae219b1 fix saving for multi encounter group maps 2019-09-09 18:26:54 -04:00
garak
5a62df9f55 add json saving to wild encounter editor 2019-09-09 18:26:54 -04:00
garak
4b0e0b0bff continue work on wild encounter editor 2019-09-09 18:26:54 -04:00
garak
1369113a1b add encounter rate slider to wild mon tables 2019-09-09 18:26:54 -04:00
garak
ce002bcb4d speed up combobox load for wild mons 2019-09-09 18:26:54 -04:00
garak
3f9ad3afbb extend wild encounter tab for all fields (dynamic) 2019-09-09 18:26:54 -04:00
garak
0ad71286b1 begin work on wild pokemon editor 2019-09-09 18:26:54 -04:00
garak
e3f92fff12 fix build:
- use parser class when parsing metatile label files
- use QString() over QString::null which is deprecated
2019-09-09 18:24:33 -04:00
garak
b9ba7777d3 fix typo / bad error message 2019-09-08 20:26:39 -04:00
garak
22fe92840f
Merge pull request #108 from Phlosioneer/metatile-labels
Add a way to name metatiles, for use in c code
2019-09-08 20:15:00 -04:00
garak
d50444b9cb remove comments 2019-08-27 18:00:56 -05:00
tustin2121
13b6f8f6e3 Event_object_graphics_pointers are now read for explicit indexes. 2019-08-27 18:00:56 -05:00
garak
dae8f7deaf only read map-related WEATHER_ constants 2019-08-19 16:52:39 -05:00