Commit Graph

3325 Commits

Author SHA1 Message Date
haven1433
99d5bc52d8 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-31 21:11:05 -05:00
haven1433
380af0d051 tileset -> lzt4 rather than sprite
this means you can't import it, but you don't want to, it's just a bunch of tiles.
2023-03-30 20:05:10 -05:00
haven1433
a772cd071b bugfix
don't crash if MapEditor is null
2023-03-30 20:04:04 -05:00
haven1433
8c46a2333d distinguish broken warps
if a warp is on a block with an inappropriate behavior, the warp won't work. Draw those warps differently and include a warning message.
2023-03-30 20:03:47 -05:00
TheDiamondMiner
6e32354228
Added TextWrapping property to the textbox (#138) 2023-03-30 11:24:30 -05:00
TheDiamondMiner
564b298fc2
Updated Scriptreference.txt for the new macros (#137)
* Updated scriptreference

* Amended changes
2023-03-30 09:55:56 -05:00
haven1433
507e1432de handle null pointer sources
note that some destinations may not have pointer sources (such as other pointers). This is a metadata inconsistency in most cases (unless the pointer is in a table and is pointing to the middle of a pointer, for example), but still shouldn't cause a crash.
2023-03-29 21:32:27 -05:00
haven1433
d86ead6d50 don't let COM errors crash the app
in some cases, trying to set the clipboard image can throw COM exceptions. Not much we can do about it other than inform the user.
2023-03-29 20:20:57 -05:00
haven1433
16903f879f include a yellow border around cells that match the selected block, but not the selected collision 2023-03-28 22:38:36 -05:00
haven1433
80555a2a3a don't allow warping to invalid maps 2023-03-28 22:13:49 -05:00
haven1433
ab988ba686 code cleanup 2023-03-28 22:03:19 -05:00
haven1433
6a39a3d615 Replace assert with warning
if the mask is set wrong, we were asserting before, which is wrong... we shouldn't assert, because we don't know that HMA caused the problem. But we do need to warn the user that something smells wrong about their data. Add a warning textbox.,
2023-03-28 22:03:08 -05:00
haven1433
5ebf0c7925 update layouts when loading map editor
also include formats in layout table
2023-03-28 21:05:18 -05:00
haven1433
3f23eabf19 add buttons to edit tileset/palette from the map editor 2023-03-27 21:55:55 -05:00
haven1433
6e400a6575 allow import of blocksets with a different size 2023-03-27 21:11:54 -05:00
haven1433
936fba2b0d version bump 2023-03-26 21:07:07 -05:00
haven1433
30e8bd6dd4 limit the number of text streams included in the tooltip 2023-03-26 21:06:45 -05:00
haven1433
8fc99dd790 read enum offsets correctly when searching for enum usages 2023-03-26 20:47:23 -05:00
haven1433
c4db68723f allow opening constant results from map editor 2023-03-26 20:37:13 -05:00
haven1433
1fae0b5c25 improve undo interaction after making a new map 2023-03-26 20:31:32 -05:00
haven1433
2909399fbb edit for testability 2023-03-24 06:33:02 -05:00
haven1433
9cdef53f0e create new map from warp -> return warp should go to previous map 2023-03-23 20:11:09 -05:00
haven1433
a852558e09 map editor selection improvements
* selection position (x, y) in the bottom corner should be based on the hover map coordinates, not the primary map coordinates
* show the border around the primary map after Goto
* selection rect should truncate to the current map, rather than snapping to the current map. This matches the draw behavior.
* All methods that previously converted coordinates based on the primaryMap now instead convert coordinates with reference to a map that you pass in.
2023-03-23 19:05:06 -05:00
haven1433
d396300c02 update current/available blockset addresses when repointing blocksets
also fix possible race condition when refreshing border render while drawing the map
also fix condition where writing script data content formats shouldn't write empty runs if the token doesn't allow changes.
2023-03-22 22:10:45 -05:00
haven1433
61a5d52768 create missing event data when adding a new event 2023-03-22 20:10:52 -05:00
haven1433
94af0be75d don't include quotes in mart in map event panel
the quotes aren't needed, they're just extra noise
2023-03-21 22:53:22 -05:00
haven1433
c28985f034 allow text caching for more textboxes
text caching keeps the text from auto-updating as the user types
2023-03-21 22:49:54 -05:00
haven1433
2f71b1f561 selecting an event should forget any block selection 2023-03-21 22:39:09 -05:00
haven1433
015208c962 fix typo
don't need AcceptsReturn twice
2023-03-21 22:38:21 -05:00
haven1433
503eb9b28d test that metadata upgrades add new shortcuts 2023-03-21 22:37:54 -05:00
haven1433
026df32382 allow multiline editing for event text properties
* marts
* trades
* tutors
* signposts
2023-03-21 20:51:59 -05:00
haven1433
e666861f1a improve freespace address interactions for scripts
if you use a freespace address, the script should introduce a new blank stream for you to use. This didn't work correctly for marts, now it does.
2023-03-21 20:44:40 -05:00
haven1433
11db60e5d2 use number section headers rather than addresses as section headers
* better for experts because they can more easily parse a handful of section headers compared to random hex addresses
* Better for new users because it helps them learn that they can use whatever names they want for the headers of scripts and for pointers.
2023-03-21 19:59:01 -05:00
haven1433
917636973e version bump 2023-03-20 22:30:54 -05:00
haven1433
1f640cfdea Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-20 22:10:01 -05:00
haven1433
fc05cd58e6 add comments explaining base commands for macros 2023-03-20 22:10:00 -05:00
haven1433
7c357f00fd don't support <auto> when reading/writing script addresses, only data addresses 2023-03-20 22:09:25 -05:00
haven1433
f21f3c0e0e auto pointers should get syntax highlighting 2023-03-18 21:47:44 -05:00
haven1433
6ef8253e02 fix cursor when resolving ?????? addresses
doing <??????> auto-included a new {} block, which is cool. But that block needs to not be included when calculating the new cursor position, because the cursor position should remain _before_ the new {}, so it's still on the same line in case you're writing `trainerbattle` or something with multiple pointers in the line.
2023-03-18 21:47:00 -05:00
haven1433
60e8910578 in case of repoint, track the new code address correctly
useful to prevent the cursor from going crazy during a repoint operation
2023-03-18 21:25:32 -05:00
ShinyTillDawn
b14baacd73
Changed which NPC facing option we shouldn't use. (#133)
* Changed which NPC facing option we shouldn't use.

The movement behavior right below "FaceRight" is actually the one that confuses people as it used to be called "Look Down" in AdvanceMap. That one causes weird stuff to happen after a battle while the first movement option is now correctly labeled "No Movement."

* Reverted the CausesGlitches change.
2023-03-18 11:31:34 -05:00
haven1433
2bef8d62f0 write updated run after deserializing 2023-03-17 22:04:30 -05:00
haven1433
eed151b751 allow goto to work for maps more often
The old algorithm didn't go to maps often enough, but the new algorithm might go to maps too often. More testing is needed.
* allow going to a map if multiple maps match. For example, "pewter city" matches every map in pewter city, but the idea is pretty clear that we should go to at least _one_ of those maps. The first one (the city itself) will do just fine.
* only match a map if the name is specific enough to only match one map name. For example, "viridian" might be "viridian forest" or "viridian city" so that's not good enough. Same with "cave". But "paltown" is good enough to match palette town.
2023-03-17 20:52:53 -05:00
haven1433
f648df04cf script editor improvements
* when jumping to a script from a map, format the script. This gets us things like text/marts immediately, instead of needing to load, then edit, to see runs that the script points to.
* When editing a script, keep better track of the cursor, so it doesn't jump around when the script address changes or a pointer within the script changes.
2023-03-17 20:50:07 -05:00
haven1433
d547f88ebc insert end token when writing a movement stream
note that this could be dangerous, since we're writing an end token to an arbitrary address that is still being decided on. A couple things mitigate this problem:
* the user can use <auto> pointers in scripts
* addresses won't be checked/used unless the user has both an open < and a close >.
2023-03-17 15:06:21 -05:00
haven1433
542ac1ca86 auto-include closing } after inserting a { 2023-03-17 14:27:23 -05:00
ShinyTillDawn
80b4b17bc8
Added rematch tables for Emerald and RS (#132)
They're separate because Ruby and Sapphire have fewer rematchable trainers than Emerald.
2023-03-16 20:57:16 -05:00
ShinyTillDawn
aacd573bf6
More scriptReference.txt changes (#131)
* Correctly fixed the domains of script commands.

According to the 3 decomps' "script_cmd_table.inc" file, Ruby/Sapphire's last command is at index C5 while FireRed/LeafGreen's last command is at index D4. Thus, I updated the file so that valid commands would only show up if you're editing a game with which said commands would be valid.
ex. preparemsg3 no longer shows up as a valid command in FR/LG.

* Found out the parameter for fadescreen3.

Thank you decomps!

I'm not sure if the "mode.screenfades" parameter is the same for the "fadescreen" command.

* Updated "trainerbattle" & other scripts' comments.

Added some comments to clarify some unknowns in commands 5E, 5F, and 65.

I also fixed some comments and unknown pointers in the trainer battle commands.

* More minor comment fixes.

I mean the word "not" in the comments for commands 4D & 4E. The commands are technically not "nop"s in the code, but the edit to 0x800D is commented out.

* Clarified warp descriptions & other commands.

- Warp commands have more descriptive comments.
- Changed FRLG's description for "nop2C."
- Added another way to fill in the "condition" parameter for "gotostdif" and "callstdif" to make it more in line with "if1" and "if2."
2023-03-16 20:55:30 -05:00
haven1433
39ca54750a update layout ID when repointing layouts in the table tool 2023-03-16 20:48:09 -05:00
haven1433
cd5fc79b6c add guards to prevent loading excess members in dynamic tables
if a dynamic table is nothing but pointers, stop the table before the first thing it points to
2023-03-16 19:06:46 -05:00