Commit Graph

2608 Commits

Author SHA1 Message Date
Haven1433
61dbbb72ff add rival nameselection graphics
This looks like an OW, but is actually stored as separate graphics in the rom
2022-06-19 18:56:53 -05:00
Haven1433
0d3e7ab095 Fix single-table-mode non-repoint selection update
When expanding a table does not cause a repoint, the scroll region still needs to be updated to know that the additional bytes are part of the table.
2022-06-19 18:44:14 -05:00
Haven1433
5e420191fc Fix single-table-mode repoint selection logic
When editing a cell in single-table-focus causes the table to repoint, turn off single-table-mode so that the selection update can work correctly.
2022-06-19 18:43:24 -05:00
Haven1433
cc506420f7 improve goto shortcut metadata loading
If the new shortcut goes to the same table as an existing shortcut, don't load it.
2022-06-18 22:26:25 -05:00
Haven1433
c45b9347a1 export table group hash 2022-06-18 22:21:52 -05:00
Haven1433
774eaa6514 Exporting a list maintains its previous hash
If the hash doesn't match the list, HMA knows that the user edited it, and won't replace that list during metadata upgrades.
2022-06-18 22:06:24 -05:00
Haven1433
2512bf0e0c improve error handling around image editor creation 2022-06-18 16:02:11 -05:00
Haven1433
60d8eea646 fix selection scroll glitch 2022-06-18 15:43:23 -05:00
Haven1433
e1aba728f7 Use correct palette for enum sprite tooltips 2022-06-18 15:29:19 -05:00
Haven1433
aaa0863ea1 improve ModelTable
make it implement IReadOnlyList so it can be used in for loops. Add `__len__` for python use.
2022-06-18 14:57:21 -05:00
Haven1433
eb3554c5bc Cloned TableStreams should be the same length as the original
This matters because having the table stream be a different length breaks the pointer-update logic when the final new run is added.
2022-06-18 13:55:03 -05:00
Haven1433
aef73703fd Use future object for Find results
This prevents the creation of a change token unless one is actually needed.
2022-06-17 20:18:56 -05:00
Haven1433
276293fc8a fix yOffset of front sprites 2022-06-16 23:25:57 -05:00
Haven1433
2a4e454756 Remove problematic Refresh code
Why was this even here? We don't need to SetTableMode during every refresh like this, it's ok to only do it during Goto. And we shouldn't be setting the Table Mode boundaries when the run that we find is not a table!
2022-06-16 23:19:45 -05:00
Haven1433
19b4e6afc3 Make tooltip loading more resistant to race conditions 2022-06-16 23:18:07 -05:00
Haven1433
8e48443170 add battle script compare options 2022-06-09 07:59:56 -05:00
Haven1433
54c32476d4 fix update checker
* use HttpClient instead of WebClient
* fix the string split logic
2022-06-09 07:17:25 -05:00
Haven1433
85741bd443 version bump 2022-06-08 22:16:52 -05:00
Haven1433
c364812af4 fix bugs in tileset animation thumb routines 2022-06-08 22:15:08 -05:00
Haven1433
1b8e03fecf fix bug compiling thumb code 2022-06-08 22:14:49 -05:00
Haven1433
88a79b2bcd allow importing palettes by copying full binary contents of a .pal file 2022-06-07 23:30:52 -05:00
Haven1433
b104d0153a update map bank fields 2022-06-07 23:30:28 -05:00
Haven1433
07658b2a0d first pass at map tileset animation editor
map tileset animations consist of 3 parts:
(1) an `init` routine that sets a hook and some Max values
(2) a callback that runs every frame that decides whether or not to animate
(3) a set of uncompressed tiles to replace existing tiles in the tileset

For each replacement effect, you need to know how many frames are in the animation, how often to update to the next frame, how many tiles to replace, which tiles to replace, and the new tiles to insert. This is handled by a new table that's created specifically for this purpose, where the first field of the table is a pointer to a table of frames. This should make it a bit easier to understand, but a good user guide is still needed for this feature.

This doesn't work yet: there's an issue with the thumb code import step. But this is a first draft.
2022-06-07 23:30:09 -05:00
Haven1433
8dd5a1baff fix palette pages for pokemon box backgrounds 2022-06-05 21:24:03 -05:00
Haven1433
8f744d1d9b fix edge case crash
don't crash when clearing format from a tilemap that's currently loaded as a sprite in the sprite tool
2022-06-05 21:23:48 -05:00
Haven1433
279ff24e26 Don't put macros in cells of the HexContent 2022-06-05 01:08:49 -05:00
Haven1433
2c34e2d8f7 add newgame professor pokemon constants for R/S
We can't actually add these automatically to the metadata because of the way the code works: it's a mov/lsl pair, rather than just a flat mov or ldr. However, both routines that load this number have an extra `nop` at the end, which means there's enough space to safely adjust them to use `ldr` instructions instead.

Add a hma script to adjust the code for R/S and introduce the new constant. These are fairly small changes that only touch the two involved functions, so they should be safe to use on basically all R/S roms.
2022-06-04 23:43:43 -05:00
Haven1433
bda65963a3 improve tooltips
add images to enum tooltips (pokemon and items)
add images to OW table tooltips
2022-06-04 23:41:26 -05:00
Haven1433
8940c45355 Add python panel
The panel is currently tucked into the right edge of the app, not taking any space. It's an advanced beta feature. The python context only gets access to 2 special variables (editor and table), plus an override for the print function.
2022-06-04 21:17:28 -05:00
Haven1433
1eb9e28041 allow & and % when typing enum names 2022-06-03 21:24:00 -05:00
Haven1433
e2fd4d4852 version bump 2022-06-02 23:16:48 -05:00
Haven1433
fd80fe8b14 add newgame constants for R/S/E 2022-06-02 23:09:56 -05:00
Haven1433
72dbe460ff Performance Improvement: table tool text editing
When you edit the pokemon names, another field in the table tool needs to update: the combobox drop-down list options for evolution species. There are 5 of these boxes.

Update the logic to be more choosy about what's being updated so that there's less changes going on and the app can update faster.
2022-06-02 23:02:54 -05:00
Haven1433
c4d39c6ab2 fix goto when typing ho-oh 2022-06-02 22:23:54 -05:00
Haven1433
59a965c7f1 Clear Format before adding constant
Shiny discovered a rom where the constant is added on top of a pointer. This is no good, because the constant replacing the pointer didn't clear the pointer from the anchor it points at.

Add logic to clear the format before adding the constant.
2022-06-02 22:09:52 -05:00
Haven1433
1ed4a4039f Improve constant copy/paste and write behavior
Allow writing the byte at the same time as writing the constant by using a `=n` suffix. Include the constant format and value in the copy text.
2022-06-02 21:52:57 -05:00
Haven1433
65765e695f Allow Text Macros
* Replace the static PCSString.Convert method with an instance method on a TextConverter that's owned by the Model. The TextConverter can know about different macros depending on which rom is being edited.
* Add macros to pcsReference.txt
2022-06-02 20:53:39 -05:00
Haven1433
b57b373b4f add tab support 2022-06-01 08:48:26 -05:00
Haven1433
3d98a79478 model pointer improvements
When generating a default anchor name, make sure that name isn't already in use.
When generating a default anchor name, put it in `misc.temp.`. Don't save anchors in from namespace to the toml file. This should make cut/paste operations less prone to adding noise to the toml.
2022-05-29 23:25:09 -05:00
Haven1433
7a8ab970e4 fix 'enter' on pointers in the table tool
Hitting enter on a pointer should jump to that pointer. But this feature's broken since changing the Accept command into a method. Update the AngleTextBox code to use a MethodCommand.
Make MethodCommand more flexible: don't fail if the execute method is missing, just silently do nothing.
2022-05-29 23:23:37 -05:00
Haven1433
ca04d5db32 don't copy the anchor unless the entire run is selected
This should improve copy/paste scenarios where the user wants to copy the content from the first element and paste it somewhere else within the same (or a similar) run, without negatively effecting the common cut/paste operation of moving an entire run to a new address.
2022-05-29 21:48:30 -05:00
Haven1433
93f8cce753 add hp-aware move effects tables
the trainer ai hp-aware flag makes the trainers less likely to use certain moves based on their own HP or the target's HP. For example, effects like
```
SelfKOAndAttack
HealHalfSelf
Rest
Endure
```
are all discouraged when the pokemon's health are high, while
```
RaiseAttack1Primary
RaiseSpAttack1Primary
OHKO
```
are discouraged when the opponent HP is low.
2022-05-29 21:36:17 -05:00
Haven1433
159c22e31a improve goto resolution
THUNDER should go to THUNDER, not THUNDERPUNCH
2022-05-29 20:56:47 -05:00
Haven1433
fff436aa70 adjust column sizes for tuple textboxes 2022-05-28 23:15:05 -05:00
Haven1433
a3c644ce0e allow duplication from non-selected tab 2022-05-28 20:53:11 -05:00
Haven1433
873e5c104b slight refactoring
Don't need to call ResolveConflicts 3 times during start up
2022-05-28 20:42:39 -05:00
Haven1433
5e25d9927e don't crash when the text tool tries to auto-complete from a list with null options 2022-05-27 23:59:33 -05:00
Haven1433
5c01e02b29 add NoInfoRun.Proxy method 2022-05-27 23:34:00 -05:00
Haven1433
de7554f307 fix script reference typo 2022-05-27 23:33:49 -05:00
Haven1433
eb8d125811 Paste should be a no-op if the ViewPort isn't focused 2022-05-27 21:22:55 -05:00