There are 4 tables related to the pokedex that I'm adding here:
* regional dex: for each pokemon, what is its regional dex index
* national dex: for each pokemon, what is its national dex index
* conversion: for each regional dex entry, what index is it in the national dex (can be computed automatically, so I added a QuickEdit item)
* dex info, such as the dex description
I also updated App.xaml and MainWindow.xaml.cs to make the QuickEditItems look better.
change tracking was previously done in the model, but exposed in the ViewModel via a data format. The problem with this is that it meant that all changed formats were wrapped in a new format, which would require a lot of work to fully validate.
The new implementation is still in the model, but exposed in the ViewModel through a new property on the HexElement. The data formats are unchanged.
The AutoSearchModel is nifty, but seems to have trouble in a lot of situations where data isn't in the format I expect.
However, I've noticed that while many romhacks move tables around, a lot less of them move code around. So I can depend on most of the pointers to those tables still being in the same spot.
Based on this idea, I've created a new "HardcodeTablesModel" that uses known pointer locations to find tables instead of just searching for tables based on their format. This lets me simplify a lot of the logic, reducing it to basically a pointer lookup in many cases.
Most of the tests for FireRed are passing now using the new HardcodeTablesModel. I'll continue looking into issues from FireRed and the other baseroms in the next update.
`Goto -> table` will currently adjust the data alignment to make the table rows line up in a useful way. However, getting the alignment back to normal after that requires doing another goto, which isn't intuitive.
make it possible to reset the alignment to default via a button.
I never quite got TM Expansion working correctly. Let's go ahead and disable the feature for now so that I can move on to fixing other bugs and adding other features. We'll come back and fix this later. More research is required.
If I intend to add more TMs, then I need to be able to add more items. Not only does this require updating the number of items, but I also have to update the number of item images (still never found the item images in Ruby/Sapphire...). But that's not all! We also need to update the code that refers to the number of items that we have. So here's a quick-edit aciton that updates code referring to the number of items.
There is now a quick-edit item for allowing the tm compatibility code to expand correctly with the tm compatibility table. Emerald still needs more updates, but before that we should test the current implementation with FireRed.
* Notify QuickEdits when the tab changes
* `MakeTutorsExpandable` correctly identifies when it's already been run on a file.
* QuickEdits notify when their runnability changes
Introduce the concept of quick-edits in the editor. These are often-wanted mini-patches that HexManiac has built-in. An example of a use case: decapitalization.
Since I expect that many users will want to expand tutors, and I'm focusing on pokemon moves right now, making tutors expandable is the first quick-edit I've implemented. This change shows includes AutoSearchTests.ExpandableTutorsWorks, which roughly shows how the UI will use this quick edit.
Change CellWidth and CellHeight to be instance members of `HexContent` instead of static. This forces other components to look up the size (or get handed the size) instead of using a global. This will let us vary the width/height in the future.
Add 'ZoomLevel' concept to EditorViewModel, so we can save/load the zoom level. It doesn't currently connect to anything in the UI, but it will eventually map to font size, which will be used to calculate cell size.