Commit Graph

2821 Commits

Author SHA1 Message Date
Haven1433
c79652d2fd don't copy text for splitter segments
these have no data and are purely for modeling
2022-08-29 20:49:59 -05:00
Haven1433
ce27bdcd53 trainers must have at least 1 pokemon
other arrays are limited to have at least 1 element, add that limit for trainer teams as well
2022-08-29 20:49:29 -05:00
Haven1433
6bd154ea22 Add easier-to-use expansion for uncompressed sprites
This works for LzRuns, make it work for uncompressed sprites as well
2022-08-29 20:24:17 -05:00
Haven1433
ed21535626 Store ToolPanelWidth in the ViewModel
WPF destroys the view whenever we switch tabs.
Store the ToolPanelWidth in the ViewModel so we can remember the value when changing tabs.
2022-08-29 07:38:13 -05:00
Haven1433
bc6fb382b2 typing text macros works in the hex content
also fixes a copy/paste bug
2022-08-26 22:55:24 -05:00
Haven1433
49fae5db0b allow tilemaps to include image switcher in the image tool 2022-08-26 21:31:38 -05:00
Haven1433
64050a4345 Cleanup Auto-Implement
This has been a thorn in the project's side for too long. Remove Auto-Implement from the project. Include the needed types, and the created implementations. If more implementations are needed, or the current implementations need to be updated, I can add them by hand. The implementations that I've actually needed have been comparable simple compared to what AutomImplement provides: I haven't needed custom property or event implementations, for example. And I haven't needed custom constructor overrides, or overrides for multiple methods with the same name. Go ahead and remove it, along with the code generation steps that come with compiling the app/tests.
2022-08-26 21:30:50 -05:00
Haven1433
0becbfac3f Tilemap tileset loading needs to be table-index aware
When showing a sprite in the table tool, we check to see what table index it is so we can use that index to find the palette. We need to do the same thing with tilesets. This means that GetPixels() needs a new parameter, the tableIndex, which can be passed in from any context that cares about it. Most of the time, getting the pixels doesn't care what the table index is. But now tilemaps can use this to figure out which tileset to use.
2022-08-25 22:46:48 -05:00
Haven1433
131eca5481 Don't double-clear anchors during script edits
Double-clearing it is a problem if it's created in the same token, because then it counts as clearing something that isn't there... which means that undoing the interaction will bring back an anchor, even though it wasn't there to begin with.
2022-08-25 20:47:59 -05:00
Haven1433
6bb8fd0998 Fix dispatcher issue
better to block rather than being non-deterministic
2022-08-25 07:37:49 -05:00
Haven1433
810f8c7a65 ScriptParser needs to know which game it is.
The 'showmoney' and 'updatemoney' commands are different from game to game. It has 2 parameters in R/S, but 3 parameters in FR/LG/E.

Update the scriptReference to specify that these commands have different versions for the different games.

Update ScriptParser to be able to read this new addition to the script reference format.

Add tests to show that the new commands are read correctly between games.
2022-08-25 06:51:51 -05:00
Haven1433
05434521d3 pass a parent in to ArrayRunElementSegment.Write
This method is used when calling TableStreamRun.DeserializeRun. There is always a parent table that owns the element. We need to know the parent in order to correctly deserialize child pointers.
2022-08-24 07:41:00 -05:00
Haven1433
11b4a6fc58 Improve logic for clearing unused tiles during edit 2022-08-24 07:05:07 -05:00
Haven1433
288a37ad2c Don't clear custom-token flag if marked to continue current transaction
The current transaction can be continued through 'ChangeCompleted' operations via use of the `continueCurrentTransaction` flag. But calling `ChangeCompleted` was still clearing the `customChangeInProgress` flag, which made the ChangeHistory forget that it was in the middle of a custom change. This caused issues if the selection was automatically changed (such as clicking in the text tool) after a custom no-data change (such as from changing the anchor name in the anchor-text)
2022-08-21 20:03:03 -05:00
Haven1433
49fdf2927e undo should reset model size 2022-08-20 13:50:15 -05:00
Haven1433
66faeb1d47 fix multi-export button (menu) in image tool 2022-08-20 13:44:37 -05:00
Haven1433
b19dda6701 fix header update during single-table mode 2022-08-19 22:13:46 -05:00
Haven1433
216887b7d7 retry clipboard on failure 2022-08-19 21:53:38 -05:00
Haven1433
f2301e5562 Reload metadata after applying patch
Applying a patch can break pointers / anchors, or change the length /location of text / images. Reload metadata after applying a patch.
2022-08-19 20:31:07 -05:00
Haven1433
76ae4efee1 clean up map banks 2022-08-19 20:12:46 -05:00
Haven1433
3148daf751 improve guard logic 2022-08-17 22:49:23 -05:00
Haven1433
e26cf56a2b don't allow writing nameless anchors with nothing pointing to them 2022-08-17 22:31:15 -05:00
Haven1433
762e719984 closing a non-selected tab needs to update the right-click diff options 2022-08-17 20:47:52 -05:00
Haven1433
28d0237b25 add hex converter to tool menu 2022-08-16 23:16:10 -05:00
Haven1433
cd0a66edbe fix initial selection in goto box 2022-08-16 23:08:57 -05:00
Haven1433
54e9557690 Make selection address/length into controls instead of indicators
HxD allows users to set the start address and length of selection using a dialog. Make this work in HMA as well, since it can make it easier to follow guides.
2022-08-16 23:07:44 -05:00
Haven1433
26bbd116a5 Improve ability_type_swaps
This now works for every game, and is included as an official script.
2022-08-16 19:45:01 -05:00
Haven1433
5405aa3daa add final fantasy text decoding
further edits are needed to make this useful, but I'm committing this so we don't lose track of it
2022-08-04 20:27:22 -05:00
Haven1433
965620921a allow decoding of non-formatted data as uncompressed images
This lets us quickly scan the rom for uncompressed images when we don't know where they are. As with decoding text, you can often tell if it's actually an image or not just by looking at it.
* press +/- to quickly increase/decrease a digit to scan through the rom
* change the width/height to change how much of the rom you can decode at once
2022-07-09 21:45:43 -05:00
Haven1433
43cafabb2e prevent render errors when rendering rom overview for short files 2022-07-09 21:11:30 -05:00
Haven1433
84c729308c load default metadata for non-pokemon gba games 2022-07-09 21:10:43 -05:00
Haven1433
a1dade9f72 limit the number of elements in auto-length tables
1000 is a reasonable default max. Otherwise, some tables may go on indefinitely, if they have a loose format
2022-07-09 21:06:20 -05:00
Haven1433
2b6bcab364 allow both <anchor>+1 and <anchor+1> to work in thumb code 2022-07-02 12:16:14 -05:00
Haven1433
4d08902316 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2022-06-28 08:17:43 -05:00
Haven1433
cd6ea07d45 add support for expanding emerald starters 2022-06-28 08:12:10 -05:00
Haven1433
7de7351c78 Fix update bug for multiple tables tied to the same constant 2022-06-28 07:28:22 -05:00
Haven1433
59ed8f7c11 fix palette discovery for Vega 2022-06-28 07:27:48 -05:00
TheDiamondMiner
1f721302eb
Fixed save-as not updating RecentFile (#92) 2022-06-28 06:39:37 -05:00
Haven1433
f227be1d3c limit logic for perpendicular bitlists 2022-06-24 23:08:27 -05:00
Haven1433
c119107bbd thumb code should not clear pointers to start+1 2022-06-24 23:07:14 -05:00
Haven1433
db12a23ec9 update type_items to work with all 9 roms 2022-06-23 21:15:43 -05:00
Haven1433
29ccd7d0fc Fix possible clipboard crash
happens when using remote desktop
2022-06-23 21:13:50 -05:00
Haven1433
0f0f2a0260 add pokemon shadow sprite 2022-06-23 21:13:25 -05:00
Haven1433
8b90b98994 fix parser bug 2022-06-23 21:12:10 -05:00
Haven1433
e8cf8453e8 Python Tool improvements
* print elements in list as results
* change layout for wider content
* allow zooming in/out of script
* don't print "" around text from tables in the ModelTable
* allowing printing the address of an element in a ModelTable
* Add button in View menu to bring up the python section
2022-06-20 07:29:55 -05:00
Haven1433
95e5ee25c7 Version bump 2022-06-19 22:39:39 -05:00
Haven1433
06bfcf95fe add dynamic syntax support for table fields in python
You can now get/set
`table['data.pokemon.names'][1].name`
instead of the more verbose
`table['data.pokemon.names'][1]['name']`
2022-06-19 22:39:29 -05:00
Haven1433
fbc182a490 export metadata to *.extension.toml for non-gba files 2022-06-19 22:27:41 -05:00
Haven1433
4f9b9bc9c1 add titlescreen music constant 2022-06-19 22:27:17 -05:00
Haven1433
d768ed883a add list for item types
This list isn't actually used yet, since it doesn't work for pokeball items
2022-06-19 21:30:05 -05:00