if a tile isn't changed, don't remove it. This fixes an edge case in certain tilemaps (ex. emerald summary screen tilemap1) where a specific tile is used no matter what the tilemap says. Edits on the tilemap that don't effect the specific tile won't change the tile, and everything should still look right.
instead of calculating their length each time, an edited script can be passed its previous length. This lets you have multiple ends within the same script without issue.
The Measure step of the ColumnStackPanel is very slow, because the ContentControls that it holds, created from the DataTemplates, are very complex. Maybe a custom control could be created for the table with a much simpler visual tree.
Instead of taking the available name.token.parts and concatenating them in every possible order, add an algorithm that can check for the best match among the possible tokens and use that. Then remove that token from the list and try to match the rest.
This algorithm is more complicated, but doesn't require as many string and list operations, and searches k short strings instead of E(k) long strings, so it's faster.
In rare cases, you can get a race condition where we try to turn the address-for-anchor keys into a list while also adding a new address-for-anchor key. This multi-threaded work can crash the app.
Use a thread-locking version of version of the dictionary to prevent Keys from being accessed at the same time as Add.
Previously, trying to edit a script with gotos/calls inline would cause trouble, because the destination is likely contained within the same script. But HMA parses the anchor and puts the script in a separate textbox, which is confusing. Worse, it prevents you from making your script longer, because it thinks it would overwrite itself because of the anchor.
Add logic to handle this case.
- If a script is completely contained within the script that's currently under edit, don't give the script its own textbox.
- If the script would overwrite some bytes, but those bytes are a script that (1) is totally contained within the script you're editing, and (2) is only referenced by the script you're editing; then allow the overwrite to occur.
This has been a thorn in the project's side for too long. Remove Auto-Implement from the project. Include the needed types, and the created implementations. If more implementations are needed, or the current implementations need to be updated, I can add them by hand. The implementations that I've actually needed have been comparable simple compared to what AutomImplement provides: I haven't needed custom property or event implementations, for example. And I haven't needed custom constructor overrides, or overrides for multiple methods with the same name. Go ahead and remove it, along with the code generation steps that come with compiling the app/tests.
When showing a sprite in the table tool, we check to see what table index it is so we can use that index to find the palette. We need to do the same thing with tilesets. This means that GetPixels() needs a new parameter, the tableIndex, which can be passed in from any context that cares about it. Most of the time, getting the pixels doesn't care what the table index is. But now tilemaps can use this to figure out which tileset to use.
Double-clearing it is a problem if it's created in the same token, because then it counts as clearing something that isn't there... which means that undoing the interaction will bring back an anchor, even though it wasn't there to begin with.
The 'showmoney' and 'updatemoney' commands are different from game to game. It has 2 parameters in R/S, but 3 parameters in FR/LG/E.
Update the scriptReference to specify that these commands have different versions for the different games.
Update ScriptParser to be able to read this new addition to the script reference format.
Add tests to show that the new commands are read correctly between games.
This method is used when calling TableStreamRun.DeserializeRun. There is always a parent table that owns the element. We need to know the parent in order to correctly deserialize child pointers.
The current transaction can be continued through 'ChangeCompleted' operations via use of the `continueCurrentTransaction` flag. But calling `ChangeCompleted` was still clearing the `customChangeInProgress` flag, which made the ChangeHistory forget that it was in the middle of a custom change. This caused issues if the selection was automatically changed (such as clicking in the text tool) after a custom no-data change (such as from changing the anchor name in the anchor-text)
HxD allows users to set the start address and length of selection using a dialog. Make this work in HMA as well, since it can make it easier to follow guides.
This lets us quickly scan the rom for uncompressed images when we don't know where they are. As with decoding text, you can often tell if it's actually an image or not just by looking at it.
* press +/- to quickly increase/decrease a digit to scan through the rom
* change the width/height to change how much of the rom you can decode at once