3412 Commits

Author SHA1 Message Date
haven1433
73996f3c44 don't clear bytes, clear anchors
If you have a custom anchor name in the middle of a script and then edit the script, that custom anchor name will be lost. But anything pointing to it will still point to it.
2023-03-10 21:33:59 -06:00
haven1433
7acb347757 improve interruptingSourceRun logic
an interrupting table is not always valid.
It's only valid if the source is at an index that would make it a pointer.
2023-03-10 20:47:35 -06:00
haven1433
b70d45546f improve handling of auto
allow <auto> to be used if there's a one-byte gap
2023-03-10 18:25:38 -06:00
haven1433
e76a91008b Improve pointer error logic
Pointers are allowed to point into the middle of an existing run. Such a pointer is an error, but is not a metadata inconsistency. Update metadata checking for new logic. Update pointer logic to display pointer as an error.
2023-03-10 00:27:40 -06:00
haven1433
be130ed088 fix trainer duplication assert
fix test name / remove unneeded comments
handle Trainer team runs specially
update assertion error message
2023-03-10 00:04:23 -06:00
haven1433
646985c950 Fix test
ExportTilesetWithPalette2_EditTileset_ImportTilesetWithPalette2_DataMatches
-> fix formatting in LzSpriteRun
-> fix overflow error in SpriteRun
-> fix default palette detection in SpriteTool
-> improve test so it gives better failure info
2023-03-09 23:49:21 -06:00
haven1433
efc4fb5608 Merge branch 'trainer-duplicate-bug' into dev1 2023-03-09 22:59:25 -06:00
haven1433
9ba33d6c17 Merge branch 'trainer-duplicate-bug' into dev1 2023-03-09 22:51:45 -06:00
haven1433
231ae769ef Grab failing trainer test from remote branch (#121)
* Updated flash constants

* Fixed flash constant locations

I originally supplied anchor references, not locations of the constants themselves. That's been fixed. Also, I changed the field name for flash.radius, so it's hopefully clearer.

* Fixed some other pointer issues with RAM addresses in script commands

RAM addresses can't be encased in <> nicely. Some commands still needed their RAM-address pointers to have the ::|h formatting instead.

* Fixing some parameter formats in the script reference file.

There were a few other commands that needed RAM-address parameters set to their correct format so that typing "2024284" doesn't auto format to 0xA024284, etc.

* update script reference (again)

* Added a failing test for duplicating trainer data

Bug report in query: https://discord.com/channels/538022037718040588/538022038376415234/1083215729177931877

---------

Co-authored-by: ShinyTillDawn <80070404+ShinyTillDawn@users.noreply.github.com>
2023-03-09 22:50:25 -06:00
haven1433
1aef148715 submit failing tests 2023-03-09 22:09:27 -06:00
ShinyTillDawn
543a57ec25 Updated more scriptReference.txt parameters (#120)
I primarily focused on D2 setcatchlocation so that its location parameter allowed the user to type in map names. I found more commands that needed similar treatments.
2023-03-09 21:57:52 -06:00
haven1433
543a877421 increase method visibility for testing image import/export 2023-03-09 21:52:55 -06:00
haven1433
cb08efbe21 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-09 20:43:44 -06:00
haven1433
48e593bb4b add cool copyright screen
thanks to Yogia16 for making it and sharing it
2023-03-09 20:43:18 -06:00
haven1433
5284b28bb8 update .gitignore
started working on a utility to make doing releases easier. I don't want to submit it until I test it once, so I'm ignoring it for now.
2023-03-08 23:01:00 -06:00
haven1433
ae386d511f fix failing tests
several tests expect AllowMultipleElementsPerLine = true
2023-03-08 22:58:29 -06:00
ShinyTillDawn
c36d89e0f2 Updated the move field for 2 commands (#118)
You can use move names for the move field in both 'bufferattack' and 'checkattack' now.
2023-03-08 22:33:02 -06:00
haven1433
fb82755dec clear format for pointers within tables when adding tables 2023-03-08 22:30:41 -06:00
ShinyTillDawn
5f218145ac Disable the "Auto-Adjust Width" setting by default. (#117)
* Disable the "Auto-Adjust Width" setting by default

* Correctly inverted the metadata checking logic
2023-03-08 18:39:16 -06:00
haven1433
48659473c7 add paranoid check 2023-03-07 23:10:09 -06:00
haven1433
4c653c8aa6 fix namespace typo 2023-03-07 20:29:55 -06:00
haven1433
1409f0df0a don't crash if trying to grab an index from outside the data for the current viewport 2023-03-07 20:28:57 -06:00
haven1433
97b3045c77 don't build a blockmap sprite if the run has no pointer sources 2023-03-07 20:28:13 -06:00
haven1433
a310bd005b allow emerald in integration tests 2023-03-07 20:01:33 -06:00
haven1433
1c4f842dbf Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-07 19:54:07 -06:00
haven1433
e3687e92a5 allow import/edit of tilemaps that use sprites as tilesets 2023-03-07 19:53:57 -06:00
haven1433
ed3203170a update CalculatedElementViewModel.Name during copy
allows the value to update live
2023-03-07 19:53:28 -06:00
haven1433
178076b700 update patch options in tab context menu when swapping tabs 2023-03-07 19:52:55 -06:00
ShinyTillDawn
dd8d74a015 Changing the Default Moves & Default Items buttons' hover texts. (#116)
* Fixed a bug with the hover text of the default items and default moves buttons

There has to be a better way than what I proposed to fix the error.

* Fixed a build error that I overlooked.

I can't use <LineBreak /> in a Text="" field. I had to use a workaround.

* Fixed incorrect white spaces.

(I think)

* Corrected the Default Items description
2023-03-07 17:27:30 -06:00
ShinyTillDawn
2b4866b9f5 Another scriptReference edit (#114)
* Another scriptReference edit

Updated some incorrect/missing commands in script reference, adjusted the Address width, and implemented the directions macro for the spriteface command.

* Marked lines 270 and 273 as [BPEE].
2023-03-07 16:08:36 -06:00
haven1433
420f0dd1f9 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-07 08:42:13 -06:00
haven1433
983cfd1ded improve diff performance
* don't adjust height for every ChildViewPort for the diff, only the first one. We don't need all the heights to be right, we just need the extra children for their selections
* defer header loading until all the children have been added
* use address goto for ChildViewPort instead of text goto, since we know we're going to an address we can skip anchor name checks.
* When creating a ViewPort, if the model is already fully initialized, go ahead and complete setup (RefreshBackingData, optional map editor creation) right away and skip the ValidateMatchedWords() check. This significantly decreases thread allocation when making many child viewports.
2023-03-07 08:42:04 -06:00
haven1433
89864a1fa4 fix broken upgrade test
legitimate name change
2023-03-07 07:29:55 -06:00
haven1433
4959d8f8ca don't auto-format script pointers in edge cases
* points to itself? Don't add the format
* points into existing data? Don't add the format
2023-03-07 07:29:37 -06:00
ShinyTillDawn
93395800eb Added calculated Base Stat Total ''field'' (#115)
Similar to the prize money field in the trainer table, I added a field to the Pokémon stats table for a Pokémon's base stat total.
(Requested by Dweebio The Rom Hacker)
2023-03-07 02:23:22 -06:00
haven1433
36706bc740 remove bad default hashes 2023-03-05 22:40:28 -06:00
haven1433
c9ec9d3379 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-05 22:39:00 -06:00
ShinyTillDawn
f108a05f96 Implemented 8 feature requests or so (#113)
* Implemented 8 feature requests or so

- fixing money cap description
- updating trainer AI script command parameters so names of types/moves can be used
- updated various font anchors
- made lists for trainer AI scripts
- added floor names for FRLG

* Fixed ability field oversight

IDK how I had the ability field use the type field.
2023-03-05 22:37:16 -06:00
ShinyTillDawn
a31ec6b0a8 Update scriptReference.txt (#112) 2023-03-05 22:31:03 -06:00
haven1433
ccbdca51f3 support |z suffix for arguments in script reference files 2023-03-05 21:39:41 -06:00
haven1433
e65644a236 repoint scripts based on previous script size, not computed size from model 2023-03-05 21:39:19 -06:00
haven1433
10f177154c fix broken tests 2023-03-04 22:00:44 -06:00
haven1433
43542dcf17 don't create orphans while no-edit formatting a script
When scripts get merged together, some inner-scripts no longer appear to be real scripts. These were showing up as orphans when the scripts get formatted, since that causes scripts to get merged. But the pointers are still there, so they're not actually orphans.

Fix the orphan-naming logic so that it won't name things as orphans if they're inner scripts that still have pointers
2023-03-04 21:33:49 -06:00
haven1433
3fdb3a8028 improve caching for improved performance
don't re-calculate the length of scripts if nothing has changed
2023-03-03 22:46:17 -06:00
haven1433
f865ddd992 line fix 2023-03-03 22:11:12 -06:00
haven1433
8896946db2 ai script performance updates
ai script children should appear as ai scripts
editing an AI script shouldn't make a bunch of orphans
introduce a light caching system for noticing when scripts don't need to be loaded again.
script edits that don't change any compiled bytes should be capable of skipping the metadata update in situations where the metadata is already correct
2023-03-03 22:10:49 -06:00
haven1433
944806e2ad fixing R/S 1.1 addresses for data.pokemon.natures.stats 2023-03-02 19:58:29 -06:00
haven1433
7bf14858c4 GetMaxUsedBlock shouldn't fail if looking outside the range of valid model data 2023-03-02 19:52:41 -06:00
haven1433
715c163de6 nature stats for all the games 2023-03-02 19:52:15 -06:00
haven1433
dd9cf7070d improve if macros / trainer flags
* replace cleartrainerflag/settrainerflag with defeatedtrainer/readytrainer
* update `if` macros to include both goto and call forms, and both positive checks and negative checks for trainers/flags
2023-03-02 19:48:52 -06:00