Commit Graph

29 Commits

Author SHA1 Message Date
haven1433
0824afb1a8 add emoji support
F9 needed to be handled like other escapes
2022-10-23 20:40:25 -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
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
32911324f3 allow cross-game macros 2022-09-20 17:23:02 -05:00
Haven1433
bc6fb382b2 typing text macros works in the hex content
also fixes a copy/paste bug
2022-08-26 22:55:24 -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
bb1948d339 Introduce pcsReference.txt
Other programs let you edit the way text is interpreted using .ini files. Add a new pcsReference.txt file that lets users see the interpretation of bytes-to-text, the number of arguments used for different control codes, and allow them to change it.
2022-05-25 23:31:20 -05:00
Haven1433
5c31f0f84d fix copy/paste for pcs strings with escape codes 2022-05-09 21:04:17 -05:00
Haven1433
b071de8654 control code 4 has 3 parameters 2022-03-12 21:59:29 -06:00
Haven1433
c859aac1ed Improve handling of control-code escapes
* 0x0A -> wait for sound effect
* 0x0B -> play background music (2 args)
* 0x10 -> play sound effect (2 args)
2022-03-07 21:39:26 -06:00
Haven1433
0ba859ae56 Add Lv character 2021-12-09 20:48:19 -06:00
Benjamin Popp
23c1d7b5ee Add support for button-escape characters 2021-10-25 20:33:11 -05:00
Benjamin Popp
df5f75076e add 'dynamic' text character 2021-09-04 21:11:04 -05:00
Benjamin Popp
1d4ee1e58b bugfix: allow 'find' to find escaped characters 2021-08-02 12:25:25 -05:00
Benjamin Popp
ce46f5f011 \l should line wrap 2021-03-31 21:04:35 -05:00
Benjamin Popp
fc88a95429 Add support for some french characters 2021-03-28 21:20:50 -05:00
Benjamin Popp
bb7cfb818d Improve PCS tool parsing
Show the hex values for escaped bytes in the text tool.
2021-01-20 21:56:28 -06:00
Benjamin Popp
766ac8dee4 FuncEscape Control Codes count as escaped characters 2020-08-11 20:24:12 -05:00
Benjamin Popp
5a5b7d9ba3 Fix PCS escape character bug
It seems that CC is *not* a double-byte escape character, at least not as we're seeing it used in the FireRed text "this isn't the time" from Oak. Instead, it's a function-escape character, which means the code after it is variable length.
2020-07-09 07:37:06 -05:00
Benjamin Popp
2ec471d0df Introduce SortedSpan
Merging lists takes a long time. Since we want the pointer sources to be sorted at all times, lets expose that detail and take advantage of it to allow us to merge-sort any time we combine tables together. This significantly increases list-merging speeds.
2020-06-25 23:52:37 -05:00
Benjamin Popp
6e926e2d52 Fix special character encoding 2020-05-14 15:32:16 -05:00
Benjamin Popp
4bda80edaa Bugfix: allow typing 'ss' or 'oe' without munging
because "ss".StartsWith("ß") returns true
2020-04-29 09:13:55 -05:00
Benjamin Popp
6edae1a00c Add more translations to PCSStrings
This doesn't seem to give us extra false-positives, and hopefully is helpful for EyeOfGull's use cases.
2020-04-06 22:14:21 -05:00
Benjamin Popp
3329c2f81c Bugfixing
The multichoice didn't load right for a number of reasons
* The PCS has a double-escape character that I wasn't handling right.
* The check to see if a value is correct should verify that the value doesn't look like a pointer (high-byte on a 4-byte value should be less than 0x08).
* Had the wrong source for FireRed: typo
* Inner formats weren't being verified correctly for added tables
2019-12-02 18:15:18 -06:00
Benjamin Popp
52fb90beb3 Adding tests for finding trainers
also realized that TPTRuns will temporarily have no sources while in the process of being removed.
2019-11-06 14:47:57 -06:00
Benjamin Popp
9d0279babb Copy Text bugfix
When copying text, don't copy all the bytes (in the case of a fixed-length string): just copy until the end-of-stream byte. This makes paste work better.
2019-10-12 13:53:10 -05:00
Benjamin Popp
1f29c5c132 fix some text recognition bugs 2019-04-07 20:31:43 -05:00
Benjamin Popp
1930a8526b fixes after working with Pokemon Gaia
make copy/paste not add empty elements
2019-03-29 21:16:58 -05:00
Benjamin Popp
0c8633da52 rename folders / files / projects from Gen3Hex to HexManiac 2019-02-05 20:58:49 -06:00