-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu work #452
Menu work #452
Conversation
wram.asm
Outdated
; MenuData2 | ||
|
||
wMenuData2Flags:: ; cf91 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be split into wMenuData2Flags, wMenuData2_2DMenuFlags, and wMenuData2_ScrollingMenuFlags in those unions? Then the comments about different bit meanings would also go in their respective sections, engine/scrolling_menu.asm can use wMenuData2_ScrollingMenuFlags, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because some flags and code checking those flags are used for several different menus. See, for example, GetMenuTextStartCoord
, which checks bit 6 and 7 of the flags, and is used by both PlaceVerticalMenuItems
and Place2DMenuItemStrings
.
Regarding macros for menu data, I think dealing with (x, y, width, height) would be easier than (y1, x1, y2, x2), particularly in map scripts. A sample menu from CeladonDeptStore6F.asm:
And with a
Theoretically a single
But that could get long when combining multiple flags, and there's less room to add side comments for each bit of data. It also doesn't match the Anyway, if |
On everything listed:
|
|
Could be wrong, but I think the end coords gives more useful information at first glance than the size, because it lets you picture the four corners of the box right away. That said, a Anyway, I guess it's up to preference so I don't really mind how it turns out. |
Gave them better names, moved the flags out of the union, and documented the w2DMenuFlags1.
Added a bunch of constants for the bitflags of each kind of menu. Some are slightly vague or too long, but I'm not sure how to else name them.
While slightly shitty, it's as complete as I'm able to get it. Any improvements are welcome.
Ready for merging. |
…lve PR pret#452) # Conflicts: # data/player_names.asm # engine/battle/menu.asm # engine/billspc.asm # engine/billspctop.asm # engine/buy_sell_toss.asm # engine/decorations.asm # engine/delete_save_change_clock.asm # engine/events/buena.asm # engine/events/elevator.asm # engine/events/kurt.asm # engine/events/mom.asm # engine/events/move_tutor.asm # engine/events/pokecenter_pc.asm # engine/events/pokepic.asm # engine/events/std_scripts.asm # engine/events/unown_walls.asm # engine/init_gender.asm # engine/intro_menu.asm # engine/mail.asm # engine/main_menu.asm # engine/mart.asm # engine/menu_2.asm # engine/mon_menu.asm # engine/pack.asm # engine/slot_machine.asm # engine/start_menu.asm # home/menu.asm # maps/CeladonDeptStore6F.asm # maps/CeladonGameCornerPrizeRoom.asm # maps/DragonShrine.asm # maps/EarlsPokemonAcademy.asm # maps/GoldenrodCity.asm # maps/GoldenrodDeptStore6F.asm # maps/GoldenrodGameCorner.asm # maps/GoldenrodPokeComCenter2FMobile.asm # mobile/mobile_12.asm # mobile/mobile_12_2.asm # mobile/mobile_22.asm # mobile/mobile_22_2.asm # mobile/mobile_40.asm # mobile/mobile_45.asm # mobile/mobile_45_sprite_engine.asm # mobile/mobile_46.asm # mobile/mobile_5c.asm # mobile/mobile_5f.asm # mobile/mobile_menu.asm
This PR will contain multiple commits that properly document and abstract menu data and functions.
Putting this here so people can look at it and provide feedback for the time being.