Commit Graph

3373 Commits

Author SHA1 Message Date
Benjamin Popp
e36d8dcfbf add ascii runs for header decoding 2019-01-30 21:22:02 -06:00
Benjamin Popp
adaebe39af pre-review refactoring
also updated tests project based on type renaming (and thus Stub renaming)
2019-01-29 20:07:40 -06:00
Benjamin Popp
e9d91a7fbb performance improvement: only clip when you absolutely have to
bugfix: typing < or ^ followed by cursor movement should redraw everything
2019-01-28 20:19:00 -06:00
Benjamin Popp
923330d1c7 refactor: moving types around and renaming things 2019-01-28 07:33:43 -06:00
Benjamin Popp
efb226e4c2 fix clipping issues: allow two-line pointers to appear correctly on two lines 2019-01-27 21:56:59 -06:00
Benjamin Popp
47488f9953 - make it possible to surface the preferredWidth
it may be useful later in the UI to be able to change it manually

- add a matrix that can be turned on/off
2019-01-27 16:46:25 -06:00
Benjamin Popp
addd5b9aab bugfix: appending to an array should modify the array format length 2019-01-27 16:00:29 -06:00
Benjamin Popp
10a9ad9f4d add a test showing that the app will error if you try to paste an array
that will blap another anchor
modify behavior to _not_ auto-fill anchor info after typing ^
(I thought that auto-fill was desirable, but it messes with paste)
This is less of a problem now that there's a dedicated anchor editor.
2019-01-27 15:48:11 -06:00
Benjamin Popp
db0ce4bda1 add a test showing it's possbile to cut/paste arrays 2019-01-27 15:34:35 -06:00
Benjamin Popp
41df0a5eb2 mass paste was slow. Performance updates to make it faster.
- SilentScroll should return whether or not a scroll was needed.
  This lets us be smarter about when we really need a refresh.
- create a lightweight version of RefreshBackingData that only refreshes
  a single square. Use the new version on pcs character complete.
- for mass edits, defer tool content updates until the end of the edit.
- update tools after an anchor edit (fixes a crash)
- use stringbuilders instead of string concatanation in critical paths
- when converting bytes to a PCSString, cache off the currentByte
  instead of asking for it multiple times
- PCSRuns did string caching so that the full string given to a HexElement
  only had to be calculated once each refresh. Now arrays cache too.

related changes:
- fixed a crash when pasting an array into a location where it would
  conflict with an existing run
- pasting large arrays no longer randomly inserts blank elements
  (no whitespace after pasted strings)
- you can middle-click to clear an error
2019-01-27 11:50:59 -06:00
Benjamin Popp
b5e73897e5 Text Tool now works for arrays 2019-01-26 16:40:04 -06:00
Benjamin Popp
da7ad3cd8d bumping version for the next release, so I don't forget to later. 2019-01-26 10:24:10 -06:00
Benjamin Popp
b6b6f93955 when you search for an array, make it remember the length that it found 2019-01-26 08:41:53 -06:00
Benjamin Popp
f378d1eeac fix a test: if an anchor is being added with no format, then don't clear
whatever format is already active there.
2019-01-26 08:36:43 -06:00
Benjamin Popp
21365e1fbf add a close button to the tab header 2019-01-26 00:20:59 -06:00
Benjamin Popp
7c9d5db90f version bump 2019-01-26 00:15:05 -06:00
Benjamin Popp
5b14925565 improve auto-searching 2019-01-26 00:14:18 -06:00
Benjamin Popp
0b5277a3fe bug fix: goto should work for tabs after switching tabs 2019-01-25 23:07:38 -06:00
Benjamin Popp
5b7304518b allow pointers to end in 0x09 if the file is long enough
exclude the GBA header from the search for anchors
2019-01-25 22:47:13 -06:00
Benjamin Popp
2db1696f20 typing <> on data should try to convert it to a pointer
creating a pointer to outside the data range should fail
2019-01-25 22:35:38 -06:00
Benjamin Popp
29bff692bc make undo not jump to the beginning so much 2019-01-25 22:23:41 -06:00
Benjamin Popp
40b9abc11b make 00 not italic, just FF 2019-01-25 22:08:54 -06:00
Benjamin Popp
a48e5a0aa7 string -> text
more user friendly
2019-01-25 22:05:34 -06:00
Benjamin Popp
10d58f9b90 typing a pointer over a pointer should auto-align to the start of the pointer 2019-01-25 22:01:30 -06:00
Benjamin Popp
7fd8780e9f bug: moving selection to goto only happened if you press Ctrl+G
while the Goto tool is closed.
fix it so that pressing Ctrl+G *always* moves the focus

fixed it for Find as well.
2019-01-25 21:50:16 -06:00
Benjamin Popp
0ef26a9af4 clearing the address on the string tool should not crash. Generally make the no-valid-string-in-tool experience better. 2019-01-25 21:33:40 -06:00
Benjamin Popp
38e284170c default to only showing .gba files 2019-01-25 21:12:49 -06:00
Benjamin Popp
048cceb0d7 opening a .sav file should not crash 2019-01-25 20:59:07 -06:00
Benjamin Popp
b2335968dc make the auto-width a bit more intuitive 2019-01-25 20:52:16 -06:00
Benjamin Popp
1dd640ac25 fixing data corruption issue
splitting the model to have 'ClearFormat' and 'ClearFormatAndData'
so I can decide in each case which one I want to do.
2019-01-25 20:41:50 -06:00
Benjamin Popp
8f95a59805 changing version information for the first public prerelease 2019-01-25 08:14:19 -06:00
Benjamin Popp
dd22595afa - "delete" with a bunch of bytes highlighted should clear them to FF 2019-01-23 22:27:21 -06:00
Benjamin Popp
1e59fcd4d3 fixed a bug where pasting an array could accidentally switch formats if a string was too long
fixed a bug where string arrays were cropping the first character of the strings
2019-01-23 22:18:19 -06:00
Benjamin Popp
a97ac3f510 make it possible to extend arrays in the data
fix a bug where typing " to end a string in an array wouldn't append the 0xFF end byte
tools for string arrays are not fully implemented yet, but at least it doesn't crash now
make the string tool add a scrollbar when it gets really tall instead of growing past the bottom edge of the screen
make it possible to copy/paste an array
make it possible to edit arrays in the data
2019-01-23 21:00:21 -06:00
Benjamin Popp
67dcee0d14 test that up/down commands work correctly for the goto viewmodel
note that this involved updating to a newer version of AutoImplement,
  which contained a bugfix that allows for testing of the IModel interface.
2019-01-21 21:40:44 -06:00
Benjamin Popp
c4c46063c7 goto / follow pointer, when going to the exact address of an array,
restricts the width of the data to be a multiple (or divisor) of
the array's element width. This makes things look much nicer.
2019-01-20 22:46:54 -06:00
Benjamin Popp
c0040e7932 add autocomplete menu for goto based on known anchor names
- there are enough properties / commands needed for goto now that it deserves its own viewmodel.
2019-01-20 20:09:28 -06:00
Benjamin Popp
e049979fbc support for searching datasets for known data formats
it is now possible to specify an array based on a format and no length,
and the app will look for that data based on known pointers.
It will automatically match the longest values, and the results will
be stored in the metadata file. Therefor, this search will only occur
when loading a file that has no associated metadata.

This searching functionality is exposed in a new model subclass, so that the
tests won't be effected. However, the functionality exists in the general model,
so it's still possible to write specific tests based on bugs found.

Since an array can call something a string when it's not, added a new "ErrorPCS"
implementation of IDataFormat, to display the raw byte in red. This will help
find string errors and possibly missing string characters.
2019-01-20 10:58:03 -06:00
Benjamin Popp
520b8d78b2 support for dynamic array length
when writing a string, I do need to know that it has an end byte (0xFF)
adjusted usages to handle the change in API.
2019-01-19 15:16:38 -06:00
Benjamin Popp
039cb68b84 whenever the string tool's content textbox updates its cursor position,
update the viewport selection to match.
2019-01-18 22:39:31 -06:00
Benjamin Popp
ca48afa272 - string tool address & content should update when changes are made in the primary view. 2019-01-18 07:09:16 -06:00
Benjamin Popp
e22293ce56 if there is not enough room in the dataset for a data move, expand the dataset. 2019-01-18 06:38:25 -06:00
Benjamin Popp
0b6a7410b0 adjusting the free-space-finder algorithm based on real-data feedback. 2019-01-17 21:53:18 -06:00
Benjamin Popp
48606e2e21 - add a 1 pixel border above the main tab content that's a different color.
This visual cue helps the user see the top data border when there's no anchor text box.
- add a message display to the error display / goto box / find box area.
- animate errors and messages to help draw the user attention to them.
- pressing escape should clear the context control
2019-01-17 21:35:18 -06:00
Benjamin Popp
0129f2dd4e - add support for finding pointers if the search term is just 3 bytes
- refactor find method, it was too long
2019-01-17 20:44:28 -06:00
Benjamin Popp
40f6bd098b make anchor thick only on mouse-over. This little bit of interaction on hover may promote understanding that the anchor can be interacted with somehow. 2019-01-16 22:47:11 -06:00
Benjamin Popp
a9c5620fc3 adding a border to the selection to make it more visible 2019-01-16 22:28:19 -06:00
Benjamin Popp
fd1cd72c2b - allow header mouse events to trigger events on the content
- double-clicking a search (or search header) should open that search in the main view
2019-01-16 22:20:12 -06:00
Benjamin Popp
80f1576607 fixing a crash (thanks Daniel!)
- when using the Delete key to clear data, clear the format as well as the data.
2019-01-16 22:08:20 -06:00
Benjamin Popp
7c66b30f1b bugfix: change the color of the None Format when the Theme changes. 2019-01-16 20:16:44 -06:00