Commit Graph

2212 Commits

Author SHA1 Message Date
Benjamin Popp
bec3d66159 update text tool after undo 2021-07-24 22:01:04 -05:00
Benjamin Popp
24490c43e9 undo should raise when a non-data change comes through 2021-07-24 21:50:26 -05:00
Benjamin Popp
46af7d65de fix script-insertion anchor issue
when writing a new script run, don't pass in the pointer sources for the parent script
2021-07-23 23:23:29 -05:00
Benjamin Popp
54ec62e8b1 allow XSE format to 'create new' data 2021-07-23 22:59:02 -05:00
Benjamin Popp
ccc1d81a0e fix edge case bugs
* scirpt parser needs to clear format before inserting movement streams
* give a reasonable max limit for warp x/y position
2021-07-23 22:29:36 -05:00
Benjamin Popp
0489b37897 limit recursion on table-streams in the table tool
for performance and to make the left-rail easier to read
2021-07-23 21:40:20 -05:00
Benjamin Popp
b478b7bb52 Emerald now knows about the number of maps per bank 2021-07-23 21:39:40 -05:00
Benjamin Popp
29bf785e90 Introduce Dynamic-Length table streams
In the case of map banks, each bank contains a number of maps. But the number of maps is different. This gives us (hypothetically) a way to grab the number of elements within each sub-table of a parent table.
2021-07-23 21:22:28 -05:00
Benjamin Popp
7bcef5b874 move orphans into a special folder to make the intent more clear
When editing XSE scripts, it's possible to have a script that used to be called, but now isn't. If we don't track those orphans, they just become dead data.
Put orphans in a subfolder so that the intent is more clear.
2021-07-23 15:55:26 -05:00
Benjamin Popp
2ab07c8546 fix name conflict 2021-07-23 15:50:52 -05:00
Benjamin Popp
53a055cb42 Improve table validation logic
* pointers to zero that don't match the expected format should be treated like nulls. Thanks AdvanceMap.
* It's ok if a HexSegment looks like a pointer.
2021-07-23 15:50:32 -05:00
Benjamin Popp
2faa3bf04d add move backgrounds / surf for Ruby/Sapphire 2021-07-23 15:09:43 -05:00
Benjamin Popp
449058617f Update pokemon fairy type script
* update the move fallback names
* update the pokedex search terms
* update the unionroom type options
2021-07-23 14:56:25 -05:00
Benjamin Popp
284ceeae52 add tests for anchor reference issues
Verify that all loaded tilemaps have tilesets
Verify that all loaded sprites have palettes (unless they don't claim to)
Verify that all loaded enums have sources
2021-07-23 10:53:07 -05:00
Benjamin Popp
cb7f747774 fix single-tab diff 2021-07-23 10:37:03 -05:00
Benjamin Popp
83cb7280a1 Fix script-text insertion bug
When inserting text from a script, clear the format first
2021-07-23 09:27:41 -05:00
Benjamin Popp
6ed461b669 fix self-referential anchor recursion
Don't UpdateNewRunFromPointerFormat during AddPointerToAnchor if the pointer being added is within the existing run: doing so can cause so weird recursion.
Example: Emerald Advanced 0.7 has an event table at 748228 with a warp table pointer that leads to... 748228. In this case, we want to keep seeing it as an event table, not a warp table.
2021-07-23 09:11:09 -05:00
Benjamin Popp
f1b59f25e4 fix ScriptRun mistaken writing
Given a no-change token, XSERun (and friends) should not clearformat / ObserveRunWritten. no-change tokens are used when pre-checking whether a format can be safely added at a destination.
2021-07-22 22:51:50 -05:00
Benjamin Popp
d24a608064 Fix inner pointer metadata update bug
When moving a run with pointers into a table, make sure that table's inner pointers get updated correctly
2021-07-22 22:08:29 -05:00
Benjamin Popp
027c0ee86d fix graphics.menu.boxes.background glitch
needs to have `graphics.menu.boxes.background` as the tileset name for the tilemap, not `graphics.menu.boxes`
2021-07-22 10:42:56 -05:00
Benjamin Popp
92b183e04b less crashes when changing formats that include XSE runs 2021-07-22 10:42:22 -05:00
Benjamin Popp
8e03d75f53 version bump 2021-07-21 18:22:53 -05:00
Benjamin Popp
992f39493d add emerald birch bag graphics 2021-07-21 16:26:09 -05:00
Benjamin Popp
2ad6cb1f56 bl instruction needs to be more permissive
allow address to start with 0x
allow address to have 08000000 added to it
2021-07-21 12:52:01 -05:00
Benjamin Popp
e1dbfcffd1 don't crash for exporting footprints when no palette is loaded
footprints don't have palettes, so they have zero palette pages: don't try to set the sprite tool's palette page if there are no valid palettes.
2021-07-21 07:45:15 -05:00
Benjamin Popp
eead7eb8f3 remove debug fail
debug fails capture things that should not happen: this is a thing that happens in the tests (because Gaia)
2021-07-20 23:32:20 -05:00
Benjamin Popp
4fc0933058 bugfix: jump from types to usages 2021-07-20 23:24:45 -05:00
Benjamin Popp
4b390ae581 update pokestats unknown field
includes the pokemon color for the pokedex as well as the no-flip bit for the summary screen
2021-07-20 16:51:29 -05:00
Benjamin Popp
7b815c645f version bump 2021-07-20 16:16:22 -05:00
Benjamin Popp
691871ec42 improve backup naming
make sure we save the metadata after making a backup so that the backup counter increment gets saved.
Turn non-letters into underscores to make it more readable
2021-07-20 16:16:16 -05:00
Benjamin Popp
573b09790e Removed matched words that don't match during load
If the bytes don't match, then the match word format is wrong: clear it.
2021-07-20 16:15:19 -05:00
Benjamin Popp
87999ed53f fix text wrapping 2021-07-20 16:14:05 -05:00
Benjamin Popp
afea210867 UI is trying to update selectedIndex during reset. Don't allow that. 2021-07-13 22:51:54 -05:00
Benjamin Popp
5f9eab3e4f version bump 2021-07-12 21:51:14 -05:00
Benjamin Popp
682c9963aa Inserted change tokens need callbacks
* We were not notifying on data changes from inserted tokens
* We were not raising CanExecuteChange for Undo/Redo/IsSaved from inserted tokens
2021-07-12 21:49:16 -05:00
Benjamin Popp
e6e14ac2f2 Refresh anchor text when calling Refresh 2021-07-12 21:47:44 -05:00
Benjamin Popp
a5d3477b86 add textbox border graphics for emerald 2021-07-12 13:47:29 -05:00
Benjamin Popp
db91f3fd8b version bump 2021-07-10 23:20:15 -05:00
Benjamin Popp
9bf4d2e2f1 imported tilemaps should respect palette page offsets 2021-07-10 22:58:40 -05:00
Benjamin Popp
24adb9b1ad prevent palette indexing bug 2021-07-10 15:59:28 -05:00
Benjamin Popp
bb62a60e33 improve trainer team run copy/paste edge case
cut now works correctly instead of crashing
copy gives a reasonable error
2021-07-10 15:48:00 -05:00
Benjamin Popp
2d0b387b9c move autocomplete content into a popup to solve clipping issues
We want the autocomplete content to hover over the top of the window... so just make it a popup so it can actually do that. This means that vertical scrolling doesn't work as well as it did before. But it is consistent with the swatch popup behavior (see PaletteControl)
2021-07-10 15:24:18 -05:00
Benjamin Popp
84a5aacb7a fix swatch on high DPI monitors
when your monitor is set to 200% DPI, we need to scale the width/height of the captured image to match.

Also add some sanity checks to prevent future crashes for multi-monitor or other weird setups.
2021-07-10 13:41:18 -05:00
Benjamin Popp
b4ec32f033 don't crash when running 'find' with a diff tab open 2021-07-10 00:52:14 -05:00
Benjamin Popp
90ef431ccd don't crash when diffing since last save 2021-07-10 00:47:36 -05:00
Benjamin Popp
01c0ae09bd don't early-exit the thumb-scan routine for the second half of bl commands
I added some early-exit code to help the routine go much faster. But that code misbehaved for the second half of `bl` commands (which are double-wide commands)
2021-07-10 00:28:33 -05:00
Benjamin Popp
12d1d3ce20 model needs to load properties from metadata when available 2021-07-09 22:51:41 -05:00
Benjamin Popp
dc03840993 fix random crash 2021-07-09 22:46:04 -05:00
Benjamin Popp
6669d83e16 copy address from diff tab 2021-07-08 20:04:19 -05:00
Benjamin Popp
b9ace4830c improve developer 'rom overview' tool 2021-07-03 08:20:06 -05:00
Benjamin Popp
e6b63289dc Fix complete-edit-during-scroll behavior
When leaving a cell that's mid-edit, we usually try to complete the edit before clearing it. We now also do that when leaving the cell causes scrolling. This means that a few pieces of code that depended on the cells getting cleared automatically as part of the scroll (for example, extending arrays) needed to be updated so that the clear happens, then the try-complete code runs.
2021-07-02 17:09:48 -05:00
Benjamin Popp
97e1c61fa3 fix broken test 2021-07-02 16:45:20 -05:00
Benjamin Popp
20183c4ef7 version bump 2021-07-02 08:28:52 -05:00
Benjamin Popp
a11334b2b7 add anchor for battle ai commands thumb code 2021-07-02 08:28:12 -05:00
Benjamin Popp
84e0b05132 Move CopyLimit constant to the global toml file 2021-07-01 23:23:01 -05:00
Benjamin Popp
5204dc8ab5 don't open auto-complete until the user types some characters 2021-07-01 23:09:01 -05:00
Benjamin Popp
8a63c7e441 don't crash if right-click on diff tab 2021-07-01 23:02:58 -05:00
Benjamin Popp
a077235133 change assert into a displayed error
this is a thing that users can really hit. It shouldn't pop up a scary error message, but should instead display error text in the table tool.
2021-07-01 22:48:54 -05:00
Benjamin Popp
24ae357a22 Fix Array-with-TableStream-pointer expansion
When expanding and moving an ArrayRun that contains a pointer to table streams, the array needs to move, which means the table stream may temporarily have no pointers to the table. When the table re-adds itself on the other side, it's important that the table stream already know about the format of the parent table. For example, the length token may come from one of the parent element's fields.
2021-07-01 22:21:54 -05:00
Benjamin Popp
d7e6d60d31 adding max diff segments to .toml 2021-07-01 09:32:04 -05:00
Benjamin Popp
abbf6df7cd battle frontier pokemon have evs, not ivs 2021-07-01 09:07:12 -05:00
Benjamin Popp
b60595ddff add lucky egg exp boost 2021-07-01 07:47:51 -05:00
Benjamin Popp
26913ff881 add flash radius 2021-07-01 07:47:34 -05:00
Benjamin Popp
104eb0af4f fix wrapping 2021-07-01 07:47:14 -05:00
Benjamin Popp
aaab1f0713 Fix the level-up move replacement
After move expansion, level-up moves no longer cycle to the most recently 4 learned moves when creating a default pokemon moveset. This change fixes the bug and increases performance of the FindAllCommands helper.
2021-06-30 21:32:29 -05:00
Benjamin Popp
b18122c2a2 Update code-seek routine to find both ldrb and ldrsb commands
In FireRed, `015020` has a `mov` command that needs to be updated whenever we're moving the move priority stat. Update the seek routine to notice this possible code path and update code as needed.
2021-06-27 21:24:07 -05:00
Benjamin Popp
389edf6706 Finish Diff
* if a diff is longer than 4 lines, show the whole block!
* don't allow diffing files of different lengths
2021-06-26 09:33:13 -05:00
Benjamin Popp
af76480fc6 Set a max width for left/right sides 2021-06-25 20:33:49 -05:00
Benjamin Popp
136ec43022 limit the max number of diff sections for performance 2021-06-25 16:58:56 -05:00
Benjamin Popp
b2b110e888 Goto from Diff 2021-06-24 21:20:02 -05:00
Benjamin Popp
00d1b7d2e5 Making a button for finding free space 2021-06-23 20:57:16 -05:00
Benjamin Popp
934eedf085 'match exact case' option for search 2021-06-21 22:31:28 -05:00
Benjamin Popp
a278d91f9f Add 'matchExactCase' parameter for ViewPort.Find 2021-06-21 22:20:12 -05:00
Benjamin Popp
cde4328bc0 "Align Here" should always be shown
This keeps the context menu items a consistent distance from the top, hopefully causing less confusion.
2021-06-21 22:08:35 -05:00
Benjamin Popp
53136ee7ce adding deoxys form stats 2021-06-21 22:03:34 -05:00
Benjamin Popp
1270d68103 Searching for 'é' should work
allow both é and e to find both é and e during search.
2021-06-21 20:30:34 -05:00
Benjamin Popp
c859c2ba76 close color picker popup when window moves 2021-06-19 21:44:02 -05:00
Benjamin Popp
be7c4cc033 TryCopy for TextStreamElements should only work if they're the same type. 2021-06-19 20:44:23 -05:00
Benjamin Popp
b38e0b4ca5 bugfix: Ctrl+F -> 00/FF -> highlight chosen byte
This already worked for most raw values, but didn't work for 00 and FF because of an order-of-operations issue
2021-06-19 20:28:53 -05:00
Benjamin Popp
cce5b69c4b fix stream parsing bug
When parsing single-element streams, skip parsing blank lines. This fixes a bug related to animation scripting: it would decode correctly, but it wouldn't encode correctly.
2021-06-19 20:28:21 -05:00
Benjamin Popp
83db9f766c remove name conflict 2021-06-18 23:56:35 -05:00
Benjamin Popp
a3394df79d Don't make the script-parser read _really slow_ if it's reading a bunch of nops in a row 2021-06-18 23:53:31 -05:00
Benjamin Popp
1665610885 add emerald trainercard sprite data 2021-06-18 23:32:58 -05:00
Benjamin Popp
6d141c9e31 close palette tool when switch application focus
this didn't work right when one of the swatch textboxes had keyboard focus
2021-06-18 22:40:09 -05:00
Benjamin Popp
c9ddab7ae3 Don't crash when copying a bit-field with unknown set bits 2021-06-18 22:24:07 -05:00
Benjamin Popp
c422f8bff2 bugfix: picking a desktop color should change the model 2021-06-18 21:48:45 -05:00
Benjamin Popp
43a7ee2cc0 Make IV_Cap constant to make the code easier to edit 2021-06-18 21:27:57 -05:00
Benjamin Popp
12f67ea439 Improve auto-complete filtering
Filter using special characters like `.'-` for  pokemon, items, and moves
2021-06-11 22:32:10 -05:00
Benjamin Popp
1760804abb Fix autocomplete text control
The Generate method returns a IEnumerable, but we need it to be a list
2021-06-11 22:05:32 -05:00
Benjamin Popp
2c839ee2d3 bugfix: trainer teams should repoint when you change the number of pokemon in the team 2021-06-11 21:25:55 -05:00
Benjamin Popp
53a6ff6f67 Add ability to show overview of a rom (developer mode only) 2021-06-06 14:28:23 -05:00
Benjamin Popp
f61d858d25 Don't crash on saveall / closeall 2021-06-05 22:04:07 -05:00
Benjamin Popp
ef9e6d8842 Add boilerplate to connect view to diff commands in the viewport 2021-06-05 21:53:42 -05:00
Benjamin Popp
6ece8d2725 make it not possible to diff with non-viewport tabs 2021-06-05 20:55:08 -05:00
Benjamin Popp
2a7815c850 Disable DiffLeft / DiffRight for edge tabs 2021-06-05 20:46:52 -05:00
Benjamin Popp
ecc4353de3 implement page up / page down for diff tabs 2021-06-05 20:21:43 -05:00
Benjamin Popp
6dbbf449d1 More tests for diff tab
* Make sure the data in the tabs is aligned. This required changing the implementation to no longer depend on the SearchResultsViewPort, but instead the DiffTab owns the children viewports itself. This lets the DiffTab control the alignment between the parallel children.
* Make sure we can see differences from multiple changes in the tab at the same time.
2021-06-04 21:27:38 -05:00
Benjamin Popp
49de6fbf9f progress with Diff 2021-06-01 20:52:39 -05:00
Benjamin Popp
f3c93c0257 Get the diff tab's name right 2021-06-01 20:24:54 -05:00
Benjamin Popp
bc4333bfc4 decompile swi thumb instructions correctly 2021-06-01 19:48:01 -05:00
Benjamin Popp
6db0cdc7b3 Introducing the Diff tab
The Diff tab is not fully functional yet. But this is a skeleton of the implementation.
2021-05-24 19:56:18 -05:00
Benjamin Popp
af6e30893d Base implementation for diffing 2 tabs 2021-05-23 19:55:05 -05:00
Benjamin Popp
f2bb90efbc improve image error handling
* provide better error messages when import fails
* don't crash when trying to decode an image that doesn't have a width as a multiple of 8
2021-05-22 21:15:57 -05:00
Benjamin Popp
96abea91a1 allow horizontal scrollbar manual interaction after animation 2021-05-20 19:59:28 -05:00
Benjamin Popp
9ceb1f1b0b Don't blap enhanced levelup format during version upgrade 2021-05-16 22:19:38 -05:00
Benjamin Popp
7ec6f132f9 fix trainertower table
include pokemon for each trainer based on info from Tarma
2021-05-15 22:09:45 -05:00
Benjamin Popp
fb3d36e052 Modify the goto logic for search results so that we scroll the correct amount 2021-05-15 21:28:04 -05:00
Benjamin Popp
cf26c6ba9f Add label for the buttons on the home screen 2021-05-15 21:16:58 -05:00
Benjamin Popp
c40053db3e Change the text of the calculated elements to make it more clear 2021-05-15 21:10:39 -05:00
Benjamin Popp
67e5c15dd0 Add animation for horizontal scrolling 2021-05-15 21:08:21 -05:00
Benjamin Popp
4733934ad8 During single-table-mode, only allow selecting within the table 2021-05-15 20:49:46 -05:00
Benjamin Popp
a0055a57af Add menu icons for Find/Goto 2021-05-15 20:26:55 -05:00
Benjamin Popp
28efdbd62e Remove Blue outline from Help Menu
Didn't provide the user value I wanted
2021-05-15 20:24:50 -05:00
Benjamin Popp
db32ff52bc Version Bump 2021-05-15 20:22:50 -05:00
Benjamin Popp
e5c4c0046e Update Start Screen for 0.4.2 2021-05-15 20:21:49 -05:00
Benjamin Popp
d245bffaff add hpbox.player for emerald 2021-05-14 13:02:32 -05:00
Benjamin Popp
f7dcc6fdb5 Fix crash
Happens when trying to save a new document during close
2021-05-14 13:02:14 -05:00
Benjamin Popp
5d3fdfdab3 Add keyboard shortcuts for Display As options 2021-05-09 22:24:06 -05:00
Benjamin Popp
08472cb0a0 Fix ugly code
The existing implementation for the selected table item was terrible. Replace it with one that's easier to understand by making the View and ViewModel interact with the new object in unique ways, making it possible for the object to know in which direction to notify.
2021-05-08 22:37:36 -05:00
Benjamin Popp
9df22c432f Make the index combobox change selection correctly on enter 2021-05-06 16:36:08 -05:00
Benjamin Popp
24bc12570e Update ComboBoxArrayElementViewModel with filter capabilities
Filtering comboboxes is hard. We want the elements to filter based on the typed text, but we want the filter to clear automatically when the user selects an element, but not when the selection changes automatically due to the options changing.
2021-05-05 22:45:02 -05:00
Benjamin Popp
9e447fbe84 Make TableToolItemSelector work when items have no names 2021-05-03 22:03:11 -05:00
Benjamin Popp
5e1979db52 First pass at making a combobox for selecting elements in the table tool 2021-05-03 21:59:08 -05:00
Benjamin Popp
4d950d2916 Add support for signed fields
Most numbers are unsigned by default. But if a signed value is desired, you can use |z. Used in the pokedex stats.
2021-05-03 16:58:01 -05:00
Benjamin Popp
5e443248f0 Fix crash
Don't crash if trying to get the calculated value from a null pointer
2021-05-03 16:57:20 -05:00
Benjamin Popp
99758135a0 Fix post-append selection bug
When updating selection after an append, first do a goto to get the data into the same location on screen.
2021-05-03 16:26:26 -05:00
Benjamin Popp
a6ad0cc318 Home icon on goto screen
The goto screen is represented by a home button on the toolbar. Add the home icon to the goto screen itself to strengthen the connection for users.
2021-05-03 16:25:34 -05:00
Benjamin Popp
d85464a7b3 Scrolled selection bugfix
When clicking on the header of a row, select exactly that row, even if the view is scrolled a bit to the right.
2021-05-03 16:24:56 -05:00
Benjamin Popp
7de69da17c Repoint All -> Performance fix
Include a loading bar for repoint all. Don't call Refresh() until we're done with the whole process.
2021-05-03 16:24:06 -05:00
Benjamin Popp
0317d0128d Updates from Kbueno 2021-05-03 07:10:08 -05:00
Benjamin Popp
09a03cd952 Don't crash if an enum option is null 2021-05-02 23:13:36 -05:00
Benjamin Popp
45b66ce489 fix typo 2021-05-02 21:43:58 -05:00
Benjamin Popp
3ed6d9f9c7 Don't crash when writing a ! end token into the anchor editor 2021-05-02 21:43:47 -05:00
Benjamin Popp
01d401193d Don't crash when a tilemap has nothing pointing to it 2021-05-02 21:22:12 -05:00
Benjamin Popp
15670018ab move backgrounds should use palette 2 2021-05-02 21:21:47 -05:00
Benjamin Popp
ea0a874f80 Make the newgame pc item table expandable 2021-05-01 23:10:48 -05:00
Benjamin Popp
8615037f92 Name the bag pockets 2021-05-01 23:10:32 -05:00
Benjamin Popp
79120cbe9a Track both view start and selection start during back/forward movement
If the selection is on screen, restore both the scroll and the selection.
If the selection is not onscreen, restore the scroll but not the selection.
2021-05-01 22:17:14 -05:00
Benjamin Popp
3ef31914a9 Fix selection confusion when expanding/repointing tables 2021-05-01 20:57:12 -05:00
Benjamin Popp
e0b0233e8c Add new util method: ToolTray.SelectedTool.set 2021-05-01 20:55:44 -05:00
Benjamin Popp
5a3fd39488 Version Bump 2021-05-01 20:31:24 -05:00
Benjamin Popp
313919ef98 Improve toml upgrade
* Don't load an offset pointers from metadata if an existing offset pointer already exists at the same address. This means that incoming offsets will not blap over existing offsets, which matters for things like roms with move expansion that change the offset relationships.
* Include code to handle special cases of formats that should not be overwritten. The only existing example is that runs with 2-byte effects and 1-byte pp should not be overwritten, because this format can only currently be created by the move expansion utility.
2021-05-01 20:29:15 -05:00
Benjamin Popp
c5ef5658f6 Allow calculated segments to be serialized 2021-05-01 20:26:39 -05:00
Benjamin Popp
e354ba2fc7 Only use the pixelCount if it's valid
This fixes a crash in Unbound
2021-05-01 19:47:54 -05:00
Benjamin Popp
0f89168e99 Add table for overworld text color
overworld expansion utility may transform this table to make it easier to edit, since it's only read by a single piece of code.
2021-04-29 21:35:04 -05:00
Benjamin Popp
c68f8019b5 Add support for BPRF0 (by Kbueno) 2021-04-29 21:28:26 -05:00
Benjamin Popp
e378359163 Cleanup 2021-04-29 14:08:07 -05:00
Benjamin Popp
d15f313903 LevelUpMoveSorter: cleanup and documentation 2021-04-29 12:38:22 -05:00
Benjamin Popp
7552eb6cd3 Add support for credits pokemon
Note that these use the same palettes as the source pokemon
2021-04-28 22:35:22 -05:00
Benjamin Popp
a08b17ebab Require that level-move pairs be 2 bytes in order to use the move expansion util 2021-04-28 21:56:15 -05:00
Benjamin Popp
1e3a8f37fb Add move backgrounds for FR/LG
Not all of them are the same size. Needed to add custom anchors for the ones that are a weird size. Had to relax the format checking to allow tilemaps to not be red pointers even if the height is wrong.
2021-04-28 21:52:24 -05:00
Benjamin Popp
6bacb02c85 Update the CanRun method for move expansion 2021-04-28 21:09:19 -05:00
Benjamin Popp
0995bb9068 Fixing script parsing bugs
* Don't crash if a line contains nothing but whitespace
* Decode variable-arg commands correctly
* Decode animation scripts as animation scripts
2021-04-28 20:53:13 -05:00
Benjamin Popp
3bec8d9a5f Update Headers after table text change 2021-04-22 21:05:33 -05:00
Benjamin Popp
93f492e387 Add Steven's multi-battle team for Emerald 2021-04-22 21:04:41 -05:00
Benjamin Popp
370b27eb0c In Single Table Mode, don't let the user select before the start 2021-04-22 21:04:22 -05:00
Benjamin Popp
e927bd5c1c Improve table filter 2021-04-21 22:07:37 -05:00
Benjamin Popp
3392b96b6a Refresh CalculatedValue when copying a CalculatedSegment ViewModel. 2021-04-21 21:58:21 -05:00
Benjamin Popp
813002a3ff Don't show headers for zero-width table segments 2021-04-21 21:55:15 -05:00
Benjamin Popp
022bdf9e61 Fix Effect width in move expansion util 2021-04-21 21:41:09 -05:00
Benjamin Popp
140bf6d591 fix hot load
When doing a hot-reload after a file is changed by another program, clear _all_ the metadata before reloading.
2021-04-21 21:38:38 -05:00
Benjamin Popp
ff869c8584 Fix crash
When grabbing a source, make sure the source is actually in the array
2021-04-21 21:38:04 -05:00
Benjamin Popp
1aaea0fe07 add comments 2021-04-20 21:35:30 -05:00
Benjamin Popp
6e7daf5fdb First pass on making move names 16 characters instead of 12 characters
Mostly works. But the summary screen (and maybe other places) ends up showing the names offset in a strange way.
2021-04-19 10:54:37 -05:00
Benjamin Popp
19b943d25b Allow for expanding move effects
* Expanding an array based on a list now expands that list
* If exactly one table is the same length as a list, enums using that list can jump to that table as the source of the enum.
2021-04-18 21:46:03 -05:00
Benjamin Popp
f058b79992 Make the model change when a token contains a list change 2021-04-18 13:20:59 -05:00
Benjamin Popp
831c544357 Start work to make list-arrays extendable 2021-04-18 01:12:12 -05:00
Benjamin Popp
02e5e69a37 Screen Grab improvements
* Don't forget to cancel screen grab mode after the screen grab is complete. Likewise, close the popup if it was previously open.
* Include a button to initiate a screen-grab from within the color editor, since the right-click menu item is hard to discover.
2021-04-17 22:48:35 -05:00
Benjamin Popp
091ee60237 Fix crash
When cutting tileset data, it can crash if you try to render the tilemap
2021-04-17 21:56:35 -05:00
Benjamin Popp
9feb55ad9e Defensive code to prevent a crash
if the code contains multiple labels in a row (which is legal, but weird), the old version of this method would crash.
2021-04-17 21:41:23 -05:00
Benjamin Popp
2a5842d0fe When expanding a table, update the scroll 2021-04-17 21:33:39 -05:00
Benjamin Popp
91d16191de Fix bug with single-table-mode scrolling
Do allow scrolling up to a partially full line.
Don't show data from before the table.
2021-04-17 21:02:37 -05:00
Benjamin Popp
da9ef18c0d trainer data readability improvement
Include IVs= when serializing
Parse correctly if IVs= is included
2021-04-16 22:16:44 -05:00
Benjamin Popp
5234671d36 New utility methods for writing values from tables 2021-04-16 22:15:38 -05:00
Benjamin Popp
f9d651feda Improve filtering for calculated fields and for bit lists 2021-04-16 21:31:18 -05:00
Benjamin Popp
6aac16a1e6 Add UI for calculated fields and support more than 2 operands
There's a multiply by 4 factor that I need to include as well. The UI is basic but functional.
Change the table reference to include the catch-all element as an actual element, so that you can easily change the catch-all money rate
2021-04-16 21:26:35 -05:00
Benjamin Popp
8449082a73 UI Bug fix: no headers for out-of-range data 2021-04-16 16:46:42 -05:00
Benjamin Popp
c460dd3523 UI Improvement: jump buttons for pointers 2021-04-16 16:45:50 -05:00
Benjamin Popp
7bf6d43cd5 Add first pass for CalculatedElementViewModel
The ViewModel is supposed to show up in the table tool. So it has to share:
* The calculated value
* a jumping point to get to the operands
* the operator
* a bool to describe whether or not we need the operator and second operand
2021-04-16 16:45:38 -05:00
Benjamin Popp
a1dcba7cac code cleanup 2021-04-15 23:07:02 -05:00
Benjamin Popp
c23d4546b5 Add support for value-from-matched-table and value-from-pointer-table 2021-04-15 23:01:00 -05:00
Benjamin Popp
5f10116a83 Initial pass for Calculated Segments
ArrayRunCalculatedSegment has no width, but provides a calculated value as part of the table. The current implementation only includes the most basic case: a value is calculated as a binary operation of two other values within the same element of the table.
2021-04-15 21:51:45 -05:00
Benjamin Popp
764b25df64 Fix broken test
If the pokemon stat table isn't found, return 0 for the default item
2021-04-15 21:49:44 -05:00
Benjamin Popp
d00e034e78 Add commands for setting default moves / items for trainer pokemon 2021-04-15 19:39:04 -05:00
Benjamin Popp
185b86be64 add gender field to trainers 2021-04-15 19:38:09 -05:00
Benjamin Popp
2f2711d4b6 code cleanup 2021-04-15 19:37:48 -05:00
Benjamin Popp
31b75b2fbe Table Filter improvements for tuples 2021-04-15 19:37:13 -05:00
Benjamin Popp
a0864adb72 improve goto anchor parsing 2021-04-14 22:39:31 -05:00
Benjamin Popp
b147ebb9c6 Fix occasional crash 2021-04-14 22:39:10 -05:00
Benjamin Popp
c040b25465 Change examples from within (?) icon to on-by-default
Users didn't see the examples before. Make them more visible and make them clickable.
2021-04-14 22:38:57 -05:00
Benjamin Popp
8b1d46592b Improve table stream search results
If a search result is in a table stream,
* Show the entire stream as a single line,
* Highlight the bytes that the user cares about,
* Show only that line to show only that stream
2021-04-14 20:48:34 -05:00
Benjamin Popp
5fe5ed40c7 code cleanup 2021-04-14 20:36:36 -05:00
Benjamin Popp
5c76f35bb7 Provide custom headers for anchors that are pointed to by named tables 2021-04-14 20:36:24 -05:00
Benjamin Popp
2cf2dc4ce0 Fix broken tests
Don't fail if the tab changes and there's no listeners for the new utility
2021-04-14 20:35:05 -05:00
Benjamin Popp
9ae317087d Add a filter field to the table tool
The filter can allow for collapsing fields in the following cases:
* Show a field if the filter matches the table name
* Show a field if the filter matches the field name
* Hide the field if the table is collapsed by the user or if the filter isn't empty and doesn't match the field/table
* Hide the table if the filter is non-empty and doesn't match any field within the table or the table itself.
2021-04-14 17:15:06 -05:00
Benjamin Popp
9b36726965 Fix scrolling issue with table-scroll mode
Allow SetTableMode(..., 0) to work even with !allowTableMode
Whenever AllowSingleTableMode changes, refresh the viewport to match
2021-04-13 21:15:20 -05:00
Benjamin Popp
4c22b70c6c Add Move Relearner Testing scirpt
This isn't a script meant to be shared. But it's useful for testing, so I'm including it as a resource. All it does is mess with the moveset of Bulbasaur/Torchic slightly and make the fat guy in the starting town into a free move relearner. This allows for easy testing of the level-up move code
2021-04-13 20:09:13 -05:00
Benjamin Popp
0f73bb462b Add Emerald-only routines to level-up-move code change
Also fix a bug: `ldr ... sp` must use a multiple of 4
2021-04-13 20:07:58 -05:00
Benjamin Popp
2bd0285ad0 Fix gamecorner score palette pages 2021-04-12 22:12:52 -05:00
Benjamin Popp
3e43377592 Clean Up Move Sorter
Still need to make a Wiki for it
2021-04-12 22:12:38 -05:00