Commit Graph

4190 Commits

Author SHA1 Message Date
haven1433
e7577eccbf version bump 2024-06-04 21:52:20 -05:00
haven1433
1c6e13feb1 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2024-06-04 21:48:22 -05:00
haven1433
2731719321 make it easy to toggle back/forth between the real table UI and the prototype table UI 2024-06-04 21:48:13 -05:00
ShinyTillDawn
855959435f A variety of changes related to HUBOL (#222)
* Updated HUBOL's move names count to 896.

Previously, two "Rapid Flow" moves were left out of the hard−coded formatting.

Testing will be required.

* Fixed a typo in the "trainerabilities" variable.

* Added HUBOL's move effect options.

Yak Attack's feature request.

The code could be improved so that it replaces the vanilla move effect options [[List]].

This code has not been tested yet.

* Fixed the indentation.

* Removed all `\t`s in favor of spaces.

* Added the code to update the "effectiveness" list.

This is if the CFRU was detected.

* Added the code to add the type chart anchor.

Address 145BB74 is the anchor reference pointer, not the location of the anchor itself.

This should be updated as `AdjustFormatForCFRU()` makes its initial call.

* Readded C9 Btl. Script alias. Fixed syntax errors.

The `jumpifattackandspecialattackcannotfall` alias no longer throws a compiler error due to its length, so it's fair game to readd it.
The other syntax errors came from implementing more things for HUBOL's metadata.

* Fixed the move effects [[List]] generation.

The existing code did not account for all of the new move effects, and the list added earlier was not completely accurate. Now, the move effect names _should_ be correct.

Some of the move effects (like Endure) are unused in HUBOL's _moves,_ but they're still used in some tables referenced by the vanilla AI.

* Optimized the code for two [[List]]s.

* Removed some comments.

* Optimized the code for making the type chart taЫe.

* Added Decorate's move effect to the metadata.

Decorate uses its own move effect (#245), and that was previously overlooked.
2024-06-04 21:44:11 -05:00
haven1433
3627fa7755 TableGroupPanel update
Child controls now have access to the FrameworkElement parent during interactions, so they can do things like updating the cursor.
First pass at an enum control
First pass at an offset render control
First pass at a text stream control
-> all of these are visual only, no interactions
2024-06-04 21:40:16 -05:00
haven1433
b2835c2464 TableGroupPanel update
* mouse interactions are now shared from the GroupPanel to the controls. Controls don't have logic yet, except for basic testing logic from the splitter.
* splitters can show/hide their section content
* filler implementation for splitters and images
* TableGroupPanel now tracks and shares a FontSize, used for zooming content.
* RenderContext can now calculate a preferred font size for long text
2024-06-04 17:49:31 -05:00
haven1433
23572cdd38 TableGroupPanel updates
After exploring other options of reducing property notifications or allowing async notifications, I've decided that the only real way to fix the table performance is to redo the UI layer. As such, I'm revisiting the TableGroupPanel.

I'll watch performance as I work to make sure it remains fast. But using a single control and modeling the interaction costs a lot of code, but hopefully not a lot of performance.
2024-06-03 19:59:40 -05:00
haven1433
7923ac1168 add functionality for silencing notifications on child viewmodels
ViewModelCore can now use `SilencePropertyNotifications` to temporarily
silence notifications. These notifications are not deferred, they are silenced.

Furthermore, ViewModels can specify a list of child viewmodels that might need to be silenced. These children cannot be detected automatically, because some ViewModels hold references to peers as well as children.

When you call `SilencePropertyNotifications`, the ViewModel and all its registered children will be silenced until the end of the silence scope.
2024-06-03 14:08:37 -05:00
haven1433
5fb94334b6 fix move relearner after move expansion 2024-06-03 08:56:39 -05:00
haven1433
32bebb384b fix script selection bug
if the script start changes and the script end doesn't change, we still need to update the script shown in the code tool.
2024-06-02 15:52:42 -05:00
haven1433
6968fffb89 fix context menu for editable AngleComboBox textbox 2024-06-02 15:41:46 -05:00
haven1433
1213886e4a fix crash importing castform sprite 2024-06-02 13:11:55 -05:00
haven1433
34dc79f877 when expanding signposts, update the existing scripts to backpoint to the moved table 2024-06-02 12:23:36 -05:00
haven1433
fdd8407aa7 don't try to show uses for null maps 2024-06-02 11:38:46 -05:00
haven1433
9bb6dee9af Script discovery logic improvement
During the first pass, scripts that are detected that are earlier than the current script are given a length of 1 to prevent recursion.
The script parser can now produce a second pass on these addresses if they're recognized as scripts, to make sure that the full script gets concatenated rather than truncated to the first command.
2024-06-02 11:13:09 -05:00
haven1433
011aa9f66a improve handling bad state for connections 2024-06-01 17:41:32 -05:00
haven1433
75d5f339ba show error for short-form macros with too many args 2024-06-01 13:26:23 -05:00
haven1433
0fecf32465 handle failure to load files better 2024-06-01 12:58:40 -05:00
haven1433
953d4e786e documentation update 2024-06-01 12:46:42 -05:00
haven1433
ae081f4b74 don't load OW sprite lists if the size isn't reasonable 2024-06-01 10:44:34 -05:00
haven1433
2fee8d5eec handle edge case clicking outside of data 2024-06-01 10:35:07 -05:00
haven1433
92360f662b don't crash if loading table formats past the end of the rom 2024-06-01 09:59:50 -05:00
haven1433
c72bd85d76 don't crash trainer creator if pokestats is missing 2024-06-01 09:49:28 -05:00
haven1433
831b2257ab Improve ability to add formats for map tilesets 2024-06-01 09:40:14 -05:00
haven1433
a84a668219 don't crash when resizing a map that's smaller than the border size 2024-06-01 09:39:55 -05:00
haven1433
20ba62f763 allow opening constants from map editor 2024-05-30 20:02:31 -05:00
haven1433
b16d238c8a fix crash 2024-05-30 19:47:28 -05:00
haven1433
2c022dafe6 9-grid limit drawing range to drawing on map 2024-05-30 19:37:48 -05:00
haven1433
9a4dcca602 fix autocomplete when changing script types
matters for when you jump directly from a battle script to an event script. Not only do we need the syntax highlighting to update, but also the auto-complete options
2024-05-30 19:37:36 -05:00
haven1433
169c2b7140 don't crash if looking for an inverse connection for a map with no connection data 2024-05-30 16:33:17 -05:00
haven1433
eeb7383549 update firered movementtypes 2024-05-30 15:50:14 -05:00
haven1433
f991486de4 clear selection before goto 2024-05-30 15:13:30 -05:00
haven1433
6b958451f0 fix anchor name logic. Cannot contain dashes. 2024-05-30 14:59:22 -05:00
haven1433
6afcbc1a62 when changing the size through the table tool, create a blockmap backup
so that as the size changes, the initial area can remain the same as expected
2024-05-30 11:47:35 -05:00
haven1433
2dc56faa7d expanding OWs/Palettes .hma updates 2024-05-30 11:41:45 -05:00
haven1433
b49bf2fe1e improve scriptReference.txt parsing 2024-05-30 11:12:59 -05:00
haven1433
8ce21a3e95 validate that script macros that expect the same value in multiple args only apply if all the args actually have the same value 2024-05-30 11:12:48 -05:00
haven1433
4e7dce1864 fix value==int.MinValue bug in script parsing 2024-05-30 11:12:19 -05:00
haven1433
069ae630d3 fix nul pointer 2024-05-30 10:29:42 -05:00
haven1433
24b8b50bb6 fix out-of-range error with record fields
Make sure that when reading the target for a record, the target is in range of the rom.
2024-05-30 10:29:24 -05:00
haven1433
8f15d29889 don't crash if a map is missing a blockset pointer 2024-05-30 09:58:35 -05:00
haven1433
f64155ad18 exclude emerald match call flags from free flags 2024-05-30 09:58:11 -05:00
haven1433
5154d05f63 improve script command parsing logic
account for macros in linecode matching logic
2024-05-30 09:57:49 -05:00
haven1433
25c18c4590 improve goto resolution
prefer matching table elements over documentation
allow documentation searches using prefixes like "doc/" or "command/"
2024-05-30 09:57:13 -05:00
haven1433
0843e26514 fix typo
this whole feature will be replaced in the future
2024-05-30 08:04:28 -05:00
ShinyTillDawn
ad4aeab057 Implemented 7 feature requests. (#221)
* Updated the battleOptions observable collection.

Axcellerator's feature request.
I updated the third & fourth option and reformatted the last option. Separating these lists for the Kanto & Hoenn games would be useful, though challenging to implement, I think.

* Two table reference touch-ups

Made the pokemonOffset & trainerOffset fields in Emerald's `data.pokedex.stats` unsigned.

Made the worldmapflag in the `graphics.overworld.firstpersonview.sprites` table show as a base-16 number.

* A 3rd table reference touch-up

Updated the back throw anchor's fields from a, b, c to size, index.

* A fourth and fifth table reference touch-up

Yogia's feature request: Implement a fixed `data.famechecker.trainerpics` anchor.

RedKraken's feature request: Implement an anchor for the PC script.

As for the name, there's only 1 `pc` subdirectory under `scripts`, and it's under `newgame`, so that's where it was located. However, this new anchor name can be adjusted.

* The final feature request in this pull request

In `scriptReference.md`, parameter fields that format numbers as entries from a named anchor will have the words "is from" instead of just "from."
2024-05-30 07:56:03 -05:00
haven1433
cb13a6d153 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2024-05-29 21:25:32 -05:00
haven1433
dc18c138ea add capability of split-byte arguments for scripts
We want a macro that can "set the current move" for use in battle scripts, for setting how the animation should work. This needs to set a low-byte high-byte pair based on a move id, which requires 2 separate commands. In order for this macro to work, the code needs to be able to read the two split bytes as a single value, and write the single value as 2 split bytes. This is now supported.
2024-05-29 21:24:14 -05:00
haven1433
aa850c38fc Add TableGroupPanel prototype
The current table panel is very slow, possibly because it's made of lots of controls. This was a basic prototype to show how it might operate if it's all a single FrameworkElement instead of a nested ItemsControl.
2024-05-29 19:08:14 -05:00
haven1433
a532f72ced battle scripts can end with handleballthrow, finishaction, and finishturn 2024-05-29 19:05:53 -05:00