Commit Graph

259 Commits

Author SHA1 Message Date
Benjamin Popp
cf828d06f1 slight refactoring to prep for more array / pointer stuff. Added some insertion points as TODOs 2019-02-12 21:04:11 -06:00
Benjamin Popp
34fd89c243 forgot to make an exception for null 2019-02-10 21:59:43 -06:00
Benjamin Popp
426c7ff362 arrays now support pointers 2019-02-10 21:34:58 -06:00
Benjamin Popp
147115bc10 code readability updates 2019-02-10 21:32:17 -06:00
Benjamin Popp
55f18002b7 support for doing Goto while in data using the @ symbol
this is useful because now users can paste an address and data
directly into the editor and have stuff automatically work.

For example:

`@123ABC <pokenames>`

You could paste that anywhere in the data, and the pointer pokenames
would get written at 123ABC.

You can combine multiple changes together in this way. Basically,
this turns HMA into a capable lightweight patching tool.
2019-02-10 11:10:29 -06:00
Benjamin Popp
c0f4456ea9 Merge branch 'master' into dev 2019-02-09 21:28:55 -06:00
Benjamin Popp
8b24af07ff rename paste to paste / replace, since it does an overwrite
fix a crash when using goto from the search results tab
fix goto not working on a tab if you get to that tab by closing the selected tab
2019-02-09 21:25:18 -06:00
Benjamin Popp
fe4f3feb2d make the anchor editor a bit more clear instead of just being a random text box 2019-02-09 21:12:35 -06:00
Benjamin Popp
3822b8b543 search results select the full length of the search string
instead of just the first byte

when following a search result, move selection to the result
2019-02-09 20:51:36 -06:00
Benjamin Popp
bb00a22fc5 - refactor ViewPort constructor to not need to take in the data array twice
- when searching for text, check if the found results are anchors
- when adding a text anchor with no name, search for pointers before rejecting it
2019-02-09 12:29:47 -06:00
Benjamin Popp
b05d7d0a5f right-clicking non-selected data should select that data
format clearing right-click option should be based on what's selected, not just what is clicked
2019-02-07 21:09:37 -06:00
Benjamin Popp
45ed0ae4f7 bumping version so I don't forget to later 2019-02-06 21:50:19 -06:00
haven1433
e929498fb0 Merge pull request #20 from haven1433/dev
Support for integers in arrays
2019-02-06 21:42:33 -06:00
Benjamin Popp
d23e77bd32 adjust the algorithm for goto-address to try to keep everything
aligned with hex 0 at the left edge (user request)

This changes automatically when you jump to an array
2019-02-06 21:41:47 -06:00
Benjamin Popp
3d8f9cd1cc right click -> escape, should close context menu 2019-02-06 21:27:32 -06:00
Benjamin Popp
e549699340 usability update: default to 16 bytes as the preferred width
the preferred width will sitll automatically change when you goto arrays
2019-02-06 21:17:04 -06:00
Benjamin Popp
4529c35551 skipping test, since now I know I won't be working on this feature next. 2019-02-05 21:11:45 -06:00
Benjamin Popp
725e5549f6 Merge branch 'dev' into haven1433-dev 2019-02-05 21:05:46 -06:00
haven1433
a3014d552d Change name in readme 2019-02-05 21:01:53 -06:00
haven1433
40d722d762 Merge pull request #19 from haven1433/dev
Usability Improvements
2019-02-05 21:01:08 -06:00
Benjamin Popp
0c8633da52 rename folders / files / projects from Gen3Hex to HexManiac 2019-02-05 20:58:49 -06:00
Benjamin Popp
4c11b5af9c fix a bug where the "next run" was the current run whenever the current run had a length of 0 2019-02-04 22:09:34 -06:00
Benjamin Popp
4a38ad6fbe performance fix: only seak pointers if we haven't seeked before
(usually this means that you should only seak if it's a new anchor)
2019-02-03 22:38:14 -06:00
Benjamin Popp
932fd7a59e make the integer format look a bit better 2019-02-03 22:10:39 -06:00
Benjamin Popp
dad8a17fe3 support for editing ints 2019-02-03 21:51:35 -06:00
Benjamin Popp
96934c24b6 Merge branch 'dev' into haven1433-dev 2019-02-02 20:13:08 -06:00
Benjamin Popp
9eb4102849 add new test to remind me what I need to work on next 2019-02-02 20:13:01 -06:00
Benjamin Popp
cf6c409cee first step for implementing integers in arrays
Can now add arrays with integers of length 1, 2, 3, or 4 bytes.

Can't edit yet, and don't have array-length-matching support yet
2019-02-02 20:06:25 -06:00
Benjamin Popp
33a784ba00 fixing edge cases 2019-02-01 23:39:06 -06:00
haven1433
c031b15554 Merge pull request #18 from haven1433/dev
Arrays and Usability Improvements
2019-02-01 23:35:05 -06:00
Benjamin Popp
44aca3cbd5 - error when there are too many search results to display
- add basic help information on the start screen so it doesn't look so empty
2019-02-01 23:33:54 -06:00
Benjamin Popp
1bce1c8887 don't hang when goto asks to go outside the size of the data 2019-01-31 20:27:56 -06:00
Benjamin Popp
bc62a3bb7e add a "clear format" right-click option
when adding an anchor, search for pointers to that spot
2019-01-31 20:15:09 -06:00
Benjamin Popp
75a65ce502 something is only a pointer if it points to useful data, no 0xFF 2019-01-31 06:33:53 -06:00
Benjamin Popp
88fc89378c performance fix: pointers should only draw via the clipping method if the
pointer's position is GREATER than the X position, meaning that part of
the pointer is clipped
2019-01-31 06:33:30 -06:00
Benjamin Popp
ae7798115c changing external name to "Hex Maniac Advance"
updating icons to match
2019-01-30 21:44:10 -06:00
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