instead of just preferring to match the lowest possible ID that counts as a partial match, add some extra criteria to make it act closer to how people expect.
* prefer entries where no letters are skipped
* prefer entries where the start of the partial matches the start of the full
* Brought in the changes from PR #170.
I'll need to get the anchor refs for RS & FRLG.
I also bundled the \`tse` feature request for this file.
* Fixed Emerald's addresses.
Previously, they were addresses of the strings themselves instead of anchor references.
* Nested "speeches" under "professor."
* Making progress on finding FRLG anchor refs.
There are a few more I still need to add.
* Finished the Anchor refs for FRLG.
The Ruby/Sapphire Anchor refs are being started.
* Finished the Anchor refs for Ruby & Sapphire.
I tested them, and all of the anchors show up in the Generation III games.
"buffer1" is associated with 0 for a parameter in a command like "buffernumber." That misalignment by 1 can cause some confusion, so this change will allow the word "buffer1" to be used instead of 0 for such commands to line up with the \\ 02 text macro ([buffer1]) that would be used afterwards.
* pressing escape should close the script tip
* fix automatic inclusion of <auto> behavior
* Fix possible crash when looking for closing } when there isn't one
* Only update TextEditor layers if they've changed (performance)
* creating a new event script should include lock/faceplayer/release
* adjust focus when switching tabs (close open tips)
* only try to access list coments if the list isn't null
Adding a field `name|python=function` to a table will add a button to the table. Clicking the button will run a python function from `hma.py`. The function is expected to have one element, which will be the current selected element of the table as a `ModelArrayElement`. This python code still has access to the entire rom and the print() function.
The button's text is based on the name of the field, and therefore cannot have a spaces or special characters, just letters / numbers.
The button will get tooltip that is based on the comment of the chosen function.
* show hex values with leading 0x
* allow parsing hex values in non-hex fields and non-hex values in hex fields
* flags are shown in hex everywhere else, show them in hex in the table tool too
* Avoid using foreach/enumorables in `MacroScriptLine.Matches` since it's called so often.
* Use Span<char> to reduce string allocations in `ArrayRun.ctor` and `ArrayRunEnumSegment.GetOptions`
* don't store the delta object used for initial setup
* avoid making lambdas in `ScriptLine.Matches`, which is called very often.
* use use List<int> instead of SortedSpan<int> for building the initial DestinationToSource cache, since we're already guaranteed that they'll be added in order and without duplicates. This greatly reduces the number of int[] arrays created during startup.
* allow `ArrayRunPointerSegment` to cache the table content results from parsing its InnerFormat, so it doesn't have to re-parse each time. This greatly reduces the number of string allocations.
* Use `ThreadSafeDictionary` for `TryGetValueCaseInsensitive` so we don't need to create a new collection of keys each time we call the method. Also add key caching to `ThreadSafeDictionary` so we don't need to make a new collection each time it's requested.
* Make `GetOptions` return a readonly list. We already know it's unique, this means we don't have to make a new collection every time we parse segments.
* limit the number of undo tokens we store (default 100) to save memory
* Use `byte[]` and `Array.Copy` instead of `List<byte>` and `AddRange` to reduce byte array allocations when loading a file.
* Freeze geometries in the `Icons` collection.
* add option for running garbage collection from the developer menu
* use a custom `AutomationPeer` to prevent WPF from holding memory after controls have been closed.
* Remove the `compact` macro, since it's just a combination of 3 macros that each make sense by themselves. The goal for macros is to put them in situations where you wouldn't ever want the command by itself.
* Move the `if` macros down to live with the other `if` macros.
* The `(` symbol has been moved.
This was supposed to go in the previous pull request, but I was too late...
* Added another `msgbox.yesno` macro.
No testing has been done yet.
* Added if.yes & if.no macroes.
Caution: These macroes will show up unintentionally if you're using commands other than msgbox.yesno that involve comparing the last result variable (800D) with the literal number 1.
* Fixed the `ptr` pointer format.
my bad
* Configured the macroes.
* Added comments to the macros.
They seem all jumbled up.
* Added corresponding cmds. for trainerbattle 0−8.
Testing needs to be done to make sure they work atm.
* Updated trainerbattle 09 & 0C.
though trainerbattle 09 will need another change.
* Added trainerbattle 09 types based on a bit field.
Right-most bit: Whether or not the player can lose
Second-right-most bit: Tutorial battle w/ Professor Oak
Based on the combinations of bits, I added more variants to FRLG's `trainerbattle 09` command.
* LocalIDs are correctly filled in as 1/2-words now.
My bad
---------
Co-authored-by: haven1433 <haven1433@gmail.com>
I thought the Berry Master & his wife would pull items from this table to give to the player if the player inputted the correct phrases; however, this specific table is only referenced in the `SetOpponentsBerryData` function in Pokémon Emerald.