Commit Graph

3373 Commits

Author SHA1 Message Date
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
haven1433
7e6dc34302 use decorations instead of mart for pokemart2
And fix name to decorationmart
2023-03-02 19:48:30 -06:00
haven1433
175925f536 fix bug with find
quick-find didn't handle offscreen values correctly
2023-03-01 22:41:03 -06:00
haven1433
1688ad8d5c r10 through r15 are valid thumb variable names 2023-03-01 22:25:49 -06:00
haven1433
a679a006db setfarbyte uses RAM addresses 2023-03-01 22:25:34 -06:00
haven1433
4a3cbe15e2 loadbytefrompointer uses RAM addresses 2023-03-01 22:25:23 -06:00
haven1433
ac4528f246 show underscores correctly in bit lists 2023-03-01 22:24:56 -06:00
haven1433
acb3629541 copybyte should use 4-byte hex, not pointers 2023-03-01 22:05:14 -06:00
haven1433
cd3d55aaec update python tool initial text 2023-03-01 22:04:15 -06:00
haven1433
efa8ab5010 signpost -> goto script should set NoInfoRuns to XSERuns 2023-03-01 22:04:06 -06:00
haven1433
f3d986882e Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-01 06:54:56 -06:00
haven1433
07608b0f9c allow record segments to be pointers
Allow record segment formats to be pointers depending on the source value
2023-02-24 22:02:34 -06:00
ShinyTillDawn
55ccabe22e
Updated flash constants (#109)
* 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.
2023-02-24 10:56:52 -06:00
haven1433
35e361a673 fix whitespace for crash dialog 2023-02-23 21:28:19 -06:00
haven1433
4458e3ae1f disable pokemon expansion, even in betas 2023-02-23 21:28:11 -06:00
haven1433
7dc97a817a don't add inner-pointers within the array that we're adding
if we're adding a table with inner pointers and we're searching for inner pointers, disqualify the area that we're currently adding to. Aligned pointers may exist, but misaligned pointers cannot.
2023-02-23 21:27:58 -06:00
haven1433
0577138e2f refactor wave function collapse
still works the exact same way, but the actual collapse has been moved up a few levels, so that the algorithm can be made more dynamic.
2023-02-20 21:38:48 -06:00
haven1433
077608a243 script editor improvements
allow standard lib imports like `import random` (nuget update)
allow setting an enum value to an int or BigInt (useful for random.randrange())
Include ViewPort this[] operator for getting table models by name. Useful for getting tablemodels from multiple tabs in the same script.
2023-02-20 21:38:12 -06:00
haven1433
ff3f2bd3df prototype for wave function collapse
given an area of all the same block, replace all those blocks with blocks that match the surrounding non-same blocks based on what blocks should 'match'. Note that this is a single-pass algorithm right now, which means that it creates a bunch of bad blocks as it gets further from the edge and more conflicts are found.

We may try to update this more in the future, or we may just go with something simpler like a maze generator using border blocks or 9-grid. But the results of this are tantalizing...
2023-02-18 00:53:05 -06:00
haven1433
affcbe7a0d make the bottom address field a bit wider to account for 7 characters for expanded roms 2023-02-13 22:42:39 -06:00
haven1433
5770ff9e03 first pass at the 'block bag' feature
holding control and selecting blocks will add/remove them from the block bag. When drawing (or painting), all blocks in the bag are treated as equivalent, so HMA will select one of the blocks at random to draw with. This works great for grass, but can also be used to create 'noisy' areas by selecting other blocks like flowers or shrubs.

Control+Click on the bag block indicator to clear all blocks from the bag.
2023-02-13 22:42:17 -06:00
haven1433
882242e8f4 version bump 2023-02-11 22:58:40 -06:00
haven1433
198cc42859 fix writebyteoffset parameters 2023-02-11 22:44:21 -06:00
haven1433
af54548c57 pointer offset updates shouldn't count as data changes 2023-02-11 22:44:11 -06:00
haven1433
690379abea early exits to prevent crashes if data is missing 2023-02-11 22:14:54 -06:00
haven1433
20c83aad02 goto section improvements
make it work right for "some._content" and "data.maps.names/s.s. anne"
2023-02-11 22:00:20 -06:00
haven1433
15ecbfcf64 fix editing table name via anchor textbox
shouldn't forget length if it comes from the parent
creating table with inner anchors and pointers should add those same pointers to innerPointers[0]
2023-02-11 21:39:13 -06:00
haven1433
7e46bf4fac copy/paste width fix in menu 2023-02-05 21:51:17 -06:00
haven1433
7c07337d3b updating blocksets should reload all loaded maps
If a blockset is edited, that could change not just the current map that
owns that blockset, but any other map that uses that blockset.
Refresh caches on all those maps.
2023-02-04 22:21:35 -06:00
haven1433
913e83ae96 add copy/paste tiles for foreground/background of blocks 2023-02-04 22:20:16 -06:00
haven1433
40eec2be06 add copy/paste icons 2023-02-04 22:17:47 -06:00
haven1433
ee6583b946 add shift+click for 9-grid support
also fix the flickering issue, where ctrl+drag causes flickering sprites
2023-02-03 22:07:14 -06:00
haven1433
792fe58155 fix threading issue with model options cache 2023-02-03 22:00:54 -06:00
haven1433
76e688d2cd limit map event tooltip content
don't show content for the same address twice, even if it appears in the script twice
2023-02-02 10:58:10 -06:00
haven1433
800aee0361 fix crash in script editor 2023-02-02 07:44:56 -06:00
haven1433
820173f3f1 settrainerflag needs to use trainer names 2023-02-02 07:44:46 -06:00
haven1433
ed976a7925 fix tests
Many tests use an Editor that doesn't have a valid Dispatcher. Update those tests to use a factory method instead of directly creating an editor.
2023-02-01 22:27:03 -06:00
haven1433
caececfc2f dispatch undo refresh
needs to happen on the foreground thread, doesn't need to happen right away
2023-02-01 22:10:52 -06:00
haven1433
7e215acfa4 fix inline 'find' highlighting near the bottom of the window 2023-02-01 22:02:31 -06:00
haven1433
00f26dc792 allow 'export backup' from map tabs 2023-02-01 22:02:04 -06:00