Commit Graph

3392 Commits

Author SHA1 Message Date
Benjamin Popp
f42ef77b9c Require that anchors have non-zero length 2019-06-04 01:29:11 -05:00
Benjamin Popp
755e4a6b3b handle naming an existing format better.
adding a name no longer removes the format, until a new format is specified to replace it.
2019-06-04 01:16:21 -05:00
Benjamin Popp
2717aace5d Fix broken test
This test was failing because I accidentally put the plm run in the middle of the move table.
2019-06-03 21:24:42 -05:00
Benjamin Popp
33d5ddacbe Selection from text tool updates main selection for plm runs 2019-05-31 23:55:12 -05:00
Benjamin Popp
f511d38958 Plm Text Tool Support
The code for PCSRuns, EggMoveRuns, and PlmRuns was starting to look very similar. So I added the IStreamRun interface, to make adding new streams to the text tool easier in the future. This required giving PCSRun access to the model, which other streams already had.
Slight refactor: new string.Split variant. Got tired of all the code duplication / verbosity.
2019-05-31 23:36:13 -05:00
Benjamin Popp
9ea56b36c3 Autocomplete and backspace for PlmItems 2019-05-31 21:28:34 -05:00
Benjamin Popp
6e2c5834f7 PLM: Select in pairs 2019-05-30 22:14:49 -05:00
Benjamin Popp
b6b75deaae First push for PLM Streams
PLM Streams (pokemon learn moves)
I can now add streams via the ViewPort
2019-05-30 22:10:14 -05:00
Benjamin Popp
ffc8a76ad8 Update table pointer field when data gets moved 2019-05-27 20:19:10 -05:00
Benjamin Popp
76df0b7bb0 Add text pointer content to tool. 2019-05-27 14:01:09 -05:00
Benjamin Popp
3e00051cb5 Allow table pointers to point to PCS streams (text)
this is a lead-in for letting them point to other kinds of streams, like plm (learnable moves) streams.
2019-05-26 21:38:28 -05:00
Benjamin Popp
f6008308e0 Version Bump 2019-05-24 21:14:00 -05:00
haven1433
e1c8441d45 Merge pull request #30 from haven1433/dev
Autosearch Improvements
2019-05-24 21:08:40 -05:00
Benjamin Popp
8cdecaa131 Context Menu Update
Add Copy/Paste context items for basically everything. Add "Remove Format" option for egg moves.
2019-05-24 21:03:50 -05:00
Benjamin Popp
b16e150967 Gaia Support
* allow the egg move limiter to be even more wrong (has to be within a given range, but doesn't have to point to FFFF)
* have pokenames and pokestats negotiate for a reasonable length, instead of pokenames always winning
* once a text table reaches length 100, allow for junk data in the bytes after the string closing FF.
2019-05-24 08:15:49 -05:00
Benjamin Popp
f4b83cadaa Merge branch 'dev-haven1433' into dev 2019-05-22 22:14:31 -05:00
haven1433
e4cd6ecfe2 Merge pull request #29 from haven1433/dev
Egg Move Support
2019-05-22 22:09:38 -05:00
Benjamin Popp
60be3bd7e6 Updates from review
* code quality improvements
* fix a crash when backspacing egg formats
* fix a crash when backspacing all the way to empty
* fix data corruption when edit-exiting multi-byte formats
*
2019-05-22 22:08:57 -05:00
Benjamin Popp
df472429da added gaia, tests failing 2019-05-22 17:46:48 -05:00
Benjamin Popp
79a8a083af Clover support
* Instead of bailing out of text tables as soon as we catch an element that starts with a space, just trim off any elements that start with a space after another fail condition. This lets us find the Fairy type, even after a number of " " types.
* only do 'text must end in FF or 00' checks if it's a purely text table. For mixed tables, this restriction is less required.
* if an egg stream has the same pokemon or move listed twice in a row, that's dumb. Recognize that as _not_ what we're looking for.
2019-05-21 22:38:47 -05:00
Benjamin Popp
4d9bf56319 Bugfixes
* allow editing PCSERROR cells.
* GetOptions() for an enum with no source should return an empty array instead of null.
2019-05-19 20:18:38 -05:00
Benjamin Popp
79287250ff Officially Support Vega
* relax egg move compatibility: allow more than 2 pointers to it
* more strict when finding pcs tables
- some fan games include new versions of tables, but leave the old tables where they were with nothing pointing to it. Before we used the new anchor to tell where a table ended. Lacking that anchor, we can determine that the new text is part of the NEXT table and not the CURRENT table using a huristic.
- if the additional element appears to be text, but the _next_ element would start with a space, then the additional element might be a different width.
- if the extra spaces after the additional element are only enough to get 4-byte aligned, then the additional element is in this table, but is the last element. The spaces are just for word alignment.
* require that abilitynames's first pointer lives somewhere in the first 0x100000 bytes. This prevents us from finding false-positive pointers much later in the ROM, even if the data has been moved. (Note that FR, LG, and Emerald all have this pointer within the first few pages of data, while Ruby/Sapphire have it much later.)
* require that trainerclassnames have more than one thing pointing to them. This reduces false positives, even given our relaxed PCS Table searching logic.
2019-05-19 20:17:38 -05:00
Benjamin Popp
4811b7d9ec Autosearch Updates 2 2019-05-18 13:57:25 -05:00
Benjamin Popp
ab7159025e Autosearch Updates
preparing to try and support more ROMs
2019-05-18 13:54:31 -05:00
Benjamin Popp
9bfa6b8026 "Find" can find egg moves 2019-05-17 21:11:26 -05:00
Benjamin Popp
ccc87f3c79 bugfix
converting from text tool didn't work right at the end
2019-05-17 20:45:02 -05:00
Benjamin Popp
34e91820c8 Main Selection updates from text tool selection 2019-05-17 20:24:39 -05:00
Benjamin Popp
0d8df15efb Right-Click option to open tool 2019-05-16 22:20:54 -05:00
Benjamin Popp
ea5f65e64f Ctrl+Click to open tool on egg moves 2019-05-16 22:17:02 -05:00
Benjamin Popp
b10e4fd7a5 Basic Tool Support 2019-05-16 22:10:01 -05:00
Benjamin Popp
eb11a855f4 limiter updates automatically 2019-05-16 21:10:09 -05:00
Benjamin Popp
68912fd8e6 Improve Copy/Paste 2019-05-16 20:54:10 -05:00
Benjamin Popp
aef8d5fe62 Contract egg run after [] 2019-05-16 20:44:41 -05:00
Benjamin Popp
0350ea47cd Egg Moves End Inline Editing
* Extension works
* Repointing works
2019-05-16 07:32:22 -05:00
Benjamin Popp
61e1fb1e6d Copy for egg runs 2019-05-15 22:25:45 -05:00
Benjamin Popp
e6e1fd3f23 Egg Moves: Inline Editing / Autocomplete 2019-05-15 22:02:35 -05:00
Benjamin Popp
b8ee9253d6 fix ui bug 2019-05-15 19:26:23 -05:00
Benjamin Popp
b22f693f8c Egg Move selection is done in pairs 2019-05-15 06:40:39 -05:00
Benjamin Popp
317582ff68 UI for egg move stream 2019-05-14 21:49:45 -05:00
Benjamin Popp
0efa5a4c59 Autosearch for egg move stream
Altair messes this up, because in that fangame, the egg moves were edited but the limiter wasn't. So the two lengths don't match, and the egg-moves were filled with "00 00".

To support other ROMs with this kind of problem, accept early exits from the format searcher.
2019-05-14 21:18:24 -05:00
Benjamin Popp
61ab55ea92 Egg moves ViewModel exposes data the UI needs. 2019-05-13 20:22:57 -05:00
Benjamin Popp
e312a47e98 Make GetOptions public/static so I can use it for egg moves 2019-05-13 20:22:07 -05:00
Benjamin Popp
1c70f8379a Initial Introduction of EggMoveStream recognition
The Egg Move stream has 2 types of data in it, each of which is 2 bytes long. Either it's a pokemon, or it's a move. (There's also the end, FF FF). This is the initial test to show that we can read an egg move stream from a format.
2019-05-12 21:53:24 -05:00
haven1433
73cc76eb3f Merge pull request #28 from haven1433/dev
Cleanup & Completion before 0.2.0 release
2019-05-12 14:24:40 -05:00
Benjamin Popp
9a9bdd4460 Cleanup
ViewPort was temporarily a partial class. Now it isn't anymore.
2019-05-12 14:23:58 -05:00
Benjamin Popp
b64337c800 Table Text gets closing " automatically 2019-05-12 14:07:13 -05:00
Benjamin Popp
2c1227511e Notify on message change 2019-05-12 13:54:06 -05:00
Benjamin Popp
46be7abe82 Version Bump 2019-05-12 13:38:52 -05:00
Benjamin Popp
f9f8b28e84 run auto-formatter 2019-05-12 13:31:18 -05:00
Benjamin Popp
d31ba98efe Bug Fixes
* Don't offer table tool in context menu of loose text
* Yield buttons for IContextItems with commands
* Ctrl+Click on pointer out of range returns an error
* Auto-moving a parent table that's being extended notifies about the move.
2019-05-12 13:30:13 -05:00