Commit Graph

3392 Commits

Author SHA1 Message Date
Benjamin Popp
136559efec Make Items Expandable
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.
2019-07-10 21:04:57 -05:00
Benjamin Popp
2cc53380bd add item images table in FR/LG/Emerald. I don't know where they are in Ruby/Sapphire 2019-07-09 22:28:03 -05:00
Benjamin Popp
f548fb8f00 Bugfix: bit-arrays longer than 32 elements were getting their data wrong after the first 32 bits. 2019-07-08 21:12:53 -05:00
Benjamin Popp
5e16247193 bugfix 2019-07-07 22:49:07 -05:00
Benjamin Popp
eabf787974 First Pass at expandable TMs
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.
2019-07-07 15:03:24 -05:00
Benjamin Popp
46df23ef63 Update to C# 7.2 2019-07-07 10:29:23 -05:00
Benjamin Popp
a61290c091 Basic TM/HM editing support
You can't properly expand TMs/HMs yet, but you can edit what moves they contain and you can edit pokemon compatibility.
2019-07-05 13:30:50 -05:00
Benjamin Popp
ff02a68cc7 caching bugfix 2019-07-05 13:29:33 -05:00
Benjamin Popp
d08f7fda48 bugfix 2019-07-05 09:03:02 -05:00
Benjamin Popp
5f88902d8c Version Bump 2019-07-03 22:22:58 -05:00
haven1433
383a68508f Merge pull request #34 from haven1433/dev
Support for Move Tutors
2019-07-03 22:18:16 -05:00
Benjamin Popp
7af3bee71b Crash better
There's bugs in the app. I know there are. But I need help finding them. This should make it a bit easier for people to help me when stuff goes wrong.
2019-07-03 22:01:13 -05:00
Benjamin Popp
b21787003c Don't crash when saving throws an exception. 2019-07-03 21:47:17 -05:00
Benjamin Popp
5b56c02030 Model fixes
* require more space between runs when moving data. The number before was short enough to give false positives: areas that look free but are not.
* fix the calculation error that was causing bit-array extension to not get moved when it should.
2019-07-03 21:38:14 -05:00
Benjamin Popp
b6d2c48610 Quick-Edit fixes
* Notify QuickEdits when the tab changes
* `MakeTutorsExpandable` correctly identifies when it's already been run on a file.
* QuickEdits notify when their runnability changes
2019-07-03 21:35:55 -05:00
Benjamin Popp
3c5e43cab5 bugfix 2019-07-02 21:33:23 -05:00
Benjamin Popp
d79e0b9497 Use constants instead of magic strings 2019-07-02 21:12:59 -05:00
Benjamin Popp
58f34f7d52 Implement UI for quick edit menu (Utilities) 2019-07-02 21:04:09 -05:00
Benjamin Popp
de4dbdd4ad Allow Bit Segments to grow
When a table used by a bit-array segment grows, grow the array with the bit-array segment as well.
2019-07-01 22:07:26 -05:00
Benjamin Popp
99b155db50 Updates from bugs found while trying to test table extension
* dependent tables were not being moved when they should be.
* PLMRuns were not being deserialized correctly.
* Adding a brand-new pointer location into a table with nested formats didn't work.
2019-07-01 21:22:04 -05:00
Benjamin Popp
d84972e3bc "Append" button -> "Add New" 2019-07-01 19:56:09 -05:00
Benjamin Popp
09d6eae907 QuickEdit-Expandable Tutors (Model)
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.
2019-06-30 22:36:21 -05:00
Benjamin Popp
a4770c6b68 Move the cursor after completing a WordRun 2019-06-30 22:13:30 -05:00
Benjamin Popp
488218cc07 Verify MatchedWords have the expected value. 2019-06-29 22:35:41 -05:00
Benjamin Popp
ec3179f32c more cache scopes 2019-06-29 15:49:01 -05:00
Benjamin Popp
33780edd71 Should be able to load MatchedWords from metadata 2019-06-29 13:53:17 -05:00
Benjamin Popp
16d52669da MatchedWords can now be saved/loaded with metadata 2019-06-29 13:46:43 -05:00
Benjamin Popp
4da667f4da Make it possible to remove matched words 2019-06-29 08:51:41 -05:00
Benjamin Popp
117b77000d Add new known anchors to the start screen 2019-06-28 22:18:53 -05:00
Benjamin Popp
f23e897f86 Bugfixes
Actually running and trying to use it revealed a few more places where I need cache scopes.
2019-06-28 22:11:42 -05:00
Benjamin Popp
9bc191f697 Introduce WordRuns
WordRuns, like PointerRuns, can live anywhere in the file and don't require anchors to them. Instead of needing an anchor to them, they specify the name of a table that they are matched to. Whenever that table's length changes, the WordRun's value is automatically updated to match the table length.
2019-06-28 21:54:47 -05:00
Benjamin Popp
86ae259473 Use cache scopes instead of letting runs own their own caches.
Since runs can live forever in the undo/redo stack, having caches owned by runs mean that the caches can live for forever too.
Now that I have a better method of creating scope-limited caches, go ahead and switch to using those for EggMoveRuns and ArrayRuns, runs that had previously owned their own caches.
2019-06-27 22:45:19 -05:00
haven1433
3615416e14 Merge pull request #33 from haven1433/dev
Introducing the 'code' tool.
2019-06-27 22:05:31 -05:00
Benjamin Popp
b6f4dcda55 Bug fixes
Looking through Gaia, found some interactions that didn't quite work as expected. Fixed them.
I've decided that supporting Gaia's method of doing move tutors would be overstepping my bounds. You can totally support them with some manual format inclusions, but doing that automatically would be outside the scope of the purpose of the search algorithm, since Gaia does something rather custom that I don't currently see being done anywhere else, and I don't know what tool did it. It might be custom work specific for Gaia.
2019-06-27 22:05:08 -05:00
Benjamin Popp
51769ba456 UI Update: 2 checkboxes per row
In the table tool, when looking at a bit-table, put 2 checkboxes per row.
2019-06-26 21:56:44 -05:00
Benjamin Popp
7fde9e9593 First pass at auto-search for tutor moves
works for the base roms, but not for user edited roms yet (Gaia)
2019-06-25 22:40:20 -05:00
Benjamin Popp
43526f1357 Fix visibility bug in SearchResults
Search Results headers were getting truncated because of the new logic to draw most data formats extremely quickly. Switching it to use a different data format that doesn't get the fast-draw treatment, so that it still looks correct.
2019-06-24 21:34:25 -05:00
Benjamin Popp
7e0998f44e Theme bugfixes
* Theme should notify when Primary / Background change.
* When the background is light and the text is dark, flip the logic for the 'backlight' color.
2019-06-24 21:24:18 -05:00
Benjamin Popp
5da9d88d95 BitArrays select entire elements, not just single cells 2019-06-24 21:06:41 -05:00
Benjamin Popp
4804a6f9f7 Visuals for bit lists 2019-06-24 07:13:29 -05:00
Benjamin Popp
3ff67cf455 BitArray Support - test passes 2019-06-23 22:14:29 -05:00
Benjamin Popp
11694e8424 Get it building 2019-06-23 20:57:31 -05:00
Benjamin Popp
fc3392c6c1 Working on bit arrays
Have the one test, started working on implementation
2019-06-23 14:09:50 -05:00
Benjamin Popp
abfe00172f Merge branch 'dev-thumb' into dev 2019-06-22 21:55:57 -05:00
Benjamin Popp
60a5988510 bl is 2-instructions wide
almost all thumb instructions are 2 bytes wide. But bl is 4 bytes wide. The first two bytes include the high half of where to jump, and the next two bytes contain the low half of where to jump. But when loading all 4 bytes at once, this gets reversed. bl allows you to jump to functions 22-bits away. (x*2+4 from current address, where x is a 22 bit signed int).
2019-06-22 21:55:25 -05:00
haven1433
00e58246d7 Merge pull request #32 from haven1433/dev
Zoom
2019-06-22 15:55:58 -05:00
Benjamin Popp
9f92c4cd2e general thumb parser fixes
* push lists are the opposite order from pop lists
* if there's a 'push lr' command, that's an interesting address
* bl and blx commands have interesting stuff after them, so don't count those as range-enders
* show code even if the selection is backwards (end-to-start)
2019-06-21 22:36:20 -05:00
Benjamin Popp
f3f97658ce ldr is word-aligned, even if the thumb instruction isn't 2019-06-21 21:01:31 -05:00
Benjamin Popp
66249cc09b Show data instead of code where applicable
Not everything should be disassembled as code. If something tells me that it's loading a word from a given address (ldr), I know that the stuff there is data instead of code. So I should show it as such.

Not everything should be disassembled as code. If I read the code "b", "bx", "bl", or "pop pc", then I know that the bytes after it aren't code until something jumps to it. Go ahead and use this knowledge to stop showing code at that point.

Make it possible to scroll / copy from the code tool.
2019-06-20 22:19:40 -05:00
Benjamin Popp
0feb22638c Thumb Bugfixes
list was backwards
pointer destination tracking was off by 4 bytes (2 commands)
2019-06-20 21:08:09 -05:00