Commit Graph

3025 Commits

Author SHA1 Message Date
haven1433
31b8f5e0c5 progress on scripts 2022-10-13 22:12:19 -05:00
haven1433
7b0ee88dae refactor 2022-10-13 22:11:59 -05:00
haven1433
27baa99992 update steven bugfix hma script 2022-10-13 22:11:49 -05:00
haven1433
066f4d8997 version bump 2022-10-13 21:04:27 -05:00
haven1433
0b5da64d09 first pass UI for scripts 2022-10-13 21:04:09 -05:00
haven1433
2992d55de0 add substitute front/back/palette data for R/S/LG and 1.1 games 2022-10-13 20:01:17 -05:00
haven1433
0e4ded5090 Complete first pass at repointer, start first pass at script collection 2022-10-13 19:47:42 -05:00
haven1433
a0254ef8ea fix script formatting bug
formatting a script should not remove inner anchors
2022-10-13 07:06:21 -05:00
haven1433
2a5f36ee6f smarter string parsing
We can pre-compute the list of valid in-progress escape sequences and only compare the escape text against the set. This is much faster than verifying that no valid character starts with the current input.
2022-10-12 21:08:16 -05:00
haven1433
89166552cb fix loading bug
data didn't load correctly if a false pointer or text interrupted the data
2022-10-12 20:49:13 -05:00
haven1433
aafe651e0f code cleanup
initial pass at the data buttons. Maybe it'll end up just being a menu with a bunch of items, but I feel like with so many operations, they need to be a bit more organized than just a simple hierarchy.
2022-10-11 23:12:04 -05:00
haven1433
028f37adcf improve selection logic
selection is now based on nearest-neighbor instead of what's under the mouse
also show wild pokemon preview
2022-10-11 21:23:12 -05:00
haven1433
5c5f51fcc9 Sprite export improvement
Allow exporting indexed PNGs
Other changes:
* multi-select blocks
* edit borders
* fix castform export
2022-10-11 20:11:37 -05:00
haven1433
d2e88ad864 add border panel
currently empty
2022-10-10 22:25:32 -05:00
haven1433
f3aa78575c fix expansion / truncation issues 2022-10-10 21:47:22 -05:00
haven1433
ce3d307251 bug fixing
* fairy script wasn't adding correctly
* right-click menus for inner-pointers weren't showing the right addresses
* appending a table and then updating the new pointer to point into a new table wasn't clearing the old pointer location from the old anchor
* search was causing thread-lock issues
* Display As Text was causing thread-lock issues
* python tool needs to update related fields when updating a table (structType, child table length from parent)
* fix character set issues
* fix crashes with mapper when tables don't have expected elements
* fix showing map options when there's no mapper
* improve handling of custom character escape sequences
* truncate text in tooltips
2022-10-10 21:33:57 -05:00
haven1433
ac20599845 add scripts.money.cap for emerald
this is our first 4-byte constant, so I had to make some changes to how 4-byte constants worked.
* constref file needs to support 4-byte constants
* WordRun needs to be able to tell the difference between a constant that's matched to a table length (displayed as the table name) and a constant that is not matched to a table name (displayed as the number)
* Goto needs to be able to go to 4-byte constants
2022-10-09 22:44:52 -05:00
haven1433
2c323831ca Condense the Edit menu by 1 row by only showing Paste / Replace once.
feature suggestion from Shiny Till Dawn
2022-10-09 22:19:05 -05:00
haven1433
84cb8bc143 fix event refresh issue after drawing 2022-10-09 22:16:56 -05:00
haven1433
743e3015b4 fix redo bug / improve block selection 2022-10-09 22:12:11 -05:00
haven1433
bad7cdd115 show the selected tile 2022-10-09 12:48:55 -05:00
haven1433
157c33b9ed undo/redo improvements
* make undo history smarter for block editing
2022-10-09 09:58:48 -05:00
haven1433
37f167356d block editing 2022-10-08 23:49:48 -05:00
haven1433
5aa83014db block editing 2022-10-08 21:45:12 -05:00
haven1433
30007082f6 python improvements
* ToString for model elements
* ability to read bit arrays as a number, sort of
* better error message when a field isn't found
* wrap text in python output
2022-10-07 22:56:11 -05:00
haven1433
8904285d47 don't export entrance_abilities script
it's broken and we don't have the time to fix it right now
2022-10-07 22:55:12 -05:00
haven1433
cea8cfba01 tile panel improvements 2022-10-07 22:54:45 -05:00
haven1433
1fcd04d74d progress 2022-10-07 06:44:04 -05:00
haven1433
1cc94f54e1 version bump 2022-10-04 23:14:28 -05:00
haven1433
b31d84e03e make tileset animation code more flexible in preparation for supporting more games 2022-10-04 23:13:37 -05:00
haven1433
b4f4e86277 don't clear the newgame pokemon tables
These were being cleared because they existed within scripts. Make the script ClearFormat logic smarter so it skips tables that align to single arguments.
2022-10-04 23:05:32 -05:00
haven1433
4317864b64 fix disappearing script section bug 2022-10-04 16:58:45 -05:00
haven1433
6d53288666 fix bug with pointers to text in tables
A table might now support inner-pointers, but a user may still want to add a pointer to text within a table. In that case, treat the pointer red, but don't cause any metadata issues.
2022-10-04 07:46:05 -05:00
haven1433
03b0198207 be more surgical with locking during Initialize 2022-10-02 00:33:49 -05:00
haven1433
6de8951d6a Improve toml reading logic
If there's an error reading the toml, give an error rather than showing the crash dialog.
2022-10-02 00:16:15 -05:00
haven1433
0f3748419b lock like you mean it
change all instances of lock (runs) to lock (threadlock) so that there's just one master threadlock that's used when accessing / editing the runs collection.

All public methods that access or edit the runs collection are now protected by the threadlock.

PLEASE tell me I didn't accidentally cause a deadlock here...
2022-10-01 22:20:54 -05:00
haven1433
f243c66562 remember length base-16 base-10 choice between runs 2022-09-30 22:59:03 -05:00
haven1433
987a2b356f Call Dispatcher.Invoke more carefully
Only call it if we really need to access UI properties.
2022-09-30 22:22:10 -05:00
haven1433
26103602dd improve text finding logic
When the asks HMA to recognize something as text, be smarter about working around things HMA thinks it has found.
* Be able to find text despite false PCSRun/NoInfoRun runs.
* Be able to find text despite false pointers
* Make sure that this new logic doesn't accidentally clear tables.
2022-09-30 22:21:33 -05:00
haven1433
ad15f35193 undo should refresh the code tool 2022-09-30 16:10:33 -05:00
haven1433
23c4e3b9ac fix underscore bug in menu items
need to escape underscores so WPF doesn't turn them into underlines for keyboard shortcuts
2022-09-30 16:09:56 -05:00
haven1433
5813fd00f7 Fix table-stream expansion logic
Normally, HMA allows you to extend a table by typing a `+` directly after the table. But for tables that have an end-token, they should instead be expanded by typing `+` over the end token `[]`.
2022-09-30 15:50:34 -05:00
haven1433
abdf4eaa1c add new table
also, `GetIndexOfNearestAddress` shouldn't ever find a table with distance 0, because that's not what we're wanting to find: we want the table with the nearest values so we can do a cross-reference, and anything with this exact address is likely missing the other games we're looking for.
2022-09-29 21:29:15 -05:00
haven1433
898d6b586b add new table 2022-09-29 21:16:08 -05:00
haven1433
414a9e5b0a improve move expansion repoint logic
All level-move runs after expansion should start at a 4-byte aligned address. This worked fine for any run that got repointed... but _didn't_ work for runs that were expanded _without_ being repointed. It works correctly now.
2022-09-29 21:13:18 -05:00
haven1433
637aa59050 fix overworld sprite reading logic
The length is only 2 bytes long, not 4 bytes long. So I should only be checking 2 bytes instead of 4 bytes when looking for the length.
2022-09-29 20:41:57 -05:00
haven1433
4ccb5d940e fix edge case
if we fail to find the "sprites" in the data, show default blank sprite rather than crashing
2022-09-29 16:35:38 -05:00
haven1433
8b69b5a7e5 fix rom contraction bug
clear format before deleting the data
2022-09-29 16:19:06 -05:00
haven1433
8fd4a742af commit missing changes 2022-09-29 00:14:12 -05:00
haven1433
a080dedbdb fix plural "best match" goto
plural worked for finding anchors, but didn't work for best-match
2022-09-29 00:13:36 -05:00