From 2ab60fa8a49dfe9e20ebb620471ba4c2ca64a4aa Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sat, 13 Jan 2018 16:38:14 -0500 Subject: [PATCH] menu_coords macro for (x1, y1, x2, y2) order (see issue #440) --- data/player_names.asm | 6 +-- data/unown_walls.asm | 12 ++---- engine/battle/menu.asm | 9 ++-- engine/billspc.asm | 15 +++---- engine/billspctop.asm | 3 +- engine/buy_sell_toss.asm | 9 ++-- engine/decorations.asm | 12 ++---- engine/delete_save_change_clock.asm | 6 +-- engine/events/buena.asm | 12 ++---- engine/events/elevator.asm | 3 +- engine/events/kurt.asm | 13 +++--- engine/events/mom.asm | 3 +- engine/events/move_tutor.asm | 3 +- engine/events/pokecenter_pc.asm | 6 +-- engine/events/pokepic.asm | 3 +- engine/events/std_scripts.asm | 3 +- engine/init_gender.asm | 3 +- engine/intro_menu.asm | 6 +-- engine/mail.asm | 6 +-- engine/main_menu.asm | 3 +- engine/mart.asm | 6 +-- engine/menu_2.asm | 6 +-- engine/mon_menu.asm | 6 +-- engine/pack.asm | 57 +++++++++---------------- engine/slot_machine.asm | 3 +- engine/start_menu.asm | 12 ++---- home/menu.asm | 9 ++-- macros/data.asm | 7 +++ maps/CeladonDeptStore6F.asm | 3 +- maps/CeladonGameCornerPrizeRoom.asm | 6 +-- maps/DragonShrine.asm | 15 +++---- maps/EarlsPokemonAcademy.asm | 3 +- maps/GoldenrodCity.asm | 3 +- maps/GoldenrodDeptStore6F.asm | 3 +- maps/GoldenrodGameCorner.asm | 6 +-- maps/GoldenrodPokeComCenter2FMobile.asm | 6 +-- mobile/mobile_12.asm | 18 +++----- mobile/mobile_12_2.asm | 3 +- mobile/mobile_22.asm | 24 ++++------- mobile/mobile_22_2.asm | 12 ++---- mobile/mobile_40.asm | 12 ++---- mobile/mobile_45.asm | 24 +++++------ mobile/mobile_45_sprite_engine.asm | 3 +- mobile/mobile_46.asm | 24 ++++------- mobile/mobile_5c.asm | 3 +- mobile/mobile_5f.asm | 6 +-- mobile/mobile_menu.asm | 6 +-- 47 files changed, 150 insertions(+), 272 deletions(-) diff --git a/data/player_names.asm b/data/player_names.asm index 87c341652..47aa17529 100644 --- a/data/player_names.asm +++ b/data/player_names.asm @@ -1,7 +1,6 @@ ChrisNameMenuHeader: ; 882b5 db $40 ; flags - db 00, 00 ; start coords - db 11, 10 ; end coords + menu_coords 0, 0, 10, TEXTBOX_Y - 1 dw .MaleNames db 1 ; ???? db 0 ; default option @@ -20,8 +19,7 @@ MalePlayerNameArray: ; 882c9 KrisNameMenuHeader: ; 882e5 db $40 ; flags - db 00, 00 ; start coords - db 11, 10 ; end coords + menu_coords 0, 0, 10, TEXTBOX_Y - 1 dw .FemaleNames db 1 ; ???? db 0 ; default option diff --git a/data/unown_walls.asm b/data/unown_walls.asm index 4e971f9b0..4a7b985c7 100644 --- a/data/unown_walls.asm +++ b/data/unown_walls.asm @@ -41,18 +41,14 @@ UnownWalls: ; 8aebc MenuDataHeaders_UnownWalls: ; 0x8aed5 ; UNOWNWORDS_ESCAPE db $40 ; flags - db 04, 03 ; start coords - db 09, 16 ; end coords + menu_coords 3, 4, 16, 9 ; UNOWNWORDS_LIGHT db $40 ; flags - db 04, 04 ; start coords - db 09, 15 ; end coords + menu_coords 4, 4, 15, 9 ; UNOWNWORDS_WATER db $40 ; flags - db 04, 04 ; start coords - db 09, 15 ; end coords + menu_coords 4, 4, 15, 9 ; UNOWNWORDS_HO_OH db $40 ; flags - db 04, 04 ; start coords - db 09, 15 ; end coords + menu_coords 4, 4, 15, 9 ; 8aee9 diff --git a/engine/battle/menu.asm b/engine/battle/menu.asm index 07d3e6081..e44d92f83 100755 --- a/engine/battle/menu.asm +++ b/engine/battle/menu.asm @@ -34,8 +34,7 @@ Function24f19: ; 24f19 BattleMenuDataHeader: ; 24f2c db $40 ; flags - db 12, 08 ; start coords - db 17, 19 ; end coords + menu_coords 8, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData_0x24f34 db 1 ; default option ; 24f34 @@ -57,8 +56,7 @@ Strings24f3d: ; 0x24f3d MenuDataHeader_0x24f4e: ; 24f4e db $40 ; flags - db 12, 00 ; start coords - db 17, 19 ; end coords + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData_0x24f56 db 1 ; default option ; 24f56 @@ -88,8 +86,7 @@ Function24f7c: ; 24f7c MenuDataHeader_0x24f89: ; 24f89 db $40 ; flags - db 12, 02 ; start coords - db 17, 19 ; end coords + menu_coords 2, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData_0x24f91 db 1 ; default option ; 24f91 diff --git a/engine/billspc.asm b/engine/billspc.asm index 00bd49f06..7be68ba36 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -230,8 +230,7 @@ BillsPCDepositFuncCancel: ; e2537 (38:6537) BillsPCDepositMenuDataHeader: ; 0xe253d (38:653d) db $40 ; flags - db 04, 09 ; start coords - db 13, 19 ; end coords + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 dw .MenuData2 db 1 ; default option ; 0xe2545 @@ -491,8 +490,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) .MenuDataHeader: ; 0xe2731 db $40 ; flags - db 04, 09 ; start coords - db 13, 19 ; end coords + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 dw .MenuData db 1 ; default option ; 0xe2739 @@ -715,8 +713,7 @@ _MovePKMNWithoutMail: ; e2759 .MenuDataHeader: ; 0xe28c3 db $40 ; flags - db 04, 09 ; start coords - db 13, 19 ; end coords + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 dw .MenuData2 db 1 ; default option ; 0xe28cb @@ -2334,8 +2331,7 @@ BillsPC_ClearTilemap: ; e35e2 (38:75e2) _ChangeBox_menudataheader: ; 0xe35f1 db $40 ; flags - db 05, 01 ; start coords - db 12, 09 ; end coords + menu_coords 1, 5, 9, 12 dw .menudata2 db 1 ; default option ; 0xe35f9 @@ -2563,8 +2559,7 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9) .MenuDataHeader: ; 0xe377b db $40 ; flags - db 04, 11 ; start coords - db 13, 19 ; end coords + menu_coords 11, 4, SCREEN_WIDTH - 1, 13 dw .MenuData2 db 1 ; default option ; 0xe3783 diff --git a/engine/billspctop.asm b/engine/billspctop.asm index c36cbe45d..0d2ba5e9d 100755 --- a/engine/billspctop.asm +++ b/engine/billspctop.asm @@ -70,8 +70,7 @@ _BillsPC: ; e3fd .MenuDataHeader: ; 0xe46f db $40 ; flags - db 00, 00 ; start coords - db 17, 19 ; end coords + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData2 db 1 ; default option diff --git a/engine/buy_sell_toss.asm b/engine/buy_sell_toss.asm index 37bee86b1..b46fc1c27 100755 --- a/engine/buy_sell_toss.asm +++ b/engine/buy_sell_toss.asm @@ -215,24 +215,21 @@ BuySell_DisplaySubtotal: ; 250d1 TossItem_MenuDataHeader: ; 0x250ed db $40 ; flags - db 09, 15 ; start coords - db 11, 19 ; end coords + menu_coords 15, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw ret_25097 db 0 ; default option ; 0x250f5 BuyItem_MenuDataHeader: ; 0x250f5 db $40 ; flags - db 15, 07 ; start coords - db 17, 19 ; end coords + menu_coords 7, 15, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw DisplayPurchasePrice db -1 ; default option ; 0x250fd SellItem_MenuDataHeader: ; 0x250fd db $40 ; flags - db 15, 07 ; start coords - db 17, 19 ; end coords + menu_coords 7, 15, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw DisplaySellingPrice db 0 ; default option ; 0x25105 diff --git a/engine/decorations.asm b/engine/decorations.asm index bd9eb0251..92ede0db6 100755 --- a/engine/decorations.asm +++ b/engine/decorations.asm @@ -38,8 +38,7 @@ _KrisDecorationMenu: ; 0x2675c .MenuDataHeader: ; 0x2679a db $40 ; flags - db 00, 05 ; start coords - db 17, 19 ; end coords + menu_coords 5, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData2 db 1 ; default option ; 0x267a2 @@ -424,8 +423,7 @@ PopulateDecoCategoryMenu: ; 2695b .NonscrollingMenuDataHeader: ; 0x269b5 db $40 ; flags - db 00, 00 ; start coords - db 17, 19 ; end coords + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .NonscrollingMenuData2 db 1 ; default option ; 0x269bd @@ -440,8 +438,7 @@ PopulateDecoCategoryMenu: ; 2695b .ScrollingMenuDataHeader: ; 0x269c5 db $40 ; flags - db 01, 01 ; start coords - db 16, 18 ; end coords + menu_coords 1, 1, SCREEN_WIDTH - 2, SCREEN_HEIGHT - 2 dw .ScrollingMenuData2 db 1 ; default option ; 0x269cd @@ -952,8 +949,7 @@ QueryWhichSide: ; 26e9a MenuDataHeader_0x26eab: ; 0x26eab db $40 ; flags - db 00, 00 ; start coords - db 07, 13 ; end coords + menu_coords 0, 0, 13, 7 dw MenuData2_0x26eb3 db 1 ; default option ; 0x26eb3 diff --git a/engine/delete_save_change_clock.asm b/engine/delete_save_change_clock.asm index e77874e1c..6e9a37b71 100755 --- a/engine/delete_save_change_clock.asm +++ b/engine/delete_save_change_clock.asm @@ -48,8 +48,7 @@ _ResetClock: ; 4d3b1 .NoYes_MenuDataHeader: ; 0x4d40d db $00 ; flags - db 07, 14 ; start coords - db 11, 19 ; end coords + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .NoYes_MenuData2 db 1 ; default option @@ -286,8 +285,7 @@ _DeleteSaveData: ; 4d54c .NoYesMenuDataHeader: ; 0x4d585 db $00 ; flags - db 07, 14 ; start coords - db 11, 19 ; end coords + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/engine/events/buena.asm b/engine/events/buena.asm index 3987487a9..cfe543a19 100644 --- a/engine/events/buena.asm +++ b/engine/events/buena.asm @@ -30,8 +30,7 @@ SpecialBuenasPassword: ; 8af6b .MenuDataHeader: ; 0x8afa9 db $40 ; flags - db 00, 00 ; start coords - db 07, 10 ; end coords + menu_coords 0, 0, 10, 7 dw .MenuData2 db 1 ; default option ; 0x8afb1 @@ -226,8 +225,7 @@ PrintBlueCardBalance: ; 8b097 BlueCardBalanceMenuDataHeader: ; 0x8b0d1 db $40 ; flags - db 11, 00 ; start coords - db 13, 11 ; end coords + menu_coords 0, 11, 11, 13 ; 8b0d6 Buena_PlacePrizeMenuBox: ; 8b0d6 @@ -238,8 +236,7 @@ Buena_PlacePrizeMenuBox: ; 8b0d6 .menudataheader ; 0x8b0dd db $40 ; flags - db 00, 00 ; start coords - db 11, 17 ; end coords + menu_coords 0, 0, 17, TEXTBOX_Y - 1 ; 8b0e2 Buena_PrizeMenu: ; 8b0e2 @@ -271,8 +268,7 @@ Buena_PrizeMenu: ; 8b0e2 .MenuDataHeader: ; 0x8b113 db $40 ; flags - db 01, 01 ; start coords - db 09, 16 ; end coords + menu_coords 1, 1, 16, 9 dw .MenuData2 db 1 ; default option ; 0x8b11b diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm index 35e95fa3c..77e74b11e 100755 --- a/engine/events/elevator.asm +++ b/engine/events/elevator.asm @@ -189,8 +189,7 @@ Elevator_GetCurrentFloorString: ; 1353f Elevator_MenuDataHeader: ; 0x13550 db $40 ; flags - db 01, 12 ; start coords - db 09, 18 ; end coords + menu_coords 12, 1, 18, 9 dw Elevator_MenuData2 db 1 ; default option ; 0x13558 diff --git a/engine/events/kurt.asm b/engine/events/kurt.asm index 3cabfd6f1..8ab28cddf 100644 --- a/engine/events/kurt.asm +++ b/engine/events/kurt.asm @@ -85,13 +85,12 @@ Kurt_SelectApricorn: ; 88055 .MenuDataHeader: ; 0x88086 db $40 ; flags - db 01, 01 ; start coords - db 10, 13 ; end coords + menu_coords 1, 1, 13, 10 dw .MenuData2 db 1 ; default option ; 0x8808e - db 0 + db 0 ; XXX .MenuData2: ; 0x8808f db $10 ; flags @@ -160,10 +159,12 @@ Kurt_SelectQuantity: ; 880c2 .MenuDataHeader: ; 0x8810d db $40 ; flags - db 09, 06 ; start coords - db 12, 19 ; end coords + menu_coords 6, 9, SCREEN_WIDTH - 1, 12 - db 0, 0, -1, 0 ; XXX + ; XXX + dw 0 + db -1 + db 0 .PlaceApricornName: ; 88116 call MenuBoxCoord2Tile diff --git a/engine/events/mom.asm b/engine/events/mom.asm index 296f3ad6f..8a61a57d8 100644 --- a/engine/events/mom.asm +++ b/engine/events/mom.asm @@ -729,8 +729,7 @@ Mom_HeldString: ; 166b0 MenuDataHeader_0x166b5: ; 0x166b5 db $40 ; flags - db 00, 00 ; start coords - db 10, 10 ; end coords + menu_coords 0, 0, 10, 10 dw MenuData2_0x166bd db 1 ; default option ; 0x166bd diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm index 802b9ef21..7b475c169 100644 --- a/engine/events/move_tutor.asm +++ b/engine/events/move_tutor.asm @@ -100,5 +100,4 @@ CheckCanLearnMoveTutorMove: ; 492b9 .MenuDataHeader: ; 0x4930a db $40 ; flags - db 12, 00 ; start coords - db 17, 19 ; end coords + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm index 8d0300aa4..f7c8a01a3 100755 --- a/engine/events/pokecenter_pc.asm +++ b/engine/events/pokecenter_pc.asm @@ -28,8 +28,7 @@ PokemonCenterPC: ; 1559a .TopMenu: db $48 ; flags - db 00, 00 ; start coords - db 12, 15 ; end coords + menu_coords 0, 0, 15, 12 dw .MenuData2 db 1 ; default option @@ -621,8 +620,7 @@ PCItemsJoypad: ; 0x15985 .PCItemsMenuData: db %01000000 - db 1, 4 ; start coords - db 10, 18 ; end coords + menu_coords 4, 1, 18, 10 dw .MenuData2 db 1 ; default option diff --git a/engine/events/pokepic.asm b/engine/events/pokepic.asm index 82016403b..aa950b255 100755 --- a/engine/events/pokepic.asm +++ b/engine/events/pokepic.asm @@ -43,7 +43,6 @@ ClosePokepic:: ; 24528 PokepicMenuDataHeader: ; 0x24547 db $40 ; flags - db 04, 06 ; start coords - db 13, 14 ; end coords + menu_coords 6, 4, 14, 13 dw NULL db 1 ; default option diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm index 708165046..6e76c6189 100644 --- a/engine/events/std_scripts.asm +++ b/engine/events/std_scripts.asm @@ -1871,8 +1871,7 @@ CoinVendor_IntroScript: ; 0xbcde0 .MenuDataHeader: db $40 ; flags - db 04, 00 ; start coords - db 11, 15 ; end coords + menu_coords 0, 4, 15, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/engine/init_gender.asm b/engine/init_gender.asm index f38139b2e..2c1a5a2ef 100755 --- a/engine/init_gender.asm +++ b/engine/init_gender.asm @@ -45,8 +45,7 @@ InitGender: ; 48dcb (12:4dcb) .MenuDataHeader: ; 0x48dfc db $40 ; flags - db 04, 06 ; start coords - db 09, 12 ; end coords + menu_coords 6, 4, 12, 9 dw .MenuData2 db 1 ; default option ; 0x48e04 diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index 08e004e1b..31e19778c 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -554,8 +554,7 @@ Continue_LoadMenuHeader: ; 5ebf .MenuDataHeader_Dex: ; 5ed9 db $40 ; flags - db 00, 00 ; start coords - db 09, 15 ; end coords + menu_coords 0, 0, 15, 9 dw .MenuData2_Dex db 1 ; default option ; 5ee1 @@ -571,8 +570,7 @@ Continue_LoadMenuHeader: ; 5ebf .MenuDataHeader_NoDex: ; 5efb db $40 ; flags - db 00, 00 ; start coords - db 09, 15 ; end coords + menu_coords 0, 0, 15, 9 dw .MenuData2_NoDex db 1 ; default option ; 5f03 diff --git a/engine/mail.asm b/engine/mail.asm index c860693be..c2ecb7548 100755 --- a/engine/mail.asm +++ b/engine/mail.asm @@ -559,8 +559,7 @@ MailboxPC: ; 0x44806 .TopMenuDataHeader: ; 0x4494c db %01000000 ; flags - db 1, 8 ; start coords - db 10, 18 ; end coords + menu_coords 8, 1, SCREEN_WIDTH - 2, 10 dw .TopMenuData2 db 1 ; default option @@ -575,8 +574,7 @@ MailboxPC: ; 0x44806 .SubMenuDataHeader: ; 0x44964 db %01000000 ; flags - db 0, 0 ; start coords - db 9, 13 ; end coords + menu_coords 0, 0, 13, 9 dw .SubMenuData2 db 1 ; default option diff --git a/engine/main_menu.asm b/engine/main_menu.asm index cbd516cd7..92a3da6bb 100755 --- a/engine/main_menu.asm +++ b/engine/main_menu.asm @@ -31,8 +31,7 @@ MainMenu: ; 49cdc .MenuDataHeader: ; 49d14 db $40 ; flags - db 00, 00 ; start coords - db 07, 16 ; end coords + menu_coords 0, 0, 16, 7 dw .MenuData2 db 1 ; default option ; 49d1c diff --git a/engine/mart.asm b/engine/mart.asm index 96423cfec..d4af8fb61 100755 --- a/engine/mart.asm +++ b/engine/mart.asm @@ -618,8 +618,7 @@ Text_Mart_CostsThisMuch: ; 0x15e13 MenuDataHeader_Buy: ; 0x15e18 db $40 ; flags - db 03, 01 ; start coords - db 11, 19 ; end coords + menu_coords 1, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .menudata2 db 1 ; default option ; 0x15e20 @@ -903,8 +902,7 @@ Text_Mart_HowMayIHelpYou: ; 0x15f83 MenuDataHeader_BuySell: ; 0x15f88 db $40 ; flags - db 00, 00 ; start coords - db 08, 07 ; end coords + menu_coords 0, 0, 7, 8 dw .menudata2 db 1 ; default option ; 0x15f90 diff --git a/engine/menu_2.asm b/engine/menu_2.asm index fc1b511b0..cbced7320 100644 --- a/engine/menu_2.asm +++ b/engine/menu_2.asm @@ -54,15 +54,13 @@ PlaceMoneyDataHeader: ; 24b01 MenuDataHeader_0x24b15: ; 0x24b15 db $40 ; flags - db 00, 11 ; start coords - db 02, 19 ; end coords + menu_coords 11, 0, SCREEN_WIDTH - 1, 2 dw NULL db 1 ; default option MenuDataHeader_0x24b1d: ; 0x24b1d db $40 ; flags - db 11, 00 ; start coords - db 13, 08 ; end coords + menu_coords 0, 11, 8, 13 dw NULL db 1 ; default option diff --git a/engine/mon_menu.asm b/engine/mon_menu.asm index e3570ab70..7dc2a2393 100755 --- a/engine/mon_menu.asm +++ b/engine/mon_menu.asm @@ -56,8 +56,7 @@ MonSubmenu: ; 24d19 .MenuDataHeader: ; 24d3f db $40 ; tile backup - db 00, 06 ; start coords - db 17, 19 ; end coords + menu_coords 6, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw 0 db 1 ; default option ; 24d47 @@ -326,8 +325,7 @@ BattleMonMenu: ; 24e99 MenuDataHeader_0x24ed4: ; 24ed4 db $00 ; flags - db 11, 11 ; start coords - db 17, 19 ; end coords + menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData2_0x24edc db 1 ; default option ; 24edc diff --git a/engine/pack.asm b/engine/pack.asm index 323592d39..7dd900617 100644 --- a/engine/pack.asm +++ b/engine/pack.asm @@ -163,8 +163,7 @@ Pack: ; 10000 ; 10124 (4:4124) .MenuDataHeader1: ; 0x10124 db $40 ; flags - db 07, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2_1 db 1 ; default option ; 0x1012c @@ -184,8 +183,7 @@ Pack: ; 10000 .MenuDataHeader2: ; 0x1013b db $40 ; flags - db 05, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2_2 db 1 ; default option ; 0x10143 @@ -324,8 +322,7 @@ Pack: ; 10000 ; 10249 (4:4249) MenuDataHeader_UsableKeyItem: ; 0x10249 db $40 ; flags - db 01, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x10251 @@ -350,8 +347,7 @@ Jumptable_UseGiveTossRegisterQuit: ; 1026a MenuDataHeader_UsableItem: ; 0x10274 db $40 ; flags - db 03, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x1027c @@ -374,8 +370,7 @@ Jumptable_UseGiveTossQuit: ; 10291 MenuDataHeader_UnusableItem: ; 0x10299 db %01000000 ; flags - db 07, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x102a1 @@ -394,8 +389,7 @@ Jumptable_UseQuit: ; 102ac MenuDataHeader_UnusableKeyItem: ; 0x102b0 db %01000000 ; flags - db 05, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x102b8 @@ -416,8 +410,7 @@ Jumptable_UseRegisterQuit: ; 102c7 MenuDataHeader_HoldableKeyItem: ; 0x102cd db $40 ; flags - db 03, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x102d5 @@ -440,8 +433,7 @@ Jumptable_GiveTossRegisterQuit: ; 102ea MenuDataHeader_HoldableItem: ; 0x102f2 db $40 ; flags - db 05, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x102fa @@ -858,8 +850,7 @@ TMHMSubmenu: ; 105dc (4:45dc) ; 10601 (4:4601) .UsableMenuDataHeader: ; 0x10601 db $40 ; flags - db 07, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .UsableMenuData2 db 1 ; default option ; 0x10609 @@ -878,8 +869,7 @@ TMHMSubmenu: ; 105dc (4:45dc) .UnusableMenuDataHeader: ; 0x10618 db $40 ; flags - db 09, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .UnusableMenuData2 db 1 ; default option ; 0x10620 @@ -1170,8 +1160,7 @@ TutorialPack: ; 107bb ; 107ef (4:47ef) .ItemsMenuDataHeader: ; 0x107ef db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .ItemsMenuData2 db 1 ; default option ; 0x107f7 @@ -1194,8 +1183,7 @@ TutorialPack: ; 107bb ; 1080e (4:480e) .KeyItemsMenuDataHeader: ; 0x1080e db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .KeyItemsMenuData2 db 1 ; default option ; 0x10816 @@ -1227,8 +1215,7 @@ TutorialPack: ; 107bb ; 10842 (4:4842) .BallsMenuDataHeader: ; 0x10842 db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .BallsMenuData2 db 1 ; default option ; 0x1084a @@ -1553,8 +1540,7 @@ Pack_InitColors: ; 10a40 ItemsPocketMenuDataHeader: ; 0x10a4f db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x10a57 @@ -1571,8 +1557,7 @@ ItemsPocketMenuDataHeader: ; 0x10a4f PC_Mart_ItemsPocketMenuDataHeader: ; 0x10a67 db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x10a6f @@ -1589,8 +1574,7 @@ PC_Mart_ItemsPocketMenuDataHeader: ; 0x10a67 KeyItemsPocketMenuDataHeader: ; 0x10a7f db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x10a87 @@ -1607,8 +1591,7 @@ KeyItemsPocketMenuDataHeader: ; 0x10a7f PC_Mart_KeyItemsPocketMenuDataHeader: ; 0x10a97 db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x10a9f @@ -1625,8 +1608,7 @@ PC_Mart_KeyItemsPocketMenuDataHeader: ; 0x10a97 BallsPocketMenuDataHeader: ; 0x10aaf db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x10ab7 @@ -1643,8 +1625,7 @@ BallsPocketMenuDataHeader: ; 0x10aaf PC_Mart_BallsPocketMenuDataHeader: ; 0x10ac7 db $40 ; flags - db 01, 07 ; start coords - db 11, 19 ; end coords + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option ; 0x10acf diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index c47e5261e..d8086a5be 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -1871,8 +1871,7 @@ Slots_AskBet: ; 9307c (24:707c) .MenuDataHeader: ; 0x930d6 db $40 ; flags - db 10, 14 ; start coords - db 17, 19 ; end coords + menu_coords 14, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData2 db 1 ; default option ; 0x930de diff --git a/engine/start_menu.asm b/engine/start_menu.asm index 91d6caff9..efb7b80f9 100755 --- a/engine/start_menu.asm +++ b/engine/start_menu.asm @@ -153,15 +153,13 @@ StartMenu:: ; 125cd .MenuDataHeader: db $40 ; tile backup - db 0, 10 ; start coords - db 17, 19 ; end coords + menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData db 1 ; default selection .ContestMenuDataHeader: db $40 ; tile backup - db 2, 10 ; start coords - db 17, 19 ; end coords + menu_coords 10, 2, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData db 1 ; default selection @@ -977,8 +975,7 @@ TakePartyItem: ; 12c60 GiveTakeItemMenuData: ; 12c9b db %01010000 - db 12, 12 ; start coords - db 17, 19 ; end coords + menu_coords 12, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .Items db 1 ; default option @@ -1166,8 +1163,7 @@ MonMailAction: ; 12d45 .MenuDataHeader: db $40 ; flags - db 10, 12 ; start coords - db 17, 19 ; end coords + menu_coords 12, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData2 db 1 ; default option ; 0x12dd1 diff --git a/home/menu.asm b/home/menu.asm index b2aacf61e..e44e1b2ca 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -41,8 +41,7 @@ LoadMenuTextBox:: ; 1d58 .MenuDataHeader: ; 1d5f db $40 ; tile backup - db 12, 0 ; start coords - db 17, 19 ; end coords + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw vTiles0 db 0 ; default option ; 1d67 @@ -61,8 +60,7 @@ LoadStandardMenuDataHeader:: ; 1d6e .MenuDataHeader: ; 1d75 db $40 ; tile backup - db 0, 0 ; start coords - db 17, 19 ; end coords + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw 0 db 1 ; default option ; 1d7d @@ -184,8 +182,7 @@ InterpretTwoOptionMenu:: ; 1dfe YesNoMenuDataHeader:: ; 1e1d db $40 ; tile backup - db 5, 10 ; start coords - db 9, 15 ; end coords + menu_coords 10, 5, 15, 9 dw .MenuData2 db 1 ; default option ; 1e25 diff --git a/macros/data.asm b/macros/data.asm index d01abb8ea..8345a2523 100644 --- a/macros/data.asm +++ b/macros/data.asm @@ -99,6 +99,13 @@ dsprite: MACRO ENDM +menu_coords: MACRO +; x1, y1, x2, y2 + db \2, \1 ; start coords + db \4, \3 ; end coords +ENDM + + sine_wave: MACRO ; \1: amplitude x = 0 diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm index 8789ebc6b..8f67c1dae 100644 --- a/maps/CeladonDeptStore6F.asm +++ b/maps/CeladonDeptStore6F.asm @@ -81,8 +81,7 @@ CeladonDeptStore6FVendingMachine: .MenuData: db $40 ; flags - db 02, 00 ; start coords - db 11, 19 ; end coords + menu_coords 0, 2, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/maps/CeladonGameCornerPrizeRoom.asm b/maps/CeladonGameCornerPrizeRoom.asm index 3e66a0e6b..07728ca97 100644 --- a/maps/CeladonGameCornerPrizeRoom.asm +++ b/maps/CeladonGameCornerPrizeRoom.asm @@ -104,8 +104,7 @@ CeladonPrizeRoom_NoCoinCase: CeladonPrizeRoom_TMMenuDataHeader: db $40 ; flags - db 02, 00 ; start coords - db 11, 15 ; end coords + menu_coords 0, 2, 15, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option @@ -191,8 +190,7 @@ CeladonGameCornerPrizeRoomPokemonVendor: .MenuDataHeader: db $40 ; flags - db 02, 00 ; start coords - db 11, 17 ; end coords + menu_coords 0, 2, 17, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/maps/DragonShrine.asm b/maps/DragonShrine.asm index d9089313d..19c1011d5 100644 --- a/maps/DragonShrine.asm +++ b/maps/DragonShrine.asm @@ -267,8 +267,7 @@ DragonShrineElder3Script: DragonShrineQuestion1_MenuDataHeader: db $40 ; flags - db 04, 08 ; start coords - db 11, 19 ; end coords + menu_coords 8, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option @@ -281,8 +280,7 @@ DragonShrineQuestion1_MenuDataHeader: DragonShrineQuestion2_MenuDataHeader: db $40 ; flags - db 04, 09 ; start coords - db 11, 19 ; end coords + menu_coords 9, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option @@ -295,8 +293,7 @@ DragonShrineQuestion2_MenuDataHeader: DragonShrineQuestion3_MenuDataHeader: db $40 ; flags - db 04, 05 ; start coords - db 11, 19 ; end coords + menu_coords 5, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option @@ -309,8 +306,7 @@ DragonShrineQuestion3_MenuDataHeader: DragonShrineQuestion4_MenuDataHeader: db $40 ; flags - db 04, 08 ; start coords - db 11, 19 ; end coords + menu_coords 8, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option @@ -323,8 +319,7 @@ DragonShrineQuestion4_MenuDataHeader: DragonShrineQuestion5_MenuDataHeader: db $40 ; flags - db 04, 12 ; start coords - db 11, 19 ; end coords + menu_coords 12, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/maps/EarlsPokemonAcademy.asm b/maps/EarlsPokemonAcademy.asm index 62ef5b16b..cad836b6d 100644 --- a/maps/EarlsPokemonAcademy.asm +++ b/maps/EarlsPokemonAcademy.asm @@ -104,8 +104,7 @@ AcademyBlackboard: .BlackboardMenuData: db $40 ; flags - db 00, 00 ; start coords - db 08, 11 ; end coords + menu_coords 0, 0, 11, 8 dw .MenuData2 db 1 ; default option diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm index 5ce8b92cc..8d3a91f2d 100644 --- a/maps/GoldenrodCity.asm +++ b/maps/GoldenrodCity.asm @@ -96,8 +96,7 @@ MoveTutor: .MoveMenuDataHeader: db $40 ; flags - db 02, 00 ; start coords - db 11, 15 ; end coords + menu_coords 0, 2, 15, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/maps/GoldenrodDeptStore6F.asm b/maps/GoldenrodDeptStore6F.asm index a20b74133..89c628684 100644 --- a/maps/GoldenrodDeptStore6F.asm +++ b/maps/GoldenrodDeptStore6F.asm @@ -70,8 +70,7 @@ GoldenrodVendingMachine: .MenuData: db $40 ; flags - db 02, 00 ; start coords - db 11, 19 ; end coords + menu_coords 0, 2, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm index dd3203ac7..b1a911a85 100644 --- a/maps/GoldenrodGameCorner.asm +++ b/maps/GoldenrodGameCorner.asm @@ -140,8 +140,7 @@ GoldenrodGameCornerPrizeVendor_NoCoinCaseScript: GoldenrodGameCornerTMVendorMenuData: db $40 ; flags - db 02, 00 ; start coords - db 11, 15 ; end coords + menu_coords 0, 2, 15, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option @@ -227,8 +226,7 @@ GoldenrodGameCornerPrizeMonVendorScript: .MenuDataHeader: db $40 ; flags - db 02, 00 ; start coords - db 11, 17 ; end coords + menu_coords 0, 2, 17, TEXTBOX_Y - 1 dw .MenuData2 db 1 ; default option diff --git a/maps/GoldenrodPokeComCenter2FMobile.asm b/maps/GoldenrodPokeComCenter2FMobile.asm index 1696a014f..1042bf28e 100644 --- a/maps/GoldenrodPokeComCenter2FMobile.asm +++ b/maps/GoldenrodPokeComCenter2FMobile.asm @@ -50,8 +50,7 @@ UnknownScript_0x62600: MenuDataHeader_0x62602: db $40 ; flags - db 00, 00 ; start coords - db 08, 15 ; end coords + menu_coords 0, 0, 15, 8 dw .MenuData2 db 1 ; default option @@ -93,8 +92,7 @@ UnknownScript_0x6264a: MenuDataHeader_0x6264c: db $40 ; flags - db 00, 00 ; start coords - db 08, 15 ; end coords + menu_coords 0, 0, 15, 8 dw .MenuData2 db 1 ; default option diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm index 14b787645..c48ab1bc8 100755 --- a/mobile/mobile_12.asm +++ b/mobile/mobile_12.asm @@ -564,8 +564,7 @@ MobileDesc_ZipCode: db "Your zip code?@" MenuDataHeader_0x484f1: ; 0x484f1 db $40 ; flags - db 02, 11 ; start coords - db 07, 19 ; end coords + menu_coords 11, 2, SCREEN_WIDTH - 1, 7 dw MenuData2_0x484f9 db 1 ; default option ; 0x484f9 @@ -580,23 +579,19 @@ String_484ff: db "Girl@" MenuDataHeader_0x48504: ; 0x48504 db $40 ; flags - db 00, 10 ; start coords - db 17, 19 ; end coords + menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 MenuDataHeader_0x48509: ; 0x48509 db $40 ; flags - db 05, 10 ; start coords - db 07, 19 ; end coords + menu_coords 10, 5, SCREEN_WIDTH - 1, 7 MenuDataHeader_0x4850e: ; 0x4850e db $40 ; flags - db 09, 10 ; start coords - db 11, 19 ; end coords + menu_coords 10, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 MenuDataHeader_0x48513: ; 0x48513 db $40 ; flags - db 01, 11 ; start coords - db 12, 18 ; end coords + menu_coords 11, 1, 18, 12 dw MenuData2_0x4851b db 1 ; default option ; 0x4851b @@ -1278,8 +1273,7 @@ Function48a9a: ; 48a9a (12:4a9a) MenuDataHeader_0x48a9c: ; 0x48a9c db $40 ; flags - db 08, 10 ; start coords - db 13, 19 ; end coord + menu_coords 10, 8, SCREEN_WIDTH - 1, 13 String_48aa1: ; 48aa1 db "Tell Now" diff --git a/mobile/mobile_12_2.asm b/mobile/mobile_12_2.asm index ba663cf86..8a59ebb2c 100755 --- a/mobile/mobile_12_2.asm +++ b/mobile/mobile_12_2.asm @@ -716,8 +716,7 @@ Function4ac58: ; 4ac58 MenuDataHeader_0x4aca2: ; 0x4aca2 db $40 ; flags - db 09, 11 ; start coords - db 17, 19 ; end coords + menu_coords 11, 9, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 1 ; default option ; 0x4acaa diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index 9cf80cdd4..27dd77261 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -278,8 +278,7 @@ Function89261: ; 89261 MenuDataHeader_0x892a3: ; 0x892a3 db $40 ; flags - db 05, 10 ; start coords - db 09, 15 ; end coords + menu_coords 10, 5, 15, 9 dw MenuData2_0x892ab db 1 ; default option ; 0x892ab @@ -2833,8 +2832,7 @@ Function8a116: ; 8a116 (22:6116) MenuDataHeader_0x8a176: ; 0x8a176 db $40 ; flags - db 00, 14 ; start coords - db 06, 19 ; end coords + menu_coords 14, 0, SCREEN_WIDTH - 1, 6 ; 8a17b Function8a17b: ; 8a17b (22:617b) @@ -2856,8 +2854,7 @@ Function8a17b: ; 8a17b (22:617b) MenuDataHeader_0x8a19a: ; 0x8a19a db $40 ; flags - db 00, 14 ; start coords - db 06, 19 ; end coords + menu_coords 14, 0, SCREEN_WIDTH - 1, 6 dw MenuData2_0x8a1a2 db 1 ; default option ; 0x8a1a2 @@ -3016,8 +3013,7 @@ Function8a2aa: ; 8a2aa (22:62aa) MenuDataHeader_0x8a2ef: ; 0x8a2ef db $40 ; flags - db 12, 00 ; start coords - db 17, 19 ; end coords + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 ; 8a2f4 UnknownText_0x8a2f4: ; 0x8a2f4 @@ -3178,8 +3174,7 @@ Unknown_8a40b: db 1, 2, 3, -1 MenuDataHeader_0x8a40f: ; 0x8a40f db $40 ; flags - db 02, 00 ; start coords - db 11, 10 ; end coords + menu_coords 0, 2, 10, TEXTBOX_Y - 1 dw MenuData2_0x8a417 db 1 ; default option ; 0x8a417 @@ -3195,8 +3190,7 @@ MenuData2_0x8a417: ; 0x8a417 MenuDataHeader_0x8a435: ; 0x8a435 db $40 ; flags - db 02, 00 ; start coords - db 09, 10 ; end coords + menu_coords 0, 2, 10, 9 dw MenuData2_0x8a43d db 1 ; default option ; 0x8a43d @@ -3921,8 +3915,7 @@ Jumptable_8a9c5: ; 8a9c5 (22:69c5) MenuDataHeader_0x8a9c9: ; 0x8a9c9 db $40 ; flags - db 04, 11 ; start coords - db 11, 18 ; end coords + menu_coords 11, 4, 18, TEXTBOX_Y - 1 ; 8a9ce Function8a9ce: ; 8a9ce (22:69ce) @@ -3951,8 +3944,7 @@ Function8a9ce: ; 8a9ce (22:69ce) MenuDataHeader_0x8a9f2: ; 0x8a9f2 db $40 ; flags - db 04, 11 ; start coords - db 11, 18 ; end coords + menu_coords 11, 4, 18, TEXTBOX_Y - 1 dw MenuData2_0x8a9fa db 1 ; default option ; 0x8a9fa diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm index 37b3d60b8..75985bc8c 100644 --- a/mobile/mobile_22_2.asm +++ b/mobile/mobile_22_2.asm @@ -911,8 +911,7 @@ Function8b855: ; 8b855 MenuDataHeader_0x8b867: ; 0x8b867 db $40 ; flags - db 03, 01 ; start coords - db 13, 18 ; end coords + menu_coords 1, 3, 18, 13 dw MenuData2_0x8b870 db 1 ; default option ; 0x8b86f @@ -1084,13 +1083,11 @@ Function8b9ab: ; 8b9ab MenuDataHeader_0x8b9ac: ; 0x8b9ac db $40 ; flags - db 00, 11 ; start coords - db 11, 19 ; end coords + menu_coords 11, 0, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 MenuDataHeader_0x8b9b1: ; 0x8b9b1 db $40 ; flags - db 00, 11 ; start coords - db 07, 19 ; end coords + menu_coords 11, 0, SCREEN_WIDTH - 1, 7 dw MenuData2_0x8b9b9 db 1 ; default option ; 0x8b9b9 @@ -1105,8 +1102,7 @@ MenuData2_0x8b9b9: ; 0x8b9b9 MenuDataHeader_0x8b9ca: ; 0x8b9ca db $40 ; flags - db 00, 11 ; start coords - db 11, 19 ; end coords + menu_coords 11, 0, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw MenuData2_0x8b9d2 db 1 ; default option ; 0x8b9d2 diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index 84be87ce4..50bd6151f 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -2120,8 +2120,7 @@ Function100d67: ; 100d67 .MenuDataHeader: ; 100d88 db 0 ; flags - db 11, 11 ; start coords - db 17, 19 ; end coords + menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData2 db 1 ; default option @@ -6288,8 +6287,7 @@ Function1029af: ; 1029af MenuDataHeader_1029bb: ; 1029bb db $40 ; flags - db 10, 3 ; start coords - db 12, 15 ; end coords + menu_coords 3, 10, 15, 12 dw NULL db 1 ; default option ; 1029c3 @@ -7786,8 +7784,7 @@ AskMobileOrCable: ; 103612 MenuDataHeader_103640: ; 103640 db $40 ; flags - db 6, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 6, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw MenuData2_103648 db 1 ; default option @@ -7941,8 +7938,7 @@ Function103700: ; 103700 MenuDataHeader_103747: ; 103747 db $40 ; flags - db 5, 13 ; start coords - db 11, 19 ; end coords + menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw MenuData2_10374f db 1 ; default option diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm index 454c38c30..a7550cd55 100644 --- a/mobile/mobile_45.asm +++ b/mobile/mobile_45.asm @@ -7298,16 +7298,14 @@ Function1179a7: ; 1179a7 (45:79a7) MenuDataHeader_1179b5: ; 1179b5 db $40 ; flags - db 12, 0 ; start coords - db 17, 19 ; end coords + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option ; 1179bd MenuDataHeader_1179bd: ; 1179bd db $40 ; flags - db 7, 14 ; start coords - db 11, 19 ; end coords + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option ; 1179c5 @@ -7658,18 +7656,16 @@ Function117c89: ret MenuDataHeader_117cbc: ; 0x117cbc - db $40 ; flags - db 12, 0 ; start coords - db 17, 19 ; end coords - dw NULL ; menu data 2 - db 0 ; default option + db $40 ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw NULL + db 0 ; default option MenuDataHeader_117cc4: ; 0x117cc4 - db $40 ; flags - db 7, 14 ; start coords - db 11, 19 ; end coords - dw NULL ; menu data 2 - db 0 ; default item + db $40 ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NULL + db 0 ; default item YesNo117ccc: ; 0x117ccc db "はい" diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm index be10e84d8..6a598c39b 100755 --- a/mobile/mobile_45_sprite_engine.asm +++ b/mobile/mobile_45_sprite_engine.asm @@ -508,8 +508,7 @@ Function1161d5: ; 1161d5 MenuDataHeader_11628c: ; 11628c db $40 ; flags - db 6, 0 ; start coords - db 17, 19 ; end coords + menu_coords 0, 6, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option ; 116294 diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index c38533e03..ccd6c0b7a 100755 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -3956,16 +3956,14 @@ BattleTowerRoomMenu_UpdateYesNoMenu: MenuDataHeader_119cf7: ; 119cf7 db $40 ; flags - db 7, 12 ; start coords - db 11, 19 ; end coords + menu_coords 12, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option ; 119cff MenuData_119cff: ; 119cff db $40 ; flags - db 7, 15 ; start coords - db 11, 19 ; end coords + menu_coords 15, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option ; 119d07 @@ -4758,16 +4756,14 @@ String_11a2d3: ; 11a2d3 MenuDataHeader_11a2d6: ; 11a2d6 db $40 ; flags - db 6, 14 ; start coords - db 10, 19 ; end coords + menu_coords 14, 6, SCREEN_WIDTH - 1, 10 dw NULL db 0 ; default option ; 11a2de MenuDataHeader_11a2de: ; 11a2de db $40 ; flags - db 7, 14 ; start coords - db 11, 19 ; end coords + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option ; 11a2e6 @@ -5330,8 +5326,7 @@ String_11a7f4: ; 11a7f4 MenuDataHeader_11a804: ; 11a804 db $40 ; flags - db 0, 0 ; start coords - db 5, 19 ; end coords + menu_coords 0, 0, SCREEN_WIDTH - 1, 5 dw NULL db 0 ; default option ; 11a80c @@ -6002,8 +5997,7 @@ Function11adc4: MenuDataHeader_11ae38: ; 11ae38 db $40 ; flags - db 10, 10 ; start coords - db 17, 17 ; end coords + menu_coords 10, 10, 17, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option ; 11ae40 @@ -6249,8 +6243,7 @@ Function11afd6: ; 11afd6 MenuDataHeader_11afe8: ; 11afe8 db $40 ; flags - db 12, 9 ; start coords - db 17, 19 ; end coords + menu_coords 9, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option ; 11aff0 @@ -6267,8 +6260,7 @@ String_11b003: ; 11b003 MenuDataHeader_11b013: ; 11b013 db $40 ; flags - db 7, 14 ; start coords - db 11, 19 ; end coords + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 1 ; default option ; 11b01b diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm index 38f1f679c..251c56adc 100755 --- a/mobile/mobile_5c.asm +++ b/mobile/mobile_5c.asm @@ -673,8 +673,7 @@ Function171c66: ; 171c66 (5c:5c66) MenuDataHeader_171c6b: ; 171c6b db $40 ; flags - db 12, 0 ; start coords - db 17, 19 ; end coords + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option ; 171c73 diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm index 5731f01fc..f03b7416a 100644 --- a/mobile/mobile_5f.asm +++ b/mobile/mobile_5f.asm @@ -484,8 +484,7 @@ Function17d246: ; 17d246 MenuDataHeader_17d26a: ; 17d26a db $40 ; flags - db 0, 0 ; start coords - db 9, 14 ; end coords + menu_coords 0, 0, 14, 9 dw MenuData2_17d272 db 1 ; default option @@ -500,8 +499,7 @@ MenuData2_17d272: ; 17d272 MenuDataHeader_ChallengeExplanationCancel: ; 17d28f db $40 ; flags - db 0, 0 ; start coords - db 7, 14 ; end coords + menu_coords 0, 0, 14, 7 dw MenuData2_ChallengeExplanationCancel db 1 ; default option diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm index e36e779ae..cc535eee9 100755 --- a/mobile/mobile_menu.asm +++ b/mobile/mobile_menu.asm @@ -462,8 +462,7 @@ Function4a28a: ; 4a28a (12:628a) MenuDataHeader_0x4a346: ; 0x4a346 db $40 ; flags - db 00, 12 ; start coords - db 06, 19 ; end coords + menu_coords 12, 0, SCREEN_WIDTH - 1, 6 String_4a34b: ; 4a34b db "いれなおす" @@ -485,8 +484,7 @@ UnknownText_0x4a35d: ; 0x4a35d DeletePassword_YesNo_MenuDataHeader: ; 0x4a362 db $40 ; flags - db 07, 14 ; start coords - db 11, 19 ; end coords + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw MenuData2_0x4a36a db 2 ; default option ; 0x4a36a