Commit Graph

195 Commits

Author SHA1 Message Date
haven1433
ff3f2bd3df prototype for wave function collapse
given an area of all the same block, replace all those blocks with blocks that match the surrounding non-same blocks based on what blocks should 'match'. Note that this is a single-pass algorithm right now, which means that it creates a bunch of bad blocks as it gets further from the edge and more conflicts are found.

We may try to update this more in the future, or we may just go with something simpler like a maze generator using border blocks or 9-grid. But the results of this are tantalizing...
2023-02-18 00:53:05 -06:00
haven1433
5770ff9e03 first pass at the 'block bag' feature
holding control and selecting blocks will add/remove them from the block bag. When drawing (or painting), all blocks in the bag are treated as equivalent, so HMA will select one of the blocks at random to draw with. This works great for grass, but can also be used to create 'noisy' areas by selecting other blocks like flowers or shrubs.

Control+Click on the bag block indicator to clear all blocks from the bag.
2023-02-13 22:42:17 -06:00
haven1433
690379abea early exits to prevent crashes if data is missing 2023-02-11 22:14:54 -06:00
haven1433
7c07337d3b updating blocksets should reload all loaded maps
If a blockset is edited, that could change not just the current map that
owns that blockset, but any other map that uses that blockset.
Refresh caches on all those maps.
2023-02-04 22:21:35 -06:00
haven1433
913e83ae96 add copy/paste tiles for foreground/background of blocks 2023-02-04 22:20:16 -06:00
haven1433
ee6583b946 add shift+click for 9-grid support
also fix the flickering issue, where ctrl+drag causes flickering sprites
2023-02-03 22:07:14 -06:00
haven1433
76e688d2cd limit map event tooltip content
don't show content for the same address twice, even if it appears in the script twice
2023-02-02 10:58:10 -06:00
haven1433
00f26dc792 allow 'export backup' from map tabs 2023-02-01 22:02:04 -06:00
haven1433
e795079296 allow null pointers to show up as <nulll> for all map event types 2023-02-01 22:01:55 -06:00
haven1433
5c750115b6 usability update: show event numbers
users got confused about making warps. Change the text to make it more clear that the input value is for the target warp, not the current warp. Add visuals to display the current warp as a number.
2023-02-01 21:26:08 -06:00
haven1433
97bbb0f1be fix startup for ruby
3-19 isn't a valid map in ruby
2023-01-31 06:58:47 -06:00
haven1433
4880abe268 fix undo new map case where new map is primary map
when undo removes the primary map, try to set the primary map to another visible map. If no visible maps are valid, just close the map editor.
2023-01-29 22:21:59 -06:00
haven1433
09f2766790 make more resilient to nulls 2023-01-29 22:03:33 -06:00
haven1433
4be64ce1d6 add paranoid null checks to autocrop.
It's already allowed to return null, so just return null if any of these weird cases happen.
2023-01-24 20:21:58 -06:00
haven1433
aaa4c9fb71 fix crash
don't crash if selecting a single block and tilesToDraw is null

also improve documentation for OW tooltips
2023-01-24 20:19:56 -06:00
haven1433
02eae8a30c fix typo in blockmap repoint tooltip 2023-01-24 20:17:08 -06:00
haven1433
548ecf2ac1 require that the PrimaryMap be in the VisibleMaps collection 2023-01-20 15:45:08 -06:00
haven1433
ca7d1d8193 bugfixes
* update the block selection in the block panel when right-click selecting a block from the border block panel
* Editing a blocks layer attribute should be a one byte change
2023-01-11 22:37:18 -06:00
haven1433
74d35fc274 fix tileset expander issues
* display the name 'tileset' instead of 'blockset' in the comment
* fix bug in calculating the number of tiles currently in a tileset
2023-01-08 21:18:40 -06:00
haven1433
084a15c407 allow adding connections to maps that have none
* refactor some code from ImageTests into an IntegrationTests base class
* add MapTests class
* add test for adding a connection to Viridian Forest
* Have `ConnectNewMap` call new `GetOrCreateConnections` method instead of just trying to get the connection data that may not exist.
2023-01-06 20:29:26 -06:00
haven1433
47388d5f3e map editor bug fixes
* creating a new map should be considered an autonomous operation for undo purposes
* support connection-objects for FireRed
* crash less when reading invalid map / layout data
* show correct hover square when hovering over neighbor maps with borders
* fix elevation names / map permissions
* don't update tile render info for the block editor if the x/y change is a no-op
*
2023-01-05 22:53:35 -06:00
haven1433
99a680ddef map editor improvements
* Draw a box around the active map (but not the border) to make the separation between maps (and border blocks) more clear
* Change the Primary Map when selecting an event on a non-primary map
* update wild pokemon tooltip during refresh
* reduce visual studdering when dragging a tile around the map
* limit hover and selection to the actual map, not the border block
2023-01-05 19:34:53 -06:00
haven1433
65e534a46d map editor fixes
* say width/height correctly in the tooltips of the map size handles
* less flickering during undo
* include default OW sprite instead of blank (for example, tutorial catch man in viridian city)
* speed up the initial script-check process that looks for default trainer sprites for each OW by not caring about the length of child scripts
* use proper thread locking during block cache invalidation and renewal so that undo doesn't mess up the number of blocks shown in the block panel
2023-01-04 23:06:51 -06:00
haven1433
3b79b0d3eb minor bugfixes 2022-12-27 00:17:36 -06:00
haven1433
5371397475 first part of <auto> support 2022-12-18 10:26:02 -06:00
haven1433
517a2f94f1 make templates work with macros 2022-12-04 23:27:15 -06:00
haven1433
7d8ae74a00 script bugfixes
add enum types for fanfare / bufferitem
allow script constants to contain underscores
allow autocomplete for constants that are the last argument
allow 'find usages -> scripts' to find usages from macros (and fix crash)
2022-12-04 22:38:04 -06:00
haven1433
bf1d30fe7d more macros
also clear constant cache when refreshing ViewPort
2022-12-02 23:28:56 -06:00
haven1433
a44841290f first pass at updating script pointer logic
instead of the script line itself knowing that it points to something,
pull it down to the argument level, so that each argument knows
if it points to something.

This will allow a single script line to point to multiple things (like trainers pointing to multiple text or scripts)
2022-12-02 08:38:21 -06:00
haven1433
6a49359716 finish last big feature for 0.5 2022-12-01 21:31:22 -06:00
haven1433
903d430e07 initial pass at last feature for 0.5 2022-12-01 08:15:48 -06:00
haven1433
5483c5e0e6 part one of r/s/e DE feature 2022-11-29 23:14:10 -06:00
haven1433
7efde66586 bugfix for R/S/E special case logic 2022-11-29 23:12:12 -06:00
haven1433
f29f69c3f6 fix loading issue from liquid crystal
improve tooltips
2022-11-29 07:32:39 -06:00
haven1433
6593125cbe fix edge cases (trainerX testing) 2022-11-27 21:46:08 -06:00
haven1433
5bcb5b9f00 import/export data 2022-11-27 20:54:02 -06:00
haven1433
d8eea8db88 improve loading conflicting data
used TrainerX's Glazed as a prototype
2022-11-25 15:27:22 -06:00
haven1433
8f3da7f04e bugfixes 2022-11-25 13:17:21 -06:00
haven1433
d48257637b improve view notifications 2022-11-25 09:20:56 -06:00
haven1433
3356961895 bugfixes 2022-11-24 23:13:09 -06:00
haven1433
8a75b2bd4f add blank template 2022-11-24 22:26:25 -06:00
haven1433
af20da7a1d extend header
blocksets
2022-11-24 20:26:39 -06:00
haven1433
38ca0d3c3c update lists 2022-11-24 15:38:08 -06:00
haven1433
4c2089196b usability feedback
label stuff
center new connections
berry shortcuts
fix goto shortcuts
2022-11-24 11:24:56 -06:00
haven1433
d815c382eb fix tut text 2022-11-23 23:23:24 -06:00
haven1433
b4cf30d487 fix event tutorial logic 2022-11-23 23:14:10 -06:00
haven1433
d0d9673d7d paint shouldn't clear tutorial if multi-drawing 2022-11-23 23:11:43 -06:00
haven1433
78d0297d91 bugfixes
* make pokemon of the chosen type more likely
* create new border for new interiors
* don't cut off trainer sprite in template (for large OWs)
* update selected block render when editing blocks
2022-11-23 23:04:47 -06:00
haven1433
453457a219 fix tab duplication issue
also fix double-click behavior for backwards warps
2022-11-18 11:55:51 -06:00
haven1433
903bed9895 updates from testing 2022-11-18 10:36:07 -06:00