From 548af3c0f1a2807e791fe7bbfe1fc57ddb726c5e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Dec 2019 15:33:36 -0500 Subject: [PATCH 01/35] Document a bit of Match Call --- .../MossdeepCity_SpaceCenter_2F/scripts.inc | 4 +- data/text/match_call.inc | 218 ++--- gflib/string_util.c | 40 +- include/constants/global.h | 1 + include/global.h | 2 +- include/gym_leader_rematch.h | 9 +- include/pokenav.h | 39 +- include/strings.h | 59 +- src/data/text/match_call_messages.h | 787 +++++++++--------- src/daycare.c | 4 +- src/naming_screen.c | 3 +- src/pokenav.c | 2 +- src/pokenav_match_call_data.c | 635 +++++++------- src/pokenav_match_call_ui.c | 30 +- src/pokenav_unk_1.c | 4 +- src/pokenav_unk_10.c | 3 + src/pokenav_unk_2.c | 2 +- src/pokenav_unk_3.c | 168 ++-- src/pokenav_unk_4.c | 24 +- src/pokenav_unk_6.c | 9 +- src/pokenav_unk_8.c | 24 +- src/pokenav_unk_9.c | 19 +- src/strings.c | 108 +-- 23 files changed, 1140 insertions(+), 1054 deletions(-) diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 403377161..46dfe025f 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -357,12 +357,12 @@ MossdeepCity_SpaceCenter_2F_EventScript_RivalRayquazaCall:: @ 8224175 end MossdeepCity_SpaceCenter_2F_EventScript_MayRayquazaCall:: @ 8224193 - pokenavcall MossdeepCity_SpaceCenter_2F_Text_MayRayquazaCall + pokenavcall MatchCall_Text_MayRayquazaCall waitmessage return MossdeepCity_SpaceCenter_2F_EventScript_BrendanRayquazaCall:: @ 822419A - pokenavcall MossdeepCity_SpaceCenter_2F_Text_BrendanRayquazaCall + pokenavcall MatchCall_Text_BrendanRayquazaCall waitmessage return diff --git a/data/text/match_call.inc b/data/text/match_call.inc index 9ecdd03c7..568ed2a86 100644 --- a/data/text/match_call.inc +++ b/data/text/match_call.inc @@ -2014,7 +2014,7 @@ MatchCall_BattlePyramidText14:: @ 82B21FC .string "You're an inspiration!\n" .string "See you again!$" -gText_Mom_Pokenav_2B227B:: @ 82B227B +MatchCall_Text_Mom1:: @ 82B227B .string "MOM: Your father and you…\n" .string "Everyone is captivated by POKéMON.\p" .string "What is the charm of POKéMON?\p" @@ -2022,7 +2022,7 @@ gText_Mom_Pokenav_2B227B:: @ 82B227B .string "I adore POKéMON that help me with\l" .string "my everyday chores.$" -gText_Mom_Pokenav_2B2310:: @ 82B2310 +MatchCall_Text_Mom2:: @ 82B2310 .string "MOM: Hi, {PLAYER}!\n" .string "Your father keeps himself locked\l" .string "away in the PETALBURG GYM.\p" @@ -2032,13 +2032,13 @@ gText_Mom_Pokenav_2B2310:: @ 82B2310 .string "I'm guessing that losing to you\n" .string "was a big blow to his pride!$" -gText_Mom_Pokenav_2B23F3:: @ 82B23F3 +MatchCall_Text_Mom3:: @ 82B23F3 .string "MOM: {PLAYER}…\n" .string "Don't worry about me or the house.\p" .string "Wear those RUNNING SHOES until\n" .string "they fall apart, honey!$" -gText_Roxanne_Pokenav_2B2456:: @ 82B2456 +MatchCall_Text_Roxanne1:: @ 82B2456 .string "ROXANNE: Oh, hello, {PLAYER}!\p" .string "I've been hard at work retraining\n" .string "since we met.\p" @@ -2047,7 +2047,7 @@ gText_Roxanne_Pokenav_2B2456:: @ 82B2456 .string "But when I do, please visit my GYM\n" .string "for a rematch!$" -gText_Roxanne_Pokenav_2B250E:: @ 82B250E +MatchCall_Text_Roxanne2:: @ 82B250E .string "ROXANNE: Is this {PLAYER}?\n" .string "Congratulations!\l" .string "I've been hearing about you!\p" @@ -2056,18 +2056,18 @@ gText_Roxanne_Pokenav_2B250E:: @ 82B250E .string "But when I do, please visit my GYM\n" .string "for a rematch!$" -gText_Roxanne_Pokenav_2B25C1:: @ 82B25C1 +MatchCall_Text_Roxanne3:: @ 82B25C1 .string "ROXANNE: {PLAYER}!\n" .string "My GYM is ready!\p" .string "Please visit RUSTBORO whenever\n" .string "you can!$" -gText_Roxanne_Pokenav_2B2607:: @ 82B2607 +MatchCall_Text_Roxanne4:: @ 82B2607 .string "ROXANNE: At the RUSTBORO GYM,\n" .string "the fact that we battled, {PLAYER},\l" .string "is a matter of pride.$" -gText_Brawly_Pokenav_2B2659:: @ 82B2659 +MatchCall_Text_Brawly1:: @ 82B2659 .string "BRAWLY: Hey, there, {PLAYER}{KUN}!\p" .string "I learned a lot from the battle we\n" .string "had together.\p" @@ -2078,7 +2078,7 @@ gText_Brawly_Pokenav_2B2659:: @ 82B2659 .string "But if I can reopen the GYM,\n" .string "I want you to challenge us again.$" -gText_Brawly_Pokenav_2B275D:: @ 82B275D +MatchCall_Text_Brawly2:: @ 82B275D .string "BRAWLY: Hey, {PLAYER}{KUN}!\n" .string "Congratulations!\p" .string "Word about your exploits arrived\n" @@ -2090,17 +2090,17 @@ gText_Brawly_Pokenav_2B275D:: @ 82B275D .string "But if I can reopen the GYM,\n" .string "I want you to challenge us again.$" -gText_Brawly_Pokenav_2B286F:: @ 82B286F +MatchCall_Text_Brawly3:: @ 82B286F .string "BRAWLY: Hey, {PLAYER}{KUN}!\n" .string "My GYM's ready for action!\p" .string "Come back to DEWFORD anytime\n" .string "for another challenge!$" -gText_Brawly_Pokenav_2B28D1:: @ 82B28D1 +MatchCall_Text_Brawly4:: @ 82B28D1 .string "BRAWLY: {PLAYER}{KUN}, I don't think\n" .string "I'll ever get bored of battling you!$" -gText_Wattson_Pokenav_2B2912:: @ 82B2912 +MatchCall_Text_Wattson1:: @ 82B2912 .string "WATTSON: Oh, it's you!\p" .string "After you left, I've been redoing\n" .string "my training from scratch.\p" @@ -2109,7 +2109,7 @@ gText_Wattson_Pokenav_2B2912:: @ 82B2912 .string "You'll have to wait till then!\n" .string "Wahahahaha!$" -gText_Wattson_Pokenav_2B29CA:: @ 82B29CA +MatchCall_Text_Wattson2:: @ 82B29CA .string "WATTSON: Wahahahaha!\p" .string "You've really done it, haven't you?\n" .string "I've been getting word about you!\p" @@ -2120,18 +2120,18 @@ gText_Wattson_Pokenav_2B29CA:: @ 82B29CA .string "You'll have to wait till then!\n" .string "Wahahahaha!$" -gText_Wattson_Pokenav_2B2AB6:: @ 82B2AB6 +MatchCall_Text_Wattson3:: @ 82B2AB6 .string "WATTSON: Oh, it's you!\n" .string "My GYM's ready!\p" .string "Visit MAUVILLE anytime!\n" .string "Wahahahaha!$" -gText_Wattson_Pokenav_2B2B01:: @ 82B2B01 +MatchCall_Text_Wattson4:: @ 82B2B01 .string "WATTSON: Wahahaha!\p" .string "A battle with you is always charged\n" .string "with shocking power!$" -gText_Flannery_Pokenav_2B2B4D:: @ 82B2B4D +MatchCall_Text_Flannery1:: @ 82B2B4D .string "FLANNERY: {PLAYER}…\p" .string "When we battled, I learned exactly\n" .string "how immature I was.\p" @@ -2141,7 +2141,7 @@ gText_Flannery_Pokenav_2B2B4D:: @ 82B2B4D .string "When the time comes, {PLAYER},\n" .string "please challenge us again.$" -gText_Flannery_Pokenav_2B2C0E:: @ 82B2C0E +MatchCall_Text_Flannery2:: @ 82B2C0E .string "FLANNERY: Hello, {PLAYER}?\n" .string "Congratulations!\p" .string "Word of your success has reached\n" @@ -2152,44 +2152,44 @@ gText_Flannery_Pokenav_2B2C0E:: @ 82B2C0E .string "appear beside my name in the\l" .string "MATCH CALL list.$" -gText_Flannery_Pokenav_2B2CF1:: @ 82B2CF1 +MatchCall_Text_Flannery3:: @ 82B2CF1 .string "FLANNERY: Oh, {PLAYER}?\n" .string "Our GYM's ready!\p" .string "Come to LAVARIDGE for a soak\n" .string "in the hot spring and a challenge!$" -gText_Flannery_Pokenav_2B2D54:: @ 82B2D54 +MatchCall_Text_Flannery4:: @ 82B2D54 .string "FLANNERY: {PLAYER}…\n" .string "I'm positive that you keep getting\l" .string "better at training every time.$" -gText_Winona_Pokenav_2B2DA4:: @ 82B2DA4 +MatchCall_Text_Winona1:: @ 82B2DA4 .string "WINONA: Hello, {PLAYER}!\p" .string "Thanks to our battle, I've come\n" .string "to understand my weak points!\p" .string "When I reopen the GYM, I won't go\n" .string "down in defeat again!$" -gText_Winona_Pokenav_2B2E2B:: @ 82B2E2B +MatchCall_Text_Winona2:: @ 82B2E2B .string "WINONA: You've done it, {PLAYER}!\p" .string "News about the new CHAMPION\n" .string "has reached us in FORTREE!\p" .string "But… The next time we battle,\n" .string "it's not going to end the same way.$" -gText_Winona_Pokenav_2B2EC2:: @ 82B2EC2 +MatchCall_Text_Winona3:: @ 82B2EC2 .string "WINONA: Is this {PLAYER}?\n" .string "Our GYM is back in operation!\p" .string "We're waiting for you in FORTREE!$" -gText_Winona_Pokenav_2B2F16:: @ 82B2F16 +MatchCall_Text_Winona4:: @ 82B2F16 .string "WINONA: {PLAYER}…\n" .string "Though I have lost, my wings will\l" .string "never break.\p" .string "Yes, in exactly the same way that\n" .string "you never lost sight of your dream.$" -gText_TateLiza_Pokenav_2B2F97:: @ 82B2F97 +MatchCall_Text_TateLiza1:: @ 82B2F97 .string "TATE: Oh! You're…\n" .string "LIZA: {PLAYER}!\p" .string "TATE: We're in training again…\n" @@ -2199,7 +2199,7 @@ gText_TateLiza_Pokenav_2B2F97:: @ 82B2F97 .string "TATE: A mark'll appear by our name…\n" .string "LIZA: On the MATCH CALL list.$" -gText_TateLiza_Pokenav_2B306E:: @ 82B306E +MatchCall_Text_TateLiza2:: @ 82B306E .string "TATE: {PLAYER}, congratulations!\n" .string "LIZA: {PLAYER}, congratulations!\p" .string "TATE: The two of us are…\n" @@ -2209,7 +2209,7 @@ gText_TateLiza_Pokenav_2B306E:: @ 82B306E .string "TATE: A mark'll appear by our name…\n" .string "LIZA: On the MATCH CALL list.$" -gText_TateLiza_Pokenav_2B3158:: @ 82B3158 +MatchCall_Text_TateLiza3:: @ 82B3158 .string "TATE: {PLAYER}!\n" .string "LIZA: {PLAYER}!\p" .string "TATE: Our GYM is ready!\n" @@ -2217,13 +2217,13 @@ gText_TateLiza_Pokenav_2B3158:: @ 82B3158 .string "TATE: Please come visit…\n" .string "LIZA: MOSSDEEP anytime!$" -gText_TateLiza_Pokenav_2B31CD:: @ 82B31CD +MatchCall_Text_TateLiza4:: @ 82B31CD .string "TATE: {PLAYER}, the battle we had…\n" .string "LIZA: Is an invaluable experience.\p" .string "TATE: It would be nice if…\n" .string "LIZA: We could all battle again!$" -gText_Juan_Pokenav_2B3249:: @ 82B3249 +MatchCall_Text_Juan1:: @ 82B3249 .string "JUAN: Hmm…\n" .string "{PLAYER}{KUN}… Was it?\p" .string "Our battle together--it brought\n" @@ -2232,7 +2232,7 @@ gText_Juan_Pokenav_2B3249:: @ 82B3249 .string "Perhaps you are a genius who may\n" .string "yet surpass WALLACE!$" -gText_Juan_Pokenav_2B32EC:: @ 82B32EC +MatchCall_Text_Juan2:: @ 82B32EC .string "JUAN: Fufu… {PLAYER}{KUN}…\n" .string "You've finally achieved your goal.\p" .string "My eye for appraising talent wasn't\n" @@ -2241,14 +2241,14 @@ gText_Juan_Pokenav_2B32EC:: @ 82B32EC .string "you, for you have scaled the peak\l" .string "of power and prestige.$" -gText_Juan_Pokenav_2B33AA:: @ 82B33AA +MatchCall_Text_Juan3:: @ 82B33AA .string "JUAN: Hoho… {PLAYER}{KUN}…\p" .string "Our SOOTOPOLIS GYM has finally\n" .string "reopened.\p" .string "If you wish to see me, you are\n" .string "welcome to visit anytime.$" -gText_Juan_Pokenav_2B341E:: @ 82B341E +MatchCall_Text_Juan4:: @ 82B341E .string "JUAN: {PLAYER}{KUN}…\p" .string "Like the finest music, the battles\n" .string "we wage together strike chords\l" @@ -2256,7 +2256,7 @@ gText_Juan_Pokenav_2B341E:: @ 82B341E .string "When I close my eyes, I see visions\n" .string "of you soaring with the melody…$" -gText_Sidney_Pokenav_2B34CC:: @ 82B34CC +MatchCall_Text_Sidney:: @ 82B34CC .string "SIDNEY: Yo, {PLAYER}!\p" .string "If you want to battle with me\n" .string "again, you come on back whenever\l" @@ -2264,7 +2264,7 @@ gText_Sidney_Pokenav_2B34CC:: @ 82B34CC .string "I'll always be here!\n" .string "I'll be waiting!$" -gText_Phoebe_Pokenav_2B3561:: @ 82B3561 +MatchCall_Text_Phoebe:: @ 82B3561 .string "PHOEBE: Hi, {PLAYER}!\p" .string "How about coming back here again\n" .string "sometime?\p" @@ -2272,7 +2272,7 @@ gText_Phoebe_Pokenav_2B3561:: @ 82B3561 .string "your bond has grown with your\l" .string "POKéMON.$" -gText_Glacia_Pokenav_2B35E4:: @ 82B35E4 +MatchCall_Text_Glacia:: @ 82B35E4 .string "GLACIA: Hello, {PLAYER}.\p" .string "I trust you haven't become\n" .string "complacent with your power?\p" @@ -2280,7 +2280,7 @@ gText_Glacia_Pokenav_2B35E4:: @ 82B35E4 .string "hot emotions just a little, do come\l" .string "to the POKéMON LEAGUE…$" -gText_Drake_Pokenav_2B368B:: @ 82B368B +MatchCall_Text_Drake:: @ 82B368B .string "DRAKE: That voice… {PLAYER}, is it?\n" .string "You sound well…\p" .string "I understand that there is now\n" @@ -2292,7 +2292,7 @@ gText_Drake_Pokenav_2B368B:: @ 82B368B .string "the POKéMON LEAGUE!\p" .string "Don't you agree, {PLAYER}?$" -gText_Wallace_Pokenav_2B3790:: @ 82B3790 +MatchCall_Text_Wallace:: @ 82B3790 .string "WALLACE: Hello, {PLAYER}{KUN}.\n" .string "Have you met STEVEN?\p" .string "He is…\n" @@ -2306,7 +2306,7 @@ gText_Wallace_Pokenav_2B3790:: @ 82B3790 .string "But what is a rare stone exactly?\n" .string "All I can think of is a METEORITE…$" -MossdeepCity_SpaceCenter_2F_Text_MayRayquazaCall: @ 82B38C1 +MatchCall_Text_MayRayquazaCall: @ 82B38C1 .string "… … … … … …\n" .string "… … … … … Beep!\p" .string "MAY: Hi, {PLAYER}{KUN}!\p" @@ -2321,7 +2321,7 @@ MossdeepCity_SpaceCenter_2F_Text_MayRayquazaCall: @ 82B38C1 .string "… … … … … …\n" .string "… … … … … Click!$" -MossdeepCity_SpaceCenter_2F_Text_BrendanRayquazaCall: @ 82B39C6 +MatchCall_Text_BrendanRayquazaCall: @ 82B39C6 .string "… … … … … …\n" .string "… … … … … Beep!\p" .string "BRENDAN: Hey, {PLAYER}!\n" @@ -2335,14 +2335,14 @@ MossdeepCity_SpaceCenter_2F_Text_BrendanRayquazaCall: @ 82B39C6 .string "… … … … … …\n" .string "… … … … … Click!$" -gText_May_Pokenav_2B3AB3:: @ 2B3AB3 +MatchCall_Text_May1:: @ 2B3AB3 .string "MAY: Hi, {PLAYER}{KUN}!\p" .string "MR. BRINEY retired as a SAILOR,\n" .string "but I still see him out on the sea\l" .string "with his pet PEEKO sometimes.\p" .string "He must love the sea still.$" -gText_May_Pokenav_2B3B3F:: @ 2B3B3F +MatchCall_Text_May2:: @ 2B3B3F .string "MAY: Hi, {PLAYER}{KUN}!\p" .string "You know how little towns like\n" .string "PETALBURG and DEWFORD have GYMS?\p" @@ -2351,7 +2351,7 @@ gText_May_Pokenav_2B3B3F:: @ 2B3B3F .string "When they finally build a GYM there,\n" .string "I should apply to be the LEADER.$" -gText_May_Pokenav_2B3C13:: @ 2B3C13 +MatchCall_Text_May3:: @ 2B3C13 .string "MAY: Hi, {PLAYER}{KUN}!\p" .string "Do you remember a man named\n" .string "the CUTTER in RUSTBORO?\l" @@ -2363,13 +2363,13 @@ gText_May_Pokenav_2B3C13:: @ 2B3C13 .string "… … … … … …\p" .string "The ROCK SMASH GUY!$" -gText_May_Pokenav_2B3CF3:: @ 2B3CF3 +MatchCall_Text_May4:: @ 2B3CF3 .string "MAY: {PLAYER}{KUN}?\p" .string "RUSTURF TUNNEL…\n" .string "They named it that because it\l" .string "joins RUSTBORO and VERDANTURF.$" -gText_May_Pokenav_2B3D4B:: @ 2B3D4B +MatchCall_Text_May5:: @ 2B3D4B .string "MAY: {PLAYER}{KUN}, how are you?\p" .string "I'm out on ROUTE 111 now.\p" .string "I'm going to get a rest at an old\n" @@ -2377,7 +2377,7 @@ gText_May_Pokenav_2B3D4B:: @ 2B3D4B .string "She lives just north of\n" .string "the desert.$" -gText_May_Pokenav_2B3DD1:: @ 2B3DD1 +MatchCall_Text_May6:: @ 2B3DD1 .string "MAY: Hi, {PLAYER}{KUN}!\p" .string "Did you know about the MIRAGE\n" .string "TOWER in the desert?\p" @@ -2385,21 +2385,21 @@ gText_May_Pokenav_2B3DD1:: @ 2B3DD1 .string "to mysteriously come and go.\p" .string "I wish I could see it.$" -gText_May_Pokenav_2B3E69:: @ 2B3E69 +MatchCall_Text_May7:: @ 2B3E69 .string "MAY: {PLAYER}{KUN}, yahoo!\n" .string "I'm on ROUTE 119 now.\p" .string "There's a big river here, and\n" .string "it often rains.\p" .string "I got soaked!$" -gText_May_Pokenav_2B3ECD:: @ 2B3ECD +MatchCall_Text_May8:: @ 2B3ECD .string "MAY: {PLAYER}{KUN}, hi.\p" .string "MT. PYRE is a memorial to POKéMON\n" .string "whose lives have ended.\p" .string "Maybe as a result, it's infested\n" .string "with many GHOST-type POKéMON!$" -gText_May_Pokenav_2B3F2B:: @ 2B3F2B +MatchCall_Text_May9:: @ 2B3F2B .string "MAY: Hi, {PLAYER}{KUN}!\p" .string "I was thinking of going to the hot\n" .string "spring in LAVARIDGE.\p" @@ -2407,14 +2407,14 @@ gText_May_Pokenav_2B3F2B:: @ 2B3F2B .string "PASS, I ran into some bad-looking\l" .string "characters. The mood was ugly!$" -gText_May_Pokenav_2B3FFB:: @ 2B3FFB +MatchCall_Text_May10:: @ 2B3FFB .string "MAY: Hi, {PLAYER}{KUN}!\n" .string "Did you see the news?\p" .string "They say CAPT. STERN discovered\n" .string "the SEAFLOOR CAVERN while on his\l" .string "submarine expedition.$" -gText_May_Pokenav_2B402B:: @ 2B402B +MatchCall_Text_May11:: @ 2B402B .string "MAY: Hi, {PLAYER}{KUN}!\n" .string "Don't you think it's neat?\p" .string "Even if you don't have a boat,\n" @@ -2424,7 +2424,7 @@ gText_May_Pokenav_2B402B:: @ 2B402B .string "There's a POKéMON move that lets\n" .string "you go to the bottom of the sea.$" -gText_May_Pokenav_2B414B:: @ 2B414B +MatchCall_Text_May12:: @ 2B414B .string "MAY: Hi, {PLAYER}{KUN}!\n" .string "Hope things are okay!\p" .string "Have you been on the sea and\n" @@ -2435,7 +2435,7 @@ gText_May_Pokenav_2B414B:: @ 2B414B .string "When you get to the other side,\n" .string "come up to the surface. Easy!$" -gText_May_Pokenav_2B4228:: @ 2B4228 +MatchCall_Text_May13:: @ 2B4228 .string "MAY: Hi, {PLAYER}{KUN}!\p" .string "How's it going?\n" .string "Are you filling your POKéDEX?\p" @@ -2444,7 +2444,7 @@ gText_May_Pokenav_2B4228:: @ 2B4228 .string "And there are three of them!\p" .string "I would love to see even one…$" -gText_May_Pokenav_2B42E0:: @ 2B42E0 +MatchCall_Text_May14:: @ 2B42E0 .string "MAY: {PLAYER}{KUN}!\n" .string "I heard the rumors!\p" .string "You beat the SOOTOPOLIS GYM\n" @@ -2452,7 +2452,7 @@ gText_May_Pokenav_2B42E0:: @ 2B42E0 .string "That means you don't have far\n" .string "to go, do you?$" -gText_May_Pokenav_2B4350:: @ 2B4350 +MatchCall_Text_May15:: @ 2B4350 .string "MAY: There isn't a single TRAINER\n" .string "left in HOENN who doesn't know who\l" .string "you are, {PLAYER}{KUN}!\p" @@ -2460,7 +2460,7 @@ gText_May_Pokenav_2B4350:: @ 2B4350 .string "with you, {PLAYER}{KUN}, they're all\l" .string "surprised!$" -gText_Brendan_Pokenav_2B43EF:: @ 2B43EF +MatchCall_Text_Brendan1:: @ 2B43EF .string "BRENDAN: Hey, {PLAYER}!\p" .string "MR. BRINEY retired as a SAILOR,\n" .string "but I still see him out on the sea\l" @@ -2468,7 +2468,7 @@ gText_Brendan_Pokenav_2B43EF:: @ 2B43EF .string "I guess he must love\n" .string "the sea still.$" -gText_Brendan_Pokenav_2B4486:: @ 2B4486 +MatchCall_Text_Brendan2:: @ 2B4486 .string "BRENDAN: Hey, {PLAYER}!\p" .string "I don't get how little towns like\n" .string "PETALBURG and DEWFORD have GYMS.\p" @@ -2477,7 +2477,7 @@ gText_Brendan_Pokenav_2B4486:: @ 2B4486 .string "When they finally build a GYM there,\n" .string "I should apply to be the LEADER.$" -gText_Brendan_Pokenav_2B4560:: @ 2B4560 +MatchCall_Text_Brendan3:: @ 2B4560 .string "BRENDAN: Yo, {PLAYER}!\p" .string "Do you remember a guy named\n" .string "the CUTTER in RUSTBORO?\l" @@ -2489,14 +2489,14 @@ gText_Brendan_Pokenav_2B4560:: @ 2B4560 .string "… … … … … …\p" .string "The ROCK SMASH GUY!$" -gText_Brendan_Pokenav_2B463F:: @ 2B463F +MatchCall_Text_Brendan4:: @ 2B463F .string "BRENDAN: This voice… {PLAYER}?\p" .string "They gave RUSTURF TUNNEL its name\n" .string "because it joins RUSTBORO and\l" .string "VERDANTURF.\p" .string "Did you know that?$" -gText_Brendan_Pokenav_2B46B7:: @ 2B46B7 +MatchCall_Text_Brendan5:: @ 2B46B7 .string "BRENDAN: {PLAYER}, what's up?\p" .string "Hey, I'm out on ROUTE 111 now.\p" .string "I'm going to rest up at an old\n" @@ -2504,7 +2504,7 @@ gText_Brendan_Pokenav_2B46B7:: @ 2B46B7 .string "If you're in the area, you should\n" .string "visit her, too.$" -gText_Brendan_Pokenav_2B4761:: @ 2B4761 +MatchCall_Text_Brendan6:: @ 2B4761 .string "BRENDAN: Hey, {PLAYER}!\p" .string "Did you know about the MIRAGE\n" .string "TOWER in the desert?\p" @@ -2512,21 +2512,21 @@ gText_Brendan_Pokenav_2B4761:: @ 2B4761 .string "seen only sometimes.\p" .string "I'd like to see that!$" -gText_Brendan_Pokenav_2B47F4:: @ 2B47F4 +MatchCall_Text_Brendan7:: @ 2B47F4 .string "BRENDAN: Who's this? Oh, {PLAYER}?\n" .string "Guess what? I'm on ROUTE 119 now.\p" .string "There's a big river here, and\n" .string "it rains all the time.\p" .string "I got soaked to the bone!$" -gText_Brendan_Pokenav_2B4882:: @ 2B4882 +MatchCall_Text_Brendan8:: @ 2B4882 .string "BRENDAN: {PLAYER}!\p" .string "MT. PYRE is a memorial to POKéMON\n" .string "whose lives have ended.\p" .string "That's probably why it's infested\n" .string "with many GHOST-type POKéMON!$" -gText_Brendan_Pokenav_2B4909:: @ 2B4909 +MatchCall_Text_Brendan9:: @ 2B4909 .string "BRENDAN: Hey there, {PLAYER}.\p" .string "I was on my way back to the hot\n" .string "spring in LAVARIDGE.\p" @@ -2535,14 +2535,14 @@ gText_Brendan_Pokenav_2B4909:: @ 2B4909 .string "Those creeps…\n" .string "I think they were TEAM MAGMA.$" -gText_Brendan_Pokenav_2B49C4:: @ 2B49C4 +MatchCall_Text_Brendan10:: @ 2B49C4 .string "BRENDAN: Hi, {PLAYER}!\n" .string "Did you catch the news?\p" .string "They say CAPT. STERN discovered\n" .string "the SEAFLOOR CAVERN while on his\l" .string "submarine expedition.$" -gText_Brendan_Pokenav_2B4A44:: @ 2B4A44 +MatchCall_Text_Brendan11:: @ 2B4A44 .string "BRENDAN: Hey there, {PLAYER}!\n" .string "Don't you think it's awesome?\p" .string "Even if you don't have a boat,\n" @@ -2552,7 +2552,7 @@ gText_Brendan_Pokenav_2B4A44:: @ 2B4A44 .string "travel to the bottom of the sea.\p" .string "Man, POKéMON can do anything!$" -gText_Brendan_Pokenav_2B4B28:: @ 2B4B28 +MatchCall_Text_Brendan12:: @ 2B4B28 .string "BRENDAN: Howdy, {PLAYER}!\n" .string "How are you holding up?\p" .string "Ever found your way to the other\n" @@ -2562,7 +2562,7 @@ gText_Brendan_Pokenav_2B4B28:: @ 2B4B28 .string "When you get to the other side,\n" .string "come up to the surface. Simple!$" -gText_Brendan_Pokenav_2B4C15:: @ 2B4C15 +MatchCall_Text_Brendan13:: @ 2B4C15 .string "BRENDAN: Hey there, {PLAYER}!\p" .string "How's it going? Filling up your\n" .string "POKéDEX successfully?\p" @@ -2571,14 +2571,14 @@ gText_Brendan_Pokenav_2B4C15:: @ 2B4C15 .string "And not just one--three!\p" .string "I'd love to catch even one…$" -gText_Brendan_Pokenav_2B4CD8:: @ 2B4CD8 +MatchCall_Text_Brendan14:: @ 2B4CD8 .string "BRENDAN: {PLAYER}!\n" .string "I heard the rumors!\p" .string "You beat the SOOTOPOLIS GYM\n" .string "LEADER? Awesome!\p" .string "You're getting awful close now!$" -gText_Brendan_Pokenav_2B4D46:: @ 2B4D46 +MatchCall_Text_Brendan15:: @ 2B4D46 .string "BRENDAN: There isn't a TRAINER in\n" .string "all of HOENN who doesn't know who\l" .string "you are, {PLAYER}!\p" @@ -2586,19 +2586,19 @@ gText_Brendan_Pokenav_2B4D46:: @ 2B4D46 .string "with you, {PLAYER}, they get pretty\l" .string "envious!$" -gText_Wally_Pokenav_2B4DE2:: @ 2B4DE2 +MatchCall_Text_Wally1:: @ 2B4DE2 .string "WALLY: Oh, {PLAYER}!\p" .string "I've been getting healthier and\n" .string "more physically fit.\p" .string "I hope I can become a TRAINER like\n" .string "you soon, {PLAYER}!$" -gText_Wally_Pokenav_2B4E57:: @ 2B4E57 +MatchCall_Text_Wally2:: @ 2B4E57 .string "WALLY: {PLAYER}, hello!\p" .string "After RUSTURF TUNNEL went\n" .string "through, WANDA's been very happy!$" -gText_Wally_Pokenav_2B4EA5:: @ 2B4EA5 +MatchCall_Text_Wally3:: @ 2B4EA5 .string "WALLY: Oh, {PLAYER}!\p" .string "I… I left my uncle's place in\n" .string "VERDANTURF without telling anyone.\p" @@ -2606,7 +2606,7 @@ gText_Wally_Pokenav_2B4EA5:: @ 2B4EA5 .string "{PLAYER}, you understand how\n" .string "I feel, don't you?$" -gText_Wally_Pokenav_2B4F41:: @ 2B4F41 +MatchCall_Text_Wally4:: @ 2B4F41 .string "WALLY: {PLAYER}?\n" .string "It's me, WALLY!\p" .string "The world of TRAINERS is amazing!\p" @@ -2615,7 +2615,7 @@ gText_Wally_Pokenav_2B4F41:: @ 2B4F41 .string "It's as if everyone's getting\n" .string "connected through POKéMON!$" -gText_Wally_Pokenav_2B4FF3:: @ 2B4FF3 +MatchCall_Text_Wally5:: @ 2B4FF3 .string "WALLY: {PLAYER}? It's awesome!\n" .string "That RALTS we caught together?\l" .string "It evolved, {PLAYER}!\p" @@ -2625,13 +2625,13 @@ gText_Wally_Pokenav_2B4FF3:: @ 2B4FF3 .string "After all, it's the POKéMON that\n" .string "should be praised!$" -gText_Wally_Pokenav_2B50B1:: @ 2B50B1 +MatchCall_Text_Wally6:: @ 2B50B1 .string "… … … … … …\n" .string "… … … … … …\p" .string "WALLY appears to be out of\n" .string "the POKéNAV's service area…$" -gText_Wally_Pokenav_2B5100:: @ 2B5100 +MatchCall_Text_Wally7:: @ 2B5100 .string "WALLY: Oh, {PLAYER}!\p" .string "Before I met you, I hardly ever\n" .string "left my house…\p" @@ -2640,7 +2640,7 @@ gText_Wally_Pokenav_2B5100:: @ 2B5100 .string "{PLAYER}…\n" .string "Thank you…$" -gText_Scott_Pokenav_2B5184:: @ 2B5184 +MatchCall_Text_Scott1:: @ 2B5184 .string "SCOTT: Howdy, {PLAYER}{KUN}!\p" .string "You know how POKéMON can be found\n" .string "everywhere?\p" @@ -2651,7 +2651,7 @@ gText_Scott_Pokenav_2B5184:: @ 2B5184 .string "As a result, I have to hurry\n" .string "everywhere, too. Busy, busy!$" -gText_Scott_Pokenav_2B5275:: @ 2B5275 +MatchCall_Text_Scott2:: @ 2B5275 .string "SCOTT: I'm on ROUTE 119 right now.\n" .string "It's teeming with TRAINERS!\p" .string "It's also overgrown with tall grass\n" @@ -2659,7 +2659,7 @@ gText_Scott_Pokenav_2B5275:: @ 2B5275 .string "Walking around in shorts here\n" .string "makes me all ticklish!$" -gText_Scott_Pokenav_2B5323:: @ 2B5323 +MatchCall_Text_Scott3:: @ 2B5323 .string "SCOTT: Hi, hi, {PLAYER}{KUN}!\p" .string "Have you had the chance to climb\n" .string "MT. PYRE?\p" @@ -2668,7 +2668,7 @@ gText_Scott_Pokenav_2B5323:: @ 2B5323 .string "It's somewhere every TRAINER\n" .string "should climb to the top of once.$" -gText_Scott_Pokenav_2B53DB:: @ 2B53DB +MatchCall_Text_Scott4:: @ 2B53DB .string "SCOTT: Hi, {PLAYER}{KUN}!\p" .string "I've been hearing about these odd\n" .string "gangs being a nuisance.\p" @@ -2678,7 +2678,7 @@ gText_Scott_Pokenav_2B53DB:: @ 2B53DB .string "skilled TRAINERS among them.\p" .string "…But if they're thugs…$" -gText_Scott_Pokenav_2B54A5:: @ 2B54A5 +MatchCall_Text_Scott5:: @ 2B54A5 .string "SCOTT: Oh, hi, {PLAYER}{KUN}.\p" .string "Might there be tough TRAINERS\n" .string "at the bottom of the sea?\p" @@ -2686,7 +2686,7 @@ gText_Scott_Pokenav_2B54A5:: @ 2B54A5 .string "I can't swim, for one.\l" .string "And I don't raise POKéMON…$" -gText_Scott_Pokenav_2B5541:: @ 2B5541 +MatchCall_Text_Scott6:: @ 2B5541 .string "SCOTT: Hi, hi, {PLAYER}{KUN}!\p" .string "You know that you can challenge\n" .string "the POKéMON LEAGUE when you've\l" @@ -2703,20 +2703,20 @@ gText_Scott_Pokenav_2B5541:: @ 2B5541 .string "the POKéMON LEAGUE into the HALL\l" .string "OF FAME!$" -gText_Scott_Pokenav_2B56CA:: @ 2B56CA +MatchCall_Text_Scott7:: @ 2B56CA .string "… … … … … …\n" .string "… … … … … …\p" .string "SCOTT appears to be out of\n" .string "the POKéNAV's service area…$" -gText_Norman_Pokenav_2B5719:: @ 82B5719 +MatchCall_Text_Norman1:: @ 82B5719 .string "DAD: In RUSTBORO, there's a man\n" .string "that goes by the odd name of\l" .string "the CUTTER.\p" .string "If you're in the area, you should\n" .string "pay him a visit.$" -gText_Norman_Pokenav_2B5795:: @ 82B5795 +MatchCall_Text_Norman2:: @ 82B5795 .string "DAD: Hm… Little by little, but also\n" .string "very surely, you're getting\l" .string "tougher, {PLAYER}.\p" @@ -2725,7 +2725,7 @@ gText_Norman_Pokenav_2B5795:: @ 82B5795 .string "and me…\p" .string "This feeling is hard to explain.$" -gText_Norman_Pokenav_2B584D:: @ 82B584D +MatchCall_Text_Norman3:: @ 82B584D .string "DAD: I see…\n" .string "You've collected four GYM BADGES…\p" .string "There's no avoiding it now.\n" @@ -2733,7 +2733,7 @@ gText_Norman_Pokenav_2B584D:: @ 82B584D .string "Come anytime.\n" .string "We'll all be waiting for you!$" -gText_Norman_Pokenav_2B58E3:: @ 82B58E3 +MatchCall_Text_Norman4:: @ 82B58E3 .string "DAD: {PLAYER}! You'd better go visit\n" .string "Mother every so often.\p" .string "I'm going to remain here and\n" @@ -2741,27 +2741,27 @@ gText_Norman_Pokenav_2B58E3:: @ 82B58E3 .string "The way of battling is deep\n" .string "and unforgiving!$" -gText_Norman_Pokenav_2B5979:: @ 82B5979 +MatchCall_Text_Norman5:: @ 82B5979 .string "DAD: Oh, hi, {PLAYER}!\p" .string "What's that? MAGMA EMBLEM?\n" .string "I don't know what that's about.\p" .string "But with a name like that, it may\n" .string "be somehow linked to a volcano!$" -gText_Norman_Pokenav_2B5A07:: @ 82B5A07 +MatchCall_Text_Norman6:: @ 82B5A07 .string "DAD: Hiyah! Haah! Dwah!\p" .string "…Oh? {PLAYER}!\p" .string "You caught me right in the middle\n" .string "of a POKéMON training session!$" -gText_Norman_Pokenav_2B5A69:: @ 82B5A69 +MatchCall_Text_Norman7:: @ 82B5A69 .string "DAD: {PLAYER}!\p" .string "Who would've thought you'd become\n" .string "the POKéMON LEAGUE CHAMPION…\p" .string "Okay!\n" .string "I won't be left behind!$" -gText_Norman_Pokenav_2B5ACF:: @ 82B5ACF +MatchCall_Text_Norman8:: @ 82B5ACF .string "DAD: Hm? {PLAYER}?\n" .string "What good timing!\p" .string "This time, I'm going to challenge\n" @@ -2769,11 +2769,11 @@ gText_Norman_Pokenav_2B5ACF:: @ 82B5ACF .string "I'm waiting in the PETALBURG GYM.\n" .string "Accept my challenge anytime!$" -gText_Norman_Pokenav_2B5B5E:: @ 82B5B5E +MatchCall_Text_Norman9:: @ 82B5B5E .string "DAD: …You amaze me, {PLAYER}.\n" .string "How much higher will you soar?$" -gText_Steven_Pokenav_2B5B95:: @ 82B5B95 +MatchCall_Text_Steven1:: @ 82B5B95 .string "STEVEN: Hi, {PLAYER}{KUN}!\p" .string "Have you been to MAUVILLE\n" .string "already?\p" @@ -2784,14 +2784,14 @@ gText_Steven_Pokenav_2B5B95:: @ 82B5B95 .string "You may make a new discovery\n" .string "there.$" -gText_Steven_Pokenav_2B5C53:: @ 82B5C53 +MatchCall_Text_Steven2:: @ 82B5C53 .string "STEVEN: Hi, {PLAYER}{KUN}!\p" .string "I've met a lot of different\n" .string "TRAINERS so far.\p" .string "But you're one of a kind.\n" .string "You're not like anyone else.$" -gText_Steven_Pokenav_2B5CC9:: @ 82B5CC9 +MatchCall_Text_Steven3:: @ 82B5CC9 .string "STEVEN: Hi, {PLAYER}{KUN}!\p" .string "When you're on an adventure with\n" .string "your POKéMON, what do you think?\p" @@ -2802,7 +2802,7 @@ gText_Steven_Pokenav_2B5CC9:: @ 82B5CC9 .string "Depending on how you think, your\n" .string "adventure's significance changes.$" -gText_Steven_Pokenav_2B5DB4:: @ 82B5DB4 +MatchCall_Text_Steven4:: @ 82B5DB4 .string "STEVEN: Hello?\n" .string "{PLAYER}{KUN}?\p" .string "I'm involved in a spot of trouble\n" @@ -2810,7 +2810,7 @@ gText_Steven_Pokenav_2B5DB4:: @ 82B5DB4 .string "I'm sorry, but I can't talk now.\n" .string "Bye!$" -gText_Steven_Pokenav_2B5E26:: @ 82B5E26 +MatchCall_Text_Steven5:: @ 82B5E26 .string "STEVEN: Oh!\n" .string "{PLAYER}{KUN}!\p" .string "There's no need to talk.\n" @@ -2818,12 +2818,12 @@ gText_Steven_Pokenav_2B5E26:: @ 82B5E26 .string "You have to believe in yourself\n" .string "and do what's right.$" -gText_Steven_Pokenav_2B5EA2:: @ 82B5EA2 +MatchCall_Text_Steven6:: @ 82B5EA2 .string "… … … … … …\p" .string "STEVEN appears not to be getting\n" .string "the call…$" -gText_Steven_Pokenav_2B5ED9:: @ 82B5ED9 +MatchCall_Text_Steven7:: @ 82B5ED9 .string "STEVEN: {PLAYER}{KUN}… Congratulations\n" .string "for entering the HALL OF FAME.\p" .string "… … … … … …\n" @@ -2851,7 +2851,7 @@ MatchCall_Text_UnusedProfBirch: .string "the POKéDEX and POKéNAV, studying\l" .string "POKéMON becomes more fun, eh?$" -gText_MrStone_Pokenav_2B60C0:: @ 82B60C0 +MatchCall_Text_MrStone1:: @ 82B60C0 .string "MR. STONE: Oh? {PLAYER}{KUN}!\p" .string "Since you called me, the POKéNAV\n" .string "must be working properly!\p" @@ -2866,7 +2866,7 @@ gText_MrStone_Pokenav_2B60C0:: @ 82B60C0 .string "Wahahaha!\n" .string "See you again!$" -gText_MrStone_Pokenav_2B61E6:: @ 82B61E6 +MatchCall_Text_MrStone2:: @ 82B61E6 .string "MR. STONE: Oh? {PLAYER}{KUN}!\p" .string "What's wrong? Have you forgotten\n" .string "about that little errand of mine?\p" @@ -2878,7 +2878,7 @@ gText_MrStone_Pokenav_2B61E6:: @ 82B61E6 .string "Now, since I am a busy PRESIDENT,\n" .string "I have to go! Bye-bye!$" -gText_MrStone_Pokenav_2B6302:: @ 82B6302 +MatchCall_Text_MrStone3:: @ 82B6302 .string "MR. STONE: Oh! {PLAYER}{KUN}!\p" .string "Ah, so you've met STEVEN!\n" .string "I'd better reward you, then!\p" @@ -2886,7 +2886,7 @@ gText_MrStone_Pokenav_2B6302:: @ 82B6302 .string "come see me at my office.\p" .string "I'll be waiting for you!$" -gText_MrStone_Pokenav_2B63A0:: @ 82B63A0 +MatchCall_Text_MrStone4:: @ 82B63A0 .string "MR. STONE: Oh! {PLAYER}{KUN}!\p" .string "Did you know that DEVON was\n" .string "digging the RUSTURF TUNNEL?\p" @@ -2897,14 +2897,14 @@ gText_MrStone_Pokenav_2B63A0:: @ 82B63A0 .string "live in peace than worry about our\l" .string "own convenience.$" -gText_MrStone_Pokenav_2B64A2:: @ 82B64A2 +MatchCall_Text_MrStone5:: @ 82B64A2 .string "MR. STONE: Hello, hello, {PLAYER}{KUN}!\p" .string "I heard from someone in PETALBURG\n" .string "that you're NORMAN's child!\p" .string "No wonder you're such a capable\n" .string "being!$" -gText_MrStone_Pokenav_2B6526:: @ 82B6526 +MatchCall_Text_MrStone6:: @ 82B6526 .string "MR. STONE: What's that?\p" .string "You battled your own father and\n" .string "defeated him?\p" @@ -2912,7 +2912,7 @@ gText_MrStone_Pokenav_2B6526:: @ 82B6526 .string "I had no idea that I befriended\n" .string "someone so special! Wahaha!$" -gText_MrStone_Pokenav_2B65BB:: @ 82B65BB +MatchCall_Text_MrStone7:: @ 82B65BB .string "Hello!\n" .string "This is DEVON CORPORATI…\l" .string "Oh, hello, {PLAYER}!\p" @@ -2921,21 +2921,21 @@ gText_MrStone_Pokenav_2B65BB:: @ 82B65BB .string "Our PRESIDENT is busy, but you\n" .string "seem to be just as busy, {PLAYER}.$" -gText_MrStone_Pokenav_2B6664:: @ 82B6664 +MatchCall_Text_MrStone8:: @ 82B6664 .string "…Huh? …What's that?\p" .string "GROU… Yes? …DON?\p" .string "You're breaking up…\n" .string "…can't hear…\p" .string "BZZZZ…$" -gText_MrStone_Pokenav_2B66B1:: @ 82B66B1 +MatchCall_Text_MrStone9:: @ 82B66B1 .string "…Huh? …What's that?\p" .string "Seaflo… Yes? …Caver…?\p" .string "You're breaking up…\n" .string "…can't hear…\p" .string "BZZZZ…$" -gText_MrStone_Pokenav_2B6703:: @ 82B6703 +MatchCall_Text_MrStone10:: @ 82B6703 .string "MR. STONE: {PLAYER}{KUN}! It's me!\p" .string "You were apparently involved in all\n" .string "sorts of things, but I, being busy,\l" @@ -2945,7 +2945,7 @@ gText_MrStone_Pokenav_2B6703:: @ 82B6703 .string "I'll always be in your corner!\n" .string "Take care!$" -gText_MrStone_Pokenav_2B67ED:: @ 82B67ED +MatchCall_Text_MrStone11:: @ 82B67ED .string "MR. STONE: … … … … … …\n" .string "Is this maybe {PLAYER}{KUN}?\p" .string "Your voice is so full of confidence,\n" diff --git a/gflib/string_util.c b/gflib/string_util.c index bce299057..db972a8ed 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -1,6 +1,7 @@ #include "global.h" #include "string_util.h" #include "text.h" +#include "strings.h" EWRAM_DATA u8 gStringVar1[0x100] = {0}; EWRAM_DATA u8 gStringVar2[0x100] = {0}; @@ -24,21 +25,6 @@ static const s32 sPowersOfTen[] = 1000000000, }; -extern const u8 gExpandedPlaceholder_Empty[]; -extern const u8 gExpandedPlaceholder_Kun[]; -extern const u8 gExpandedPlaceholder_Chan[]; -extern const u8 gExpandedPlaceholder_Sapphire[]; -extern const u8 gExpandedPlaceholder_Ruby[]; -extern const u8 gExpandedPlaceholder_Emerald[]; -extern const u8 gExpandedPlaceholder_Aqua[]; -extern const u8 gExpandedPlaceholder_Magma[]; -extern const u8 gExpandedPlaceholder_Archie[]; -extern const u8 gExpandedPlaceholder_Maxie[]; -extern const u8 gExpandedPlaceholder_Kyogre[]; -extern const u8 gExpandedPlaceholder_Groudon[]; -extern const u8 gExpandedPlaceholder_Brendan[]; -extern const u8 gExpandedPlaceholder_May[]; - u8 *StringCopy10(u8 *dest, const u8 *src) { u8 i; @@ -451,52 +437,52 @@ static const u8 *ExpandPlaceholder_StringVar3(void) static const u8 *ExpandPlaceholder_KunChan(void) { if (gSaveBlock2Ptr->playerGender == MALE) - return gExpandedPlaceholder_Kun; + return gText_ExpandedPlaceholder_Kun; else - return gExpandedPlaceholder_Chan; + return gText_ExpandedPlaceholder_Chan; } static const u8 *ExpandPlaceholder_RivalName(void) { if (gSaveBlock2Ptr->playerGender == MALE) - return gExpandedPlaceholder_May; + return gText_ExpandedPlaceholder_May; else - return gExpandedPlaceholder_Brendan; + return gText_ExpandedPlaceholder_Brendan; } static const u8 *ExpandPlaceholder_Version(void) { - return gExpandedPlaceholder_Emerald; + return gText_ExpandedPlaceholder_Emerald; } static const u8 *ExpandPlaceholder_Aqua(void) { - return gExpandedPlaceholder_Aqua; + return gText_ExpandedPlaceholder_Aqua; } static const u8 *ExpandPlaceholder_Magma(void) { - return gExpandedPlaceholder_Magma; + return gText_ExpandedPlaceholder_Magma; } static const u8 *ExpandPlaceholder_Archie(void) { - return gExpandedPlaceholder_Archie; + return gText_ExpandedPlaceholder_Archie; } static const u8 *ExpandPlaceholder_Maxie(void) { - return gExpandedPlaceholder_Maxie; + return gText_ExpandedPlaceholder_Maxie; } static const u8 *ExpandPlaceholder_Kyogre(void) { - return gExpandedPlaceholder_Kyogre; + return gText_ExpandedPlaceholder_Kyogre; } static const u8 *ExpandPlaceholder_Groudon(void) { - return gExpandedPlaceholder_Groudon; + return gText_ExpandedPlaceholder_Groudon; } const u8 *GetExpandedPlaceholder(u32 id) @@ -522,7 +508,7 @@ const u8 *GetExpandedPlaceholder(u32 id) }; if (id >= ARRAY_COUNT(funcs)) - return gExpandedPlaceholder_Empty; + return gText_ExpandedPlaceholder_Empty; else return funcs[id](); } diff --git a/include/constants/global.h b/include/constants/global.h index 4c638d63f..f4d81e563 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -51,6 +51,7 @@ #define DECOR_MAX_PLAYERS_HOUSE 12 #define APPRENTICE_COUNT 4 #define APPRENTICE_MAX_QUESTIONS 9 +#define MAX_REMATCH_ENTRIES 100 // only REMATCH_TABLE_ENTRIES (78) are used #define PYRAMID_BAG_ITEMS_COUNT 10 #define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode. diff --git a/include/global.h b/include/global.h index 61186d084..9bf1a5b34 100644 --- a/include/global.h +++ b/include/global.h @@ -923,7 +923,7 @@ struct SaveBlock1 /*0x9BC*/ u16 berryBlenderRecords[3]; /*0x9C2*/ u8 field_9C2[6]; /*0x9C8*/ u16 trainerRematchStepCounter; - /*0x9CA*/ u8 trainerRematches[100]; + /*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES]; /*0xA30*/ struct EventObject eventObjects[EVENT_OBJECTS_COUNT]; /*0xC70*/ struct EventObjectTemplate eventObjectTemplates[EVENT_OBJECT_TEMPLATES_COUNT]; /*0x1270*/ u8 flags[FLAGS_COUNT]; diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index 778d7a1e8..473d7b1c1 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -75,17 +75,12 @@ enum { REMATCH_WINONA, REMATCH_TATE_AND_LIZA, REMATCH_JUAN, - - // Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES. - REMATCH_SIDNEY, + REMATCH_SIDNEY, // Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES. REMATCH_PHOEBE, REMATCH_GLACIA, REMATCH_DRAKE, REMATCH_WALLACE, - - // The total number of rematch entries. This must be the last element - // in the enum. - REMATCH_TABLE_ENTRIES + REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum }; void UpdateGymLeaderRematch(void); diff --git a/include/pokenav.h b/include/pokenav.h index b1c3287f1..5edde5900 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -7,11 +7,12 @@ typedef u32 (*LoopedTask)(s32 state); +// TODO: This struct is also used generally by Match Call, should probably be renamed struct PokenavMonList { - u8 boxId; - u8 monId; - u16 unk6; + u8 id1; + u8 id2; + u16 data; }; struct PokenavSub18 @@ -32,8 +33,8 @@ struct PokenavSub18 enum { POKENAV_MODE_NORMAL, // Chosen from Start menu. - POKENAV_MODE_FORCE_CALL_1, // Used for the script's special. Has to choose Match Call and make a call. - POKENAV_MODE_FORCE_CALL_2, // Set after making a call, has to exit Pokenav. + POKENAV_MODE_FORCE_CALL_READY, // When player is forced to call Mr. Stone for pokenav tutorial + POKENAV_MODE_FORCE_CALL_EXIT, // Forced to exit fter being calling Mr. Stone for pokenav tutorial }; #define POKENAV_MENU_IDS_START 100000 @@ -82,6 +83,28 @@ enum MC_HEADER_COUNT }; +enum +{ + MATCH_CALL_OPTION_CALL, + MATCH_CALL_OPTION_CHECK, + MATCH_CALL_OPTION_CANCEL, + MATCH_CALL_OPTION_COUNT +}; + +enum +{ + CHECK_PAGE_STRATEGY, + CHECK_PAGE_POKEMON, + CHECK_PAGE_INTRO_1, + CHECK_PAGE_INTRO_2, + CHECK_PAGE_ENTRY_COUNT +}; + +#define MCFLAVOR(name) {[CHECK_PAGE_STRATEGY] = gText_MatchCall##name##_Strategy, \ + [CHECK_PAGE_POKEMON] = gText_MatchCall##name##_Pokemon, \ + [CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \ + [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2} + // pokenav.c void sub_81C7694(u32); u32 sub_81C76AC(void); @@ -207,14 +230,14 @@ int sub_81CAE48(void); struct PokenavMonList *sub_81CAE94(void); u16 sub_81CAEA4(int); bool32 sub_81CAEBC(int index); -int sub_81CAF04(int index); -const u8 *sub_81CAFD8(int index, int textType); +int GetMatchCallTrainerPic(int index); +const u8 *GetMatchCallFlavorText(int index, int textType); u16 sub_81CB01C(void); u16 sub_81CB02C(int arg0); void sub_81CB050(struct PokenavMonList * arg0, u8 *str); u8 sub_81CB0C8(int rematchIndex); int sub_81CB0E4(int index); -bool32 sub_81CAE08(int); +bool32 IsRematchEntryRegistered(int index); int sub_81CB128(int index); // pokenav_unk_4.c diff --git a/include/strings.h b/include/strings.h index f814ad29f..8cebdcfa0 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1,6 +1,22 @@ #ifndef GUARD_STRINGS_H #define GUARD_STRINGS_H +// Placeholders +extern const u8 gText_ExpandedPlaceholder_Empty[]; +extern const u8 gText_ExpandedPlaceholder_Kun[]; +extern const u8 gText_ExpandedPlaceholder_Chan[]; +extern const u8 gText_ExpandedPlaceholder_Sapphire[]; +extern const u8 gText_ExpandedPlaceholder_Ruby[]; +extern const u8 gText_ExpandedPlaceholder_Emerald[]; +extern const u8 gText_ExpandedPlaceholder_Aqua[]; +extern const u8 gText_ExpandedPlaceholder_Magma[]; +extern const u8 gText_ExpandedPlaceholder_Archie[]; +extern const u8 gText_ExpandedPlaceholder_Maxie[]; +extern const u8 gText_ExpandedPlaceholder_Kyogre[]; +extern const u8 gText_ExpandedPlaceholder_Groudon[]; +extern const u8 gText_ExpandedPlaceholder_Brendan[]; +extern const u8 gText_ExpandedPlaceholder_May[]; + extern const u8 gText_FromSpace[]; extern const u8 gText_Lv50[]; @@ -2332,6 +2348,43 @@ extern const u8 MatchCall_BattlePyramidText11[]; extern const u8 MatchCall_BattlePyramidText12[]; extern const u8 MatchCall_BattlePyramidText13[]; extern const u8 MatchCall_BattlePyramidText14[]; +extern const u8 gText_MrStoneMatchCallDesc[]; +extern const u8 gText_MrStoneMatchCallName[]; +extern const u8 gText_StevenMatchCallDesc[]; +extern const u8 gText_StevenMatchCallName[]; +extern const u8 gText_MayBrendanMatchCallDesc[]; +extern const u8 gText_WallyMatchCallDesc[]; +extern const u8 gText_NormanMatchCallDesc[]; +extern const u8 gText_NormanMatchCallName[]; +extern const u8 gText_MomMatchCallDesc[]; +extern const u8 gText_MomMatchCallName[]; +extern const u8 gText_ScottMatchCallDesc[]; +extern const u8 gText_ScottMatchCallName[]; +extern const u8 gText_RoxanneMatchCallDesc[]; +extern const u8 gText_BrawlyMatchCallDesc[]; +extern const u8 gText_WattsonMatchCallDesc[]; +extern const u8 gText_FlanneryMatchCallDesc[]; +extern const u8 gText_WinonaMatchCallDesc[]; +extern const u8 gText_TateLizaMatchCallDesc[]; +extern const u8 gText_JuanMatchCallDesc[]; +extern const u8 gText_EliteFourMatchCallDesc[]; +extern const u8 gText_ChampionMatchCallDesc[]; +extern const u8 gText_ProfBirchMatchCallDesc[]; +extern const u8 gText_ProfBirchMatchCallName[]; +extern const u8 gText_MatchCallSteven_Strategy[]; +extern const u8 gText_MatchCallSteven_Pokemon[]; +extern const u8 gText_MatchCallSteven_Intro1_BeforeMeteorFallsBattle[]; +extern const u8 gText_MatchCallSteven_Intro2_BeforeMeteorFallsBattle[]; +extern const u8 gText_MatchCallSteven_Intro1_AfterMeteorFallsBattle[]; +extern const u8 gText_MatchCallSteven_Intro2_AfterMeteorFallsBattle[]; +extern const u8 gText_MatchCallBrendan_Strategy[]; +extern const u8 gText_MatchCallBrendan_Pokemon[]; +extern const u8 gText_MatchCallBrendan_Intro1[]; +extern const u8 gText_MatchCallBrendan_Intro2[]; +extern const u8 gText_MatchCallMay_Strategy[]; +extern const u8 gText_MatchCallMay_Pokemon[]; +extern const u8 gText_MatchCallMay_Intro1[]; +extern const u8 gText_MatchCallMay_Intro2[]; // Contest Link extern const u8 gText_ColorDarkGrey[]; @@ -2762,9 +2815,9 @@ extern const u8 gUnknown_085EBE41[]; extern const u8 gText_NoRibbonWinners[]; // pokenav_unk_4 -extern const u8 gUnknown_085EC017[]; -extern const u8 gUnknown_085EC01C[]; -extern const u8 gUnknown_085EC022[]; +extern const u8 gText_Call[]; +extern const u8 gText_Check[]; +extern const u8 gText_Cancel6[]; // pokenav_unk_8 extern const u8 gText_NumberF700[]; diff --git a/src/data/text/match_call_messages.h b/src/data/text/match_call_messages.h index c3015b5a7..6ea3b549f 100644 --- a/src/data/text/match_call_messages.h +++ b/src/data/text/match_call_messages.h @@ -1,399 +1,394 @@ -#define MCFLAVOR(name) {gMatchCallFlavorText_##name##_Strategy, \ - gMatchCallFlavorText_##name##_Pokemon, \ - gMatchCallFlavorText_##name##_Intro1, \ - gMatchCallFlavorText_##name##_Intro2} - -const u8 gMatchCallFlavorText_AromaLady_Rose_Strategy[] = _("Becalm fighting emotions."); -const u8 gMatchCallFlavorText_AromaLady_Rose_Pokemon[] = _("Fragrant GRASS POKéMON."); -const u8 gMatchCallFlavorText_AromaLady_Rose_Intro1[] = _("Soothing aromas make the"); -const u8 gMatchCallFlavorText_AromaLady_Rose_Intro2[] = _("body and mind healthy."); - -const u8 gMatchCallFlavorText_RuinManiac_Andres_Strategy[] = _("I'm not very good at this."); -const u8 gMatchCallFlavorText_RuinManiac_Andres_Pokemon[] = _("Ruin-exploration partners."); -const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro1[] = _("I am searching for undersea"); -const u8 gMatchCallFlavorText_RuinManiac_Andres_Intro2[] = _("ruins and relics."); - -const u8 gMatchCallFlavorText_RuinManiac_Dusty_Strategy[] = _("Overwhelm with power!"); -const u8 gMatchCallFlavorText_RuinManiac_Dusty_Pokemon[] = _("Craggy ROCK POKéMON."); -const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro1[] = _("In search of ancient lore,"); -const u8 gMatchCallFlavorText_RuinManiac_Dusty_Intro2[] = _("I travel the world."); - -const u8 gMatchCallFlavorText_Tuber_Lola_Strategy[] = _("I'm going to try hard!"); -const u8 gMatchCallFlavorText_Tuber_Lola_Pokemon[] = _("Good swimmer POKéMON."); -const u8 gMatchCallFlavorText_Tuber_Lola_Intro1[] = _("I wish I could swim without"); -const u8 gMatchCallFlavorText_Tuber_Lola_Intro2[] = _("using an inner tube."); - -const u8 gMatchCallFlavorText_Tuber_Ricky_Strategy[] = _("I don't know. I'll try hard."); -const u8 gMatchCallFlavorText_Tuber_Ricky_Pokemon[] = _("WATER POKéMON are buddies."); -const u8 gMatchCallFlavorText_Tuber_Ricky_Intro1[] = _("It's not like I can't swim."); -const u8 gMatchCallFlavorText_Tuber_Ricky_Intro2[] = _("I just like my inner tube."); - -const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Strategy[] = _("We split our duties."); -const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Pokemon[] = _("We like friendly POKéMON."); -const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro1[] = _("We enjoy POKéMON together"); -const u8 gMatchCallFlavorText_SisAndBro_LilaAndRoy_Intro2[] = _("as sister and brother."); - -const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Strategy[] = _("I finish with power moves!"); -const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Pokemon[] = _("A mix of different types."); -const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro1[] = _("I aim to become the ultimate"); -const u8 gMatchCallFlavorText_Cooltrainer_Cristin_Intro2[] = _("TRAINER!"); - -const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Strategy[] = _("Exploit the foe's weakness."); -const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Pokemon[] = _("Balance is crucial."); -const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro1[] = _("My goal is to become the"); -const u8 gMatchCallFlavorText_Cooltrainer_Brooke_Intro2[] = _("POKéMON CHAMPION."); - -const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Strategy[] = _("Upset the opponent."); -const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Pokemon[] = _("Type doesn't matter."); -const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro1[] = _("I'm a top student at the"); -const u8 gMatchCallFlavorText_Cooltrainer_Wilton_Intro2[] = _("TRAINER'S SCHOOL."); - -const u8 gMatchCallFlavorText_HexManiac_Valerie_Strategy[] = _("Slow, steady suffering."); -const u8 gMatchCallFlavorText_HexManiac_Valerie_Pokemon[] = _("Scary to meet at night."); -const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro1[] = _("I see things that others"); -const u8 gMatchCallFlavorText_HexManiac_Valerie_Intro2[] = _("can't see..."); - -const u8 gMatchCallFlavorText_Lady_Cindy_Strategy[] = _("Anything to win."); -const u8 gMatchCallFlavorText_Lady_Cindy_Pokemon[] = _("Gorgeous type!"); -const u8 gMatchCallFlavorText_Lady_Cindy_Intro1[] = _("I have a pool specially for"); -const u8 gMatchCallFlavorText_Lady_Cindy_Intro2[] = _("my POKéMON at home."); - -const u8 gMatchCallFlavorText_Beauty_Thalia_Strategy[] = _("You'll fall under my spell!"); -const u8 gMatchCallFlavorText_Beauty_Thalia_Pokemon[] = _("Mature WATER type."); -const u8 gMatchCallFlavorText_Beauty_Thalia_Intro1[] = _("I dream of cruising around"); -const u8 gMatchCallFlavorText_Beauty_Thalia_Intro2[] = _("the world on a luxury liner."); - -const u8 gMatchCallFlavorText_Beauty_Jessica_Strategy[] = _("I'll lead you astray."); -const u8 gMatchCallFlavorText_Beauty_Jessica_Pokemon[] = _("Cute, of course."); -const u8 gMatchCallFlavorText_Beauty_Jessica_Intro1[] = _("I love the SAFARI ZONE."); -const u8 gMatchCallFlavorText_Beauty_Jessica_Intro2[] = _("I seem to end up there."); - -const u8 gMatchCallFlavorText_RichBoy_Winston_Strategy[] = _("Strategy? Who needs it?"); -const u8 gMatchCallFlavorText_RichBoy_Winston_Pokemon[] = _("I spent big money on it!"); -const u8 gMatchCallFlavorText_RichBoy_Winston_Intro1[] = _("I, being rich, sleep in a"); -const u8 gMatchCallFlavorText_RichBoy_Winston_Intro2[] = _("custom POKéMON bed."); - -const u8 gMatchCallFlavorText_PokeManiac_Steve_Strategy[] = _("Wrestle down with power."); -const u8 gMatchCallFlavorText_PokeManiac_Steve_Pokemon[] = _("Took all night to catch."); -const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro1[] = _("Big, burly, and buff"); -const u8 gMatchCallFlavorText_PokeManiac_Steve_Intro2[] = _("POKéMON are the best..."); - -const u8 gMatchCallFlavorText_Swimmer_Tony_Strategy[] = _("Ram at full speed!"); -const u8 gMatchCallFlavorText_Swimmer_Tony_Pokemon[] = _("Funky WATER type!"); -const u8 gMatchCallFlavorText_Swimmer_Tony_Intro1[] = _("If I can't be out swimming,"); -const u8 gMatchCallFlavorText_Swimmer_Tony_Intro2[] = _("I'll be pumping weights."); - -const u8 gMatchCallFlavorText_BlackBelt_Nob_Strategy[] = _("Grand slam pummeling!"); -const u8 gMatchCallFlavorText_BlackBelt_Nob_Pokemon[] = _("FIGHTING type."); -const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro1[] = _("Not to brag, but I can bust"); -const u8 gMatchCallFlavorText_BlackBelt_Nob_Intro2[] = _("ten roof tiles!"); - -const u8 gMatchCallFlavorText_BlackBelt_Koji_Strategy[] = _("Witness karate power!"); -const u8 gMatchCallFlavorText_BlackBelt_Koji_Pokemon[] = _("My partners in training!"); -const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro1[] = _("Let us discuss matters of"); -const u8 gMatchCallFlavorText_BlackBelt_Koji_Intro2[] = _("the world with bare fists!"); - -const u8 gMatchCallFlavorText_Guitarist_Fernando_Strategy[] = _("Rock to stunning sounds!"); -const u8 gMatchCallFlavorText_Guitarist_Fernando_Pokemon[] = _("Electric-and-sound combo!"); -const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro1[] = _("My compositions will shock"); -const u8 gMatchCallFlavorText_Guitarist_Fernando_Intro2[] = _("you and stun you!"); - -const u8 gMatchCallFlavorText_Guitarist_Dalton_Strategy[] = _("I'll electrify you!"); -const u8 gMatchCallFlavorText_Guitarist_Dalton_Pokemon[] = _("They're ELECTRIC!"); -const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro1[] = _("I want to make people cry"); -const u8 gMatchCallFlavorText_Guitarist_Dalton_Intro2[] = _("with songs from my heart."); - -const u8 gMatchCallFlavorText_Kindler_Bernie_Strategy[] = _("Burn it all down!"); -const u8 gMatchCallFlavorText_Kindler_Bernie_Pokemon[] = _("Burn-inducing POKéMON."); -const u8 gMatchCallFlavorText_Kindler_Bernie_Intro1[] = _("When you light a campfire,"); -const u8 gMatchCallFlavorText_Kindler_Bernie_Intro2[] = _("be sure there's some water."); - -const u8 gMatchCallFlavorText_Camper_Ethan_Strategy[] = _("Hang in and be tenacious!"); -const u8 gMatchCallFlavorText_Camper_Ethan_Pokemon[] = _("I'll raise any POKéMON."); -const u8 gMatchCallFlavorText_Camper_Ethan_Intro1[] = _("POKéMON raised in the wild"); -const u8 gMatchCallFlavorText_Camper_Ethan_Intro2[] = _("grow strong!"); - -const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Strategy[] = _("Our love lets us prevail."); -const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Pokemon[] = _("We've had them for years."); -const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro1[] = _("Married 50 years, we've"); -const u8 gMatchCallFlavorText_OldCouple_JohnAndJay_Intro2[] = _("devotedly raised POKéMON."); - -const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Strategy[] = _("Attack in waves!"); -const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Pokemon[] = _("BUG POKéMON are cool."); -const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro1[] = _("I go into the forest every"); -const u8 gMatchCallFlavorText_BugManiac_Jeffrey_Intro2[] = _("day to catch BUG POKéMON."); - -const u8 gMatchCallFlavorText_Psychic_Cameron_Strategy[] = _("Daze and confuse!"); -const u8 gMatchCallFlavorText_Psychic_Cameron_Pokemon[] = _("Ones with weird powers."); -const u8 gMatchCallFlavorText_Psychic_Cameron_Intro1[] = _("I can see through exactly"); -const u8 gMatchCallFlavorText_Psychic_Cameron_Intro2[] = _("what you're thinking!"); - -const u8 gMatchCallFlavorText_Psychic_Jacki_Strategy[] = _("Battle at full power."); -const u8 gMatchCallFlavorText_Psychic_Jacki_Pokemon[] = _("POKéMON of many mysteries."); -const u8 gMatchCallFlavorText_Psychic_Jacki_Intro1[] = _("When we spoke, I was really"); -const u8 gMatchCallFlavorText_Psychic_Jacki_Intro2[] = _("using telepathy."); - -const u8 gMatchCallFlavorText_Gentleman_Walter_Strategy[] = _("Calm and collected."); -const u8 gMatchCallFlavorText_Gentleman_Walter_Pokemon[] = _("POKéMON of distinction."); -const u8 gMatchCallFlavorText_Gentleman_Walter_Intro1[] = _("We enjoy a spot of tea"); -const u8 gMatchCallFlavorText_Gentleman_Walter_Intro2[] = _("every day. It's imported."); - -const u8 gMatchCallFlavorText_SchoolKid_Karen_Strategy[] = _("I use my head to battle."); -const u8 gMatchCallFlavorText_SchoolKid_Karen_Pokemon[] = _("I love any kind of POKéMON!"); -const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro1[] = _("My daddy gives me spending"); -const u8 gMatchCallFlavorText_SchoolKid_Karen_Intro2[] = _("money if I ace a test."); - -const u8 gMatchCallFlavorText_SchoolKid_Jerry_Strategy[] = _("My knowledge rules!"); -const u8 gMatchCallFlavorText_SchoolKid_Jerry_Pokemon[] = _("Any smart POKéMON!"); -const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro1[] = _("I want to be a POKéMON"); -const u8 gMatchCallFlavorText_SchoolKid_Jerry_Intro2[] = _("researcher in the future."); - -const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Strategy[] = _("We talk it over first."); -const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Pokemon[] = _("POKéMON that we both like."); -const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro1[] = _("We're senior and junior"); -const u8 gMatchCallFlavorText_SrAndJr_AnnaAndMeg_Intro2[] = _("students into POKéMON!"); - -const u8 gMatchCallFlavorText_Pokefan_Isabel_Strategy[] = _("Go for it, my dears!"); -const u8 gMatchCallFlavorText_Pokefan_Isabel_Pokemon[] = _("I have no likes or dislikes."); -const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro1[] = _("While out shopping for"); -const u8 gMatchCallFlavorText_Pokefan_Isabel_Intro2[] = _("supper, I battle too."); - -const u8 gMatchCallFlavorText_Pokefan_Miguel_Strategy[] = _("I battle with love!"); -const u8 gMatchCallFlavorText_Pokefan_Miguel_Pokemon[] = _("A POKéMON raised with love!"); -const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro1[] = _("It's important to build"); -const u8 gMatchCallFlavorText_Pokefan_Miguel_Intro2[] = _("trust with your POKéMON."); - -const u8 gMatchCallFlavorText_Expert_Timothy_Strategy[] = _("I see through your moves!"); -const u8 gMatchCallFlavorText_Expert_Timothy_Pokemon[] = _("The essence of FIGHTING."); -const u8 gMatchCallFlavorText_Expert_Timothy_Intro1[] = _("I'm not ready to give way"); -const u8 gMatchCallFlavorText_Expert_Timothy_Intro2[] = _("to the young yet!"); - -const u8 gMatchCallFlavorText_Expert_Shelby_Strategy[] = _("Attack while defending."); -const u8 gMatchCallFlavorText_Expert_Shelby_Pokemon[] = _("The FIGHTING type."); -const u8 gMatchCallFlavorText_Expert_Shelby_Intro1[] = _("Being old, I have my own"); -const u8 gMatchCallFlavorText_Expert_Shelby_Intro2[] = _("style of battling."); - -const u8 gMatchCallFlavorText_Youngster_Calvin_Strategy[] = _("I do what I can."); -const u8 gMatchCallFlavorText_Youngster_Calvin_Pokemon[] = _("I use different types."); -const u8 gMatchCallFlavorText_Youngster_Calvin_Intro1[] = _("I'm going to keep working"); -const u8 gMatchCallFlavorText_Youngster_Calvin_Intro2[] = _("until I beat a GYM LEADER."); - -const u8 gMatchCallFlavorText_Fisherman_Elliot_Strategy[] = _("I battle patiently."); -const u8 gMatchCallFlavorText_Fisherman_Elliot_Pokemon[] = _("WATER POKéMON to battle!"); -const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro1[] = _("I'm the world's only guy to"); -const u8 gMatchCallFlavorText_Fisherman_Elliot_Intro2[] = _("catch a huge POKéMON!"); - -const u8 gMatchCallFlavorText_Triathlete_Isaiah_Strategy[] = _("Exploit the environment!"); -const u8 gMatchCallFlavorText_Triathlete_Isaiah_Pokemon[] = _("All hail the WATER type!"); -const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro1[] = _("I won't be beaten by some"); -const u8 gMatchCallFlavorText_Triathlete_Isaiah_Intro2[] = _("beach bum SWIMMER!"); - -const u8 gMatchCallFlavorText_Triathlete_Maria_Strategy[] = _("Speed above all!"); -const u8 gMatchCallFlavorText_Triathlete_Maria_Pokemon[] = _("I use a speedy POKéMON."); -const u8 gMatchCallFlavorText_Triathlete_Maria_Intro1[] = _("A marathon is a challenge"); -const u8 gMatchCallFlavorText_Triathlete_Maria_Intro2[] = _("against your own self."); - -const u8 gMatchCallFlavorText_Triathlete_Abigail_Strategy[] = _("Defense is crucial."); -const u8 gMatchCallFlavorText_Triathlete_Abigail_Pokemon[] = _("My POKéMON is solid."); -const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro1[] = _("I started this for dieting,"); -const u8 gMatchCallFlavorText_Triathlete_Abigail_Intro2[] = _("but I got right into it."); - -const u8 gMatchCallFlavorText_Triathlete_Dylan_Strategy[] = _("Strike before stricken!"); -const u8 gMatchCallFlavorText_Triathlete_Dylan_Pokemon[] = _("A fast-running POKéMON!"); -const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro1[] = _("If you ran and ran, you'd"); -const u8 gMatchCallFlavorText_Triathlete_Dylan_Intro2[] = _("become one with the wind."); - -const u8 gMatchCallFlavorText_Triathlete_Katelyn_Strategy[] = _("All-out offensive!"); -const u8 gMatchCallFlavorText_Triathlete_Katelyn_Pokemon[] = _("WATER POKéMON rule!"); -const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro1[] = _("I must swim over 6 miles"); -const u8 gMatchCallFlavorText_Triathlete_Katelyn_Intro2[] = _("every day."); - -const u8 gMatchCallFlavorText_Triathlete_Benjamin_Strategy[] = _("Push and push again!"); -const u8 gMatchCallFlavorText_Triathlete_Benjamin_Pokemon[] = _("The strength of STEEL."); -const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro1[] = _("If you're sweating, get"); -const u8 gMatchCallFlavorText_Triathlete_Benjamin_Intro2[] = _("fluids into you regularly."); - -const u8 gMatchCallFlavorText_Triathlete_Pablo_Strategy[] = _("Draw the power of WATER."); -const u8 gMatchCallFlavorText_Triathlete_Pablo_Pokemon[] = _("Toughened WATER POKéMON."); -const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro1[] = _("Training POKéMON is good,"); -const u8 gMatchCallFlavorText_Triathlete_Pablo_Intro2[] = _("but don't neglect yourself."); - -const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Strategy[] = _("It's about POKéMON power!"); -const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Pokemon[] = _("See the power of DRAGONS!"); -const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro1[] = _("I'll become legendary as the"); -const u8 gMatchCallFlavorText_DragonTamer_Nicolas_Intro2[] = _("strongest one day!"); - -const u8 gMatchCallFlavorText_BirdKeeper_Robert_Strategy[] = _("I'll show you my technique!"); -const u8 gMatchCallFlavorText_BirdKeeper_Robert_Pokemon[] = _("Elegantly wheeling BIRDS."); -const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro1[] = _("My BIRD POKéMON, deliver my"); -const u8 gMatchCallFlavorText_BirdKeeper_Robert_Intro2[] = _("love to that girl!"); - -const u8 gMatchCallFlavorText_NinjaBoy_Lao_Strategy[] = _("You'll suffer from poison!"); -const u8 gMatchCallFlavorText_NinjaBoy_Lao_Pokemon[] = _("Poisonous POKéMON."); -const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro1[] = _("I undertake training so"); -const u8 gMatchCallFlavorText_NinjaBoy_Lao_Intro2[] = _("that I may become a ninja."); - -const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Strategy[] = _("The first strike wins!"); -const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Pokemon[] = _("Speedy FIGHTING type."); -const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro1[] = _("If my POKéMON lose,"); -const u8 gMatchCallFlavorText_BattleGirl_Cyndy_Intro2[] = _("I'll carry on the fight!"); - -const u8 gMatchCallFlavorText_ParasolLady_Madeline_Strategy[] = _("Go, go, my POKéMON!"); -const u8 gMatchCallFlavorText_ParasolLady_Madeline_Pokemon[] = _("I'll raise anything."); -const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro1[] = _("UV rays are your skin's"); -const u8 gMatchCallFlavorText_ParasolLady_Madeline_Intro2[] = _("enemy. Get protected."); - -const u8 gMatchCallFlavorText_Swimmer_Jenny_Strategy[] = _("No mercy!"); -const u8 gMatchCallFlavorText_Swimmer_Jenny_Pokemon[] = _("Cute WATER POKéMON."); -const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro1[] = _("I have too many fans."); -const u8 gMatchCallFlavorText_Swimmer_Jenny_Intro2[] = _("I was interviewed on TV."); - -const u8 gMatchCallFlavorText_Picnicker_Diana_Strategy[] = _("I think about this & that."); -const u8 gMatchCallFlavorText_Picnicker_Diana_Pokemon[] = _("I like all POKéMON."); -const u8 gMatchCallFlavorText_Picnicker_Diana_Intro1[] = _("What lies beyond that"); -const u8 gMatchCallFlavorText_Picnicker_Diana_Intro2[] = _("yonder hill?"); - -const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Strategy[] = _("We battle together!"); -const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Pokemon[] = _("We train together!"); -const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro1[] = _("We like the same POKéMON,"); -const u8 gMatchCallFlavorText_Twins_AmyAndLiv_Intro2[] = _("but different desserts."); - -const u8 gMatchCallFlavorText_Sailor_Ernest_Strategy[] = _("I force things with power!"); -const u8 gMatchCallFlavorText_Sailor_Ernest_Pokemon[] = _("WATER and FIGHTING types."); -const u8 gMatchCallFlavorText_Sailor_Ernest_Intro1[] = _("Seamen are rough spirits!"); -const u8 gMatchCallFlavorText_Sailor_Ernest_Intro2[] = _("Any complaints?"); - -const u8 gMatchCallFlavorText_Sailor_Cory_Strategy[] = _("Up for a fight anytime!"); -const u8 gMatchCallFlavorText_Sailor_Cory_Pokemon[] = _("WATER POKéMON are my faves!"); -const u8 gMatchCallFlavorText_Sailor_Cory_Intro1[] = _("If you want to shout loud,"); -const u8 gMatchCallFlavorText_Sailor_Cory_Intro2[] = _("suck in air with your belly!"); - -const u8 gMatchCallFlavorText_Collector_Edwin_Strategy[] = _("Protect POKéMON from harm."); -const u8 gMatchCallFlavorText_Collector_Edwin_Pokemon[] = _("I love rare POKéMON."); -const u8 gMatchCallFlavorText_Collector_Edwin_Intro1[] = _("I want to collect all the"); -const u8 gMatchCallFlavorText_Collector_Edwin_Intro2[] = _("world's rare POKéMON."); - -const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Strategy[] = _("I count on power."); -const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Pokemon[] = _("POKéMON are my children."); -const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro1[] = _("It takes knowledge and"); -const u8 gMatchCallFlavorText_PkmnBreeder_Lydia_Intro2[] = _("love to raise POKéMON."); - -const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Strategy[] = _("Full-on attack!"); -const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Pokemon[] = _("Anything. I'll raise it."); -const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro1[] = _("I give them {POKEBLOCK}S for"); -const u8 gMatchCallFlavorText_PkmnBreeder_Isaac_Intro2[] = _("going after CONTEST titles."); - -const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Strategy[] = _("I raise POKéMON with care."); -const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Pokemon[] = _("Fun-to-raise POKéMON."); -const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro1[] = _("Treat every POKéMON you"); -const u8 gMatchCallFlavorText_PkmnBreeder_Gabrielle_Intro2[] = _("meet with respect."); - -const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Strategy[] = _("I believe in my POKéMON."); -const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Pokemon[] = _("I like strong POKéMON."); -const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro1[] = _("I'm training for rescue"); -const u8 gMatchCallFlavorText_PkmnRanger_Catherine_Intro2[] = _("work with my POKéMON."); - -const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Strategy[] = _("Attack in waves!"); -const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Pokemon[] = _("I use different types."); -const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro1[] = _("Those who destroy nature"); -const u8 gMatchCallFlavorText_PkmnRanger_Jackson_Intro2[] = _("must never be forgiven!"); - -const u8 gMatchCallFlavorText_Lass_Haley_Strategy[] = _("I'll show you some guts!"); -const u8 gMatchCallFlavorText_Lass_Haley_Pokemon[] = _("Cute POKéMON are my faves!"); -const u8 gMatchCallFlavorText_Lass_Haley_Intro1[] = _("After a battle, I always"); -const u8 gMatchCallFlavorText_Lass_Haley_Intro2[] = _("bathe with my POKéMON."); - -const u8 gMatchCallFlavorText_BugCatcher_James_Strategy[] = _("Lightning-fast attack!"); -const u8 gMatchCallFlavorText_BugCatcher_James_Pokemon[] = _("BUG POKéMON are number 1!"); -const u8 gMatchCallFlavorText_BugCatcher_James_Intro1[] = _("If you want to catch BUG"); -const u8 gMatchCallFlavorText_BugCatcher_James_Intro2[] = _("POKéMON, wake up early."); - -const u8 gMatchCallFlavorText_Hiker_Trent_Strategy[] = _("I battle with power."); -const u8 gMatchCallFlavorText_Hiker_Trent_Pokemon[] = _("Hard-bodied POKéMON."); -const u8 gMatchCallFlavorText_Hiker_Trent_Intro1[] = _("I've been planning a month"); -const u8 gMatchCallFlavorText_Hiker_Trent_Intro2[] = _("for today's hike."); - -const u8 gMatchCallFlavorText_Hiker_Sawyer_Strategy[] = _("I like it hot!"); -const u8 gMatchCallFlavorText_Hiker_Sawyer_Pokemon[] = _("Hot POKéMON!"); -const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro1[] = _("As much as I love POKéMON,"); -const u8 gMatchCallFlavorText_Hiker_Sawyer_Intro2[] = _("I surely like hiking!"); - -const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Strategy[] = _("Lovey-dovey strategy!"); -const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Pokemon[] = _("Lovey-dovey POKéMON!"); -const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro1[] = _("We're lovey-dovey!"); -const u8 gMatchCallFlavorText_YoungCouple_LoisAndHal_Intro2[] = _("Forever lovey-dovey!"); - -const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Strategy[] = _("We let it all hang out."); -const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Pokemon[] = _("The 1st POKéMON I caught."); -const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro1[] = _("POKéMON and I have grown"); -const u8 gMatchCallFlavorText_PkmnTrainer_Wally_Intro2[] = _("stronger together."); - -const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Strategy[] = _("ROCK-type power attack."); -const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Pokemon[] = _("I prefer rock-hard POKéMON."); -const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro1[] = _("A LEADER of a big GYM bears"); -const u8 gMatchCallFlavorText_RockinWhiz_Roxanne_Intro2[] = _("a lot of responsibility."); - -const u8 gMatchCallFlavorText_TheBigHit_Brawly_Strategy[] = _("Direct physical action!"); -const u8 gMatchCallFlavorText_TheBigHit_Brawly_Pokemon[] = _("FIGHTING POKéMON rule!"); -const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro1[] = _("The world awaits me as the"); -const u8 gMatchCallFlavorText_TheBigHit_Brawly_Intro2[] = _("next big wave!"); - -const u8 gMatchCallFlavorText_SwellShock_Wattson_Strategy[] = _("I choose to electrify."); -const u8 gMatchCallFlavorText_SwellShock_Wattson_Pokemon[] = _("Get shocked by electricity!"); -const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro1[] = _("One must never throw a"); -const u8 gMatchCallFlavorText_SwellShock_Wattson_Intro2[] = _("match. Even I must not."); - -const u8 gMatchCallFlavorText_PassionBurn_Flannery_Strategy[] = _("Battle aggressively."); -const u8 gMatchCallFlavorText_PassionBurn_Flannery_Pokemon[] = _("Burn with passion!"); -const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro1[] = _("Completely wash away daily"); -const u8 gMatchCallFlavorText_PassionBurn_Flannery_Intro2[] = _("fatigue in hot springs!"); - -const u8 gMatchCallFlavorText_ReliableOne_Dad_Strategy[] = _("I flexibly adapt my style."); -const u8 gMatchCallFlavorText_ReliableOne_Dad_Pokemon[] = _("Grown in a balanced manner."); -const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro1[] = _("I walk the 30 minutes from"); -const u8 gMatchCallFlavorText_ReliableOne_Dad_Intro2[] = _("home to here every day."); - -const u8 gMatchCallFlavorText_SkyTamer_Winona_Strategy[] = _("I take advantage of speed."); -const u8 gMatchCallFlavorText_SkyTamer_Winona_Pokemon[] = _("Graceful sky dancers."); -const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro1[] = _("The ultimate would be to"); -const u8 gMatchCallFlavorText_SkyTamer_Winona_Intro2[] = _("live as one with nature."); - -const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Strategy[] = _("We battle in cooperation."); -const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Pokemon[] = _("Always friendly POKéMON."); -const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro1[] = _("Papa has trouble telling"); -const u8 gMatchCallFlavorText_MysticDuo_TateAndLiza_Intro2[] = _("the two of us apart!"); - -const u8 gMatchCallFlavorText_DandyCharm_Juan_Strategy[] = _("I use splendid waterpower."); -const u8 gMatchCallFlavorText_DandyCharm_Juan_Pokemon[] = _("POKéMON of elegance!"); -const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro1[] = _("The adulation of beautiful"); -const u8 gMatchCallFlavorText_DandyCharm_Juan_Intro2[] = _("ladies fills me with energy!"); - -const u8 gMatchCallFlavorText_EliteFour_Sidney_Strategy[] = _("Offense over defense!"); -const u8 gMatchCallFlavorText_EliteFour_Sidney_Pokemon[] = _("The DARK side's beauties."); -const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro1[] = _("They said I was a punk, but"); -const u8 gMatchCallFlavorText_EliteFour_Sidney_Intro2[] = _("I'm one of the ELITE FOUR!"); - -const u8 gMatchCallFlavorText_EliteFour_Phoebe_Strategy[] = _("Confuse and confound."); -const u8 gMatchCallFlavorText_EliteFour_Phoebe_Pokemon[] = _("There's nothing definite."); -const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro1[] = _("I wonder how my grandma at"); -const u8 gMatchCallFlavorText_EliteFour_Phoebe_Intro2[] = _("MT. PYRE is doing?"); - -const u8 gMatchCallFlavorText_EliteFour_Glacia_Strategy[] = _("I use items for help."); -const u8 gMatchCallFlavorText_EliteFour_Glacia_Pokemon[] = _("Flaming passion in icy cold!"); -const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro1[] = _("The ICE type can be better"); -const u8 gMatchCallFlavorText_EliteFour_Glacia_Intro2[] = _("trained in this hot land."); - -const u8 gMatchCallFlavorText_EliteFour_Drake_Strategy[] = _("Harness strong abilities."); -const u8 gMatchCallFlavorText_EliteFour_Drake_Pokemon[] = _("The raw power of DRAGONS!"); -const u8 gMatchCallFlavorText_EliteFour_Drake_Intro1[] = _("I dedicate myself to the"); -const u8 gMatchCallFlavorText_EliteFour_Drake_Intro2[] = _("POKéMON that saved me."); - -const u8 gMatchCallFlavorText_Champion_Wallace_Strategy[] = _("Dignity and respect."); -const u8 gMatchCallFlavorText_Champion_Wallace_Pokemon[] = _("I prefer POKéMON of grace."); -const u8 gMatchCallFlavorText_Champion_Wallace_Intro1[] = _("I represent beauty as"); -const u8 gMatchCallFlavorText_Champion_Wallace_Intro2[] = _("well as intelligence."); - -const u8 *const gMatchCallMessages[][4] = +const u8 gText_MatchCallAromaLady_Rose_Strategy[] = _("Becalm fighting emotions."); +const u8 gText_MatchCallAromaLady_Rose_Pokemon[] = _("Fragrant GRASS POKéMON."); +const u8 gText_MatchCallAromaLady_Rose_Intro1[] = _("Soothing aromas make the"); +const u8 gText_MatchCallAromaLady_Rose_Intro2[] = _("body and mind healthy."); + +const u8 gText_MatchCallRuinManiac_Andres_Strategy[] = _("I'm not very good at this."); +const u8 gText_MatchCallRuinManiac_Andres_Pokemon[] = _("Ruin-exploration partners."); +const u8 gText_MatchCallRuinManiac_Andres_Intro1[] = _("I am searching for undersea"); +const u8 gText_MatchCallRuinManiac_Andres_Intro2[] = _("ruins and relics."); + +const u8 gText_MatchCallRuinManiac_Dusty_Strategy[] = _("Overwhelm with power!"); +const u8 gText_MatchCallRuinManiac_Dusty_Pokemon[] = _("Craggy ROCK POKéMON."); +const u8 gText_MatchCallRuinManiac_Dusty_Intro1[] = _("In search of ancient lore,"); +const u8 gText_MatchCallRuinManiac_Dusty_Intro2[] = _("I travel the world."); + +const u8 gText_MatchCallTuber_Lola_Strategy[] = _("I'm going to try hard!"); +const u8 gText_MatchCallTuber_Lola_Pokemon[] = _("Good swimmer POKéMON."); +const u8 gText_MatchCallTuber_Lola_Intro1[] = _("I wish I could swim without"); +const u8 gText_MatchCallTuber_Lola_Intro2[] = _("using an inner tube."); + +const u8 gText_MatchCallTuber_Ricky_Strategy[] = _("I don't know. I'll try hard."); +const u8 gText_MatchCallTuber_Ricky_Pokemon[] = _("WATER POKéMON are buddies."); +const u8 gText_MatchCallTuber_Ricky_Intro1[] = _("It's not like I can't swim."); +const u8 gText_MatchCallTuber_Ricky_Intro2[] = _("I just like my inner tube."); + +const u8 gText_MatchCallSisAndBro_LilaAndRoy_Strategy[] = _("We split our duties."); +const u8 gText_MatchCallSisAndBro_LilaAndRoy_Pokemon[] = _("We like friendly POKéMON."); +const u8 gText_MatchCallSisAndBro_LilaAndRoy_Intro1[] = _("We enjoy POKéMON together"); +const u8 gText_MatchCallSisAndBro_LilaAndRoy_Intro2[] = _("as sister and brother."); + +const u8 gText_MatchCallCooltrainer_Cristin_Strategy[] = _("I finish with power moves!"); +const u8 gText_MatchCallCooltrainer_Cristin_Pokemon[] = _("A mix of different types."); +const u8 gText_MatchCallCooltrainer_Cristin_Intro1[] = _("I aim to become the ultimate"); +const u8 gText_MatchCallCooltrainer_Cristin_Intro2[] = _("TRAINER!"); + +const u8 gText_MatchCallCooltrainer_Brooke_Strategy[] = _("Exploit the foe's weakness."); +const u8 gText_MatchCallCooltrainer_Brooke_Pokemon[] = _("Balance is crucial."); +const u8 gText_MatchCallCooltrainer_Brooke_Intro1[] = _("My goal is to become the"); +const u8 gText_MatchCallCooltrainer_Brooke_Intro2[] = _("POKéMON CHAMPION."); + +const u8 gText_MatchCallCooltrainer_Wilton_Strategy[] = _("Upset the opponent."); +const u8 gText_MatchCallCooltrainer_Wilton_Pokemon[] = _("Type doesn't matter."); +const u8 gText_MatchCallCooltrainer_Wilton_Intro1[] = _("I'm a top student at the"); +const u8 gText_MatchCallCooltrainer_Wilton_Intro2[] = _("TRAINER'S SCHOOL."); + +const u8 gText_MatchCallHexManiac_Valerie_Strategy[] = _("Slow, steady suffering."); +const u8 gText_MatchCallHexManiac_Valerie_Pokemon[] = _("Scary to meet at night."); +const u8 gText_MatchCallHexManiac_Valerie_Intro1[] = _("I see things that others"); +const u8 gText_MatchCallHexManiac_Valerie_Intro2[] = _("can't see..."); + +const u8 gText_MatchCallLady_Cindy_Strategy[] = _("Anything to win."); +const u8 gText_MatchCallLady_Cindy_Pokemon[] = _("Gorgeous type!"); +const u8 gText_MatchCallLady_Cindy_Intro1[] = _("I have a pool specially for"); +const u8 gText_MatchCallLady_Cindy_Intro2[] = _("my POKéMON at home."); + +const u8 gText_MatchCallBeauty_Thalia_Strategy[] = _("You'll fall under my spell!"); +const u8 gText_MatchCallBeauty_Thalia_Pokemon[] = _("Mature WATER type."); +const u8 gText_MatchCallBeauty_Thalia_Intro1[] = _("I dream of cruising around"); +const u8 gText_MatchCallBeauty_Thalia_Intro2[] = _("the world on a luxury liner."); + +const u8 gText_MatchCallBeauty_Jessica_Strategy[] = _("I'll lead you astray."); +const u8 gText_MatchCallBeauty_Jessica_Pokemon[] = _("Cute, of course."); +const u8 gText_MatchCallBeauty_Jessica_Intro1[] = _("I love the SAFARI ZONE."); +const u8 gText_MatchCallBeauty_Jessica_Intro2[] = _("I seem to end up there."); + +const u8 gText_MatchCallRichBoy_Winston_Strategy[] = _("Strategy? Who needs it?"); +const u8 gText_MatchCallRichBoy_Winston_Pokemon[] = _("I spent big money on it!"); +const u8 gText_MatchCallRichBoy_Winston_Intro1[] = _("I, being rich, sleep in a"); +const u8 gText_MatchCallRichBoy_Winston_Intro2[] = _("custom POKéMON bed."); + +const u8 gText_MatchCallPokeManiac_Steve_Strategy[] = _("Wrestle down with power."); +const u8 gText_MatchCallPokeManiac_Steve_Pokemon[] = _("Took all night to catch."); +const u8 gText_MatchCallPokeManiac_Steve_Intro1[] = _("Big, burly, and buff"); +const u8 gText_MatchCallPokeManiac_Steve_Intro2[] = _("POKéMON are the best..."); + +const u8 gText_MatchCallSwimmer_Tony_Strategy[] = _("Ram at full speed!"); +const u8 gText_MatchCallSwimmer_Tony_Pokemon[] = _("Funky WATER type!"); +const u8 gText_MatchCallSwimmer_Tony_Intro1[] = _("If I can't be out swimming,"); +const u8 gText_MatchCallSwimmer_Tony_Intro2[] = _("I'll be pumping weights."); + +const u8 gText_MatchCallBlackBelt_Nob_Strategy[] = _("Grand slam pummeling!"); +const u8 gText_MatchCallBlackBelt_Nob_Pokemon[] = _("FIGHTING type."); +const u8 gText_MatchCallBlackBelt_Nob_Intro1[] = _("Not to brag, but I can bust"); +const u8 gText_MatchCallBlackBelt_Nob_Intro2[] = _("ten roof tiles!"); + +const u8 gText_MatchCallBlackBelt_Koji_Strategy[] = _("Witness karate power!"); +const u8 gText_MatchCallBlackBelt_Koji_Pokemon[] = _("My partners in training!"); +const u8 gText_MatchCallBlackBelt_Koji_Intro1[] = _("Let us discuss matters of"); +const u8 gText_MatchCallBlackBelt_Koji_Intro2[] = _("the world with bare fists!"); + +const u8 gText_MatchCallGuitarist_Fernando_Strategy[] = _("Rock to stunning sounds!"); +const u8 gText_MatchCallGuitarist_Fernando_Pokemon[] = _("Electric-and-sound combo!"); +const u8 gText_MatchCallGuitarist_Fernando_Intro1[] = _("My compositions will shock"); +const u8 gText_MatchCallGuitarist_Fernando_Intro2[] = _("you and stun you!"); + +const u8 gText_MatchCallGuitarist_Dalton_Strategy[] = _("I'll electrify you!"); +const u8 gText_MatchCallGuitarist_Dalton_Pokemon[] = _("They're ELECTRIC!"); +const u8 gText_MatchCallGuitarist_Dalton_Intro1[] = _("I want to make people cry"); +const u8 gText_MatchCallGuitarist_Dalton_Intro2[] = _("with songs from my heart."); + +const u8 gText_MatchCallKindler_Bernie_Strategy[] = _("Burn it all down!"); +const u8 gText_MatchCallKindler_Bernie_Pokemon[] = _("Burn-inducing POKéMON."); +const u8 gText_MatchCallKindler_Bernie_Intro1[] = _("When you light a campfire,"); +const u8 gText_MatchCallKindler_Bernie_Intro2[] = _("be sure there's some water."); + +const u8 gText_MatchCallCamper_Ethan_Strategy[] = _("Hang in and be tenacious!"); +const u8 gText_MatchCallCamper_Ethan_Pokemon[] = _("I'll raise any POKéMON."); +const u8 gText_MatchCallCamper_Ethan_Intro1[] = _("POKéMON raised in the wild"); +const u8 gText_MatchCallCamper_Ethan_Intro2[] = _("grow strong!"); + +const u8 gText_MatchCallOldCouple_JohnAndJay_Strategy[] = _("Our love lets us prevail."); +const u8 gText_MatchCallOldCouple_JohnAndJay_Pokemon[] = _("We've had them for years."); +const u8 gText_MatchCallOldCouple_JohnAndJay_Intro1[] = _("Married 50 years, we've"); +const u8 gText_MatchCallOldCouple_JohnAndJay_Intro2[] = _("devotedly raised POKéMON."); + +const u8 gText_MatchCallBugManiac_Jeffrey_Strategy[] = _("Attack in waves!"); +const u8 gText_MatchCallBugManiac_Jeffrey_Pokemon[] = _("BUG POKéMON are cool."); +const u8 gText_MatchCallBugManiac_Jeffrey_Intro1[] = _("I go into the forest every"); +const u8 gText_MatchCallBugManiac_Jeffrey_Intro2[] = _("day to catch BUG POKéMON."); + +const u8 gText_MatchCallPsychic_Cameron_Strategy[] = _("Daze and confuse!"); +const u8 gText_MatchCallPsychic_Cameron_Pokemon[] = _("Ones with weird powers."); +const u8 gText_MatchCallPsychic_Cameron_Intro1[] = _("I can see through exactly"); +const u8 gText_MatchCallPsychic_Cameron_Intro2[] = _("what you're thinking!"); + +const u8 gText_MatchCallPsychic_Jacki_Strategy[] = _("Battle at full power."); +const u8 gText_MatchCallPsychic_Jacki_Pokemon[] = _("POKéMON of many mysteries."); +const u8 gText_MatchCallPsychic_Jacki_Intro1[] = _("When we spoke, I was really"); +const u8 gText_MatchCallPsychic_Jacki_Intro2[] = _("using telepathy."); + +const u8 gText_MatchCallGentleman_Walter_Strategy[] = _("Calm and collected."); +const u8 gText_MatchCallGentleman_Walter_Pokemon[] = _("POKéMON of distinction."); +const u8 gText_MatchCallGentleman_Walter_Intro1[] = _("We enjoy a spot of tea"); +const u8 gText_MatchCallGentleman_Walter_Intro2[] = _("every day. It's imported."); + +const u8 gText_MatchCallSchoolKid_Karen_Strategy[] = _("I use my head to battle."); +const u8 gText_MatchCallSchoolKid_Karen_Pokemon[] = _("I love any kind of POKéMON!"); +const u8 gText_MatchCallSchoolKid_Karen_Intro1[] = _("My daddy gives me spending"); +const u8 gText_MatchCallSchoolKid_Karen_Intro2[] = _("money if I ace a test."); + +const u8 gText_MatchCallSchoolKid_Jerry_Strategy[] = _("My knowledge rules!"); +const u8 gText_MatchCallSchoolKid_Jerry_Pokemon[] = _("Any smart POKéMON!"); +const u8 gText_MatchCallSchoolKid_Jerry_Intro1[] = _("I want to be a POKéMON"); +const u8 gText_MatchCallSchoolKid_Jerry_Intro2[] = _("researcher in the future."); + +const u8 gText_MatchCallSrAndJr_AnnaAndMeg_Strategy[] = _("We talk it over first."); +const u8 gText_MatchCallSrAndJr_AnnaAndMeg_Pokemon[] = _("POKéMON that we both like."); +const u8 gText_MatchCallSrAndJr_AnnaAndMeg_Intro1[] = _("We're senior and junior"); +const u8 gText_MatchCallSrAndJr_AnnaAndMeg_Intro2[] = _("students into POKéMON!"); + +const u8 gText_MatchCallPokefan_Isabel_Strategy[] = _("Go for it, my dears!"); +const u8 gText_MatchCallPokefan_Isabel_Pokemon[] = _("I have no likes or dislikes."); +const u8 gText_MatchCallPokefan_Isabel_Intro1[] = _("While out shopping for"); +const u8 gText_MatchCallPokefan_Isabel_Intro2[] = _("supper, I battle too."); + +const u8 gText_MatchCallPokefan_Miguel_Strategy[] = _("I battle with love!"); +const u8 gText_MatchCallPokefan_Miguel_Pokemon[] = _("A POKéMON raised with love!"); +const u8 gText_MatchCallPokefan_Miguel_Intro1[] = _("It's important to build"); +const u8 gText_MatchCallPokefan_Miguel_Intro2[] = _("trust with your POKéMON."); + +const u8 gText_MatchCallExpert_Timothy_Strategy[] = _("I see through your moves!"); +const u8 gText_MatchCallExpert_Timothy_Pokemon[] = _("The essence of FIGHTING."); +const u8 gText_MatchCallExpert_Timothy_Intro1[] = _("I'm not ready to give way"); +const u8 gText_MatchCallExpert_Timothy_Intro2[] = _("to the young yet!"); + +const u8 gText_MatchCallExpert_Shelby_Strategy[] = _("Attack while defending."); +const u8 gText_MatchCallExpert_Shelby_Pokemon[] = _("The FIGHTING type."); +const u8 gText_MatchCallExpert_Shelby_Intro1[] = _("Being old, I have my own"); +const u8 gText_MatchCallExpert_Shelby_Intro2[] = _("style of battling."); + +const u8 gText_MatchCallYoungster_Calvin_Strategy[] = _("I do what I can."); +const u8 gText_MatchCallYoungster_Calvin_Pokemon[] = _("I use different types."); +const u8 gText_MatchCallYoungster_Calvin_Intro1[] = _("I'm going to keep working"); +const u8 gText_MatchCallYoungster_Calvin_Intro2[] = _("until I beat a GYM LEADER."); + +const u8 gText_MatchCallFisherman_Elliot_Strategy[] = _("I battle patiently."); +const u8 gText_MatchCallFisherman_Elliot_Pokemon[] = _("WATER POKéMON to battle!"); +const u8 gText_MatchCallFisherman_Elliot_Intro1[] = _("I'm the world's only guy to"); +const u8 gText_MatchCallFisherman_Elliot_Intro2[] = _("catch a huge POKéMON!"); + +const u8 gText_MatchCallTriathlete_Isaiah_Strategy[] = _("Exploit the environment!"); +const u8 gText_MatchCallTriathlete_Isaiah_Pokemon[] = _("All hail the WATER type!"); +const u8 gText_MatchCallTriathlete_Isaiah_Intro1[] = _("I won't be beaten by some"); +const u8 gText_MatchCallTriathlete_Isaiah_Intro2[] = _("beach bum SWIMMER!"); + +const u8 gText_MatchCallTriathlete_Maria_Strategy[] = _("Speed above all!"); +const u8 gText_MatchCallTriathlete_Maria_Pokemon[] = _("I use a speedy POKéMON."); +const u8 gText_MatchCallTriathlete_Maria_Intro1[] = _("A marathon is a challenge"); +const u8 gText_MatchCallTriathlete_Maria_Intro2[] = _("against your own self."); + +const u8 gText_MatchCallTriathlete_Abigail_Strategy[] = _("Defense is crucial."); +const u8 gText_MatchCallTriathlete_Abigail_Pokemon[] = _("My POKéMON is solid."); +const u8 gText_MatchCallTriathlete_Abigail_Intro1[] = _("I started this for dieting,"); +const u8 gText_MatchCallTriathlete_Abigail_Intro2[] = _("but I got right into it."); + +const u8 gText_MatchCallTriathlete_Dylan_Strategy[] = _("Strike before stricken!"); +const u8 gText_MatchCallTriathlete_Dylan_Pokemon[] = _("A fast-running POKéMON!"); +const u8 gText_MatchCallTriathlete_Dylan_Intro1[] = _("If you ran and ran, you'd"); +const u8 gText_MatchCallTriathlete_Dylan_Intro2[] = _("become one with the wind."); + +const u8 gText_MatchCallTriathlete_Katelyn_Strategy[] = _("All-out offensive!"); +const u8 gText_MatchCallTriathlete_Katelyn_Pokemon[] = _("WATER POKéMON rule!"); +const u8 gText_MatchCallTriathlete_Katelyn_Intro1[] = _("I must swim over 6 miles"); +const u8 gText_MatchCallTriathlete_Katelyn_Intro2[] = _("every day."); + +const u8 gText_MatchCallTriathlete_Benjamin_Strategy[] = _("Push and push again!"); +const u8 gText_MatchCallTriathlete_Benjamin_Pokemon[] = _("The strength of STEEL."); +const u8 gText_MatchCallTriathlete_Benjamin_Intro1[] = _("If you're sweating, get"); +const u8 gText_MatchCallTriathlete_Benjamin_Intro2[] = _("fluids into you regularly."); + +const u8 gText_MatchCallTriathlete_Pablo_Strategy[] = _("Draw the power of WATER."); +const u8 gText_MatchCallTriathlete_Pablo_Pokemon[] = _("Toughened WATER POKéMON."); +const u8 gText_MatchCallTriathlete_Pablo_Intro1[] = _("Training POKéMON is good,"); +const u8 gText_MatchCallTriathlete_Pablo_Intro2[] = _("but don't neglect yourself."); + +const u8 gText_MatchCallDragonTamer_Nicolas_Strategy[] = _("It's about POKéMON power!"); +const u8 gText_MatchCallDragonTamer_Nicolas_Pokemon[] = _("See the power of DRAGONS!"); +const u8 gText_MatchCallDragonTamer_Nicolas_Intro1[] = _("I'll become legendary as the"); +const u8 gText_MatchCallDragonTamer_Nicolas_Intro2[] = _("strongest one day!"); + +const u8 gText_MatchCallBirdKeeper_Robert_Strategy[] = _("I'll show you my technique!"); +const u8 gText_MatchCallBirdKeeper_Robert_Pokemon[] = _("Elegantly wheeling BIRDS."); +const u8 gText_MatchCallBirdKeeper_Robert_Intro1[] = _("My BIRD POKéMON, deliver my"); +const u8 gText_MatchCallBirdKeeper_Robert_Intro2[] = _("love to that girl!"); + +const u8 gText_MatchCallNinjaBoy_Lao_Strategy[] = _("You'll suffer from poison!"); +const u8 gText_MatchCallNinjaBoy_Lao_Pokemon[] = _("Poisonous POKéMON."); +const u8 gText_MatchCallNinjaBoy_Lao_Intro1[] = _("I undertake training so"); +const u8 gText_MatchCallNinjaBoy_Lao_Intro2[] = _("that I may become a ninja."); + +const u8 gText_MatchCallBattleGirl_Cyndy_Strategy[] = _("The first strike wins!"); +const u8 gText_MatchCallBattleGirl_Cyndy_Pokemon[] = _("Speedy FIGHTING type."); +const u8 gText_MatchCallBattleGirl_Cyndy_Intro1[] = _("If my POKéMON lose,"); +const u8 gText_MatchCallBattleGirl_Cyndy_Intro2[] = _("I'll carry on the fight!"); + +const u8 gText_MatchCallParasolLady_Madeline_Strategy[] = _("Go, go, my POKéMON!"); +const u8 gText_MatchCallParasolLady_Madeline_Pokemon[] = _("I'll raise anything."); +const u8 gText_MatchCallParasolLady_Madeline_Intro1[] = _("UV rays are your skin's"); +const u8 gText_MatchCallParasolLady_Madeline_Intro2[] = _("enemy. Get protected."); + +const u8 gText_MatchCallSwimmer_Jenny_Strategy[] = _("No mercy!"); +const u8 gText_MatchCallSwimmer_Jenny_Pokemon[] = _("Cute WATER POKéMON."); +const u8 gText_MatchCallSwimmer_Jenny_Intro1[] = _("I have too many fans."); +const u8 gText_MatchCallSwimmer_Jenny_Intro2[] = _("I was interviewed on TV."); + +const u8 gText_MatchCallPicnicker_Diana_Strategy[] = _("I think about this & that."); +const u8 gText_MatchCallPicnicker_Diana_Pokemon[] = _("I like all POKéMON."); +const u8 gText_MatchCallPicnicker_Diana_Intro1[] = _("What lies beyond that"); +const u8 gText_MatchCallPicnicker_Diana_Intro2[] = _("yonder hill?"); + +const u8 gText_MatchCallTwins_AmyAndLiv_Strategy[] = _("We battle together!"); +const u8 gText_MatchCallTwins_AmyAndLiv_Pokemon[] = _("We train together!"); +const u8 gText_MatchCallTwins_AmyAndLiv_Intro1[] = _("We like the same POKéMON,"); +const u8 gText_MatchCallTwins_AmyAndLiv_Intro2[] = _("but different desserts."); + +const u8 gText_MatchCallSailor_Ernest_Strategy[] = _("I force things with power!"); +const u8 gText_MatchCallSailor_Ernest_Pokemon[] = _("WATER and FIGHTING types."); +const u8 gText_MatchCallSailor_Ernest_Intro1[] = _("Seamen are rough spirits!"); +const u8 gText_MatchCallSailor_Ernest_Intro2[] = _("Any complaints?"); + +const u8 gText_MatchCallSailor_Cory_Strategy[] = _("Up for a fight anytime!"); +const u8 gText_MatchCallSailor_Cory_Pokemon[] = _("WATER POKéMON are my faves!"); +const u8 gText_MatchCallSailor_Cory_Intro1[] = _("If you want to shout loud,"); +const u8 gText_MatchCallSailor_Cory_Intro2[] = _("suck in air with your belly!"); + +const u8 gText_MatchCallCollector_Edwin_Strategy[] = _("Protect POKéMON from harm."); +const u8 gText_MatchCallCollector_Edwin_Pokemon[] = _("I love rare POKéMON."); +const u8 gText_MatchCallCollector_Edwin_Intro1[] = _("I want to collect all the"); +const u8 gText_MatchCallCollector_Edwin_Intro2[] = _("world's rare POKéMON."); + +const u8 gText_MatchCallPkmnBreeder_Lydia_Strategy[] = _("I count on power."); +const u8 gText_MatchCallPkmnBreeder_Lydia_Pokemon[] = _("POKéMON are my children."); +const u8 gText_MatchCallPkmnBreeder_Lydia_Intro1[] = _("It takes knowledge and"); +const u8 gText_MatchCallPkmnBreeder_Lydia_Intro2[] = _("love to raise POKéMON."); + +const u8 gText_MatchCallPkmnBreeder_Isaac_Strategy[] = _("Full-on attack!"); +const u8 gText_MatchCallPkmnBreeder_Isaac_Pokemon[] = _("Anything. I'll raise it."); +const u8 gText_MatchCallPkmnBreeder_Isaac_Intro1[] = _("I give them {POKEBLOCK}S for"); +const u8 gText_MatchCallPkmnBreeder_Isaac_Intro2[] = _("going after CONTEST titles."); + +const u8 gText_MatchCallPkmnBreeder_Gabrielle_Strategy[] = _("I raise POKéMON with care."); +const u8 gText_MatchCallPkmnBreeder_Gabrielle_Pokemon[] = _("Fun-to-raise POKéMON."); +const u8 gText_MatchCallPkmnBreeder_Gabrielle_Intro1[] = _("Treat every POKéMON you"); +const u8 gText_MatchCallPkmnBreeder_Gabrielle_Intro2[] = _("meet with respect."); + +const u8 gText_MatchCallPkmnRanger_Catherine_Strategy[] = _("I believe in my POKéMON."); +const u8 gText_MatchCallPkmnRanger_Catherine_Pokemon[] = _("I like strong POKéMON."); +const u8 gText_MatchCallPkmnRanger_Catherine_Intro1[] = _("I'm training for rescue"); +const u8 gText_MatchCallPkmnRanger_Catherine_Intro2[] = _("work with my POKéMON."); + +const u8 gText_MatchCallPkmnRanger_Jackson_Strategy[] = _("Attack in waves!"); +const u8 gText_MatchCallPkmnRanger_Jackson_Pokemon[] = _("I use different types."); +const u8 gText_MatchCallPkmnRanger_Jackson_Intro1[] = _("Those who destroy nature"); +const u8 gText_MatchCallPkmnRanger_Jackson_Intro2[] = _("must never be forgiven!"); + +const u8 gText_MatchCallLass_Haley_Strategy[] = _("I'll show you some guts!"); +const u8 gText_MatchCallLass_Haley_Pokemon[] = _("Cute POKéMON are my faves!"); +const u8 gText_MatchCallLass_Haley_Intro1[] = _("After a battle, I always"); +const u8 gText_MatchCallLass_Haley_Intro2[] = _("bathe with my POKéMON."); + +const u8 gText_MatchCallBugCatcher_James_Strategy[] = _("Lightning-fast attack!"); +const u8 gText_MatchCallBugCatcher_James_Pokemon[] = _("BUG POKéMON are number 1!"); +const u8 gText_MatchCallBugCatcher_James_Intro1[] = _("If you want to catch BUG"); +const u8 gText_MatchCallBugCatcher_James_Intro2[] = _("POKéMON, wake up early."); + +const u8 gText_MatchCallHiker_Trent_Strategy[] = _("I battle with power."); +const u8 gText_MatchCallHiker_Trent_Pokemon[] = _("Hard-bodied POKéMON."); +const u8 gText_MatchCallHiker_Trent_Intro1[] = _("I've been planning a month"); +const u8 gText_MatchCallHiker_Trent_Intro2[] = _("for today's hike."); + +const u8 gText_MatchCallHiker_Sawyer_Strategy[] = _("I like it hot!"); +const u8 gText_MatchCallHiker_Sawyer_Pokemon[] = _("Hot POKéMON!"); +const u8 gText_MatchCallHiker_Sawyer_Intro1[] = _("As much as I love POKéMON,"); +const u8 gText_MatchCallHiker_Sawyer_Intro2[] = _("I surely like hiking!"); + +const u8 gText_MatchCallYoungCouple_LoisAndHal_Strategy[] = _("Lovey-dovey strategy!"); +const u8 gText_MatchCallYoungCouple_LoisAndHal_Pokemon[] = _("Lovey-dovey POKéMON!"); +const u8 gText_MatchCallYoungCouple_LoisAndHal_Intro1[] = _("We're lovey-dovey!"); +const u8 gText_MatchCallYoungCouple_LoisAndHal_Intro2[] = _("Forever lovey-dovey!"); + +const u8 gText_MatchCallPkmnTrainer_Wally_Strategy[] = _("We let it all hang out."); +const u8 gText_MatchCallPkmnTrainer_Wally_Pokemon[] = _("The 1st POKéMON I caught."); +const u8 gText_MatchCallPkmnTrainer_Wally_Intro1[] = _("POKéMON and I have grown"); +const u8 gText_MatchCallPkmnTrainer_Wally_Intro2[] = _("stronger together."); + +const u8 gText_MatchCallRockinWhiz_Roxanne_Strategy[] = _("ROCK-type power attack."); +const u8 gText_MatchCallRockinWhiz_Roxanne_Pokemon[] = _("I prefer rock-hard POKéMON."); +const u8 gText_MatchCallRockinWhiz_Roxanne_Intro1[] = _("A LEADER of a big GYM bears"); +const u8 gText_MatchCallRockinWhiz_Roxanne_Intro2[] = _("a lot of responsibility."); + +const u8 gText_MatchCallTheBigHit_Brawly_Strategy[] = _("Direct physical action!"); +const u8 gText_MatchCallTheBigHit_Brawly_Pokemon[] = _("FIGHTING POKéMON rule!"); +const u8 gText_MatchCallTheBigHit_Brawly_Intro1[] = _("The world awaits me as the"); +const u8 gText_MatchCallTheBigHit_Brawly_Intro2[] = _("next big wave!"); + +const u8 gText_MatchCallSwellShock_Wattson_Strategy[] = _("I choose to electrify."); +const u8 gText_MatchCallSwellShock_Wattson_Pokemon[] = _("Get shocked by electricity!"); +const u8 gText_MatchCallSwellShock_Wattson_Intro1[] = _("One must never throw a"); +const u8 gText_MatchCallSwellShock_Wattson_Intro2[] = _("match. Even I must not."); + +const u8 gText_MatchCallPassionBurn_Flannery_Strategy[] = _("Battle aggressively."); +const u8 gText_MatchCallPassionBurn_Flannery_Pokemon[] = _("Burn with passion!"); +const u8 gText_MatchCallPassionBurn_Flannery_Intro1[] = _("Completely wash away daily"); +const u8 gText_MatchCallPassionBurn_Flannery_Intro2[] = _("fatigue in hot springs!"); + +const u8 gText_MatchCallReliableOne_Dad_Strategy[] = _("I flexibly adapt my style."); +const u8 gText_MatchCallReliableOne_Dad_Pokemon[] = _("Grown in a balanced manner."); +const u8 gText_MatchCallReliableOne_Dad_Intro1[] = _("I walk the 30 minutes from"); +const u8 gText_MatchCallReliableOne_Dad_Intro2[] = _("home to here every day."); + +const u8 gText_MatchCallSkyTamer_Winona_Strategy[] = _("I take advantage of speed."); +const u8 gText_MatchCallSkyTamer_Winona_Pokemon[] = _("Graceful sky dancers."); +const u8 gText_MatchCallSkyTamer_Winona_Intro1[] = _("The ultimate would be to"); +const u8 gText_MatchCallSkyTamer_Winona_Intro2[] = _("live as one with nature."); + +const u8 gText_MatchCallMysticDuo_TateAndLiza_Strategy[] = _("We battle in cooperation."); +const u8 gText_MatchCallMysticDuo_TateAndLiza_Pokemon[] = _("Always friendly POKéMON."); +const u8 gText_MatchCallMysticDuo_TateAndLiza_Intro1[] = _("Papa has trouble telling"); +const u8 gText_MatchCallMysticDuo_TateAndLiza_Intro2[] = _("the two of us apart!"); + +const u8 gText_MatchCallDandyCharm_Juan_Strategy[] = _("I use splendid waterpower."); +const u8 gText_MatchCallDandyCharm_Juan_Pokemon[] = _("POKéMON of elegance!"); +const u8 gText_MatchCallDandyCharm_Juan_Intro1[] = _("The adulation of beautiful"); +const u8 gText_MatchCallDandyCharm_Juan_Intro2[] = _("ladies fills me with energy!"); + +const u8 gText_MatchCallEliteFour_Sidney_Strategy[] = _("Offense over defense!"); +const u8 gText_MatchCallEliteFour_Sidney_Pokemon[] = _("The DARK side's beauties."); +const u8 gText_MatchCallEliteFour_Sidney_Intro1[] = _("They said I was a punk, but"); +const u8 gText_MatchCallEliteFour_Sidney_Intro2[] = _("I'm one of the ELITE FOUR!"); + +const u8 gText_MatchCallEliteFour_Phoebe_Strategy[] = _("Confuse and confound."); +const u8 gText_MatchCallEliteFour_Phoebe_Pokemon[] = _("There's nothing definite."); +const u8 gText_MatchCallEliteFour_Phoebe_Intro1[] = _("I wonder how my grandma at"); +const u8 gText_MatchCallEliteFour_Phoebe_Intro2[] = _("MT. PYRE is doing?"); + +const u8 gText_MatchCallEliteFour_Glacia_Strategy[] = _("I use items for help."); +const u8 gText_MatchCallEliteFour_Glacia_Pokemon[] = _("Flaming passion in icy cold!"); +const u8 gText_MatchCallEliteFour_Glacia_Intro1[] = _("The ICE type can be better"); +const u8 gText_MatchCallEliteFour_Glacia_Intro2[] = _("trained in this hot land."); + +const u8 gText_MatchCallEliteFour_Drake_Strategy[] = _("Harness strong abilities."); +const u8 gText_MatchCallEliteFour_Drake_Pokemon[] = _("The raw power of DRAGONS!"); +const u8 gText_MatchCallEliteFour_Drake_Intro1[] = _("I dedicate myself to the"); +const u8 gText_MatchCallEliteFour_Drake_Intro2[] = _("POKéMON that saved me."); + +const u8 gText_MatchCallChampion_Wallace_Strategy[] = _("Dignity and respect."); +const u8 gText_MatchCallChampion_Wallace_Pokemon[] = _("I prefer POKéMON of grace."); +const u8 gText_MatchCallChampion_Wallace_Intro1[] = _("I represent beauty as"); +const u8 gText_MatchCallChampion_Wallace_Intro2[] = _("well as intelligence."); + +const u8 *const gMatchCallFlavorTexts[REMATCH_TABLE_ENTRIES][CHECK_PAGE_ENTRY_COUNT] = { [REMATCH_ROSE] = MCFLAVOR(AromaLady_Rose), [REMATCH_ANDRES] = MCFLAVOR(RuinManiac_Andres), diff --git a/src/daycare.c b/src/daycare.c index 42c69465b..dcbadeba8 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -54,8 +54,8 @@ static const struct WindowTemplate sDaycareLevelMenuWindowTemplate = // which is copied to VAR_0x8004 and used as an index for GetDaycareCost static const struct ListMenuItem sLevelMenuItems[] = { - {gExpandedPlaceholder_Empty, 0}, - {gExpandedPlaceholder_Empty, 1}, + {gText_ExpandedPlaceholder_Empty, 0}, + {gText_ExpandedPlaceholder_Empty, 1}, {gText_Exit, DAYCARE_LEVEL_MENU_EXIT} }; diff --git a/src/naming_screen.c b/src/naming_screen.c index 73eda32c8..a282b728a 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -33,7 +33,6 @@ EWRAM_DATA static struct NamingScreenData *gNamingScreenData = NULL; extern u16 gKeyRepeatStartDelay; // extern text -extern const u8 gExpandedPlaceholder_Empty[]; extern const u8 gText_MoveOkBack[]; extern const u8 gText_YourName[]; extern const u8 gText_BoxName[]; @@ -1679,7 +1678,7 @@ static void sub_80E4D10(void) for (i = 0; i < maxChars; i++) { temp[0] = gNamingScreenData->textBuffer[i]; - temp[1] = gExpandedPlaceholder_Empty[0]; + temp[1] = gText_ExpandedPlaceholder_Empty[0]; unk2 = (sub_80E503C(temp[0]) == 1) ? 2 : 0; AddTextPrinterParameterized(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL); diff --git a/src/pokenav.c b/src/pokenav.c index 9f12380df..6b971bc00 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -337,7 +337,7 @@ static void CB2_InitPokenavForTutorial(void) else { InitPokenavResources(gPokenavResources); - gPokenavResources->mode = POKENAV_MODE_FORCE_CALL_1; + gPokenavResources->mode = POKENAV_MODE_FORCE_CALL_READY; ResetTasks(); ResetSpriteData(); FreeAllSpritePalettes(); diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 5379ee88e..15374ca89 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -7,6 +7,7 @@ #include "gym_leader_rematch.h" #include "match_call.h" #include "pokenav.h" +#include "strings.h" #include "constants/region_map_sections.h" #include "constants/trainers.h" @@ -100,7 +101,7 @@ struct MatchCallOverride { u16 idx; u16 facilityClass; u32 flag; - const u8 *flavorTexts[4]; + const u8 *flavorTexts[CHECK_PAGE_ENTRY_COUNT]; }; // Static RAM declarations @@ -153,176 +154,144 @@ static void sub_81D1920(const match_call_text_data_t *, u8 *); static void sub_81D199C(const match_call_text_data_t *, u16, u8 *); static void MatchCall_GetNameAndDescByRematchIdx(u32, const u8 **, const u8 **); -extern const u8 gText_MrStone_Pokenav_2B60C0[]; -extern const u8 gText_MrStone_Pokenav_2B61E6[]; -extern const u8 gText_MrStone_Pokenav_2B6302[]; -extern const u8 gText_MrStone_Pokenav_2B63A0[]; -extern const u8 gText_MrStone_Pokenav_2B64A2[]; -extern const u8 gText_MrStone_Pokenav_2B6526[]; -extern const u8 gText_MrStone_Pokenav_2B65BB[]; -extern const u8 gText_MrStone_Pokenav_2B6664[]; -extern const u8 gText_MrStone_Pokenav_2B66B1[]; -extern const u8 gText_MrStone_Pokenav_2B6703[]; -extern const u8 gText_MrStone_Pokenav_2B67ED[]; +extern const u8 MatchCall_Text_MrStone1[]; +extern const u8 MatchCall_Text_MrStone2[]; +extern const u8 MatchCall_Text_MrStone3[]; +extern const u8 MatchCall_Text_MrStone4[]; +extern const u8 MatchCall_Text_MrStone5[]; +extern const u8 MatchCall_Text_MrStone6[]; +extern const u8 MatchCall_Text_MrStone7[]; +extern const u8 MatchCall_Text_MrStone8[]; +extern const u8 MatchCall_Text_MrStone9[]; +extern const u8 MatchCall_Text_MrStone10[]; +extern const u8 MatchCall_Text_MrStone11[]; -extern const u8 gMrStoneMatchCallDesc[]; -extern const u8 gMrStoneMatchCallName[]; +extern const u8 MatchCall_Text_Norman1[]; +extern const u8 MatchCall_Text_Norman2[]; +extern const u8 MatchCall_Text_Norman3[]; +extern const u8 MatchCall_Text_Norman4[]; +extern const u8 MatchCall_Text_Norman5[]; +extern const u8 MatchCall_Text_Norman6[]; +extern const u8 MatchCall_Text_Norman7[]; +extern const u8 MatchCall_Text_Norman8[]; +extern const u8 MatchCall_Text_Norman9[]; -extern const u8 gText_Norman_Pokenav_2B5719[]; -extern const u8 gText_Norman_Pokenav_2B5795[]; -extern const u8 gText_Norman_Pokenav_2B584D[]; -extern const u8 gText_Norman_Pokenav_2B58E3[]; -extern const u8 gText_Norman_Pokenav_2B5979[]; -extern const u8 gText_Norman_Pokenav_2B5A07[]; -extern const u8 gText_Norman_Pokenav_2B5A69[]; -extern const u8 gText_Norman_Pokenav_2B5ACF[]; -extern const u8 gText_Norman_Pokenav_2B5B5E[]; +extern const u8 MatchCall_Text_Mom1[]; +extern const u8 MatchCall_Text_Mom2[]; +extern const u8 MatchCall_Text_Mom3[]; -extern const u8 gNormanMatchCallDesc[]; -extern const u8 gNormanMatchCallName[]; +extern const u8 MatchCall_Text_Steven1[]; +extern const u8 MatchCall_Text_Steven2[]; +extern const u8 MatchCall_Text_Steven3[]; +extern const u8 MatchCall_Text_Steven4[]; +extern const u8 MatchCall_Text_Steven5[]; +extern const u8 MatchCall_Text_Steven6[]; +extern const u8 MatchCall_Text_Steven7[]; -extern const u8 gProfBirchMatchCallDesc[]; -extern const u8 gProfBirchMatchCallName[]; +extern const u8 MatchCall_Text_May1[]; +extern const u8 MatchCall_Text_May2[]; +extern const u8 MatchCall_Text_May3[]; +extern const u8 MatchCall_Text_May4[]; +extern const u8 MatchCall_Text_May5[]; +extern const u8 MatchCall_Text_May6[]; +extern const u8 MatchCall_Text_May7[]; +extern const u8 MatchCall_Text_May8[]; +extern const u8 MatchCall_Text_May9[]; +extern const u8 MatchCall_Text_May10[]; +extern const u8 MatchCall_Text_May11[]; +extern const u8 MatchCall_Text_May12[]; +extern const u8 MatchCall_Text_May13[]; +extern const u8 MatchCall_Text_May14[]; +extern const u8 MatchCall_Text_May15[]; -extern const u8 gText_Mom_Pokenav_2B227B[]; -extern const u8 gText_Mom_Pokenav_2B2310[]; -extern const u8 gText_Mom_Pokenav_2B23F3[]; +extern const u8 MatchCall_Text_Brendan1[]; +extern const u8 MatchCall_Text_Brendan2[]; +extern const u8 MatchCall_Text_Brendan3[]; +extern const u8 MatchCall_Text_Brendan4[]; +extern const u8 MatchCall_Text_Brendan5[]; +extern const u8 MatchCall_Text_Brendan6[]; +extern const u8 MatchCall_Text_Brendan7[]; +extern const u8 MatchCall_Text_Brendan8[]; +extern const u8 MatchCall_Text_Brendan9[]; +extern const u8 MatchCall_Text_Brendan10[]; +extern const u8 MatchCall_Text_Brendan11[]; +extern const u8 MatchCall_Text_Brendan12[]; +extern const u8 MatchCall_Text_Brendan13[]; +extern const u8 MatchCall_Text_Brendan14[]; +extern const u8 MatchCall_Text_Brendan15[]; -extern const u8 gMomMatchCallDesc[]; -extern const u8 gMomMatchCallName[]; +extern const u8 MatchCall_Text_Wally1[]; +extern const u8 MatchCall_Text_Wally2[]; +extern const u8 MatchCall_Text_Wally3[]; +extern const u8 MatchCall_Text_Wally4[]; +extern const u8 MatchCall_Text_Wally5[]; +extern const u8 MatchCall_Text_Wally6[]; +extern const u8 MatchCall_Text_Wally7[]; -extern const u8 gText_Steven_Pokenav_2B5B95[]; -extern const u8 gText_Steven_Pokenav_2B5C53[]; -extern const u8 gText_Steven_Pokenav_2B5CC9[]; -extern const u8 gText_Steven_Pokenav_2B5DB4[]; -extern const u8 gText_Steven_Pokenav_2B5E26[]; -extern const u8 gText_Steven_Pokenav_2B5EA2[]; -extern const u8 gText_Steven_Pokenav_2B5ED9[]; +extern const u8 MatchCall_Text_Scott1[]; +extern const u8 MatchCall_Text_Scott2[]; +extern const u8 MatchCall_Text_Scott3[]; +extern const u8 MatchCall_Text_Scott4[]; +extern const u8 MatchCall_Text_Scott5[]; +extern const u8 MatchCall_Text_Scott6[]; +extern const u8 MatchCall_Text_Scott7[]; -extern const u8 gStevenMatchCallDesc[]; -extern const u8 gStevenMatchCallName[]; +extern const u8 MatchCall_Text_Roxanne1[]; +extern const u8 MatchCall_Text_Roxanne2[]; +extern const u8 MatchCall_Text_Roxanne3[]; +extern const u8 MatchCall_Text_Roxanne4[]; + +extern const u8 MatchCall_Text_Brawly1[]; +extern const u8 MatchCall_Text_Brawly2[]; +extern const u8 MatchCall_Text_Brawly3[]; +extern const u8 MatchCall_Text_Brawly4[]; + +extern const u8 MatchCall_Text_Wattson1[]; +extern const u8 MatchCall_Text_Wattson2[]; +extern const u8 MatchCall_Text_Wattson3[]; +extern const u8 MatchCall_Text_Wattson4[]; + +extern const u8 MatchCall_Text_Flannery1[]; +extern const u8 MatchCall_Text_Flannery2[]; +extern const u8 MatchCall_Text_Flannery3[]; +extern const u8 MatchCall_Text_Flannery4[]; + +extern const u8 MatchCall_Text_Winona1[]; +extern const u8 MatchCall_Text_Winona2[]; +extern const u8 MatchCall_Text_Winona3[]; +extern const u8 MatchCall_Text_Winona4[]; + +extern const u8 MatchCall_Text_TateLiza1[]; +extern const u8 MatchCall_Text_TateLiza2[]; +extern const u8 MatchCall_Text_TateLiza3[]; +extern const u8 MatchCall_Text_TateLiza4[]; + +extern const u8 MatchCall_Text_Juan1[]; +extern const u8 MatchCall_Text_Juan2[]; +extern const u8 MatchCall_Text_Juan3[]; +extern const u8 MatchCall_Text_Juan4[]; + +extern const u8 MatchCall_Text_Sidney[]; +extern const u8 MatchCall_Text_Phoebe[]; +extern const u8 MatchCall_Text_Glacia[]; +extern const u8 MatchCall_Text_Drake[]; +extern const u8 MatchCall_Text_Wallace[]; -extern const u8 gText_May_Pokenav_2B3AB3[]; -extern const u8 gText_May_Pokenav_2B3B3F[]; -extern const u8 gText_May_Pokenav_2B3C13[]; -extern const u8 gText_May_Pokenav_2B3CF3[]; -extern const u8 gText_May_Pokenav_2B3D4B[]; -extern const u8 gText_May_Pokenav_2B3DD1[]; -extern const u8 gText_May_Pokenav_2B3E69[]; -extern const u8 gText_May_Pokenav_2B3ECD[]; -extern const u8 gText_May_Pokenav_2B3F2B[]; -extern const u8 gText_May_Pokenav_2B3FFB[]; -extern const u8 gText_May_Pokenav_2B402B[]; -extern const u8 gText_May_Pokenav_2B414B[]; -extern const u8 gText_May_Pokenav_2B4228[]; -extern const u8 gText_May_Pokenav_2B42E0[]; -extern const u8 gText_May_Pokenav_2B4350[]; -extern const u8 gMayBrendanMatchCallDesc[]; -extern const u8 gExpandedPlaceholder_May[]; -extern const u8 gText_Brendan_Pokenav_2B43EF[]; -extern const u8 gText_Brendan_Pokenav_2B4486[]; -extern const u8 gText_Brendan_Pokenav_2B4560[]; -extern const u8 gText_Brendan_Pokenav_2B463F[]; -extern const u8 gText_Brendan_Pokenav_2B46B7[]; -extern const u8 gText_Brendan_Pokenav_2B4761[]; -extern const u8 gText_Brendan_Pokenav_2B47F4[]; -extern const u8 gText_Brendan_Pokenav_2B4882[]; -extern const u8 gText_Brendan_Pokenav_2B4909[]; -extern const u8 gText_Brendan_Pokenav_2B49C4[]; -extern const u8 gText_Brendan_Pokenav_2B4A44[]; -extern const u8 gText_Brendan_Pokenav_2B4B28[]; -extern const u8 gText_Brendan_Pokenav_2B4C15[]; -extern const u8 gText_Brendan_Pokenav_2B4CD8[]; -extern const u8 gText_Brendan_Pokenav_2B4D46[]; -extern const u8 gExpandedPlaceholder_Brendan[]; -extern const u8 gText_Wally_Pokenav_2B4DE2[]; -extern const u8 gText_Wally_Pokenav_2B4E57[]; -extern const u8 gText_Wally_Pokenav_2B4EA5[]; -extern const u8 gText_Wally_Pokenav_2B4F41[]; -extern const u8 gText_Wally_Pokenav_2B4FF3[]; -extern const u8 gText_Wally_Pokenav_2B50B1[]; -extern const u8 gText_Wally_Pokenav_2B5100[]; -extern const u8 gWallyMatchCallDesc[]; -extern const u8 gText_Scott_Pokenav_2B5184[]; -extern const u8 gText_Scott_Pokenav_2B5275[]; -extern const u8 gText_Scott_Pokenav_2B5323[]; -extern const u8 gText_Scott_Pokenav_2B53DB[]; -extern const u8 gText_Scott_Pokenav_2B54A5[]; -extern const u8 gText_Scott_Pokenav_2B5541[]; -extern const u8 gText_Scott_Pokenav_2B56CA[]; -extern const u8 gScottMatchCallDesc[]; -extern const u8 gScottMatchCallName[]; -extern const u8 gText_Roxanne_Pokenav_2B2456[]; -extern const u8 gText_Roxanne_Pokenav_2B250E[]; -extern const u8 gText_Roxanne_Pokenav_2B25C1[]; -extern const u8 gText_Roxanne_Pokenav_2B2607[]; -extern const u8 gRoxanneMatchCallDesc[]; -extern const u8 gText_Brawly_Pokenav_2B2659[]; -extern const u8 gText_Brawly_Pokenav_2B275D[]; -extern const u8 gText_Brawly_Pokenav_2B286F[]; -extern const u8 gText_Brawly_Pokenav_2B28D1[]; -extern const u8 gBrawlyMatchCallDesc[]; -extern const u8 gText_Wattson_Pokenav_2B2912[]; -extern const u8 gText_Wattson_Pokenav_2B29CA[]; -extern const u8 gText_Wattson_Pokenav_2B2AB6[]; -extern const u8 gText_Wattson_Pokenav_2B2B01[]; -extern const u8 gWattsonMatchCallDesc[]; -extern const u8 gText_Flannery_Pokenav_2B2B4D[]; -extern const u8 gText_Flannery_Pokenav_2B2C0E[]; -extern const u8 gText_Flannery_Pokenav_2B2CF1[]; -extern const u8 gText_Flannery_Pokenav_2B2D54[]; -extern const u8 gFlanneryMatchCallDesc[]; -extern const u8 gText_Winona_Pokenav_2B2DA4[]; -extern const u8 gText_Winona_Pokenav_2B2E2B[]; -extern const u8 gText_Winona_Pokenav_2B2EC2[]; -extern const u8 gText_Winona_Pokenav_2B2F16[]; -extern const u8 gWinonaMatchCallDesc[]; -extern const u8 gText_TateLiza_Pokenav_2B2F97[]; -extern const u8 gText_TateLiza_Pokenav_2B306E[]; -extern const u8 gText_TateLiza_Pokenav_2B3158[]; -extern const u8 gText_TateLiza_Pokenav_2B31CD[]; -extern const u8 gTateLizaMatchCallDesc[]; -extern const u8 gText_Juan_Pokenav_2B3249[]; -extern const u8 gText_Juan_Pokenav_2B32EC[]; -extern const u8 gText_Juan_Pokenav_2B33AA[]; -extern const u8 gText_Juan_Pokenav_2B341E[]; -extern const u8 gJuanMatchCallDesc[]; -extern const u8 gText_Sidney_Pokenav_2B34CC[]; -extern const u8 gEliteFourMatchCallDesc[]; -extern const u8 gText_Phoebe_Pokenav_2B3561[]; -extern const u8 gText_Glacia_Pokenav_2B35E4[]; -extern const u8 gText_Drake_Pokenav_2B368B[]; -extern const u8 gText_Wallace_Pokenav_2B3790[]; -extern const u8 gChampionMatchCallDesc[]; -extern const u8 gMatchCallStevenStrategyText[]; -extern const u8 gMatchCall_StevenTrainersPokemonText[]; -extern const u8 gMatchCall_StevenSelfIntroductionText_Line1_BeforeMeteorFallsBattle[]; -extern const u8 gMatchCall_StevenSelfIntroductionText_Line2_BeforeMeteorFallsBattle[]; -extern const u8 gMatchCall_StevenSelfIntroductionText_Line1_AfterMeteorFallsBattle[]; -extern const u8 gMatchCall_StevenSelfIntroductionText_Line2_AfterMeteorFallsBattle[]; -extern const u8 gMatchCall_BrendanStrategyText[]; -extern const u8 gMatchCall_BrendanTrainersPokemonText[]; -extern const u8 gMatchCall_BrendanSelfIntroductionText_Line1[]; -extern const u8 gMatchCall_BrendanSelfIntroductionText_Line2[]; -extern const u8 gMatchCall_MayStrategyText[]; -extern const u8 gMatchCall_MayTrainersPokemonText[]; -extern const u8 gMatchCall_MaySelfIntroductionText_Line1[]; -extern const u8 gMatchCall_MaySelfIntroductionText_Line2[]; // .rodata static const match_call_text_data_t sMrStoneTextScripts[] = { - { gText_MrStone_Pokenav_2B60C0, 0xFFFF, FLAG_ENABLE_MR_STONE_POKENAV }, - { gText_MrStone_Pokenav_2B61E6, FLAG_ENABLE_MR_STONE_POKENAV, 0xFFFF }, - { gText_MrStone_Pokenav_2B6302, FLAG_DELIVERED_STEVEN_LETTER, 0xFFFF }, - { gText_MrStone_Pokenav_2B63A0, FLAG_RECEIVED_EXP_SHARE, 0xFFFF }, - { gText_MrStone_Pokenav_2B64A2, FLAG_RECEIVED_HM04, 0xFFFF }, - { gText_MrStone_Pokenav_2B6526, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, - { gText_MrStone_Pokenav_2B65BB, FLAG_RECEIVED_CASTFORM, 0xFFFF }, - { gText_MrStone_Pokenav_2B6664, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, - { gText_MrStone_Pokenav_2B66B1, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, - { gText_MrStone_Pokenav_2B6703, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, - { gText_MrStone_Pokenav_2B67ED, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_MrStone1, 0xFFFF, FLAG_ENABLE_MR_STONE_POKENAV }, + { MatchCall_Text_MrStone2, FLAG_ENABLE_MR_STONE_POKENAV, 0xFFFF }, + { MatchCall_Text_MrStone3, FLAG_DELIVERED_STEVEN_LETTER, 0xFFFF }, + { MatchCall_Text_MrStone4, FLAG_RECEIVED_EXP_SHARE, 0xFFFF }, + { MatchCall_Text_MrStone5, FLAG_RECEIVED_HM04, 0xFFFF }, + { MatchCall_Text_MrStone6, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, + { MatchCall_Text_MrStone7, FLAG_RECEIVED_CASTFORM, 0xFFFF }, + { MatchCall_Text_MrStone8, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, + { MatchCall_Text_MrStone9, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, + { MatchCall_Text_MrStone10, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, + { MatchCall_Text_MrStone11, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct0 sMrStoneMatchCallHeader = @@ -330,22 +299,22 @@ static const struct MatchCallStruct0 sMrStoneMatchCallHeader = .type = 0, .mapSec = MAPSEC_RUSTBORO_CITY, .flag = 0xFFFF, - .desc = gMrStoneMatchCallDesc, - .name = gMrStoneMatchCallName, + .desc = gText_MrStoneMatchCallDesc, + .name = gText_MrStoneMatchCallName, .textData = sMrStoneTextScripts }; static const match_call_text_data_t sNormanTextScripts[] = { - { gText_Norman_Pokenav_2B5719, FLAG_ENABLE_NORMAN_MATCH_CALL, 0xFFFF }, - { gText_Norman_Pokenav_2B5795, FLAG_DEFEATED_DEWFORD_GYM, 0xFFFF }, - { gText_Norman_Pokenav_2B584D, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, - { gText_Norman_Pokenav_2B58E3, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, - { gText_Norman_Pokenav_2B5979, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, - { gText_Norman_Pokenav_2B5A07, 0xFFFE, 0xFFFF }, - { gText_Norman_Pokenav_2B5A69, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { gText_Norman_Pokenav_2B5ACF, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { gText_Norman_Pokenav_2B5B5E, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Norman1, FLAG_ENABLE_NORMAN_MATCH_CALL, 0xFFFF }, + { MatchCall_Text_Norman2, FLAG_DEFEATED_DEWFORD_GYM, 0xFFFF }, + { MatchCall_Text_Norman3, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, + { MatchCall_Text_Norman4, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, + { MatchCall_Text_Norman5, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, + { MatchCall_Text_Norman6, 0xFFFE, 0xFFFF }, + { MatchCall_Text_Norman7, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { MatchCall_Text_Norman8, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { MatchCall_Text_Norman9, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sNormanMatchCallHeader = @@ -354,8 +323,8 @@ static const struct MatchCallStruct5 sNormanMatchCallHeader = .mapSec = MAPSEC_PETALBURG_CITY, .flag = FLAG_ENABLE_NORMAN_MATCH_CALL, .rematchTableIdx = REMATCH_NORMAN, - .desc = gNormanMatchCallDesc, - .name = gNormanMatchCallName, + .desc = gText_NormanMatchCallDesc, + .name = gText_NormanMatchCallName, .textData = sNormanTextScripts }; @@ -364,15 +333,15 @@ static const struct MatchCallStruct3 sProfBirchMatchCallHeader = .type = 3, .mapSec = 0, .flag = FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, - .desc = gProfBirchMatchCallDesc, - .name = gProfBirchMatchCallName + .desc = gText_ProfBirchMatchCallDesc, + .name = gText_ProfBirchMatchCallName }; static const match_call_text_data_t sMomTextScripts[] = { - { gText_Mom_Pokenav_2B227B, 0xffff, 0xffff }, - { gText_Mom_Pokenav_2B2310, FLAG_DEFEATED_PETALBURG_GYM, 0xffff }, - { gText_Mom_Pokenav_2B23F3, FLAG_SYS_GAME_CLEAR, 0xffff }, - { NULL, 0xffff, 0xffff } + { MatchCall_Text_Mom1, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Mom2, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, + { MatchCall_Text_Mom3, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct0 sMomMatchCallHeader = @@ -380,20 +349,20 @@ static const struct MatchCallStruct0 sMomMatchCallHeader = .type = 0, .mapSec = MAPSEC_LITTLEROOT_TOWN, .flag = FLAG_ENABLE_MOM_MATCH_CALL, - .desc = gMomMatchCallDesc, - .name = gMomMatchCallName, + .desc = gText_MomMatchCallDesc, + .name = gText_MomMatchCallName, .textData = sMomTextScripts }; static const match_call_text_data_t sStevenTextScripts[] = { - { gText_Steven_Pokenav_2B5B95, 0xffff, 0xffff }, - { gText_Steven_Pokenav_2B5C53, FLAG_RUSTURF_TUNNEL_OPENED, 0xffff }, - { gText_Steven_Pokenav_2B5CC9, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xffff }, - { gText_Steven_Pokenav_2B5DB4, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xffff }, - { gText_Steven_Pokenav_2B5E26, FLAG_DEFEATED_MOSSDEEP_GYM, 0xffff }, - { gText_Steven_Pokenav_2B5EA2, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xffff }, - { gText_Steven_Pokenav_2B5ED9, FLAG_SYS_GAME_CLEAR, 0xffff }, - { NULL, 0xffff, 0xffff }, + { MatchCall_Text_Steven1, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Steven2, FLAG_RUSTURF_TUNNEL_OPENED, 0xFFFF }, + { MatchCall_Text_Steven3, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, + { MatchCall_Text_Steven4, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, + { MatchCall_Text_Steven5, FLAG_DEFEATED_MOSSDEEP_GYM, 0xFFFF }, + { MatchCall_Text_Steven6, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xFFFF }, + { MatchCall_Text_Steven7, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF }, }; static const struct MatchCallStruct0 sStevenMatchCallHeader = @@ -401,28 +370,28 @@ static const struct MatchCallStruct0 sStevenMatchCallHeader = .type = 0, .mapSec = MAPSEC_NONE, .flag = FLAG_REGISTERED_STEVEN_POKENAV, - .desc = gStevenMatchCallDesc, - .name = gStevenMatchCallName, + .desc = gText_StevenMatchCallDesc, + .name = gText_StevenMatchCallName, .textData = sStevenTextScripts }; static const match_call_text_data_t sMayTextScripts[] = { - { gText_May_Pokenav_2B3AB3, 0xFFFF, 0xFFFF }, - { gText_May_Pokenav_2B3B3F, FLAG_DEFEATED_DEWFORD_GYM, 0xFFFF }, - { gText_May_Pokenav_2B3C13, FLAG_DELIVERED_DEVON_GOODS, 0xFFFF }, - { gText_May_Pokenav_2B3CF3, FLAG_HIDE_MAUVILLE_CITY_WALLY, 0xFFFF }, - { gText_May_Pokenav_2B3D4B, FLAG_RECEIVED_HM04, 0xFFFF }, - { gText_May_Pokenav_2B3DD1, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, - { gText_May_Pokenav_2B3E69, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, - { gText_May_Pokenav_2B3ECD, FLAG_RECEIVED_CASTFORM, 0xFFFF }, - { gText_May_Pokenav_2B3F2B, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, - { gText_May_Pokenav_2B3FFB, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, - { gText_May_Pokenav_2B402B, FLAG_MET_TEAM_AQUA_HARBOR, 0xFFFF }, - { gText_May_Pokenav_2B414B, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, - { gText_May_Pokenav_2B4228, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xFFFF }, - { gText_May_Pokenav_2B42E0, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, - { gText_May_Pokenav_2B4350, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_May1, 0xFFFF, 0xFFFF }, + { MatchCall_Text_May2, FLAG_DEFEATED_DEWFORD_GYM, 0xFFFF }, + { MatchCall_Text_May3, FLAG_DELIVERED_DEVON_GOODS, 0xFFFF }, + { MatchCall_Text_May4, FLAG_HIDE_MAUVILLE_CITY_WALLY, 0xFFFF }, + { MatchCall_Text_May5, FLAG_RECEIVED_HM04, 0xFFFF }, + { MatchCall_Text_May6, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, + { MatchCall_Text_May7, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, + { MatchCall_Text_May8, FLAG_RECEIVED_CASTFORM, 0xFFFF }, + { MatchCall_Text_May9, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, + { MatchCall_Text_May10, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, + { MatchCall_Text_May11, FLAG_MET_TEAM_AQUA_HARBOR, 0xFFFF }, + { MatchCall_Text_May12, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, + { MatchCall_Text_May13, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xFFFF }, + { MatchCall_Text_May14, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, + { MatchCall_Text_May15, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct4 sMayMatchCallHeader = @@ -430,28 +399,28 @@ static const struct MatchCallStruct4 sMayMatchCallHeader = .type = 4, .gender = MALE, //Gender of player .flag = FLAG_ENABLE_RIVAL_MATCH_CALL, - .desc = gMayBrendanMatchCallDesc, - .name = gExpandedPlaceholder_May, + .desc = gText_MayBrendanMatchCallDesc, + .name = gText_ExpandedPlaceholder_May, .textData = sMayTextScripts }; static const match_call_text_data_t sBrendanTextScripts[] = { - { gText_Brendan_Pokenav_2B43EF, 0xFFFF, 0xFFFF }, - { gText_Brendan_Pokenav_2B4486, FLAG_DEFEATED_DEWFORD_GYM, 0xFFFF }, - { gText_Brendan_Pokenav_2B4560, FLAG_DELIVERED_DEVON_GOODS, 0xFFFF }, - { gText_Brendan_Pokenav_2B463F, FLAG_HIDE_MAUVILLE_CITY_WALLY, 0xFFFF }, - { gText_Brendan_Pokenav_2B46B7, FLAG_RECEIVED_HM04, 0xFFFF }, - { gText_Brendan_Pokenav_2B4761, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, - { gText_Brendan_Pokenav_2B47F4, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, - { gText_Brendan_Pokenav_2B4882, FLAG_RECEIVED_CASTFORM, 0xFFFF }, - { gText_Brendan_Pokenav_2B4909, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, - { gText_Brendan_Pokenav_2B49C4, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, - { gText_Brendan_Pokenav_2B4A44, FLAG_MET_TEAM_AQUA_HARBOR, 0xFFFF }, - { gText_Brendan_Pokenav_2B4B28, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, - { gText_Brendan_Pokenav_2B4C15, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xFFFF }, - { gText_Brendan_Pokenav_2B4CD8, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, - { gText_Brendan_Pokenav_2B4D46, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Brendan1, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Brendan2, FLAG_DEFEATED_DEWFORD_GYM, 0xFFFF }, + { MatchCall_Text_Brendan3, FLAG_DELIVERED_DEVON_GOODS, 0xFFFF }, + { MatchCall_Text_Brendan4, FLAG_HIDE_MAUVILLE_CITY_WALLY, 0xFFFF }, + { MatchCall_Text_Brendan5, FLAG_RECEIVED_HM04, 0xFFFF }, + { MatchCall_Text_Brendan6, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, + { MatchCall_Text_Brendan7, FLAG_DEFEATED_PETALBURG_GYM, 0xFFFF }, + { MatchCall_Text_Brendan8, FLAG_RECEIVED_CASTFORM, 0xFFFF }, + { MatchCall_Text_Brendan9, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, + { MatchCall_Text_Brendan10, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, + { MatchCall_Text_Brendan11, FLAG_MET_TEAM_AQUA_HARBOR, 0xFFFF }, + { MatchCall_Text_Brendan12, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, + { MatchCall_Text_Brendan13, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xFFFF }, + { MatchCall_Text_Brendan14, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, + { MatchCall_Text_Brendan15, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct4 sBrendanMatchCallHeader = @@ -459,20 +428,20 @@ static const struct MatchCallStruct4 sBrendanMatchCallHeader = .type = 4, .gender = FEMALE, //Gender of player .flag = FLAG_ENABLE_RIVAL_MATCH_CALL, - .desc = gMayBrendanMatchCallDesc, - .name = gExpandedPlaceholder_Brendan, + .desc = gText_MayBrendanMatchCallDesc, + .name = gText_ExpandedPlaceholder_Brendan, .textData = sBrendanTextScripts }; static const match_call_text_data_t sWallyTextScripts[] = { - { gText_Wally_Pokenav_2B4DE2, 0xFFFF, 0xFFFF }, - { gText_Wally_Pokenav_2B4E57, FLAG_RUSTURF_TUNNEL_OPENED, 0xFFFF }, - { gText_Wally_Pokenav_2B4EA5, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, - { gText_Wally_Pokenav_2B4F41, FLAG_RECEIVED_CASTFORM, 0xFFFF }, - { gText_Wally_Pokenav_2B4FF3, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, - { gText_Wally_Pokenav_2B50B1, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xFFFF }, - { gText_Wally_Pokenav_2B5100, FLAG_DEFEATED_WALLY_VICTORY_ROAD, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Wally1, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Wally2, FLAG_RUSTURF_TUNNEL_OPENED, 0xFFFF }, + { MatchCall_Text_Wally3, FLAG_DEFEATED_LAVARIDGE_GYM, 0xFFFF }, + { MatchCall_Text_Wally4, FLAG_RECEIVED_CASTFORM, 0xFFFF }, + { MatchCall_Text_Wally5, FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, 0xFFFF }, + { MatchCall_Text_Wally6, FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, 0xFFFF }, + { MatchCall_Text_Wally7, FLAG_DEFEATED_WALLY_VICTORY_ROAD, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; const struct MatchCallSubstruct2 sWallyAdditionalData[] = { @@ -488,20 +457,20 @@ static const struct MatchCallStruct2 sWallyMatchCallHeader = .mapSec = 0, .flag = FLAG_ENABLE_WALLY_MATCH_CALL, .rematchTableIdx = REMATCH_WALLY_3, - .desc = gWallyMatchCallDesc, + .desc = gText_WallyMatchCallDesc, .textData = sWallyTextScripts, .v10 = sWallyAdditionalData }; static const match_call_text_data_t sScottTextScripts[] = { - { gText_Scott_Pokenav_2B5184, 0xFFFF, 0xFFFF }, - { gText_Scott_Pokenav_2B5275, FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, 0xFFFF }, - { gText_Scott_Pokenav_2B5323, FLAG_RECEIVED_CASTFORM, 0xFFFF }, - { gText_Scott_Pokenav_2B53DB, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, - { gText_Scott_Pokenav_2B54A5, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, - { gText_Scott_Pokenav_2B5541, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, - { gText_Scott_Pokenav_2B56CA, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Scott1, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Scott2, FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, 0xFFFF }, + { MatchCall_Text_Scott3, FLAG_RECEIVED_CASTFORM, 0xFFFF }, + { MatchCall_Text_Scott4, FLAG_RECEIVED_RED_OR_BLUE_ORB, 0xFFFF }, + { MatchCall_Text_Scott5, FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, 0xFFFF }, + { MatchCall_Text_Scott6, FLAG_DEFEATED_SOOTOPOLIS_GYM, 0xFFFF }, + { MatchCall_Text_Scott7, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; @@ -510,17 +479,17 @@ static const struct MatchCallStruct0 sScottMatchCallHeader = .type = 0, .mapSec = MAPSEC_NONE, .flag = FLAG_ENABLE_SCOTT_MATCH_CALL, - .desc = gScottMatchCallDesc, - .name = gScottMatchCallName, + .desc = gText_ScottMatchCallDesc, + .name = gText_ScottMatchCallName, .textData = sScottTextScripts }; static const match_call_text_data_t sRoxanneTextScripts[] = { - { gText_Roxanne_Pokenav_2B2456, 0xFFFE, 0xFFFF }, - { gText_Roxanne_Pokenav_2B250E, 0xFFFF, 0xFFFF }, - { gText_Roxanne_Pokenav_2B25C1, 0xFFFF, 0xFFFF }, - { gText_Roxanne_Pokenav_2B2607, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Roxanne1, 0xFFFE, 0xFFFF }, + { MatchCall_Text_Roxanne2, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Roxanne3, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Roxanne4, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sRoxanneMatchCallHeader = @@ -529,17 +498,17 @@ static const struct MatchCallStruct5 sRoxanneMatchCallHeader = .mapSec = MAPSEC_RUSTBORO_CITY, .flag = FLAG_ENABLE_ROXANNE_MATCH_CALL, .rematchTableIdx = REMATCH_ROXANNE, - .desc = gRoxanneMatchCallDesc, + .desc = gText_RoxanneMatchCallDesc, .name = NULL, .textData = sRoxanneTextScripts }; static const match_call_text_data_t sBrawlyTextScripts[] = { - { gText_Brawly_Pokenav_2B2659, 0xFFFE, 0xFFFF }, - { gText_Brawly_Pokenav_2B275D, 0xFFFF, 0xFFFF }, - { gText_Brawly_Pokenav_2B286F, 0xFFFF, 0xFFFF }, - { gText_Brawly_Pokenav_2B28D1, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Brawly1, 0xFFFE, 0xFFFF }, + { MatchCall_Text_Brawly2, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Brawly3, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Brawly4, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sBrawlyMatchCallHeader = @@ -548,17 +517,17 @@ static const struct MatchCallStruct5 sBrawlyMatchCallHeader = .mapSec = MAPSEC_DEWFORD_TOWN, .flag = FLAG_ENABLE_BRAWLY_MATCH_CALL, .rematchTableIdx = REMATCH_BRAWLY, - .desc = gBrawlyMatchCallDesc, + .desc = gText_BrawlyMatchCallDesc, .name = NULL, .textData = sBrawlyTextScripts }; static const match_call_text_data_t sWattsonTextScripts[] = { - { gText_Wattson_Pokenav_2B2912, 0xFFFE, 0xFFFF }, - { gText_Wattson_Pokenav_2B29CA, 0xFFFF, 0xFFFF }, - { gText_Wattson_Pokenav_2B2AB6, 0xFFFF, 0xFFFF }, - { gText_Wattson_Pokenav_2B2B01, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Wattson1, 0xFFFE, 0xFFFF }, + { MatchCall_Text_Wattson2, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Wattson3, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Wattson4, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sWattsonMatchCallHeader = @@ -567,17 +536,17 @@ static const struct MatchCallStruct5 sWattsonMatchCallHeader = .mapSec = MAPSEC_MAUVILLE_CITY, .flag = FLAG_ENABLE_WATTSON_MATCH_CALL, .rematchTableIdx = REMATCH_WATTSON, - .desc = gWattsonMatchCallDesc, + .desc = gText_WattsonMatchCallDesc, .name = NULL, .textData = sWattsonTextScripts }; static const match_call_text_data_t sFlanneryTextScripts[] = { - { gText_Flannery_Pokenav_2B2B4D, 0xFFFE, 0xFFFF }, - { gText_Flannery_Pokenav_2B2C0E, 0xFFFF, 0xFFFF }, - { gText_Flannery_Pokenav_2B2CF1, 0xFFFF, 0xFFFF }, - { gText_Flannery_Pokenav_2B2D54, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Flannery1, 0xFFFE, 0xFFFF }, + { MatchCall_Text_Flannery2, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Flannery3, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Flannery4, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sFlanneryMatchCallHeader = @@ -586,17 +555,17 @@ static const struct MatchCallStruct5 sFlanneryMatchCallHeader = .mapSec = MAPSEC_LAVARIDGE_TOWN, .flag = FLAG_ENABLE_FLANNERY_MATCH_CALL, .rematchTableIdx = REMATCH_FLANNERY, - .desc = gFlanneryMatchCallDesc, + .desc = gText_FlanneryMatchCallDesc, .name = NULL, .textData = sFlanneryTextScripts }; static const match_call_text_data_t sWinonaTextScripts[] = { - { gText_Winona_Pokenav_2B2DA4, 0xFFFE, 0xFFFF }, - { gText_Winona_Pokenav_2B2E2B, 0xFFFF, 0xFFFF }, - { gText_Winona_Pokenav_2B2EC2, 0xFFFF, 0xFFFF }, - { gText_Winona_Pokenav_2B2F16, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Winona1, 0xFFFE, 0xFFFF }, + { MatchCall_Text_Winona2, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Winona3, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Winona4, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sWinonaMatchCallHeader = @@ -605,17 +574,17 @@ static const struct MatchCallStruct5 sWinonaMatchCallHeader = .mapSec = MAPSEC_FORTREE_CITY, .flag = FLAG_ENABLE_WINONA_MATCH_CALL, .rematchTableIdx = REMATCH_WINONA, - .desc = gWinonaMatchCallDesc, + .desc = gText_WinonaMatchCallDesc, .name = NULL, .textData = sWinonaTextScripts }; static const match_call_text_data_t sTateLizaTextScripts[] = { - { gText_TateLiza_Pokenav_2B2F97, 0xFFFE, 0xFFFF }, - { gText_TateLiza_Pokenav_2B306E, 0xFFFF, 0xFFFF }, - { gText_TateLiza_Pokenav_2B3158, 0xFFFF, 0xFFFF }, - { gText_TateLiza_Pokenav_2B31CD, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_TateLiza1, 0xFFFE, 0xFFFF }, + { MatchCall_Text_TateLiza2, 0xFFFF, 0xFFFF }, + { MatchCall_Text_TateLiza3, 0xFFFF, 0xFFFF }, + { MatchCall_Text_TateLiza4, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sTateLizaMatchCallHeader = @@ -624,17 +593,17 @@ static const struct MatchCallStruct5 sTateLizaMatchCallHeader = .mapSec = MAPSEC_MOSSDEEP_CITY, .flag = FLAG_ENABLE_TATE_AND_LIZA_MATCH_CALL, .rematchTableIdx = REMATCH_TATE_AND_LIZA, - .desc = gTateLizaMatchCallDesc, + .desc = gText_TateLizaMatchCallDesc, .name = NULL, .textData = sTateLizaTextScripts }; static const match_call_text_data_t sJuanTextScripts[] = { - { gText_Juan_Pokenav_2B3249, 0xFFFE, 0xFFFF }, - { gText_Juan_Pokenav_2B32EC, 0xFFFF, 0xFFFF }, - { gText_Juan_Pokenav_2B33AA, 0xFFFF, 0xFFFF }, - { gText_Juan_Pokenav_2B341E, FLAG_SYS_GAME_CLEAR, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Juan1, 0xFFFE, 0xFFFF }, + { MatchCall_Text_Juan2, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Juan3, 0xFFFF, 0xFFFF }, + { MatchCall_Text_Juan4, FLAG_SYS_GAME_CLEAR, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sJuanMatchCallHeader = @@ -643,14 +612,14 @@ static const struct MatchCallStruct5 sJuanMatchCallHeader = .mapSec = MAPSEC_SOOTOPOLIS_CITY, .flag = FLAG_ENABLE_JUAN_MATCH_CALL, .rematchTableIdx = REMATCH_JUAN, - .desc = gJuanMatchCallDesc, + .desc = gText_JuanMatchCallDesc, .name = NULL, .textData = sJuanTextScripts }; static const match_call_text_data_t sSidneyTextScripts[] = { - { gText_Sidney_Pokenav_2B34CC, 0xFFFF, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Sidney, 0xFFFF, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sSidneyMatchCallHeader = @@ -659,14 +628,14 @@ static const struct MatchCallStruct5 sSidneyMatchCallHeader = .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_SIDNEY, .rematchTableIdx = REMATCH_SIDNEY, - .desc = gEliteFourMatchCallDesc, + .desc = gText_EliteFourMatchCallDesc, .name = NULL, .textData = sSidneyTextScripts }; static const match_call_text_data_t sPhoebeTextScripts[] = { - { gText_Phoebe_Pokenav_2B3561, 0xFFFF, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Phoebe, 0xFFFF, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sPhoebeMatchCallHeader = @@ -675,14 +644,14 @@ static const struct MatchCallStruct5 sPhoebeMatchCallHeader = .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_PHOEBE, .rematchTableIdx = REMATCH_PHOEBE, - .desc = gEliteFourMatchCallDesc, + .desc = gText_EliteFourMatchCallDesc, .name = NULL, .textData = sPhoebeTextScripts }; static const match_call_text_data_t sGlaciaTextScripts[] = { - { gText_Glacia_Pokenav_2B35E4, 0xFFFF, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Glacia, 0xFFFF, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sGlaciaMatchCallHeader = @@ -691,14 +660,14 @@ static const struct MatchCallStruct5 sGlaciaMatchCallHeader = .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_GLACIA, .rematchTableIdx = REMATCH_GLACIA, - .desc = gEliteFourMatchCallDesc, + .desc = gText_EliteFourMatchCallDesc, .name = NULL, .textData = sGlaciaTextScripts }; static const match_call_text_data_t sDrakeTextScripts[] = { - { gText_Drake_Pokenav_2B368B, 0xFFFF, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Drake, 0xFFFF, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sDrakeMatchCallHeader = @@ -707,14 +676,14 @@ static const struct MatchCallStruct5 sDrakeMatchCallHeader = .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_DRAKE, .rematchTableIdx = REMATCH_DRAKE, - .desc = gEliteFourMatchCallDesc, + .desc = gText_EliteFourMatchCallDesc, .name = NULL, .textData = sDrakeTextScripts }; static const match_call_text_data_t sWallaceTextScripts[] = { - { gText_Wallace_Pokenav_2B3790, 0xFFFF, 0xFFFF }, - { NULL, 0xFFFF, 0xFFFF } + { MatchCall_Text_Wallace, 0xFFFF, 0xFFFF }, + { NULL, 0xFFFF, 0xFFFF } }; static const struct MatchCallStruct5 sWallaceMatchCallHeader = @@ -723,7 +692,7 @@ static const struct MatchCallStruct5 sWallaceMatchCallHeader = .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_WALLACE, .rematchTableIdx = REMATCH_WALLACE, - .desc = gChampionMatchCallDesc, + .desc = gText_ChampionMatchCallDesc, .name = NULL, .textData = sWallaceTextScripts }; @@ -809,10 +778,40 @@ static void (*const sMatchCall_GetNameAndDescFunctions[])(match_call_t, const u8 }; static const struct MatchCallOverride sMatchCallCheckPageOverrides[] = { - { MC_HEADER_STEVEN, FACILITY_CLASS_STEVEN, 0xFFFF, { gMatchCallStevenStrategyText, gMatchCall_StevenTrainersPokemonText, gMatchCall_StevenSelfIntroductionText_Line1_BeforeMeteorFallsBattle, gMatchCall_StevenSelfIntroductionText_Line2_BeforeMeteorFallsBattle } }, // STEVEN - { MC_HEADER_STEVEN, FACILITY_CLASS_STEVEN, FLAG_DEFEATED_MOSSDEEP_GYM, { gMatchCallStevenStrategyText, gMatchCall_StevenTrainersPokemonText, gMatchCall_StevenSelfIntroductionText_Line1_AfterMeteorFallsBattle, gMatchCall_StevenSelfIntroductionText_Line2_AfterMeteorFallsBattle } }, // STEVEN - { MC_HEADER_BRENDAN, FACILITY_CLASS_BRENDAN, 0xFFFF, { gMatchCall_BrendanStrategyText, gMatchCall_BrendanTrainersPokemonText, gMatchCall_BrendanSelfIntroductionText_Line1, gMatchCall_BrendanSelfIntroductionText_Line2 } }, // Brendan - { MC_HEADER_MAY, FACILITY_CLASS_MAY, 0xFFFF, { gMatchCall_MayStrategyText, gMatchCall_MayTrainersPokemonText, gMatchCall_MaySelfIntroductionText_Line1, gMatchCall_MaySelfIntroductionText_Line2 } } // May + { + .idx = MC_HEADER_STEVEN, + .facilityClass = FACILITY_CLASS_STEVEN, + .flag = 0xFFFF, + .flavorTexts = { + [CHECK_PAGE_STRATEGY] = gText_MatchCallSteven_Strategy, + [CHECK_PAGE_POKEMON] = gText_MatchCallSteven_Pokemon, + [CHECK_PAGE_INTRO_1] = gText_MatchCallSteven_Intro1_BeforeMeteorFallsBattle, + [CHECK_PAGE_INTRO_2] = gText_MatchCallSteven_Intro2_BeforeMeteorFallsBattle + } + }, + { + .idx = MC_HEADER_STEVEN, + .facilityClass = FACILITY_CLASS_STEVEN, + .flag = FLAG_DEFEATED_MOSSDEEP_GYM, + .flavorTexts = { + [CHECK_PAGE_STRATEGY] = gText_MatchCallSteven_Strategy, + [CHECK_PAGE_POKEMON] = gText_MatchCallSteven_Pokemon, + [CHECK_PAGE_INTRO_1] = gText_MatchCallSteven_Intro1_AfterMeteorFallsBattle, + [CHECK_PAGE_INTRO_2] = gText_MatchCallSteven_Intro2_AfterMeteorFallsBattle + } + }, + { + .idx = MC_HEADER_BRENDAN, + .facilityClass = FACILITY_CLASS_BRENDAN, + .flag = 0xFFFF, + .flavorTexts = MCFLAVOR(Brendan) + }, + { + .idx = MC_HEADER_MAY, + .facilityClass = FACILITY_CLASS_MAY, + .flag = 0xFFFF, + .flavorTexts = MCFLAVOR(May) + } }; // .text @@ -867,21 +866,21 @@ bool32 MatchCallFlagGetByIndex(u32 idx) static bool32 MatchCallGetFlag_Type0(match_call_t matchCall) { - if (matchCall.type0->flag == 0xffff) + if (matchCall.type0->flag == 0xFFFF) return TRUE; return FlagGet(matchCall.type0->flag); } static bool32 MatchCallGetFlag_Type1(match_call_t matchCall) { - if (matchCall.type1->flag == 0xffff) + if (matchCall.type1->flag == 0xFFFF) return TRUE; return FlagGet(matchCall.type1->flag); } static bool32 MatchCallGetFlag_Type2(match_call_t matchCall) { - if (matchCall.type2->flag == 0xffff) + if (matchCall.type2->flag == 0xFFFF) return TRUE; return FlagGet(matchCall.type2->flag); } @@ -890,7 +889,7 @@ static bool32 MatchCallGetFlag_Type4(match_call_t matchCall) { if (matchCall.type4->gender != gSaveBlock2Ptr->playerGender) return FALSE; - if (matchCall.type4->flag == 0xffff) + if (matchCall.type4->flag == 0xFFFF) return TRUE; return FlagGet(matchCall.type4->flag); } @@ -926,7 +925,7 @@ static u8 MatchCallGetMapSec_Type2(match_call_t matchCall) { s32 i; - for (i = 0; matchCall.type2->v10[i].flag != 0xffff; i++) + for (i = 0; matchCall.type2->v10[i].flag != 0xFFFF; i++) { if (!FlagGet(matchCall.type2->v10[i].flag)) break; @@ -1113,11 +1112,11 @@ static void sub_81D1920(const match_call_text_data_t *sub0, u8 *dest) i--; while (i) { - if (sub0[i].flag != 0xffff && FlagGet(sub0[i].flag) == TRUE) + if (sub0[i].flag != 0xFFFF && FlagGet(sub0[i].flag) == TRUE) break; i--; } - if (sub0[i].flag2 != 0xffff) + if (sub0[i].flag2 != 0xFFFF) FlagSet(sub0[i].flag2); StringExpandPlaceholders(dest, sub0[i].text); } @@ -1129,14 +1128,14 @@ static void sub_81D199C(const match_call_text_data_t *sub0, u16 idx, u8 *dest) { if (sub0[i].flag == 0xfffe) break; - if (sub0[i].flag != 0xffff && !FlagGet(sub0[i].flag)) + if (sub0[i].flag != 0xFFFF && !FlagGet(sub0[i].flag)) break; } if (sub0[i].flag != 0xfffe) { if (i) i--; - if (sub0[i].flag2 != 0xffff) + if (sub0[i].flag2 != 0xFFFF) FlagSet(sub0[i].flag2); StringExpandPlaceholders(dest, sub0[i].text); } @@ -1254,8 +1253,8 @@ bool32 sub_81D1BF8(u32 idx) for (i = 0; i < (int)ARRAY_COUNT(sMatchCallHeaders); i++) { - u32 r0 = MatchCall_GetRematchTableIdx(i); - if (r0 != REMATCH_TABLE_ENTRIES && r0 == idx) + u32 id = MatchCall_GetRematchTableIdx(i); + if (id != REMATCH_TABLE_ENTRIES && id == idx) return TRUE; } return FALSE; diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 275a4063e..552bf2cb7 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -76,7 +76,7 @@ void ToggleMatchCallArrows(struct PokenavSub17Substruct *a0, u32 a1); void sub_81C8FE0(struct PokenavSub17Substruct *a0); void sub_81C8EF8(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1); void sub_81C8ED0(void); -void sub_81C8E54(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1, u32 a2); +static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1, u32 a2); void PrintMatchCallFieldNames(struct PokenavSub17Substruct *a0, u32 a1); void sub_81C8D4C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1); void sub_81C8CB4(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1); @@ -558,22 +558,22 @@ u32 LoopedTask_sub_81C8958(s32 state) PrintMatchCallFieldNames(&structPtr->unk0, 0); break; case 2: - sub_81C8E54(&structPtr->unk888, &structPtr->unk0, 0); + PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_STRATEGY); break; case 3: PrintMatchCallFieldNames(&structPtr->unk0, 1); break; case 4: - sub_81C8E54(&structPtr->unk888, &structPtr->unk0, 1); + PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_POKEMON); break; case 5: PrintMatchCallFieldNames(&structPtr->unk0, 2); break; case 6: - sub_81C8E54(&structPtr->unk888, &structPtr->unk0, 2); + PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_INTRO_1); break; case 7: - sub_81C8E54(&structPtr->unk888, &structPtr->unk0, 3); + PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->unk0, CHECK_PAGE_INTRO_2); break; default: return LT_FINISH; @@ -705,7 +705,7 @@ void sub_81C8C64(struct UnknownSubSubStruct_0203CF40 *a0, u32 a1) void sub_81C8CB4(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1) { - u8 colors[3] = {0, 2, 5}; + u8 colors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_RED}; a1->unk34(a0->unk10 + a0->unkC * a0->windowTopIndex, a1->unkTextBuffer); a1->unk38(a1->unk0.windowId, a0->windowTopIndex, a1->unk0.unkA); @@ -727,7 +727,7 @@ void sub_81C8D4C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct * void PrintMatchCallFieldNames(struct PokenavSub17Substruct *a0, u32 fieldId) { const u8 *fieldNames[] = {gText_PokenavMatchCall_Strategy, gText_PokenavMatchCall_TrainerPokemon, gText_PokenavMatchCall_SelfIntroduction}; - u8 colors[3] = {1, 4, 5}; + u8 colors[3] = {TEXT_COLOR_WHITE, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}; u32 top = (a0->unk0.unkA + 1 + (fieldId * 2)) & 0xF; FillWindowPixelRect(a0->unk0.windowId, PIXEL_FILL(1), 0, top << 4, a0->unk0.unk4, 16); @@ -735,11 +735,19 @@ void PrintMatchCallFieldNames(struct PokenavSub17Substruct *a0, u32 fieldId) CopyWindowRectToVram(a0->unk0.windowId, 2, 0, top << 1, a0->unk0.unk4, 2); } -void sub_81C8E54(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1, u32 a2) +static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1, u32 checkPageEntry) { - static const u8 array[] = {2, 4, 6, 7}; - u32 r6 = (a1->unk0.unkA + array[a2]) & 0xF; - const u8 *str = sub_81CAFD8(a0->windowTopIndex, a2); + // lines 1, 3, and 5 are the field names printed by PrintMatchCallFieldNames + static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] = + { + [CHECK_PAGE_STRATEGY] = 2, + [CHECK_PAGE_POKEMON] = 4, + [CHECK_PAGE_INTRO_1] = 6, + [CHECK_PAGE_INTRO_2] = 7 + }; + + u32 r6 = (a1->unk0.unkA + lineOffsets[checkPageEntry]) & 0xF; + const u8 *str = GetMatchCallFlavorText(a0->windowTopIndex, checkPageEntry); if (str != NULL) { diff --git a/src/pokenav_unk_1.c b/src/pokenav_unk_1.c index b5bbc4b74..7d531c2f7 100644 --- a/src/pokenav_unk_1.c +++ b/src/pokenav_unk_1.c @@ -151,9 +151,9 @@ static u32 (*sub_81C93EC(void))(struct Pokenav1Struct*) default: case POKENAV_MODE_NORMAL: return sub_81C943C; - case POKENAV_MODE_FORCE_CALL_1: + case POKENAV_MODE_FORCE_CALL_READY: return sub_81C9520; - case POKENAV_MODE_FORCE_CALL_2: + case POKENAV_MODE_FORCE_CALL_EXIT: return sub_81C9588; } } diff --git a/src/pokenav_unk_10.c b/src/pokenav_unk_10.c index 135ff24b3..0d82f1a9c 100644 --- a/src/pokenav_unk_10.c +++ b/src/pokenav_unk_10.c @@ -13,6 +13,9 @@ #include "window.h" #include "constants/songs.h" +#define boxId id1 // naming multi-purpose field +#define monId id2 // naming multi-purpose field + struct PokenavSub13 { u8 filler0[0x8]; diff --git a/src/pokenav_unk_2.c b/src/pokenav_unk_2.c index cb9467a9c..ed9da0800 100644 --- a/src/pokenav_unk_2.c +++ b/src/pokenav_unk_2.c @@ -324,7 +324,7 @@ static bool32 sub_81C98D4(void) for (i = 0; i < REMATCH_TABLE_ENTRIES; i++) { if (sub_81CB0C8(i) == gMapHeader.regionMapSectionId - && sub_81CAE08(i) + && IsRematchEntryRegistered(i) && gSaveBlock1Ptr->trainerRematches[i]) return TRUE; } diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c index c66434192..09aef6a0c 100755 --- a/src/pokenav_unk_3.c +++ b/src/pokenav_unk_3.c @@ -15,21 +15,25 @@ #include "constants/flags.h" #include "constants/songs.h" +//#define ?? id1 +#define mapSec id2 // naming multi-purpose field +#define headerId data // naming multi-purpose field + struct Pokenav3Struct { u16 unk0; u16 unk2; - const u8 *unk4; - u16 unk8; + const u8 *matchCallOptions; + u16 headerId; u16 unkA; u16 unkC; u32 unk10; u32 unk14; u32 (*callback)(struct Pokenav3Struct*); - struct PokenavMonList unk1C[99]; + struct PokenavMonList matchCallEntries[MAX_REMATCH_ENTRIES - 1]; }; -static u32 sub_81CAB44(struct Pokenav3Struct *); +static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *); static u32 sub_81CABFC(struct Pokenav3Struct *); static u32 sub_81CAC04(struct Pokenav3Struct *); static u32 sub_81CACB8(struct Pokenav3Struct *); @@ -39,8 +43,18 @@ static bool32 sub_81CB1D0(void); #include "data/text/match_call_messages.h" -const u8 gUnknown_08622508[] = {0, 2}; -const u8 gUnknown_0862250A[] = {0, 1, 2}; +static const u8 sMatchCallOptionsNoCheckPage[] = +{ + MATCH_CALL_OPTION_CALL, + MATCH_CALL_OPTION_CANCEL +}; + +static const u8 sMatchCallOptionsHasCheckPage[] = +{ + MATCH_CALL_OPTION_CALL, + MATCH_CALL_OPTION_CHECK, + MATCH_CALL_OPTION_CANCEL +}; bool32 PokenavCallback_Init_11(void) { @@ -48,8 +62,8 @@ bool32 PokenavCallback_Init_11(void) if (!state) return FALSE; - state->callback = sub_81CAB44; - state->unk8 = 0; + state->callback = CB2_HandleMatchCallInput; + state->headerId = 0; state->unk10 = 0; state->unk14 = CreateLoopedTask(sub_81CAD20, 1); return TRUE; @@ -66,9 +80,9 @@ void sub_81CAB38(void) FreePokenavSubstruct(5); } -static u32 sub_81CAB44(struct Pokenav3Struct *state) +static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) { - int selectedMatchCall; + int selection; if (gMain.newAndRepeatedKeys & DPAD_UP) return 2; @@ -83,15 +97,15 @@ static u32 sub_81CAB44(struct Pokenav3Struct *state) { state->callback = sub_81CAC04; state->unk0 = 0; - selectedMatchCall = GetSelectedMatchCall(); - if (!state->unk1C[selectedMatchCall].boxId || MatchCall_HasCheckPage(state->unk1C[selectedMatchCall].unk6)) + selection = GetSelectedMatchCall(); + if (!state->matchCallEntries[selection].id1 || MatchCall_HasCheckPage(state->matchCallEntries[selection].headerId)) { - state->unk4 = gUnknown_0862250A; + state->matchCallOptions = sMatchCallOptionsHasCheckPage; state->unk2 = 2; } else { - state->unk4 = gUnknown_08622508; + state->matchCallOptions = sMatchCallOptionsNoCheckPage; state->unk2 = 1; } @@ -100,7 +114,7 @@ static u32 sub_81CAB44(struct Pokenav3Struct *state) if (gMain.newKeys & B_BUTTON) { - if (GetPokenavMode() != POKENAV_MODE_FORCE_CALL_1) + if (GetPokenavMode() != POKENAV_MODE_FORCE_CALL_READY) { state->callback = sub_81CABFC; return 15; @@ -135,21 +149,21 @@ static u32 sub_81CAC04(struct Pokenav3Struct *state) if (gMain.newKeys & A_BUTTON) { - switch (state->unk4[state->unk0]) + switch (state->matchCallOptions[state->unk0]) { - case 2: - state->callback = sub_81CAB44; + case MATCH_CALL_OPTION_CANCEL: + state->callback = CB2_HandleMatchCallInput; return 7; - case 0: - if (GetPokenavMode() == POKENAV_MODE_FORCE_CALL_1) - SetPokenavMode(POKENAV_MODE_FORCE_CALL_2); + case MATCH_CALL_OPTION_CALL: + if (GetPokenavMode() == POKENAV_MODE_FORCE_CALL_READY) + SetPokenavMode(POKENAV_MODE_FORCE_CALL_EXIT); state->callback = sub_81CACF8; if (sub_81CB1D0()) return 9; return 8; - case 1: + case MATCH_CALL_OPTION_CHECK: state->callback = sub_81CACB8; return 11; } @@ -157,7 +171,7 @@ static u32 sub_81CAC04(struct Pokenav3Struct *state) if (gMain.newKeys & B_BUTTON) { - state->callback = sub_81CAB44; + state->callback = CB2_HandleMatchCallInput; return 7; } @@ -173,7 +187,7 @@ static u32 sub_81CACB8(struct Pokenav3Struct *state) if (gMain.newKeys & B_BUTTON) { - state->callback = sub_81CAB44; + state->callback = CB2_HandleMatchCallInput; return 14; } @@ -184,7 +198,7 @@ static u32 sub_81CACF8(struct Pokenav3Struct *state) { if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { - state->callback = sub_81CAB44; + state->callback = CB2_HandleMatchCallInput; return 10; } @@ -198,41 +212,41 @@ static u32 sub_81CAD20(s32 taskState) switch (taskState) { case 0: - state->unk8 = 0; + state->headerId = 0; state->unkA = 0; return LT_INC_AND_CONTINUE; case 1: - for (i = 0, j = state->unk8; i < 30; i++, j++) + for (i = 0, j = state->headerId; i < 30; i++, j++) { if (MatchCallFlagGetByIndex(j)) { - state->unk1C[state->unkA].unk6 = j; - state->unk1C[state->unkA].boxId = 1; - state->unk1C[state->unkA].monId = MatchCallMapSecGetByIndex(j); + state->matchCallEntries[state->unkA].headerId = j; + state->matchCallEntries[state->unkA].id1 = TRUE; + state->matchCallEntries[state->unkA].mapSec = MatchCallMapSecGetByIndex(j); state->unkA++; } - if (++state->unk8 >= MC_HEADER_COUNT) + if (++state->headerId >= MC_HEADER_COUNT) { - state->unkC = state->unk8; - state->unk8 = 0; + state->unkC = state->headerId; + state->headerId = 0; return LT_INC_AND_CONTINUE; } } return LT_CONTINUE; case 2: - for (i = 0, j = state->unk8; i < 30; i++, j++) + for (i = 0, j = state->headerId; i < 30; i++, j++) { - if (!sub_81D1BF8(state->unk8) && sub_81CAE08(state->unk8)) + if (!sub_81D1BF8(state->headerId) && IsRematchEntryRegistered(state->headerId)) { - state->unk1C[state->unkA].unk6 = state->unk8; - state->unk1C[state->unkA].boxId = 0; - state->unk1C[state->unkA].monId = sub_81CB0C8(j); + state->matchCallEntries[state->unkA].headerId = state->headerId; + state->matchCallEntries[state->unkA].id1 = FALSE; + state->matchCallEntries[state->unkA].mapSec = sub_81CB0C8(j); state->unkA++; } - if (++state->unk8 > REMATCH_TABLE_ENTRIES - 1) + if (++state->headerId > REMATCH_TABLE_ENTRIES - 1) return LT_INC_AND_CONTINUE; } @@ -245,7 +259,7 @@ static u32 sub_81CAD20(s32 taskState) return LT_FINISH; } -bool32 sub_81CAE08(int rematchIndex) +bool32 IsRematchEntryRegistered(int rematchIndex) { if (rematchIndex < REMATCH_TABLE_ENTRIES) return FlagGet(FLAG_MATCH_CALL_REGISTERED + rematchIndex); @@ -284,28 +298,28 @@ int unref_sub_81CAE6C(int arg0) if (arg0 >= state->unkA) return REMATCH_TABLE_ENTRIES; - return state->unk1C[arg0].unk6; + return state->matchCallEntries[arg0].headerId; } struct PokenavMonList *sub_81CAE94(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); - return state->unk1C; + return state->matchCallEntries; } u16 sub_81CAEA4(int index) { struct Pokenav3Struct *state = GetSubstructPtr(5); - return state->unk1C[index].monId; + return state->matchCallEntries[index].mapSec; } bool32 sub_81CAEBC(int index) { struct Pokenav3Struct *state = GetSubstructPtr(5); - if (!state->unk1C[index].boxId) - index = state->unk1C[index].unk6; + if (!state->matchCallEntries[index].id1) + index = state->matchCallEntries[index].headerId; else - index = MatchCall_GetRematchTableIdx(state->unk1C[index].unk6); + index = MatchCall_GetRematchTableIdx(state->matchCallEntries[index].headerId); if (index == REMATCH_TABLE_ENTRIES) return FALSE; @@ -313,17 +327,17 @@ bool32 sub_81CAEBC(int index) return gSaveBlock1Ptr->trainerRematches[index] != 0; } -int sub_81CAF04(int index) +int GetMatchCallTrainerPic(int index) { int var0; struct Pokenav3Struct *state = GetSubstructPtr(5); - if (!state->unk1C[index].boxId) + if (!state->matchCallEntries[index].id1) { - index = GetTrainerIdxByRematchIdx(state->unk1C[index].unk6); + index = GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId); return gTrainers[index].trainerPic; } - var0 = state->unk1C[index].unk6; + var0 = state->matchCallEntries[index].headerId; index = MatchCall_GetRematchTableIdx(var0); if (index != REMATCH_TABLE_ENTRIES) { @@ -342,30 +356,30 @@ const u8 *sub_81CAF78(int index, u8 *arg1) if (!Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType)) return gText_CallCantBeMadeHere; - if (!state->unk1C[index].boxId) - *arg1 = SelectMatchCallMessage(GetTrainerIdxByRematchIdx(state->unk1C[index].unk6), gStringVar4); + if (!state->matchCallEntries[index].id1) + *arg1 = SelectMatchCallMessage(GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId), gStringVar4); else - MatchCall_GetMessage(state->unk1C[index].unk6, gStringVar4); + MatchCall_GetMessage(state->matchCallEntries[index].headerId, gStringVar4); return gStringVar4; } -const u8 *sub_81CAFD8(int index, int textType) +const u8 *GetMatchCallFlavorText(int index, int checkPageEntry) { - int var0; + int rematchId; struct Pokenav3Struct *state = GetSubstructPtr(5); - if (state->unk1C[index].boxId) + if (state->matchCallEntries[index].id1) { - var0 = MatchCall_GetRematchTableIdx(state->unk1C[index].unk6); - if (var0 == REMATCH_TABLE_ENTRIES) - return MatchCall_GetOverrideFlavorText(state->unk1C[index].unk6, textType); + rematchId = MatchCall_GetRematchTableIdx(state->matchCallEntries[index].headerId); + if (rematchId == REMATCH_TABLE_ENTRIES) + return MatchCall_GetOverrideFlavorText(state->matchCallEntries[index].headerId, checkPageEntry); } else { - var0 = state->unk1C[index].unk6; + rematchId = state->matchCallEntries[index].headerId; } - return gMatchCallMessages[var0][textType]; + return gMatchCallFlavorTexts[rematchId][checkPageEntry]; } u16 sub_81CB01C(void) @@ -378,18 +392,18 @@ u16 sub_81CB02C(int arg0) { struct Pokenav3Struct *state = GetSubstructPtr(5); if (state->unk2 < arg0) - return 3; + return MATCH_CALL_OPTION_COUNT; - return state->unk4[arg0]; + return state->matchCallOptions[arg0]; } void sub_81CB050(struct PokenavMonList * arg0, u8 *str) { const u8 *trainerName; const u8 *className; - if (!arg0->boxId) + if (!arg0->id1) { - int index = GetTrainerIdxByRematchIdx(arg0->unk6); + int index = GetTrainerIdxByRematchIdx(arg0->headerId); const struct Trainer *trainer = &gTrainers[index]; int class = trainer->trainerClass; className = gTrainerClassNames[class]; @@ -397,7 +411,7 @@ void sub_81CB050(struct PokenavMonList * arg0, u8 *str) } else { - sub_81D1A78(arg0->unk6, &className, &trainerName); + sub_81D1A78(arg0->headerId, &className, &trainerName); } if (className && trainerName) @@ -424,9 +438,9 @@ int sub_81CB0E4(int index) int count = 1; while (++index < state->unkA) { - if (!state->unk1C[index].boxId) + if (!state->matchCallEntries[index].id1) return count; - if (MatchCall_HasCheckPage(state->unk1C[index].unk6)) + if (MatchCall_HasCheckPage(state->matchCallEntries[index].headerId)) return count; count++; @@ -441,9 +455,9 @@ int sub_81CB128(int index) int count = -1; while (--index >= 0) { - if (!state->unk1C[index].boxId) + if (!state->matchCallEntries[index].id1) return count; - if (MatchCall_HasCheckPage(state->unk1C[index].unk6)) + if (MatchCall_HasCheckPage(state->matchCallEntries[index].headerId)) return count; count--; @@ -458,7 +472,7 @@ bool32 unref_sub_81CB16C(void) for (i = 0; i < REMATCH_TABLE_ENTRIES; i++) { - if (sub_81CAE08(i) && gSaveBlock1Ptr->trainerRematches[i]) + if (IsRematchEntryRegistered(i) && gSaveBlock1Ptr->trainerRematches[i]) return TRUE; } @@ -478,20 +492,20 @@ bool32 unref_sub_81CB16C(void) static bool32 sub_81CB1D0(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); - int index = GetSelectedMatchCall(); - if (!state->unk1C[index].boxId) + int selection = GetSelectedMatchCall(); + if (!state->matchCallEntries[selection].id1) { - if (sub_81CAEA4(index) == gMapHeader.regionMapSectionId) + if (sub_81CAEA4(selection) == gMapHeader.regionMapSectionId) { - if (!gSaveBlock1Ptr->trainerRematches[state->unk1C[index].unk6]) + if (!gSaveBlock1Ptr->trainerRematches[state->matchCallEntries[selection].headerId]) return TRUE; } } else { - if (state->unk1C[index].unk6 == 11) + if (state->matchCallEntries[selection].headerId == MC_HEADER_WATTSON) { - if (sub_81CAEA4(index) == gMapHeader.regionMapSectionId + if (sub_81CAEA4(selection) == gMapHeader.regionMapSectionId && FlagGet(FLAG_BADGE05_GET) == TRUE) { if (!FlagGet(FLAG_WATTSON_REMATCH_AVAILABLE)) diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index 0f05c6f5d..4ac2ed41e 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -197,11 +197,11 @@ const struct WindowTemplate gUnknown_086227E0 = .baseBlock = 38 }; -const u8 *const gUnknown_086227E8[] = +static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = { - gUnknown_085EC017, - gUnknown_085EC01C, - gUnknown_085EC022 + [MATCH_CALL_OPTION_CALL] = gText_Call, + [MATCH_CALL_OPTION_CHECK] = gText_Check, + [MATCH_CALL_OPTION_CANCEL] = gText_Cancel6 }; const u8 gUnknown_086227F4[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); @@ -1022,13 +1022,13 @@ static void sub_81CBF60(struct Pokenav4Struct *state) u32 i; FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); - for (i = 0; i < 3; i++) + for (i = 0; i < MATCH_CALL_OPTION_COUNT; i++) { - int messageId = sub_81CB02C(i); - if (messageId == 3) + int optionText = sub_81CB02C(i); + if (optionText == MATCH_CALL_OPTION_COUNT) break; - AddTextPrinterParameterized(state->unk12, 7, gUnknown_086227E8[messageId], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->unk12, 7, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); } CopyWindowToVram(state->unk12, 2); @@ -1226,11 +1226,11 @@ static struct Sprite *sub_81CC370(void) static void sub_81CC39C(struct Pokenav4Struct *state) { u16 cursor; - int trainerId = sub_81CAF04(GetSelectedMatchCall()); - if (trainerId >= 0) + int trainerPic = GetMatchCallTrainerPic(GetSelectedMatchCall()); + if (trainerPic >= 0) { - DecompressPicFromTable(&gTrainerFrontPicTable[trainerId], state->unk1828, SPECIES_NONE); - LZ77UnCompWram(gTrainerFrontPicPaletteTable[trainerId].data, state->unk2028); + DecompressPicFromTable(&gTrainerFrontPicTable[trainerPic], state->unk1828, SPECIES_NONE); + LZ77UnCompWram(gTrainerFrontPicPaletteTable[trainerPic].data, state->unk2028); cursor = RequestDma3Copy(state->unk1828, state->unk1824, 0x800, 1); LoadPalette(state->unk2028, state->unk1A, 0x20); state->unk20->data[0] = 0; diff --git a/src/pokenav_unk_6.c b/src/pokenav_unk_6.c index ac8237793..c96c3ac1c 100644 --- a/src/pokenav_unk_6.c +++ b/src/pokenav_unk_6.c @@ -14,6 +14,9 @@ #include "constants/songs.h" #include "constants/species.h" +#define boxId id1 // naming multi-purpose field +#define monId id2 // naming multi-purpose field + struct PokenavSub11 { u32 monPal[3][0x20]; @@ -463,14 +466,14 @@ void sub_81CD970(void) { unkPtr->unk4[count].boxId = TOTAL_BOXES_COUNT; unkPtr->unk4[count].monId = i; - unkPtr->unk4[count].unk6 = 0; + unkPtr->unk4[count].data = 0; count++; } } unkPtr->unk4[count].boxId = 0; unkPtr->unk4[count].monId = 0; - unkPtr->unk4[count].unk6 = 0; + unkPtr->unk4[count].data = 0; unkPtr->unk2 = 0; unkPtr->unk0 = count + 1; structPtr->unk678A = 0; @@ -597,7 +600,7 @@ u8 *sub_81CDD24(u8 id) u16 sub_81CDD48(void) { struct PokenavSub18 *unkPtr = GetSubstructPtr(18); - return unkPtr->unk4[unkPtr->unk2].unk6; + return unkPtr->unk4[unkPtr->unk2].data; } bool32 sub_81CDD5C(void) diff --git a/src/pokenav_unk_8.c b/src/pokenav_unk_8.c index c52932a79..f3d0b76f9 100644 --- a/src/pokenav_unk_8.c +++ b/src/pokenav_unk_8.c @@ -10,6 +10,10 @@ #include "international_string_util.h" #include "constants/songs.h" +#define boxId id1 // naming multi-purpose field +#define monId id2 // naming multi-purpose field + + struct PokenavSub7 { u32 (*unk0)(struct PokenavSub7 *); @@ -227,7 +231,7 @@ static s32 sub_81CF0F0(void) { struct PokenavSub7 * ptr = GetSubstructPtr(7); s32 i = GetSelectedMatchCall(); - return ptr->unkPtr->unk4[i].unk6; + return ptr->unkPtr->unk4[i].data; } static u16 sub_81CF10C(void) @@ -258,7 +262,7 @@ static u32 sub_81CF134(s32 state) if (!GetMonData(pokemon, MON_DATA_SANITY_IS_EGG)) { item.monId = i; - item.unk6 = GetMonData(pokemon, ptr->unk14); + item.data = GetMonData(pokemon, ptr->unk14); sub_81CF2C4(ptr, &item); } } @@ -290,7 +294,7 @@ static u32 sub_81CF1D8(s32 state) { item.boxId = boxId; item.monId = monId; - item.unk6 = GetBoxMonDataAt(boxId, monId, ptr->unk14); + item.data = GetBoxMonDataAt(boxId, monId, ptr->unk14); sub_81CF2C4(ptr, &item); } boxCount++; @@ -313,19 +317,19 @@ static u32 sub_81CF278(s32 state) { struct PokenavSub7 * ptr = GetSubstructPtr(7); s32 r6 = ptr->unkPtr->unk0; - s32 r4 = ptr->unkPtr->unk4[0].unk6; + s32 r4 = ptr->unkPtr->unk4[0].data; s32 i; - ptr->unkPtr->unk4[0].unk6 = 1; + ptr->unkPtr->unk4[0].data = 1; for (i = 1; i < r6; i++) { - if (ptr->unkPtr->unk4[i].unk6 == r4) + if (ptr->unkPtr->unk4[i].data == r4) { - ptr->unkPtr->unk4[i].unk6 = ptr->unkPtr->unk4[i - 1].unk6; + ptr->unkPtr->unk4[i].data = ptr->unkPtr->unk4[i - 1].data; } else { - r4 = ptr->unkPtr->unk4[i].unk6; - ptr->unkPtr->unk4[i].unk6 = i + 1; + r4 = ptr->unkPtr->unk4[i].data; + ptr->unkPtr->unk4[i].data = i + 1; } } ptr->unk18 = 1; @@ -340,7 +344,7 @@ static void sub_81CF2C4(struct PokenavSub7 *structPtr, struct PokenavMonList *it while (right != insertionIdx) { - if (item->unk6 > structPtr->unkPtr->unk4[insertionIdx].unk6) + if (item->data > structPtr->unkPtr->unk4[insertionIdx].data) right = insertionIdx; else left = insertionIdx + 1; diff --git a/src/pokenav_unk_9.c b/src/pokenav_unk_9.c index 05d590a87..e8078ea02 100644 --- a/src/pokenav_unk_9.c +++ b/src/pokenav_unk_9.c @@ -8,6 +8,9 @@ #include "international_string_util.h" #include "constants/songs.h" +#define boxId id1 // naming multi-purpose field +#define monId id2 // naming multi-purpose field + struct PokenavSub9 { u32 (*unk0)(struct PokenavSub9*); @@ -218,7 +221,7 @@ static s32 sub_81CFB48(void) { struct PokenavSub9 * ptr = GetSubstructPtr(9); s32 idx = GetSelectedMatchCall(); - return ptr->unk1C->unk4[idx].unk6; + return ptr->unk1C->unk4[idx].data; } static s32 sub_81CFB64(void) @@ -240,7 +243,7 @@ static u32 sub_81CFB8C(s32 state) ptr->unk1C->unk0 = 0; ptr->unk1C->unk2 = 0; - item.boxId = 14; + item.boxId = TOTAL_BOXES_COUNT; for (i = 0; i < PARTY_SIZE; i++) { struct Pokemon * pokemon = &gPlayerParty[i]; @@ -252,7 +255,7 @@ static u32 sub_81CFB8C(s32 state) if (ribbonCount != 0) { item.monId = i; - item.unk6 = ribbonCount; + item.data = ribbonCount; sub_81CFCEC(ptr, &item); } } @@ -288,13 +291,13 @@ static u32 sub_81CFC40(s32 state) { item.boxId = boxId; item.monId = monId; - item.unk6 = ribbonCount; + item.data = ribbonCount; sub_81CFCEC(ptr, &item); } } boxCount++; monId++; - if (boxCount > 14) + if (boxCount > TOTAL_BOXES_COUNT) { ptr->unkC = boxId; ptr->unk10 = monId; @@ -317,7 +320,7 @@ static void sub_81CFCEC(struct PokenavSub9 *structPtr, struct PokenavMonList *it while (right != insertionIdx) { - if (item->unk6 > structPtr->unk1C->unk4[insertionIdx].unk6) + if (item->data > structPtr->unk1C->unk4[insertionIdx].data) right = insertionIdx; else left = insertionIdx + 1; @@ -688,7 +691,7 @@ static void sub_81D035C(struct PokenavMonList * item0, u8 * dest) u8 * s; const u8 * genderStr; struct PokenavMonList * item = item0; - if (item->boxId == 14) + if (item->boxId == TOTAL_BOXES_COUNT) { struct Pokemon * mon = &gPlayerParty[item->monId]; gender = GetMonGender(mon); @@ -722,5 +725,5 @@ static void sub_81D035C(struct PokenavMonList * item0, u8 * dest) *s++ = 5; // LV ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); dest = sub_81DB494(dest, 1, gStringVar1, 54); - ConvertIntToDecimalStringN(dest, item->unk6, STR_CONV_MODE_RIGHT_ALIGN, 2); + ConvertIntToDecimalStringN(dest, item->data, STR_CONV_MODE_RIGHT_ALIGN, 2); } diff --git a/src/strings.c b/src/strings.c index afa567b9f..0efeb7249 100644 --- a/src/strings.c +++ b/src/strings.c @@ -2,23 +2,23 @@ #include "strings.h" ALIGNED(4) -const u8 gExpandedPlaceholder_Empty[] = _(""); -const u8 gExpandedPlaceholder_Kun[] = _(""); -const u8 gExpandedPlaceholder_Chan[] = _(""); -const u8 gExpandedPlaceholder_Sapphire[] = _("SAPPHIRE"); -const u8 gExpandedPlaceholder_Ruby[] = _("RUBY"); -const u8 gExpandedPlaceholder_Emerald[] = _("EMERALD"); -const u8 gExpandedPlaceholder_Aqua[] = _("AQUA"); -const u8 gExpandedPlaceholder_Magma[] = _("MAGMA"); -const u8 gExpandedPlaceholder_Archie[] = _("ARCHIE"); -const u8 gExpandedPlaceholder_Maxie[] = _("MAXIE"); -const u8 gExpandedPlaceholder_Kyogre[] = _("KYOGRE"); -const u8 gExpandedPlaceholder_Groudon[] = _("GROUDON"); -const u8 gExpandedPlaceholder_Brendan[] = _("BRENDAN"); -const u8 gExpandedPlaceholder_May[] = _("MAY"); +const u8 gText_ExpandedPlaceholder_Empty[] = _(""); +const u8 gText_ExpandedPlaceholder_Kun[] = _(""); +const u8 gText_ExpandedPlaceholder_Chan[] = _(""); +const u8 gText_ExpandedPlaceholder_Sapphire[] = _("SAPPHIRE"); +const u8 gText_ExpandedPlaceholder_Ruby[] = _("RUBY"); +const u8 gText_ExpandedPlaceholder_Emerald[] = _("EMERALD"); +const u8 gText_ExpandedPlaceholder_Aqua[] = _("AQUA"); +const u8 gText_ExpandedPlaceholder_Magma[] = _("MAGMA"); +const u8 gText_ExpandedPlaceholder_Archie[] = _("ARCHIE"); +const u8 gText_ExpandedPlaceholder_Maxie[] = _("MAXIE"); +const u8 gText_ExpandedPlaceholder_Kyogre[] = _("KYOGRE"); +const u8 gText_ExpandedPlaceholder_Groudon[] = _("GROUDON"); +const u8 gText_ExpandedPlaceholder_Brendan[] = _("BRENDAN"); +const u8 gText_ExpandedPlaceholder_May[] = _("MAY"); const u8 gText_EggNickname[] = _("EGG"); const u8 gText_Pokemon[] = _("POKéMON"); -const u8 gProfBirchMatchCallName[] = _("PROF. BIRCH"); +const u8 gText_ProfBirchMatchCallName[] = _("PROF. BIRCH"); const u8 gText_MainMenuNewGame[] = _("NEW GAME"); const u8 gText_MainMenuContinue[] = _("CONTINUE"); const u8 gText_MainMenuOption[] = _("OPTION"); @@ -985,9 +985,9 @@ const u8 gUnknown_085EBFE4[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT const u8 gUnknown_085EBFF6[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); const u8 gUnknown_085EC008[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}"); const u8 gText_Unknown[] = _("UNKNOWN"); -const u8 gUnknown_085EC017[] = _("CALL"); -const u8 gUnknown_085EC01C[] = _("CHECK"); -const u8 gUnknown_085EC022[] = _("CANCEL"); +const u8 gText_Call[] = _("CALL"); +const u8 gText_Check[] = _("CHECK"); +const u8 gText_Cancel6[] = _("CANCEL"); const u8 gText_NumberF700[] = _("No. {SPECIAL_F7 0x00}"); const u8 gText_RibbonsF700[] = _("RIBBONS {SPECIAL_F7 0x00}"); const u8 gUnknown_085EC03B[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); @@ -1276,20 +1276,20 @@ const u8 gText_Sorry[] = _("SORRY"); const u8 gText_YayUnkF9F9[] = _("YAY{EMOJI_BIGSMILE}"); const u8 gText_ThankYou[] = _("THANK YOU"); const u8 gText_ByeBye[] = _("BYE-BYE!"); -const u8 gMatchCallStevenStrategyText[] = _("Attack the weak points!"); -const u8 gMatchCall_StevenTrainersPokemonText[] = _("Ultimate STEEL POKéMON."); -const u8 gMatchCall_StevenSelfIntroductionText_Line1_BeforeMeteorFallsBattle[] = _("I'd climb even waterfalls"); -const u8 gMatchCall_StevenSelfIntroductionText_Line2_BeforeMeteorFallsBattle[] = _("to find a rare stone!"); -const u8 gMatchCall_StevenSelfIntroductionText_Line1_AfterMeteorFallsBattle[] = _("I'm the strongest and most"); -const u8 gMatchCall_StevenSelfIntroductionText_Line2_AfterMeteorFallsBattle[] = _("energetic after all!"); -const u8 gMatchCall_BrendanStrategyText[] = _("Battle with knowledge!"); -const u8 gMatchCall_BrendanTrainersPokemonText[] = _("I will use various POKéMON."); -const u8 gMatchCall_BrendanSelfIntroductionText_Line1[] = _("I'll be a better POKéMON"); -const u8 gMatchCall_BrendanSelfIntroductionText_Line2[] = _("prof than my father is!"); -const u8 gMatchCall_MayStrategyText[] = _("I'm not so good at battles."); -const u8 gMatchCall_MayTrainersPokemonText[] = _("I'll use any POKéMON!"); -const u8 gMatchCall_MaySelfIntroductionText_Line1[] = _("My POKéMON and I help"); -const u8 gMatchCall_MaySelfIntroductionText_Line2[] = _("my father's research."); +const u8 gText_MatchCallSteven_Strategy[] = _("Attack the weak points!"); +const u8 gText_MatchCallSteven_Pokemon[] = _("Ultimate STEEL POKéMON."); +const u8 gText_MatchCallSteven_Intro1_BeforeMeteorFallsBattle[] = _("I'd climb even waterfalls"); +const u8 gText_MatchCallSteven_Intro2_BeforeMeteorFallsBattle[] = _("to find a rare stone!"); +const u8 gText_MatchCallSteven_Intro1_AfterMeteorFallsBattle[] = _("I'm the strongest and most"); +const u8 gText_MatchCallSteven_Intro2_AfterMeteorFallsBattle[] = _("energetic after all!"); +const u8 gText_MatchCallBrendan_Strategy[] = _("Battle with knowledge!"); +const u8 gText_MatchCallBrendan_Pokemon[] = _("I will use various POKéMON."); +const u8 gText_MatchCallBrendan_Intro1[] = _("I'll be a better POKéMON"); +const u8 gText_MatchCallBrendan_Intro2[] = _("prof than my father is!"); +const u8 gText_MatchCallMay_Strategy[] = _("I'm not so good at battles."); +const u8 gText_MatchCallMay_Pokemon[] = _("I'll use any POKéMON!"); +const u8 gText_MatchCallMay_Intro1[] = _("My POKéMON and I help"); +const u8 gText_MatchCallMay_Intro2[] = _("my father's research."); const u8 gText_HatchedFromEgg[] = _("{STR_VAR_1} hatched from the EGG!"); const u8 gText_NicknameHatchPrompt[] = _("Would you like to nickname the newly\nhatched {STR_VAR_1}?"); ALIGNED(4) const u8 gText_ReadyToBerryCrush[] = _("Are you ready to BERRY-CRUSH?\nPlease pick a BERRY for use.\p"); @@ -1769,28 +1769,28 @@ const u8 gText_ClearingData[] = _("Clearing data…\nPlease wait."); const u8 gText_IsThisTheCorrectTime[] = _("Is this the correct time?"); const u8 gText_Confirm3[] = _("CONFIRM"); const u8 gText_Cancel4[] = _("CANCEL"); -const u8 gMrStoneMatchCallDesc[] = _("DEVON PRES"); -const u8 gMrStoneMatchCallName[] = _("MR. STONE"); -const u8 gStevenMatchCallDesc[] = _("HARD AS ROCK"); -const u8 gStevenMatchCallName[] = _("STEVEN"); -const u8 gMayBrendanMatchCallDesc[] = _("RAD NEIGHBOR"); -const u8 gNormanMatchCallDesc[] = _("RELIABLE ONE"); -const u8 gMomMatchCallDesc[] = _("CALM & KIND"); -const u8 gWallyMatchCallDesc[] = _("{PKMN} LOVER"); -const u8 gNormanMatchCallName[] = _("DAD"); -const u8 gMomMatchCallName[] = _("MOM"); -const u8 gScottMatchCallDesc[] = _("ELUSIVE EYES"); -const u8 gScottMatchCallName[] = _("SCOTT"); -const u8 gRoxanneMatchCallDesc[] = _("ROCKIN' WHIZ"); -const u8 gBrawlyMatchCallDesc[] = _("THE BIG HIT"); -const u8 gWattsonMatchCallDesc[] = _("SWELL SHOCK"); -const u8 gFlanneryMatchCallDesc[] = _("PASSION BURN"); -const u8 gWinonaMatchCallDesc[] = _("SKY TAMER"); -const u8 gTateLizaMatchCallDesc[] = _("MYSTIC DUO"); -const u8 gJuanMatchCallDesc[] = _("DANDY CHARM"); -const u8 gEliteFourMatchCallDesc[] = _("ELITE FOUR"); -const u8 gChampionMatchCallDesc[] = _("CHAMPION"); -const u8 gProfBirchMatchCallDesc[] = _("{PKMN} PROF."); +const u8 gText_MrStoneMatchCallDesc[] = _("DEVON PRES"); +const u8 gText_MrStoneMatchCallName[] = _("MR. STONE"); +const u8 gText_StevenMatchCallDesc[] = _("HARD AS ROCK"); +const u8 gText_StevenMatchCallName[] = _("STEVEN"); +const u8 gText_MayBrendanMatchCallDesc[] = _("RAD NEIGHBOR"); +const u8 gText_NormanMatchCallDesc[] = _("RELIABLE ONE"); +const u8 gText_MomMatchCallDesc[] = _("CALM & KIND"); +const u8 gText_WallyMatchCallDesc[] = _("{PKMN} LOVER"); +const u8 gText_NormanMatchCallName[] = _("DAD"); +const u8 gText_MomMatchCallName[] = _("MOM"); +const u8 gText_ScottMatchCallDesc[] = _("ELUSIVE EYES"); +const u8 gText_ScottMatchCallName[] = _("SCOTT"); +const u8 gText_RoxanneMatchCallDesc[] = _("ROCKIN' WHIZ"); +const u8 gText_BrawlyMatchCallDesc[] = _("THE BIG HIT"); +const u8 gText_WattsonMatchCallDesc[] = _("SWELL SHOCK"); +const u8 gText_FlanneryMatchCallDesc[] = _("PASSION BURN"); +const u8 gText_WinonaMatchCallDesc[] = _("SKY TAMER"); +const u8 gText_TateLizaMatchCallDesc[] = _("MYSTIC DUO"); +const u8 gText_JuanMatchCallDesc[] = _("DANDY CHARM"); +const u8 gText_EliteFourMatchCallDesc[] = _("ELITE FOUR"); +const u8 gText_ChampionMatchCallDesc[] = _("CHAMPION"); +const u8 gText_ProfBirchMatchCallDesc[] = _("{PKMN} PROF."); const u8 gText_CommStandbyAwaitingOtherPlayer[] = _("Communication standby…\nAwaiting another player to choose."); const u8 gText_BattleWasRefused[] = _("The battle was refused.{PAUSE 60}"); const u8 gText_RefusedBattle[] = _("Refused the battle.{PAUSE 60}"); From cc9b923dc29c9ab855283fdf24687e16d7451b13 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Dec 2019 22:34:55 -0500 Subject: [PATCH 02/35] More pokenav match call documentation --- include/battle_setup.h | 1 - include/gym_leader_rematch.h | 5 +- include/pokenav.h | 21 +- src/battle_setup.c | 2 +- src/match_call.c | 6 +- src/pokenav_match_call_data.c | 272 ++++++++++---------- src/pokenav_unk_3.c | 45 ++-- src/pokenav_unk_4.c | 467 +++++++++++++++++----------------- 8 files changed, 425 insertions(+), 394 deletions(-) diff --git a/include/battle_setup.h b/include/battle_setup.h index 984c820bb..dacd1fa71 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -4,7 +4,6 @@ #include "gym_leader_rematch.h" #define REMATCHES_COUNT 5 -#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY struct RematchTrainer { diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index 473d7b1c1..ac365a41a 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -66,7 +66,7 @@ enum { REMATCH_TRENT, REMATCH_SAWYER, REMATCH_KIRA_AND_DAN, - REMATCH_WALLY_3, + REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs REMATCH_ROXANNE, REMATCH_BRAWLY, REMATCH_WATTSON, @@ -83,6 +83,9 @@ enum { REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum }; +#define REMATCH_NORMAL_NPC_END REMATCH_WALLY_3 +#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY + void UpdateGymLeaderRematch(void); #endif //GUARD_TRAINER_REMATCH_H diff --git a/include/pokenav.h b/include/pokenav.h index 5edde5900..c497c4b85 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -105,6 +105,23 @@ enum [CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \ [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2} +#define POKENAV_MC_FUNC_NONE 0 +#define POKENAV_MC_FUNC_DOWN 1 +#define POKENAV_MC_FUNC_UP 2 +#define POKENAV_MC_FUNC_PG_DOWN 3 +#define POKENAV_MC_FUNC_PG_UP 4 +#define POKENAV_MC_FUNC_SELECT 5 +#define POKENAV_MC_FUNC_6 6 +#define POKENAV_MC_FUNC_7 7 +#define POKENAV_MC_FUNC_CALL_MSG 8 +#define POKENAV_MC_FUNC_NEARBY_MSG 9 +#define POKENAV_MC_FUNC_10 10 +#define POKENAV_MC_FUNC_11 11 +#define POKENAV_MC_FUNC_12 12 +#define POKENAV_MC_FUNC_13 13 +#define POKENAV_MC_FUNC_14 14 +#define POKENAV_MC_FUNC_EXIT 15 + // pokenav.c void sub_81C7694(u32); u32 sub_81C76AC(void); @@ -207,7 +224,6 @@ bool32 PokenavCallback_Init_3(void); u32 sub_81C941C(void); void sub_81C9430(void); int sub_81C9894(void); -const u8 *sub_81CAF78(int index, u8 *arg1); int sub_81C98A4(void); int sub_81C98B4(void); u16 sub_81C98C4(void); @@ -232,6 +248,7 @@ u16 sub_81CAEA4(int); bool32 sub_81CAEBC(int index); int GetMatchCallTrainerPic(int index); const u8 *GetMatchCallFlavorText(int index, int textType); +const u8 *GetMatchCallMessageText(int index, u8 *arg1); u16 sub_81CB01C(void); u16 sub_81CB02C(int arg0); void sub_81CB050(struct PokenavMonList * arg0, u8 *str); @@ -240,7 +257,7 @@ int sub_81CB0E4(int index); bool32 IsRematchEntryRegistered(int index); int sub_81CB128(int index); -// pokenav_unk_4.c +// POKENAV_MC.c bool32 sub_81CB260(void); void sub_81CB29C(s32 index); u32 sub_81CB2CC(void); diff --git a/src/battle_setup.c b/src/battle_setup.c index b98b5df06..817f699f2 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1582,7 +1582,7 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u s32 i; bool32 ret = FALSE; - for (i = 0; i <= REMATCH_WALLY_3; i++) + for (i = 0; i <= REMATCH_NORMAL_NPC_END; i++) { if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !sub_80B1D94(i)) { diff --git a/src/match_call.c b/src/match_call.c index 646b14cea..8458bb31d 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1060,7 +1060,7 @@ static bool32 SelectMatchCallTrainer(void) static u32 GetNumRegisteredNPCs(void) { u32 i, count; - for (i = 0, count = 0; i < 64; i++) + for (i = 0, count = 0; i < REMATCH_NORMAL_NPC_END; i++) { if (FlagGet(FLAG_MATCH_CALL_REGISTERED + i)) count++; @@ -1072,7 +1072,7 @@ static u32 GetNumRegisteredNPCs(void) static u32 GetActiveMatchCallTrainerId(u32 activeMatchCallId) { u32 i; - for (i = 0; i < 64; i++) + for (i = 0; i < REMATCH_NORMAL_NPC_END; i++) { if (FlagGet(FLAG_MATCH_CALL_REGISTERED + i)) { @@ -1384,7 +1384,7 @@ static u16 GetRematchTrainerLocation(int matchCallId) static u32 GetNumRematchTrainersFought(void) { u32 i, count; - for (i = 0, count = 0; i < 64; i++) + for (i = 0, count = 0; i < REMATCH_NORMAL_NPC_END; i++) { if (HasTrainerBeenFought(gRematchTable[i].trainerIds[0])) count++; diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 15374ca89..2460a2f37 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -11,6 +11,16 @@ #include "constants/region_map_sections.h" #include "constants/trainers.h" +enum +{ + MC_TYPE_0, + MC_TYPE_1, + MC_TYPE_WALLY, + MC_TYPE_BIRCH, + MC_TYPE_RIVAL, + MC_TYPE_5 +}; + // Static type declarations typedef struct MatchCallTextDataStruct { @@ -49,17 +59,17 @@ struct MatchCallSubstruct2 { u8 mapSec; }; -struct MatchCallStruct2 { +struct MatchCallWally { u8 type; u8 mapSec; u16 flag; u16 rematchTableIdx; const u8 *desc; const match_call_text_data_t *textData; - const struct MatchCallSubstruct2 *v10; + const struct MatchCallSubstruct2 *locationData; }; -struct MatchCallStruct3 { +struct MatchCallBirch { u8 type; u8 mapSec; u16 flag; @@ -67,9 +77,9 @@ struct MatchCallStruct3 { const u8 *name; }; -struct MatchCallStruct4 { +struct MatchCallRival { u8 type; - u8 gender; + u8 playerGender; u16 flag; const u8 *desc; const u8 *name; @@ -91,9 +101,9 @@ typedef union { const struct MatchCallStructCommon *common; const struct MatchCallStruct0 *type0; const struct MatchCallStruct1 *type1; - const struct MatchCallStruct2 *type2; - const struct MatchCallStruct3 *type3; - const struct MatchCallStruct4 *type4; + const struct MatchCallWally *wally; + const struct MatchCallBirch *birch; + const struct MatchCallRival *rival; const struct MatchCallStruct5 *type5; } match_call_t; @@ -110,47 +120,47 @@ struct MatchCallOverride { static bool32 MatchCallGetFlag_Type0(match_call_t); static bool32 MatchCallGetFlag_Type1(match_call_t); -static bool32 MatchCallGetFlag_Type2(match_call_t); -static bool32 MatchCallGetFlag_Type3(match_call_t); -static bool32 MatchCallGetFlag_Type4(match_call_t); +static bool32 MatchCallGetFlag_Wally(match_call_t); +static bool32 MatchCallGetFlag_Birch(match_call_t); +static bool32 MatchCallGetFlag_Rival(match_call_t); static u8 MatchCallGetMapSec_Type0(match_call_t); static u8 MatchCallGetMapSec_Type1(match_call_t); -static u8 MatchCallGetMapSec_Type2(match_call_t); -static u8 MatchCallGetMapSec_Type3(match_call_t); -static u8 MatchCallGetMapSec_Type4(match_call_t); +static u8 MatchCallGetMapSec_Wally(match_call_t); +static u8 MatchCallGetMapSec_Birch(match_call_t); +static u8 MatchCallGetMapSec_Rival(match_call_t); static bool32 MatchCall_IsRematchable_Type0(match_call_t); static bool32 MatchCall_IsRematchable_Type1(match_call_t); -static bool32 MatchCall_IsRematchable_Type2(match_call_t); -static bool32 MatchCall_IsRematchable_Type3(match_call_t); -static bool32 MatchCall_IsRematchable_Type4(match_call_t); +static bool32 MatchCall_IsRematchable_Wally(match_call_t); +static bool32 MatchCall_IsRematchable_Birch(match_call_t); +static bool32 MatchCall_IsRematchable_Rival(match_call_t); static bool32 MatchCall_HasCheckPage_Type0(match_call_t); static bool32 MatchCall_HasCheckPage_Type1(match_call_t); -static bool32 MatchCall_HasCheckPage_Type2(match_call_t); -static bool32 MatchCall_HasCheckPage_Type3(match_call_t); -static bool32 MatchCall_HasCheckPage_Type4(match_call_t); +static bool32 MatchCall_HasCheckPage_Wally(match_call_t); +static bool32 MatchCall_HasCheckPage_Birch(match_call_t); +static bool32 MatchCall_HasCheckPage_Rival(match_call_t); static u32 MatchCall_GetRematchTableIdx_Type0(match_call_t); static u32 MatchCall_GetRematchTableIdx_Type1(match_call_t); -static u32 MatchCall_GetRematchTableIdx_Type2(match_call_t); -static u32 MatchCall_GetRematchTableIdx_Type3(match_call_t); -static u32 MatchCall_GetRematchTableIdx_Type4(match_call_t); +static u32 MatchCall_GetRematchTableIdx_Wally(match_call_t); +static u32 MatchCall_GetRematchTableIdx_Birch(match_call_t); +static u32 MatchCall_GetRematchTableIdx_Rival(match_call_t); static void MatchCall_GetMessage_Type0(match_call_t, u8 *); static void MatchCall_GetMessage_Type1(match_call_t, u8 *); -static void MatchCall_GetMessage_Type2(match_call_t, u8 *); -static void MatchCall_GetMessage_Type3(match_call_t, u8 *); -static void MatchCall_GetMessage_Type4(match_call_t, u8 *); +static void MatchCall_GetMessage_Wally(match_call_t, u8 *); +static void MatchCall_GetMessage_Birch(match_call_t, u8 *); +static void MatchCall_GetMessage_Rival(match_call_t, u8 *); static void MatchCall_GetNameAndDesc_Type0(match_call_t, const u8 **, const u8 **); static void MatchCall_GetNameAndDesc_Type1(match_call_t, const u8 **, const u8 **); -static void MatchCall_GetNameAndDesc_Type2(match_call_t, const u8 **, const u8 **); -static void MatchCall_GetNameAndDesc_Type3(match_call_t, const u8 **, const u8 **); -static void MatchCall_GetNameAndDesc_Type4(match_call_t, const u8 **, const u8 **); +static void MatchCall_GetNameAndDesc_Wally(match_call_t, const u8 **, const u8 **); +static void MatchCall_GetNameAndDesc_Birch(match_call_t, const u8 **, const u8 **); +static void MatchCall_GetNameAndDesc_Rival(match_call_t, const u8 **, const u8 **); -static void sub_81D1920(const match_call_text_data_t *, u8 *); +static void MatchCall_BufferCallMessageText(const match_call_text_data_t *, u8 *); static void sub_81D199C(const match_call_text_data_t *, u16, u8 *); static void MatchCall_GetNameAndDescByRematchIdx(u32, const u8 **, const u8 **); @@ -328,9 +338,9 @@ static const struct MatchCallStruct5 sNormanMatchCallHeader = .textData = sNormanTextScripts }; -static const struct MatchCallStruct3 sProfBirchMatchCallHeader = +static const struct MatchCallBirch sProfBirchMatchCallHeader = { - .type = 3, + .type = MC_TYPE_BIRCH, .mapSec = 0, .flag = FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, .desc = gText_ProfBirchMatchCallDesc, @@ -394,10 +404,10 @@ static const match_call_text_data_t sMayTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct4 sMayMatchCallHeader = +static const struct MatchCallRival sMayMatchCallHeader = { - .type = 4, - .gender = MALE, //Gender of player + .type = MC_TYPE_RIVAL, + .playerGender = MALE, .flag = FLAG_ENABLE_RIVAL_MATCH_CALL, .desc = gText_MayBrendanMatchCallDesc, .name = gText_ExpandedPlaceholder_May, @@ -423,10 +433,10 @@ static const match_call_text_data_t sBrendanTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct4 sBrendanMatchCallHeader = +static const struct MatchCallRival sBrendanMatchCallHeader = { - .type = 4, - .gender = FEMALE, //Gender of player + .type = MC_TYPE_RIVAL, + .playerGender = FEMALE, .flag = FLAG_ENABLE_RIVAL_MATCH_CALL, .desc = gText_MayBrendanMatchCallDesc, .name = gText_ExpandedPlaceholder_Brendan, @@ -444,22 +454,22 @@ static const match_call_text_data_t sWallyTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -const struct MatchCallSubstruct2 sWallyAdditionalData[] = { +const struct MatchCallSubstruct2 sWallyLocationData[] = { { FLAG_HIDE_MAUVILLE_CITY_WALLY, MAPSEC_VERDANTURF_TOWN }, { FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, MAPSEC_NONE }, { FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY, MAPSEC_VICTORY_ROAD }, { 0xFFFF, MAPSEC_NONE } }; -static const struct MatchCallStruct2 sWallyMatchCallHeader = +static const struct MatchCallWally sWallyMatchCallHeader = { - .type = 2, + .type = MC_TYPE_WALLY, .mapSec = 0, .flag = FLAG_ENABLE_WALLY_MATCH_CALL, .rematchTableIdx = REMATCH_WALLY_3, .desc = gText_WallyMatchCallDesc, .textData = sWallyTextScripts, - .v10 = sWallyAdditionalData + .locationData = sWallyLocationData }; static const match_call_text_data_t sScottTextScripts[] = { @@ -699,10 +709,10 @@ static const struct MatchCallStruct5 sWallaceMatchCallHeader = static const match_call_t sMatchCallHeaders[] = { [MC_HEADER_MR_STONE] = {.type0 = &sMrStoneMatchCallHeader}, - [MC_HEADER_PROF_BIRCH] = {.type3 = &sProfBirchMatchCallHeader}, - [MC_HEADER_BRENDAN] = {.type4 = &sBrendanMatchCallHeader}, - [MC_HEADER_MAY] = {.type4 = &sMayMatchCallHeader}, - [MC_HEADER_WALLY] = {.type2 = &sWallyMatchCallHeader}, + [MC_HEADER_PROF_BIRCH] = {.birch = &sProfBirchMatchCallHeader}, + [MC_HEADER_BRENDAN] = {.rival = &sBrendanMatchCallHeader}, + [MC_HEADER_MAY] = {.rival = &sMayMatchCallHeader}, + [MC_HEADER_WALLY] = {.wally = &sWallyMatchCallHeader}, [MC_HEADER_NORMAN] = {.type5 = &sNormanMatchCallHeader}, [MC_HEADER_MOM] = {.type0 = &sMomMatchCallHeader}, [MC_HEADER_STEVEN] = {.type0 = &sStevenMatchCallHeader}, @@ -724,57 +734,57 @@ static const match_call_t sMatchCallHeaders[] = { static bool32 (*const sMatchCallGetFlagFuncs[])(match_call_t) = { MatchCallGetFlag_Type0, MatchCallGetFlag_Type1, - MatchCallGetFlag_Type2, - MatchCallGetFlag_Type4, - MatchCallGetFlag_Type3 + MatchCallGetFlag_Wally, + MatchCallGetFlag_Rival, + MatchCallGetFlag_Birch }; static u8 (*const sMatchCallGetMapSecFuncs[])(match_call_t) = { MatchCallGetMapSec_Type0, MatchCallGetMapSec_Type1, - MatchCallGetMapSec_Type2, - MatchCallGetMapSec_Type4, - MatchCallGetMapSec_Type3 + MatchCallGetMapSec_Wally, + MatchCallGetMapSec_Rival, + MatchCallGetMapSec_Birch }; static bool32 (*const sMatchCall_IsRematchableFunctions[])(match_call_t) = { MatchCall_IsRematchable_Type0, MatchCall_IsRematchable_Type1, - MatchCall_IsRematchable_Type2, - MatchCall_IsRematchable_Type4, - MatchCall_IsRematchable_Type3 + MatchCall_IsRematchable_Wally, + MatchCall_IsRematchable_Rival, + MatchCall_IsRematchable_Birch }; static bool32 (*const sMatchCall_HasCheckPageFunctions[])(match_call_t) = { MatchCall_HasCheckPage_Type0, MatchCall_HasCheckPage_Type1, - MatchCall_HasCheckPage_Type2, - MatchCall_HasCheckPage_Type4, - MatchCall_HasCheckPage_Type3 + MatchCall_HasCheckPage_Wally, + MatchCall_HasCheckPage_Rival, + MatchCall_HasCheckPage_Birch }; static u32 (*const sMatchCall_GetRematchTableIdxFunctions[])(match_call_t) = { MatchCall_GetRematchTableIdx_Type0, MatchCall_GetRematchTableIdx_Type1, - MatchCall_GetRematchTableIdx_Type2, - MatchCall_GetRematchTableIdx_Type4, - MatchCall_GetRematchTableIdx_Type3 + MatchCall_GetRematchTableIdx_Wally, + MatchCall_GetRematchTableIdx_Rival, + MatchCall_GetRematchTableIdx_Birch }; static void (*const sMatchCall_GetMessageFunctions[])(match_call_t, u8 *) = { MatchCall_GetMessage_Type0, MatchCall_GetMessage_Type1, - MatchCall_GetMessage_Type2, - MatchCall_GetMessage_Type4, - MatchCall_GetMessage_Type3 + MatchCall_GetMessage_Wally, + MatchCall_GetMessage_Rival, + MatchCall_GetMessage_Birch }; static void (*const sMatchCall_GetNameAndDescFunctions[])(match_call_t, const u8 **, const u8 **) = { MatchCall_GetNameAndDesc_Type0, MatchCall_GetNameAndDesc_Type1, - MatchCall_GetNameAndDesc_Type2, - MatchCall_GetNameAndDesc_Type4, - MatchCall_GetNameAndDesc_Type3 + MatchCall_GetNameAndDesc_Wally, + MatchCall_GetNameAndDesc_Rival, + MatchCall_GetNameAndDesc_Birch }; static const struct MatchCallOverride sMatchCallCheckPageOverrides[] = { @@ -820,17 +830,17 @@ static u32 MatchCallGetFunctionIndex(match_call_t matchCall) { switch (matchCall.common->type) { - case 0: + case MC_TYPE_0: default: return 0; - case 1: - case 5: + case MC_TYPE_1: + case MC_TYPE_5: return 1; - case 2: + case MC_TYPE_WALLY: return 2; - case 4: + case MC_TYPE_RIVAL: return 3; - case 3: + case MC_TYPE_BIRCH: return 4; } } @@ -878,25 +888,25 @@ static bool32 MatchCallGetFlag_Type1(match_call_t matchCall) return FlagGet(matchCall.type1->flag); } -static bool32 MatchCallGetFlag_Type2(match_call_t matchCall) +static bool32 MatchCallGetFlag_Wally(match_call_t matchCall) { - if (matchCall.type2->flag == 0xFFFF) + if (matchCall.wally->flag == 0xFFFF) return TRUE; - return FlagGet(matchCall.type2->flag); + return FlagGet(matchCall.wally->flag); } -static bool32 MatchCallGetFlag_Type4(match_call_t matchCall) +static bool32 MatchCallGetFlag_Rival(match_call_t matchCall) { - if (matchCall.type4->gender != gSaveBlock2Ptr->playerGender) + if (matchCall.rival->playerGender != gSaveBlock2Ptr->playerGender) return FALSE; - if (matchCall.type4->flag == 0xFFFF) + if (matchCall.rival->flag == 0xFFFF) return TRUE; - return FlagGet(matchCall.type4->flag); + return FlagGet(matchCall.rival->flag); } -static bool32 MatchCallGetFlag_Type3(match_call_t matchCall) +static bool32 MatchCallGetFlag_Birch(match_call_t matchCall) { - return FlagGet(matchCall.type3->flag); + return FlagGet(matchCall.birch->flag); } u8 MatchCallMapSecGetByIndex(u32 idx) @@ -921,24 +931,24 @@ static u8 MatchCallGetMapSec_Type1(match_call_t matchCall) return matchCall.type1->mapSec; } -static u8 MatchCallGetMapSec_Type2(match_call_t matchCall) +static u8 MatchCallGetMapSec_Wally(match_call_t matchCall) { s32 i; - for (i = 0; matchCall.type2->v10[i].flag != 0xFFFF; i++) + for (i = 0; matchCall.wally->locationData[i].flag != 0xFFFF; i++) { - if (!FlagGet(matchCall.type2->v10[i].flag)) + if (!FlagGet(matchCall.wally->locationData[i].flag)) break; } - return matchCall.type2->v10[i].mapSec; + return matchCall.wally->locationData[i].mapSec; } -static u8 MatchCallGetMapSec_Type4(match_call_t matchCall) +static u8 MatchCallGetMapSec_Rival(match_call_t matchCall) { return MAPSEC_NONE; } -static u8 MatchCallGetMapSec_Type3(match_call_t matchCall) +static u8 MatchCallGetMapSec_Birch(match_call_t matchCall) { return MAPSEC_NONE; } @@ -967,17 +977,17 @@ static bool32 MatchCall_IsRematchable_Type1(match_call_t matchCall) return gSaveBlock1Ptr->trainerRematches[matchCall.type1->rematchTableIdx] ? TRUE : FALSE; } -static bool32 MatchCall_IsRematchable_Type2(match_call_t matchCall) +static bool32 MatchCall_IsRematchable_Wally(match_call_t matchCall) { - return gSaveBlock1Ptr->trainerRematches[matchCall.type2->rematchTableIdx] ? TRUE : FALSE; + return gSaveBlock1Ptr->trainerRematches[matchCall.wally->rematchTableIdx] ? TRUE : FALSE; } -static bool32 MatchCall_IsRematchable_Type4(match_call_t matchCall) +static bool32 MatchCall_IsRematchable_Rival(match_call_t matchCall) { return FALSE; } -static bool32 MatchCall_IsRematchable_Type3(match_call_t matchCall) +static bool32 MatchCall_IsRematchable_Birch(match_call_t matchCall) { return FALSE; } @@ -1011,17 +1021,17 @@ static bool32 MatchCall_HasCheckPage_Type1(match_call_t matchCall) return TRUE; } -static bool32 MatchCall_HasCheckPage_Type2(match_call_t matchCall) +static bool32 MatchCall_HasCheckPage_Wally(match_call_t matchCall) { return TRUE; } -static bool32 MatchCall_HasCheckPage_Type4(match_call_t matchCall) +static bool32 MatchCall_HasCheckPage_Rival(match_call_t matchCall) { return FALSE; } -static bool32 MatchCall_HasCheckPage_Type3(match_call_t matchCall) +static bool32 MatchCall_HasCheckPage_Birch(match_call_t matchCall) { return FALSE; } @@ -1048,17 +1058,17 @@ static u32 MatchCall_GetRematchTableIdx_Type1(match_call_t matchCall) return matchCall.type1->rematchTableIdx; } -static u32 MatchCall_GetRematchTableIdx_Type2(match_call_t matchCall) +static u32 MatchCall_GetRematchTableIdx_Wally(match_call_t matchCall) { - return matchCall.type2->rematchTableIdx; + return matchCall.wally->rematchTableIdx; } -static u32 MatchCall_GetRematchTableIdx_Type4(match_call_t matchCall) +static u32 MatchCall_GetRematchTableIdx_Rival(match_call_t matchCall) { return REMATCH_TABLE_ENTRIES; } -static u32 MatchCall_GetRematchTableIdx_Type3(match_call_t matchCall) +static u32 MatchCall_GetRematchTableIdx_Birch(match_call_t matchCall) { return REMATCH_TABLE_ENTRIES; } @@ -1077,67 +1087,67 @@ void MatchCall_GetMessage(u32 idx, u8 *dest) static void MatchCall_GetMessage_Type0(match_call_t matchCall, u8 *dest) { - sub_81D1920(matchCall.type0->textData, dest); + MatchCall_BufferCallMessageText(matchCall.type0->textData, dest); } static void MatchCall_GetMessage_Type1(match_call_t matchCall, u8 *dest) { - if (matchCall.common->type != 5) - sub_81D1920(matchCall.type1->textData, dest); + if (matchCall.common->type != MC_TYPE_5) + MatchCall_BufferCallMessageText(matchCall.type1->textData, dest); else sub_81D199C(matchCall.type5->textData, matchCall.type5->rematchTableIdx, dest); } -static void MatchCall_GetMessage_Type2(match_call_t matchCall, u8 *dest) +static void MatchCall_GetMessage_Wally(match_call_t matchCall, u8 *dest) { - sub_81D1920(matchCall.type2->textData, dest); + MatchCall_BufferCallMessageText(matchCall.wally->textData, dest); } -static void MatchCall_GetMessage_Type4(match_call_t matchCall, u8 *dest) +static void MatchCall_GetMessage_Rival(match_call_t matchCall, u8 *dest) { - sub_81D1920(matchCall.type4->textData, dest); + MatchCall_BufferCallMessageText(matchCall.rival->textData, dest); } -static void MatchCall_GetMessage_Type3(match_call_t matchCall, u8 *dest) +static void MatchCall_GetMessage_Birch(match_call_t matchCall, u8 *dest) { sub_8197080(dest); } -static void sub_81D1920(const match_call_text_data_t *sub0, u8 *dest) +static void MatchCall_BufferCallMessageText(const match_call_text_data_t *textData, u8 *dest) { u32 i; - for (i = 0; sub0[i].text != NULL; i++) + for (i = 0; textData[i].text != NULL; i++) ; if (i) i--; while (i) { - if (sub0[i].flag != 0xFFFF && FlagGet(sub0[i].flag) == TRUE) + if (textData[i].flag != 0xFFFF && FlagGet(textData[i].flag) == TRUE) break; i--; } - if (sub0[i].flag2 != 0xFFFF) - FlagSet(sub0[i].flag2); - StringExpandPlaceholders(dest, sub0[i].text); + if (textData[i].flag2 != 0xFFFF) + FlagSet(textData[i].flag2); + StringExpandPlaceholders(dest, textData[i].text); } -static void sub_81D199C(const match_call_text_data_t *sub0, u16 idx, u8 *dest) +static void sub_81D199C(const match_call_text_data_t *textData, u16 idx, u8 *dest) { u32 i; - for (i = 0; sub0[i].text != NULL; i++) + for (i = 0; textData[i].text != NULL; i++) { - if (sub0[i].flag == 0xfffe) + if (textData[i].flag == 0xFFFE) break; - if (sub0[i].flag != 0xFFFF && !FlagGet(sub0[i].flag)) + if (textData[i].flag != 0xFFFF && !FlagGet(textData[i].flag)) break; } - if (sub0[i].flag != 0xfffe) + if (textData[i].flag != 0xFFFE) { if (i) i--; - if (sub0[i].flag2 != 0xFFFF) - FlagSet(sub0[i].flag2); - StringExpandPlaceholders(dest, sub0[i].text); + if (textData[i].flag2 != 0xFFFF) + FlagSet(textData[i].flag2); + StringExpandPlaceholders(dest, textData[i].text); } else { @@ -1154,7 +1164,7 @@ static void sub_81D199C(const match_call_text_data_t *sub0, u16 idx, u8 *dest) } while (0); } - StringExpandPlaceholders(dest, sub0[i].text); + StringExpandPlaceholders(dest, textData[i].text); } } @@ -1186,22 +1196,22 @@ static void MatchCall_GetNameAndDesc_Type1(match_call_t matchCall, const u8 **de *desc = _matchCall.type1->desc; } -static void MatchCall_GetNameAndDesc_Type2(match_call_t matchCall, const u8 **desc, const u8 **name) +static void MatchCall_GetNameAndDesc_Wally(match_call_t matchCall, const u8 **desc, const u8 **name) { - MatchCall_GetNameAndDescByRematchIdx(matchCall.type2->rematchTableIdx, desc, name); - *desc = matchCall.type2->desc; + MatchCall_GetNameAndDescByRematchIdx(matchCall.wally->rematchTableIdx, desc, name); + *desc = matchCall.wally->desc; } -static void MatchCall_GetNameAndDesc_Type4(match_call_t matchCall, const u8 **desc, const u8 **name) +static void MatchCall_GetNameAndDesc_Rival(match_call_t matchCall, const u8 **desc, const u8 **name) { - *desc = matchCall.type4->desc; - *name = matchCall.type4->name; + *desc = matchCall.rival->desc; + *name = matchCall.rival->name; } -static void MatchCall_GetNameAndDesc_Type3(match_call_t matchCall, const u8 **desc, const u8 **name) +static void MatchCall_GetNameAndDesc_Birch(match_call_t matchCall, const u8 **desc, const u8 **name) { - *desc = matchCall.type3->desc; - *name = matchCall.type3->name; + *desc = matchCall.birch->desc; + *name = matchCall.birch->name; } static void MatchCall_GetNameAndDescByRematchIdx(u32 idx, const u8 **desc, const u8 **name) diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c index 09aef6a0c..6289bd2cb 100755 --- a/src/pokenav_unk_3.c +++ b/src/pokenav_unk_3.c @@ -85,13 +85,13 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) int selection; if (gMain.newAndRepeatedKeys & DPAD_UP) - return 2; + return POKENAV_MC_FUNC_UP; if (gMain.newAndRepeatedKeys & DPAD_DOWN) - return 1; + return POKENAV_MC_FUNC_DOWN; if (gMain.newAndRepeatedKeys & DPAD_LEFT) - return 4; + return POKENAV_MC_FUNC_PG_UP; if (gMain.newAndRepeatedKeys & DPAD_RIGHT) - return 3; + return POKENAV_MC_FUNC_PG_DOWN; if (gMain.newKeys & A_BUTTON) { @@ -109,7 +109,7 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) state->unk2 = 1; } - return 5; + return POKENAV_MC_FUNC_SELECT; } if (gMain.newKeys & B_BUTTON) @@ -117,15 +117,16 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) if (GetPokenavMode() != POKENAV_MODE_FORCE_CALL_READY) { state->callback = sub_81CABFC; - return 15; + return POKENAV_MC_FUNC_EXIT; } else { + // Cant exit Match Call menu before calling Mr Stone during tutorial PlaySE(SE_HAZURE); } } - return 0; + return POKENAV_MC_FUNC_NONE; } static u32 sub_81CABFC(struct Pokenav3Struct *state) @@ -138,13 +139,13 @@ static u32 sub_81CAC04(struct Pokenav3Struct *state) if ((gMain.newKeys & DPAD_UP) && state->unk0) { state->unk0--; - return 6; + return POKENAV_MC_FUNC_6; } if ((gMain.newKeys & DPAD_DOWN) && state->unk0 < state->unk2) { state->unk0++; - return 6; + return POKENAV_MC_FUNC_6; } if (gMain.newKeys & A_BUTTON) @@ -153,45 +154,45 @@ static u32 sub_81CAC04(struct Pokenav3Struct *state) { case MATCH_CALL_OPTION_CANCEL: state->callback = CB2_HandleMatchCallInput; - return 7; + return POKENAV_MC_FUNC_7; case MATCH_CALL_OPTION_CALL: if (GetPokenavMode() == POKENAV_MODE_FORCE_CALL_READY) SetPokenavMode(POKENAV_MODE_FORCE_CALL_EXIT); state->callback = sub_81CACF8; if (sub_81CB1D0()) - return 9; + return POKENAV_MC_FUNC_NEARBY_MSG; - return 8; + return POKENAV_MC_FUNC_CALL_MSG; case MATCH_CALL_OPTION_CHECK: state->callback = sub_81CACB8; - return 11; + return POKENAV_MC_FUNC_11; } } if (gMain.newKeys & B_BUTTON) { state->callback = CB2_HandleMatchCallInput; - return 7; + return POKENAV_MC_FUNC_7; } - return 0; + return POKENAV_MC_FUNC_NONE; } static u32 sub_81CACB8(struct Pokenav3Struct *state) { if (gMain.newAndRepeatedKeys & DPAD_UP) - return 12; + return POKENAV_MC_FUNC_12; if (gMain.newAndRepeatedKeys & DPAD_DOWN) - return 13; + return POKENAV_MC_FUNC_13; if (gMain.newKeys & B_BUTTON) { state->callback = CB2_HandleMatchCallInput; - return 14; + return POKENAV_MC_FUNC_14; } - return 0; + return POKENAV_MC_FUNC_NONE; } static u32 sub_81CACF8(struct Pokenav3Struct *state) @@ -199,10 +200,10 @@ static u32 sub_81CACF8(struct Pokenav3Struct *state) if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { state->callback = CB2_HandleMatchCallInput; - return 10; + return POKENAV_MC_FUNC_10; } - return 0; + return POKENAV_MC_FUNC_NONE; } static u32 sub_81CAD20(s32 taskState) @@ -349,7 +350,7 @@ int GetMatchCallTrainerPic(int index) return gFacilityClassToPicIndex[index]; } -const u8 *sub_81CAF78(int index, u8 *arg1) +const u8 *GetMatchCallMessageText(int index, u8 *arg1) { struct Pokenav3Struct *state = GetSubstructPtr(5); *arg1 = 0; diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index 4ac2ed41e..b1cabe147 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -32,9 +32,9 @@ struct Pokenav4Struct u8 filler8[0x6]; u8 unkE; u8 unkF; - u16 unk10; - u16 unk12; - u16 unk14; + u16 locWindowId; + u16 infoBoxWindowId; + u16 msgBoxWindowId; //windowId s16 unk16; u8 unused18; u8 unk19; @@ -55,25 +55,25 @@ static void sub_81CBBB8(void); static void sub_81CBC1C(void); static void sub_81CC2B4(void); static void sub_81CC034(struct Pokenav4Struct *); -static void sub_81CBD78(struct Pokenav4Struct *); -static void sub_81CBDC0(struct Pokenav4Struct *); -static void sub_81CBEF8(struct Pokenav4Struct *, int); +static void DrawMatchCallLeftColumnWindows(struct Pokenav4Struct *); +static void UpdateMatchCallInfoBox(struct Pokenav4Struct *); +static void PrintMatchCallLocation(struct Pokenav4Struct *, int); static void sub_81CC214(void); static void sub_81CBC38(int); -static void sub_81CBF60(struct Pokenav4Struct *); +static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *); static bool32 sub_81CBFC4(struct Pokenav4Struct *); static void sub_81CC344(struct Pokenav4Struct *, int); static bool32 sub_81CC004(struct Pokenav4Struct *); static void sub_81CBFF0(struct Pokenav4Struct *); static void sub_81CC058(struct Pokenav4Struct *); static bool32 sub_81CC0D0(struct Pokenav4Struct *); -static void sub_81CC0E0(struct Pokenav4Struct *); -static bool32 sub_81CC104(struct Pokenav4Struct *); -static void sub_81CC158(struct Pokenav4Struct *); -static bool32 sub_81CC194(struct Pokenav4Struct *); +static void PrintCallingDots(struct Pokenav4Struct *); +static bool32 WaitForCallingDotsText(struct Pokenav4Struct *); +static void PrintMatchCallMessage(struct Pokenav4Struct *); +static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *); static void sub_81CC09C(struct Pokenav4Struct *); -static void sub_81CC11C(struct Pokenav4Struct *); -static bool32 sub_81CC140(struct Pokenav4Struct *); +static void PrintTrainerIsCloseBy(struct Pokenav4Struct *); +static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *); static void sub_81CC1DC(struct Pokenav4Struct *); static bool32 sub_81CC204(struct Pokenav4Struct *); static void sub_81CC014(struct Pokenav4Struct *); @@ -82,27 +82,27 @@ static bool32 sub_81CC42C(struct Pokenav4Struct *); static void sub_81CC420(struct Pokenav4Struct *); static void sub_81CBC64(u8 taskId); static void sub_81CBCEC(u16 windowId, u32, u32); -static void sub_81CBDF4(u16 windowId); -static void sub_81CBE0C(u16 windowId); -static void sub_81CBE38(u16 windowId); -static void sub_81CBE50(u16 windowId); -static void sub_81CBE88(u16 windowId, const u8 *str, int top); -static void sub_81CBEB4(u16 windowId, const u8 *str, int top); +static void PrintNumberRegisteredLabel(u16 windowId); +static void PrintNumberRegistered(u16 windowId); +static void PrintNumberOfBattlesLabel(u16 windowId); +static void PrintNumberOfBattles(u16 windowId); +static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top); +static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top); static void sub_81CC2F0(struct Pokenav4Struct *, int); -static void sub_81CC330(struct Pokenav4Struct *); +static void CloseMatchCallSelectOptionsWindow(struct Pokenav4Struct *); static struct Sprite *sub_81CC370(void); static void sub_81CC440(struct Sprite *sprite); static void sub_81CC4A4(struct Sprite *sprite); void sub_81CC34C(struct Sprite *sprite); -u32 sub_81CB510(s32); -u32 sub_81CB588(s32); -u32 sub_81CB600(s32); -u32 sub_81CB678(s32); -u32 sub_81CB6F0(s32); +u32 MatchCallListCursorDown(s32); +u32 MatchCallListCursorUp(s32); +u32 MatchCallListPageDown(s32); +u32 MatchCallListPageUp(s32); +u32 SelectMatchCallEntry(s32); u32 sub_81CB734(s32); u32 sub_81CB75C(s32); -u32 sub_81CB7A0(s32); -u32 sub_81CB824(s32); +u32 DoMatchCallMessage(s32); +u32 DoTrainerCloseByMessage(s32); u32 sub_81CB888(s32); u32 sub_81CB93C(s32); u32 sub_81CBAD4(s32); @@ -157,25 +157,25 @@ const struct BgTemplate gUnknown_0862278C[3] = const LoopedTask gUnknown_08622798[] = { - NULL, - sub_81CB510, - sub_81CB588, - sub_81CB600, - sub_81CB678, - sub_81CB6F0, - sub_81CB734, - sub_81CB75C, - sub_81CB7A0, - sub_81CB824, - sub_81CB888, - sub_81CB93C, - sub_81CBAD4, - sub_81CB9C8, - sub_81CBA68, - sub_81CBB74 + [POKENAV_MC_FUNC_NONE] = NULL, + [POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown, + [POKENAV_MC_FUNC_UP] = MatchCallListCursorUp, + [POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown, + [POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp, + [POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry, + [POKENAV_MC_FUNC_6] = sub_81CB734, + [POKENAV_MC_FUNC_7] = sub_81CB75C, + [POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage, + [POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage, + [POKENAV_MC_FUNC_10] = sub_81CB888, + [POKENAV_MC_FUNC_11] = sub_81CB93C, + [POKENAV_MC_FUNC_12] = sub_81CBAD4, + [POKENAV_MC_FUNC_13] = sub_81CB9C8, + [POKENAV_MC_FUNC_14] = sub_81CBA68, + [POKENAV_MC_FUNC_15] = sub_81CBB74 }; -const struct WindowTemplate gUnknown_086227D8 = +static const struct WindowTemplate sMatchCallLocationWindowTemplate = { .bg = 2, .tilemapLeft = 0, @@ -186,7 +186,7 @@ const struct WindowTemplate gUnknown_086227D8 = .baseBlock = 16 }; -const struct WindowTemplate gUnknown_086227E0 = +static const struct WindowTemplate sMatchCallInfoBoxWindowTemplate = { .bg = 2, .tilemapLeft = 0, @@ -204,7 +204,8 @@ static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = [MATCH_CALL_OPTION_CANCEL] = gText_Cancel6 }; -const u8 gUnknown_086227F4[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); +// The series of 5 dots that appear when someone is called with Match Call +const u8 gText_CallingDots[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); const struct WindowTemplate gUnknown_08622808 = { @@ -308,9 +309,9 @@ void sub_81CB2E0(void) struct Pokenav4Struct *state = GetSubstructPtr(6); sub_81CC2B4(); sub_81CBC1C(); - RemoveWindow(state->unk12); - RemoveWindow(state->unk10); - RemoveWindow(state->unk14); + RemoveWindow(state->infoBoxWindowId); + RemoveWindow(state->locWindowId); + RemoveWindow(state->msgBoxWindowId); FreePokenavSubstruct(6); } @@ -335,42 +336,42 @@ static u32 sub_81CB324(s32 taskState) CopyBgTilemapBufferToVram(2); CopyPaletteIntoBufferUnfaded(gUnknown_08622510, 0x20, 0x20); CopyBgTilemapBufferToVram(2); - return 0; + return LT_INC_AND_PAUSE; case 1: if (free_temp_tile_data_buffers_if_possible()) - return 2; + return LT_PAUSE; sub_8199DF0(1, 0, 0, 1); SetBgTilemapBuffer(1, state->unk24); FillBgTilemapBufferRect_Palette0(1, 0x1000, 0, 0, 32, 20); CopyPaletteIntoBufferUnfaded(gUnknown_086226E0, 0x10, 0x20); CopyBgTilemapBufferToVram(1); - return 0; + return LT_INC_AND_PAUSE; case 2: if (free_temp_tile_data_buffers_if_possible()) - return 2; + return LT_PAUSE; sub_81CC034(state); decompress_and_copy_tile_data_to_vram(3, gUnknown_08622760, 0, 0, 0); CopyPaletteIntoBufferUnfaded(gUnknown_08622700, 0x30, 0x20); CopyPaletteIntoBufferUnfaded(gUnknown_08622720, 0x50, 0x20); - return 0; + return LT_INC_AND_PAUSE; case 3: if (free_temp_tile_data_buffers_if_possible() || !sub_81CAE28()) - return 2; + return LT_PAUSE; sub_81CBBB8(); - return 0; + return LT_INC_AND_PAUSE; case 4: if (sub_81C8224()) - return 2; + return LT_PAUSE; - sub_81CBD78(state); - return 0; + DrawMatchCallLeftColumnWindows(state); + return LT_INC_AND_PAUSE; case 5: - sub_81CBDC0(state); - sub_81CBEF8(state, 0); - return 0; + UpdateMatchCallInfoBox(state); + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 6: ChangeBgX(1, 0, 0); ChangeBgY(1, 0, 0); @@ -381,19 +382,19 @@ static u32 sub_81CB324(s32 taskState) LoadLeftHeaderGfxForIndex(3); sub_81C7FA0(3, 1, 0); sub_81C7AC0(1); - return 0; + return LT_INC_AND_PAUSE; case 7: if (IsPaletteFadeActive() || sub_81C8010()) - return 2; + return LT_PAUSE; sub_81CBC38(1); - return 4; + return LT_FINISH; default: - return 4; + return LT_FINISH; } } -u32 sub_81CB510(s32 taskState) +u32 MatchCallListCursorDown(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -410,27 +411,27 @@ u32 sub_81CB510(s32 taskState) PlaySE(SE_SELECT); // fall through default: - return 0; + return LT_INC_AND_PAUSE; } break; case 1: if (sub_81C8630()) - return 2; + return LT_PAUSE; - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 2: - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } -u32 sub_81CB588(s32 taskState) +u32 MatchCallListCursorUp(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -447,27 +448,27 @@ u32 sub_81CB588(s32 taskState) PlaySE(SE_SELECT); // fall through default: - return 0; + return LT_INC_AND_PAUSE; } break; case 1: if (sub_81C8630()) - return 2; + return LT_PAUSE; - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 2: - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } -u32 sub_81CB600(s32 taskState) +u32 MatchCallListPageDown(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -484,27 +485,27 @@ u32 sub_81CB600(s32 taskState) PlaySE(SE_SELECT); // fall through default: - return 0; + return LT_INC_AND_PAUSE; } break; case 1: if (sub_81C8630()) - return 2; + return LT_PAUSE; - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 2: - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } -u32 sub_81CB678(s32 taskState) +u32 MatchCallListPageUp(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -521,43 +522,43 @@ u32 sub_81CB678(s32 taskState) PlaySE(SE_SELECT); // fall through default: - return 0; + return LT_INC_AND_PAUSE; } break; case 1: if (sub_81C8630()) - return 2; + return LT_PAUSE; - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 2: - sub_81CBEF8(state, 0); - return 0; + PrintMatchCallLocation(state, 0); + return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } -u32 sub_81CB6F0(s32 taskState) +u32 SelectMatchCallEntry(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) { case 0: PlaySE(SE_SELECT); - sub_81CBF60(state); + PrintMatchCallSelectionOptions(state); sub_81C7BA4(7); - return 0; + return LT_INC_AND_PAUSE; case 1: if (sub_81CBFC4(state)) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } u32 sub_81CB734(s32 taskState) @@ -569,7 +570,7 @@ u32 sub_81CB734(s32 taskState) state = GetSubstructPtr(6); var0 = sub_81CB01C(); sub_81CC344(state, var0); - return 4; + return LT_FINISH; } u32 sub_81CB75C(s32 taskState) @@ -581,17 +582,17 @@ u32 sub_81CB75C(s32 taskState) PlaySE(SE_SELECT); sub_81CBFF0(state); sub_81C7BA4(6); - return 0; + return LT_INC_AND_PAUSE; case 1: if (sub_81CC004(state)) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } -u32 sub_81CB7A0(s32 taskState) +u32 DoMatchCallMessage(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -599,31 +600,31 @@ u32 sub_81CB7A0(s32 taskState) case 0: ToggleMatchCallVerticalArrows(TRUE); sub_81CC058(state); - return 0; + return LT_INC_AND_PAUSE; case 1: if (sub_81CC0D0(state)) - return 2; + return LT_PAUSE; - sub_81CC0E0(state); + PrintCallingDots(state); PlaySE(SE_TOREEYE); state->unkE = 0; - return 0; + return LT_INC_AND_PAUSE; case 2: - if (sub_81CC104(state)) - return 2; + if (WaitForCallingDotsText(state)) + return LT_PAUSE; - sub_81CC158(state); - return 0; + PrintMatchCallMessage(state); + return LT_INC_AND_PAUSE; case 3: - if (sub_81CC194(state)) - return 2; + if (WaitForMatchCallMessageText(state)) + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } -u32 sub_81CB824(s32 taskState) +u32 DoTrainerCloseByMessage(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -633,26 +634,26 @@ u32 sub_81CB824(s32 taskState) sub_81CC09C(state); ToggleMatchCallVerticalArrows(TRUE); state->unkE = 1; - return 0; + return LT_INC_AND_PAUSE; case 1: if (sub_81CC0D0(state)) - return 2; + return LT_PAUSE; - sub_81CC11C(state); - return 0; + PrintTrainerIsCloseBy(state); + return LT_INC_AND_PAUSE; case 2: - if (sub_81CC140(state)) - return 2; + if (WaitForTrainerIsCloseByText(state)) + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } u32 sub_81CB888(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); - u32 result = 0; + u32 result = LT_INC_AND_PAUSE; switch (taskState) { @@ -667,45 +668,45 @@ u32 sub_81CB888(s32 taskState) break; case 2: if (sub_81CC204(state)) - result = 2; + result = LT_PAUSE; break; case 3: sub_81CBFF0(state); break; case 4: if (sub_81CC004(state)) - result = 2; + result = LT_PAUSE; sub_81C7BA4(6); break; case 5: if (IsDma3ManagerBusyWithBgCopy_()) { - result = 2; + result = LT_PAUSE; } else { if (state->unkF) { sub_81C8838(); - result = 1; + result = LT_INC_AND_CONTINUE; } else { ToggleMatchCallVerticalArrows(FALSE); - result = 4; + result = LT_FINISH; } } break; case 6: if (IsDma3ManagerBusyWithBgCopy()) { - result = 2; + result = LT_PAUSE; } else { ToggleMatchCallVerticalArrows(FALSE); - result = 4; + result = LT_FINISH; } break; } @@ -722,24 +723,24 @@ u32 sub_81CB93C(s32 taskState) PlaySE(SE_SELECT); sub_81C877C(); sub_81CC014(state); - return 0; + return LT_INC_AND_PAUSE; case 1: if (sub_81C8820() || sub_81CC004(state)) - return 2; + return LT_PAUSE; sub_81C7BA4(8); - return 0; + return LT_INC_AND_PAUSE; case 2: sub_81C87AC(0); sub_81CC39C(state); - return 0; + return LT_INC_AND_PAUSE; case 3: if (sub_81C8820() || sub_81CC42C(state) || IsDma3ManagerBusyWithBgCopy_()) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } u32 sub_81CB9C8(s32 taskState) @@ -757,28 +758,28 @@ u32 sub_81CB9C8(s32 taskState) PlaySE(SE_SELECT); state->unk16 = var0; sub_81CC420(state); - return 0; + return LT_INC_AND_PAUSE; } break; case 1: if (sub_81CC42C(state)) - return 2; + return LT_PAUSE; - sub_81CBEF8(state, state->unk16); - return 0; + PrintMatchCallLocation(state, state->unk16); + return LT_INC_AND_PAUSE; case 2: sub_81C87AC(state->unk16); - return 0; + return LT_INC_AND_PAUSE; case 3: sub_81CC39C(state); - return 0; + return LT_INC_AND_PAUSE; case 4: if (sub_81C8820() || sub_81CC42C(state)) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } u32 sub_81CBA68(s32 taskState) @@ -790,21 +791,21 @@ u32 sub_81CBA68(s32 taskState) PlaySE(SE_SELECT); sub_81CC420(state); sub_81C87F0(); - return 0; + return LT_INC_AND_PAUSE; case 1: if (sub_81C8820() || sub_81CC42C(state)) - return 2; + return LT_PAUSE; sub_81C7BA4(6); - sub_81CBDC0(state); - return 0; + UpdateMatchCallInfoBox(state); + return LT_INC_AND_PAUSE; case 2: if (IsDma3ManagerBusyWithBgCopy()) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } u32 sub_81CBAD4(s32 taskState) @@ -822,28 +823,28 @@ u32 sub_81CBAD4(s32 taskState) PlaySE(SE_SELECT); state->unk16 = var0; sub_81CC420(state); - return 0; + return LT_INC_AND_PAUSE; } break; case 1: if (sub_81CC42C(state)) - return 2; + return LT_PAUSE; - sub_81CBEF8(state, state->unk16); - return 0; + PrintMatchCallLocation(state, state->unk16); + return LT_INC_AND_PAUSE; case 2: sub_81C87AC(state->unk16); - return 0; + return LT_INC_AND_PAUSE; case 3: sub_81CC39C(state); - return 0; + return LT_INC_AND_PAUSE; case 4: if (sub_81C8820() || sub_81CC42C(state)) - return 2; + return LT_PAUSE; break; } - return 4; + return LT_FINISH; } u32 sub_81CBB74(s32 taskState) @@ -855,16 +856,16 @@ u32 sub_81CBB74(s32 taskState) sub_81CBC38(0); sub_81C7AC0(0); sub_81C78A0(); - return 0; + return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive() || MainMenuLoopedTaskIsBusy()) - return 2; + return LT_PAUSE; sub_81C7FDC(); break; } - return 4; + return LT_FINISH; } static void sub_81CBBB8(void) @@ -939,45 +940,45 @@ void sub_81CBD48(u16 windowId, u32 arg0) tilemap[0x20] = 0x5002; } -static void sub_81CBD78(struct Pokenav4Struct *state) +static void DrawMatchCallLeftColumnWindows(struct Pokenav4Struct *state) { - state->unk10 = AddWindow(&gUnknown_086227D8); - state->unk12 = AddWindow(&gUnknown_086227E0); - FillWindowPixelBuffer(state->unk10, PIXEL_FILL(1)); - PutWindowTilemap(state->unk10); - FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); - PutWindowTilemap(state->unk12); - CopyWindowToVram(state->unk10, 1); + state->locWindowId = AddWindow(&sMatchCallLocationWindowTemplate); + state->infoBoxWindowId = AddWindow(&sMatchCallInfoBoxWindowTemplate); + FillWindowPixelBuffer(state->locWindowId, PIXEL_FILL(1)); + PutWindowTilemap(state->locWindowId); + FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); + PutWindowTilemap(state->infoBoxWindowId); + CopyWindowToVram(state->locWindowId, 1); } -static void sub_81CBDC0(struct Pokenav4Struct *state) +static void UpdateMatchCallInfoBox(struct Pokenav4Struct *state) { - FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); - sub_81CBDF4(state->unk12); - sub_81CBE0C(state->unk12); - sub_81CBE38(state->unk12); - sub_81CBE50(state->unk12); - CopyWindowToVram(state->unk12, 2); + FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); + PrintNumberRegisteredLabel(state->infoBoxWindowId); + PrintNumberRegistered(state->infoBoxWindowId); + PrintNumberOfBattlesLabel(state->infoBoxWindowId); + PrintNumberOfBattles(state->infoBoxWindowId); + CopyWindowToVram(state->infoBoxWindowId, 2); } -static void sub_81CBDF4(u16 windowId) +static void PrintNumberRegisteredLabel(u16 windowId) { - sub_81CBE88(windowId, gText_NumberRegistered, 0); + PrintMatchCallInfoLabel(windowId, gText_NumberRegistered, 0); } -static void sub_81CBE0C(u16 windowId) +static void PrintNumberRegistered(u16 windowId) { u8 str[3]; ConvertIntToDecimalStringN(str, sub_81CAE38(), STR_CONV_MODE_LEFT_ALIGN, 3); - sub_81CBEB4(windowId, str, 1); + PrintMatchCallInfoNumber(windowId, str, 1); } -static void sub_81CBE38(u16 windowId) +static void PrintNumberOfBattlesLabel(u16 windowId) { - sub_81CBE88(windowId, gText_NumberOfBattles, 2); + PrintMatchCallInfoLabel(windowId, gText_NumberOfBattles, 2); } -static void sub_81CBE50(u16 windowId) +static void PrintNumberOfBattles(u16 windowId) { u8 str[5]; int numTrainerBattles = GetGameStat(GAME_STAT_TRAINER_BATTLES); @@ -985,23 +986,23 @@ static void sub_81CBE50(u16 windowId) numTrainerBattles = 99999; ConvertIntToDecimalStringN(str, numTrainerBattles, STR_CONV_MODE_LEFT_ALIGN, 5); - sub_81CBEB4(windowId, str, 3); + PrintMatchCallInfoNumber(windowId, str, 3); } -static void sub_81CBE88(u16 windowId, const u8 *str, int top) +static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top) { int y = top * 16 + 1; AddTextPrinterParameterized(windowId, 7, str, 2, y, TEXT_SPEED_FF, NULL); } -static void sub_81CBEB4(u16 windowId, const u8 *str, int top) +static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top) { int x = GetStringRightAlignXOffset(7, str, 86); int y = top * 16 + 1; AddTextPrinterParameterized(windowId, 7, str, x, y, TEXT_SPEED_FF, NULL); } -static void sub_81CBEF8(struct Pokenav4Struct *state, int arg1) +static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) { u8 mapName[32]; int x; @@ -1013,25 +1014,25 @@ static void sub_81CBEF8(struct Pokenav4Struct *state, int arg1) StringCopy(mapName, gText_Unknown); x = GetStringCenterAlignXOffset(7, mapName, 88); - FillWindowPixelBuffer(state->unk10, PIXEL_FILL(1)); - AddTextPrinterParameterized(state->unk10, 7, mapName, x, 1, 0, NULL); + FillWindowPixelBuffer(state->locWindowId, PIXEL_FILL(1)); + AddTextPrinterParameterized(state->locWindowId, 7, mapName, x, 1, 0, NULL); } -static void sub_81CBF60(struct Pokenav4Struct *state) +static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state) { u32 i; - FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); + FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); for (i = 0; i < MATCH_CALL_OPTION_COUNT; i++) { int optionText = sub_81CB02C(i); if (optionText == MATCH_CALL_OPTION_COUNT) break; - AddTextPrinterParameterized(state->unk12, 7, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoBoxWindowId, 7, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); } - CopyWindowToVram(state->unk12, 2); + CopyWindowToVram(state->infoBoxWindowId, 2); } static bool32 sub_81CBFC4(struct Pokenav4Struct *state) @@ -1047,8 +1048,8 @@ static bool32 sub_81CBFC4(struct Pokenav4Struct *state) static void sub_81CBFF0(struct Pokenav4Struct *state) { - sub_81CC330(state); - sub_81CBDC0(state); + CloseMatchCallSelectOptionsWindow(state); + UpdateMatchCallInfoBox(state); } static bool32 sub_81CC004(struct Pokenav4Struct *state) @@ -1058,26 +1059,26 @@ static bool32 sub_81CC004(struct Pokenav4Struct *state) static void sub_81CC014(struct Pokenav4Struct *state) { - sub_81CC330(state); - FillWindowPixelBuffer(state->unk12, PIXEL_FILL(1)); - CopyWindowToVram(state->unk12, 2); + CloseMatchCallSelectOptionsWindow(state); + FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); + CopyWindowToVram(state->infoBoxWindowId, 2); } static void sub_81CC034(struct Pokenav4Struct *state) { - state->unk14 = AddWindow(&gUnknown_08622808); - sub_8197184(state->unk14, 1, 4); + state->msgBoxWindowId = AddWindow(&gUnknown_08622808); + sub_8197184(state->msgBoxWindowId, 1, 4); sub_81C7B40(); } static void sub_81CC058(struct Pokenav4Struct *state) { struct Sprite *sprite; - sub_8197184(state->unk14, 1, 4); - sub_81971C4(state->unk14, 1, 4); - FillWindowPixelBuffer(state->unk14, PIXEL_FILL(1)); - PutWindowTilemap(state->unk14); - CopyWindowToVram(state->unk14, 3); + sub_8197184(state->msgBoxWindowId, 1, 4); + sub_81971C4(state->msgBoxWindowId, 1, 4); + FillWindowPixelBuffer(state->msgBoxWindowId, PIXEL_FILL(1)); + PutWindowTilemap(state->msgBoxWindowId); + CopyWindowToVram(state->msgBoxWindowId, 3); sprite = PauseSpinningPokenavSprite(); sprite->pos1.x = 24; sprite->pos1.y = 112; @@ -1086,11 +1087,11 @@ static void sub_81CC058(struct Pokenav4Struct *state) static void sub_81CC09C(struct Pokenav4Struct *state) { - LoadUserWindowBorderGfx(state->unk14, 1, 0x40); - DrawTextBorderOuter(state->unk14, 1, 4); - FillWindowPixelBuffer(state->unk14, PIXEL_FILL(1)); - PutWindowTilemap(state->unk14); - CopyWindowToVram(state->unk14, 3); + LoadUserWindowBorderGfx(state->msgBoxWindowId, 1, 0x40); + DrawTextBorderOuter(state->msgBoxWindowId, 1, 4); + FillWindowPixelBuffer(state->msgBoxWindowId, PIXEL_FILL(1)); + PutWindowTilemap(state->msgBoxWindowId); + CopyWindowToVram(state->msgBoxWindowId, 3); } static bool32 sub_81CC0D0(struct Pokenav4Struct *state) @@ -1098,37 +1099,37 @@ static bool32 sub_81CC0D0(struct Pokenav4Struct *state) return IsDma3ManagerBusyWithBgCopy(); } -static void sub_81CC0E0(struct Pokenav4Struct *state) +static void PrintCallingDots(struct Pokenav4Struct *state) { - AddTextPrinterParameterized(state->unk14, 1, gUnknown_086227F4, 32, 1, 1, NULL); + AddTextPrinterParameterized(state->msgBoxWindowId, 1, gText_CallingDots, 32, 1, 1, NULL); } -static bool32 sub_81CC104(struct Pokenav4Struct *state) +static bool32 WaitForCallingDotsText(struct Pokenav4Struct *state) { RunTextPrinters(); - return IsTextPrinterActive(state->unk14); + return IsTextPrinterActive(state->msgBoxWindowId); } -static void sub_81CC11C(struct Pokenav4Struct *state) +static void PrintTrainerIsCloseBy(struct Pokenav4Struct *state) { - AddTextPrinterParameterized(state->unk14, 1, gText_TrainerCloseBy, 0, 1, 1, NULL); + AddTextPrinterParameterized(state->msgBoxWindowId, 1, gText_TrainerCloseBy, 0, 1, 1, NULL); } -static bool32 sub_81CC140(struct Pokenav4Struct *state) +static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *state) { RunTextPrinters(); - return IsTextPrinterActive(state->unk14); + return IsTextPrinterActive(state->msgBoxWindowId); } -static void sub_81CC158(struct Pokenav4Struct *state) +static void PrintMatchCallMessage(struct Pokenav4Struct *state) { int index = GetSelectedMatchCall(); - const u8 *str = sub_81CAF78(index, &state->unkF); + const u8 *str = GetMatchCallMessageText(index, &state->unkF); u8 speed = GetPlayerTextSpeedDelay(); - AddTextPrinterParameterized(state->unk14, 1, str, 32, 1, speed, NULL); + AddTextPrinterParameterized(state->msgBoxWindowId, 1, str, 32, 1, speed, NULL); } -static bool32 sub_81CC194(struct Pokenav4Struct *state) +static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *state) { if (gMain.heldKeys & A_BUTTON) gTextFlags.canABSpeedUpPrint = 1; @@ -1136,7 +1137,7 @@ static bool32 sub_81CC194(struct Pokenav4Struct *state) gTextFlags.canABSpeedUpPrint = 0; RunTextPrinters(); - return IsTextPrinterActive(state->unk14); + return IsTextPrinterActive(state->msgBoxWindowId); } static void sub_81CC1DC(struct Pokenav4Struct *state) @@ -1197,7 +1198,7 @@ static void sub_81CC2F0(struct Pokenav4Struct *state, int top) } } -static void sub_81CC330(struct Pokenav4Struct *state) +static void CloseMatchCallSelectOptionsWindow(struct Pokenav4Struct *state) { DestroySprite(state->unk1C); state->unk1C = NULL; From 0086cd1efa902d7f645296dbfdde6147b911d292 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 7 Dec 2019 04:08:21 -0500 Subject: [PATCH 03/35] More pokenav match call documentation --- include/gym_leader_rematch.h | 6 +- include/match_call.h | 2 +- include/pokenav.h | 94 +++++---- src/battle_setup.c | 6 +- src/match_call.c | 8 +- src/pokenav_main_menu.c | 76 ++++--- src/pokenav_match_call_data.c | 368 +++++++++++++++++----------------- src/pokenav_match_call_ui.c | 11 +- src/pokenav_unk_1.c | 22 +- src/pokenav_unk_10.c | 6 +- src/pokenav_unk_2.c | 4 +- src/pokenav_unk_3.c | 144 ++++++------- src/pokenav_unk_4.c | 339 ++++++++++++++++--------------- src/pokenav_unk_5.c | 8 +- src/pokenav_unk_7.c | 90 ++++----- src/pokenav_unk_8.c | 2 +- src/pokenav_unk_9.c | 2 +- 17 files changed, 598 insertions(+), 590 deletions(-) diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index ac365a41a..81ce3da23 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -66,7 +66,7 @@ enum { REMATCH_TRENT, REMATCH_SAWYER, REMATCH_KIRA_AND_DAN, - REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs + REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs, from Wally below are special trainers REMATCH_ROXANNE, REMATCH_BRAWLY, REMATCH_WATTSON, @@ -83,8 +83,8 @@ enum { REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum }; -#define REMATCH_NORMAL_NPC_END REMATCH_WALLY_3 -#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY +#define REMATCH_SPECIAL_TRAINER_START REMATCH_WALLY_3 +#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY void UpdateGymLeaderRematch(void); diff --git a/include/match_call.h b/include/match_call.h index 52eab63ec..8214e03b7 100644 --- a/include/match_call.h +++ b/include/match_call.h @@ -15,7 +15,7 @@ void InitMatchCallCounters(void); bool32 TryStartMatchCall(void); bool32 IsMatchCallTaskActive(void); void StartMatchCallFromScript(u8 *message); -void sub_8197080(u8 *destStr); +void BufferPokedexRatingForMatchCall(u8 *destStr); bool32 SelectMatchCallMessage(int, u8 *); void sub_8197184(u32 windowId, u32 destOffset, u32 paletteId); void sub_81971C4(u32 windowId, u32 tileOffset, u32 paletteId); diff --git a/include/pokenav.h b/include/pokenav.h index c497c4b85..e2c2a4d08 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -32,9 +32,9 @@ struct PokenavSub18 enum { - POKENAV_MODE_NORMAL, // Chosen from Start menu. - POKENAV_MODE_FORCE_CALL_READY, // When player is forced to call Mr. Stone for pokenav tutorial - POKENAV_MODE_FORCE_CALL_EXIT, // Forced to exit fter being calling Mr. Stone for pokenav tutorial + POKENAV_MODE_NORMAL, // Chosen from Start menu. + POKENAV_MODE_FORCE_CALL_READY, // Pokenav tutorial before calling Mr. Stone + POKENAV_MODE_FORCE_CALL_EXIT, // Pokenav tutorial after calling Mr. Stone }; #define POKENAV_MENU_IDS_START 100000 @@ -57,6 +57,23 @@ enum POKENAV_MENU_E, }; +enum +{ + HELPBAR_NONE, + HELPBAR_MAP_ZOOMED_OUT, + HELPBAR_MAP_ZOOMED_IN, + HELPBAR_CONDITION_MON_LIST, + HELPBAR_CONDITION_MON_STATUS, + HELPBAR_CONDITION_MARKINGS, + HELPBAR_MC_TRAINER_LIST, + HELPBAR_MC_CALL_MENU, + HELPBAR_MC_CHECK_PAGE, + HELPBAR_RIBBONS_MON_LIST, + HELPBAR_RIBBONS_LIST, + HELPBAR_RIBBONS_CHECK, + HELPBAR_COUNT +}; + enum { MC_HEADER_MR_STONE, @@ -105,22 +122,25 @@ enum [CHECK_PAGE_INTRO_1] = gText_MatchCall##name##_Intro1, \ [CHECK_PAGE_INTRO_2] = gText_MatchCall##name##_Intro2} -#define POKENAV_MC_FUNC_NONE 0 -#define POKENAV_MC_FUNC_DOWN 1 -#define POKENAV_MC_FUNC_UP 2 -#define POKENAV_MC_FUNC_PG_DOWN 3 -#define POKENAV_MC_FUNC_PG_UP 4 -#define POKENAV_MC_FUNC_SELECT 5 -#define POKENAV_MC_FUNC_6 6 -#define POKENAV_MC_FUNC_7 7 -#define POKENAV_MC_FUNC_CALL_MSG 8 -#define POKENAV_MC_FUNC_NEARBY_MSG 9 -#define POKENAV_MC_FUNC_10 10 -#define POKENAV_MC_FUNC_11 11 -#define POKENAV_MC_FUNC_12 12 -#define POKENAV_MC_FUNC_13 13 -#define POKENAV_MC_FUNC_14 14 -#define POKENAV_MC_FUNC_EXIT 15 +enum +{ + POKENAV_MC_FUNC_NONE, + POKENAV_MC_FUNC_DOWN, + POKENAV_MC_FUNC_UP, + POKENAV_MC_FUNC_PG_DOWN, + POKENAV_MC_FUNC_PG_UP, + POKENAV_MC_FUNC_SELECT, + POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR, + POKENAV_MC_FUNC_CANCEL, + POKENAV_MC_FUNC_CALL_MSG, + POKENAV_MC_FUNC_NEARBY_MSG, + POKENAV_MC_FUNC_10, + POKENAV_MC_FUNC_SHOW_CHECK_PAGE, + POKENAV_MC_FUNC_CHECK_PAGE_UP, + POKENAV_MC_FUNC_CHECK_PAGE_DOWN, + POKENAV_MC_FUNC_EXIT_CHECK_PAGE, + POKENAV_MC_FUNC_EXIT +}; // pokenav.c void sub_81C7694(u32); @@ -168,7 +188,7 @@ void ToggleMatchCallVerticalArrows(bool32 shouldHide); void sub_81C8838(void); void sub_81C877C(void); bool32 sub_81C8820(void); -void sub_81C87AC(s16 a0); +void PrintCheckPageInfo(s16 a0); u32 GetMatchCallListTopIndex(void); void sub_81C87F0(void); bool32 sub_81C81D4(const struct BgTemplate *arg0, struct MatchCallListTemplate *arg1, s32 arg2); @@ -176,15 +196,15 @@ void sub_81C8234(void); // pokenav_match_call_data.c bool32 MatchCall_HasCheckPage(u32 idx); -u8 MatchCallMapSecGetByIndex(u32 idx); -bool32 sub_81D1BF8(u32 idx); -bool32 MatchCallFlagGetByIndex(u32 idx); +u8 MatchCall_GetMapSec(u32 idx); +bool32 MatchCall_HasRematchId(u32 idx); +bool32 MatchCall_GetEnabled(u32 idx); u32 MatchCall_GetRematchTableIdx(u32 idx); u32 GetTrainerIdxByRematchIdx(u32 rematchIdx); int MatchCall_GetOverrideFacilityClass(u32 idx); void MatchCall_GetMessage(u32 idx, u8 *dest); const u8 *MatchCall_GetOverrideFlavorText(u32 idx, u32 offset); -void sub_81D1A78(u32 idx, const u8 **desc, const u8 **name); +void MatchCall_GetNameAndDesc(u32 idx, const u8 **desc, const u8 **name); // pokenav_main_menu.c bool32 InitPokenavMainMenu(void); @@ -197,8 +217,8 @@ void sub_81C7AC0(s32 a0); bool32 sub_81C8010(void); void InitBgTemplates(const struct BgTemplate *templates, int count); bool32 IsPaletteFadeActive(void); -void sub_81C7BA4(u32 helpBarIndex); -bool32 IsDma3ManagerBusyWithBgCopy_(void); +void PrintHelpBarText(u32 textId); +bool32 WaitForHelpBar(void); void sub_81C78A0(void); bool32 MainMenuLoopedTaskIsBusy(void); void sub_81C7FDC(void); @@ -226,7 +246,7 @@ void sub_81C9430(void); int sub_81C9894(void); int sub_81C98A4(void); int sub_81C98B4(void); -u16 sub_81C98C4(void); +u16 GetHelpBarTextId(void); // pokenav_unk_2.c bool32 sub_81C9924(void); @@ -241,28 +261,28 @@ bool32 PokenavCallback_Init_11(void); u32 sub_81CAB24(void); void sub_81CAB38(void); int sub_81CAE28(void); -int sub_81CAE38(void); +int GetNumberRegistered(void); int sub_81CAE48(void); struct PokenavMonList *sub_81CAE94(void); -u16 sub_81CAEA4(int); -bool32 sub_81CAEBC(int index); +u16 GetMatchCallMapSec(int); +bool32 ShouldDrawRematchPokeballIcon(int index); +void ClearRematchPokeballIcon(u16 windowId, u32 a1); int GetMatchCallTrainerPic(int index); const u8 *GetMatchCallFlavorText(int index, int textType); const u8 *GetMatchCallMessageText(int index, u8 *arg1); -u16 sub_81CB01C(void); -u16 sub_81CB02C(int arg0); -void sub_81CB050(struct PokenavMonList * arg0, u8 *str); +u16 GetMatchCallOptionCursorPos(void); +u16 GetMatchCallOptionId(int arg0); +void BufferMatchCallNameAndDesc(struct PokenavMonList * arg0, u8 *str); u8 sub_81CB0C8(int rematchIndex); -int sub_81CB0E4(int index); +int GetIndexDeltaOfNextCheckPageDown(int index); +int GetIndexDeltaOfNextCheckPageUp(int index); bool32 IsRematchEntryRegistered(int index); -int sub_81CB128(int index); -// POKENAV_MC.c +// pokenav_unk_4.c bool32 sub_81CB260(void); void sub_81CB29C(s32 index); u32 sub_81CB2CC(void); void sub_81CB2E0(void); -void sub_81CBD48(u16 windowId, u32 a1); // pokenav_unk_5.c u32 PokenavCallback_Init_6(void); diff --git a/src/battle_setup.c b/src/battle_setup.c index 817f699f2..3234e8974 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1582,7 +1582,7 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u s32 i; bool32 ret = FALSE; - for (i = 0; i <= REMATCH_NORMAL_NPC_END; i++) + for (i = 0; i <= REMATCH_SPECIAL_TRAINER_START; i++) { if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !sub_80B1D94(i)) { @@ -1641,7 +1641,7 @@ static bool8 IsFirstTrainerIdReadyForRematch(const struct RematchTrainer *table, if (tableId == -1) return FALSE; - if (tableId >= 100) + if (tableId >= MAX_REMATCH_ENTRIES) return FALSE; if (gSaveBlock1Ptr->trainerRematches[tableId] == 0) return FALSE; @@ -1655,7 +1655,7 @@ static bool8 IsTrainerReadyForRematch_(const struct RematchTrainer *table, u16 t if (tableId == -1) return FALSE; - if (tableId >= 100) + if (tableId >= MAX_REMATCH_ENTRIES) return FALSE; if (gSaveBlock1Ptr->trainerRematches[tableId] == 0) return FALSE; diff --git a/src/match_call.c b/src/match_call.c index 8458bb31d..dac98e559 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1060,7 +1060,7 @@ static bool32 SelectMatchCallTrainer(void) static u32 GetNumRegisteredNPCs(void) { u32 i, count; - for (i = 0, count = 0; i < REMATCH_NORMAL_NPC_END; i++) + for (i = 0, count = 0; i < REMATCH_SPECIAL_TRAINER_START; i++) { if (FlagGet(FLAG_MATCH_CALL_REGISTERED + i)) count++; @@ -1072,7 +1072,7 @@ static u32 GetNumRegisteredNPCs(void) static u32 GetActiveMatchCallTrainerId(u32 activeMatchCallId) { u32 i; - for (i = 0; i < REMATCH_NORMAL_NPC_END; i++) + for (i = 0; i < REMATCH_SPECIAL_TRAINER_START; i++) { if (FlagGet(FLAG_MATCH_CALL_REGISTERED + i)) { @@ -1384,7 +1384,7 @@ static u16 GetRematchTrainerLocation(int matchCallId) static u32 GetNumRematchTrainersFought(void) { u32 i, count; - for (i = 0, count = 0; i < REMATCH_NORMAL_NPC_END; i++) + for (i = 0, count = 0; i < REMATCH_SPECIAL_TRAINER_START; i++) { if (HasTrainerBeenFought(gRematchTable[i].trainerIds[0])) count++; @@ -1961,7 +1961,7 @@ static const u8 *const sBirchDexRatingTexts[] = gBirchDexRatingText_DexCompleted, }; -void sub_8197080(u8 *destStr) +void BufferPokedexRatingForMatchCall(u8 *destStr) { int numSeen, numCaught; u8 *str; diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 4422a70e3..ea15a5198 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -41,7 +41,7 @@ struct PokenavMainMenuResources u32 (*unk4)(void); u32 unk8; u32 currentTaskId; - u32 unk10; + u32 helpBarWindowId; u32 unk14; struct Sprite *spinningPokenav; struct Sprite *leftHeaderSprites[2]; @@ -68,10 +68,10 @@ static void MoveLeftHeader(struct Sprite *sprite, s32 startX, s32 endX, s32 dura static void SpriteCB_MoveLeftHeader(struct Sprite *sprite); static void InitPokenavMainMenuResources(void); static void InitHoennMapHeaderSprites(void); -static void sub_81C7B74(void); +static void InitHelpBar(void); static u32 LoopedTask_ScrollMenuHeaderDown(s32 a0); static u32 LoopedTask_ScrollMenuHeaderUp(s32 a0); -static void sub_81C7BF8(u32 a0); +static void DrawHelpBar(u32 windowId); static void SpriteCB_SpinningPokenav(struct Sprite* sprite); static u32 LoopedTask_InitPokenavMenu(s32 a0); @@ -92,7 +92,7 @@ const struct BgTemplate gPokenavMainMenuBgTemplates[] = } }; -const struct WindowTemplate gUnknown_0861FA08[2] = +static const struct WindowTemplate sHelpBarWindowTemplate[] = { { .bg = 0, @@ -103,36 +103,28 @@ const struct WindowTemplate gUnknown_0861FA08[2] = .paletteNum = 0, .baseBlock = 0x36, }, - { - .bg = 0xFF, - .tilemapLeft = 0, - .tilemapTop = 0, - .width = 0, - .height = 0, - .paletteNum = 0, - .baseBlock = 0, - }, + DUMMY_WIN_TEMPLATE }; -const u8 *const sHelpBarTexts[12] = +static const u8 *const sHelpBarTexts[HELPBAR_COUNT] = { - gText_Pokenav_ClearButtonList, - gText_PokenavMap_ZoomedOutButtons, - gText_PokenavMap_ZoomedInButtons, - gText_PokenavCondition_MonListButtons, - gText_PokenavCondition_MonStatusButtons, - gText_PokenavCondition_MarkingButtons, - gText_PokenavMatchCall_TrainerListButtons, - gText_PokenavMatchCall_CallMenuButtons, - gText_PokenavMatchCall_CheckTrainerButtons, - gText_PokenavRibbons_MonListButtons, - gText_PokenavRibbons_RibbonListButtons, - gText_PokenavRibbons_RibbonCheckButtons, + [HELPBAR_NONE] = gText_Pokenav_ClearButtonList, + [HELPBAR_MAP_ZOOMED_OUT] = gText_PokenavMap_ZoomedOutButtons, + [HELPBAR_MAP_ZOOMED_IN] = gText_PokenavMap_ZoomedInButtons, + [HELPBAR_CONDITION_MON_LIST] = gText_PokenavCondition_MonListButtons, + [HELPBAR_CONDITION_MON_STATUS] = gText_PokenavCondition_MonStatusButtons, + [HELPBAR_CONDITION_MARKINGS] = gText_PokenavCondition_MarkingButtons, + [HELPBAR_MC_TRAINER_LIST] = gText_PokenavMatchCall_TrainerListButtons, + [HELPBAR_MC_CALL_MENU] = gText_PokenavMatchCall_CallMenuButtons, + [HELPBAR_MC_CHECK_PAGE] = gText_PokenavMatchCall_CheckTrainerButtons, + [HELPBAR_RIBBONS_MON_LIST] = gText_PokenavRibbons_MonListButtons, + [HELPBAR_RIBBONS_LIST] = gText_PokenavRibbons_RibbonListButtons, + [HELPBAR_RIBBONS_CHECK] = gText_PokenavRibbons_RibbonCheckButtons, }; -const u8 gMenuButtonReminderColor[3] = +static const u8 sHelpBarTextColors[3] = { - 4, 1, 2 + TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY }; static const struct CompressedSpriteSheet gSpinningPokenavSpriteSheet[] = @@ -386,7 +378,7 @@ static u32 LoopedTask_InitPokenavMenu(s32 a0) if (free_temp_tile_data_buffers_if_possible()) return LT_PAUSE; - sub_81C7B74(); + InitHelpBar(); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -650,10 +642,10 @@ void sub_81C7AC0(s32 a0) BeginNormalPaletteFade(structPtr->unk14, -2, 16, 0, RGB_BLACK); break; case 2: - BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK); + BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK); //out break; case 3: - BeginNormalPaletteFade(0xFFFFFFFF, -2, 16, 0, RGB_BLACK); + BeginNormalPaletteFade(0xFFFFFFFF, -2, 16, 0, RGB_BLACK); //in break; } } @@ -676,31 +668,31 @@ void InitBgTemplates(const struct BgTemplate *templates, int count) InitBgFromTemplate(templates++); } -static void sub_81C7B74(void) +static void InitHelpBar(void) { struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); - InitWindows(&gUnknown_0861FA08[0]); - structPtr->unk10 = 0; - sub_81C7BF8(structPtr->unk10); - PutWindowTilemap(structPtr->unk10); - CopyWindowToVram(structPtr->unk10, 3); // TODO: Use a defined constant here. + InitWindows(&sHelpBarWindowTemplate[0]); + structPtr->helpBarWindowId = 0; + DrawHelpBar(structPtr->helpBarWindowId); + PutWindowTilemap(structPtr->helpBarWindowId); + CopyWindowToVram(structPtr->helpBarWindowId, 3); // TODO: Use a defined constant here. } -void sub_81C7BA4(u32 helpBarIndex) +void PrintHelpBarText(u32 textId) { struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); - sub_81C7BF8(structPtr->unk10); - AddTextPrinterParameterized3(structPtr->unk10, 1, 0, 1, gMenuButtonReminderColor, 0, sHelpBarTexts[helpBarIndex]); + DrawHelpBar(structPtr->helpBarWindowId); + AddTextPrinterParameterized3(structPtr->helpBarWindowId, 1, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]); } -bool32 IsDma3ManagerBusyWithBgCopy_(void) +bool32 WaitForHelpBar(void) { return IsDma3ManagerBusyWithBgCopy(); } -static void sub_81C7BF8(u32 windowId) +static void DrawHelpBar(u32 windowId) { FillWindowPixelBuffer(windowId, PIXEL_FILL(4)); FillWindowPixelRect(windowId, PIXEL_FILL(5), 0, 0, 0x80, 1); diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 2460a2f37..34cc41bd2 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -11,14 +11,17 @@ #include "constants/region_map_sections.h" #include "constants/trainers.h" + +// NPC below means non-trainer character (no rematch or check page) +// Steven also uses this type but has a check page by using a MatchCallCheckPageOverride enum { - MC_TYPE_0, - MC_TYPE_1, + MC_TYPE_NPC, + MC_TYPE_TRAINER, MC_TYPE_WALLY, MC_TYPE_BIRCH, MC_TYPE_RIVAL, - MC_TYPE_5 + MC_TYPE_LEADER }; // Static type declarations @@ -35,7 +38,7 @@ struct MatchCallStructCommon { u16 flag; }; -struct MatchCallStruct0 { +struct MatchCallStructNPC { u8 type; u8 mapSec; u16 flag; @@ -44,7 +47,8 @@ struct MatchCallStruct0 { const match_call_text_data_t *textData; }; -struct MatchCallStruct1 { +// Shared by MC_TYPE_TRAINER and MC_TYPE_LEADER +struct MatchCallStructTrainer { u8 type; u8 mapSec; u16 flag; @@ -54,7 +58,7 @@ struct MatchCallStruct1 { const match_call_text_data_t *textData; }; -struct MatchCallSubstruct2 { +struct MatchCallLocationOverride { u16 flag; u8 mapSec; }; @@ -66,7 +70,7 @@ struct MatchCallWally { u16 rematchTableIdx; const u8 *desc; const match_call_text_data_t *textData; - const struct MatchCallSubstruct2 *locationData; + const struct MatchCallLocationOverride *locationData; }; struct MatchCallBirch { @@ -86,28 +90,17 @@ struct MatchCallRival { const match_call_text_data_t *textData; }; -// Note: Type1 and Type5 have identical struct layouts. -struct MatchCallStruct5 { - u8 type; - u8 mapSec; - u16 flag; - u16 rematchTableIdx; - const u8 *desc; - const u8 *name; - const match_call_text_data_t *textData; -}; - typedef union { const struct MatchCallStructCommon *common; - const struct MatchCallStruct0 *type0; - const struct MatchCallStruct1 *type1; + const struct MatchCallStructNPC *npc; + const struct MatchCallStructTrainer *trainer; const struct MatchCallWally *wally; const struct MatchCallBirch *birch; const struct MatchCallRival *rival; - const struct MatchCallStruct5 *type5; + const struct MatchCallStructTrainer *leader; } match_call_t; -struct MatchCallOverride { +struct MatchCallCheckPageOverride { u16 idx; u16 facilityClass; u32 flag; @@ -118,50 +111,50 @@ struct MatchCallOverride { // Static ROM declarations -static bool32 MatchCallGetFlag_Type0(match_call_t); -static bool32 MatchCallGetFlag_Type1(match_call_t); -static bool32 MatchCallGetFlag_Wally(match_call_t); -static bool32 MatchCallGetFlag_Birch(match_call_t); -static bool32 MatchCallGetFlag_Rival(match_call_t); +static bool32 MatchCall_GetEnabled_NPC(match_call_t); +static bool32 MatchCall_GetEnabled_Trainer(match_call_t); +static bool32 MatchCall_GetEnabled_Wally(match_call_t); +static bool32 MatchCall_GetEnabled_Birch(match_call_t); +static bool32 MatchCall_GetEnabled_Rival(match_call_t); -static u8 MatchCallGetMapSec_Type0(match_call_t); -static u8 MatchCallGetMapSec_Type1(match_call_t); -static u8 MatchCallGetMapSec_Wally(match_call_t); -static u8 MatchCallGetMapSec_Birch(match_call_t); -static u8 MatchCallGetMapSec_Rival(match_call_t); +static u8 MatchCall_GetMapSec_NPC(match_call_t); +static u8 MatchCall_GetMapSec_Trainer(match_call_t); +static u8 MatchCall_GetMapSec_Wally(match_call_t); +static u8 MatchCall_GetMapSec_Birch(match_call_t); +static u8 MatchCall_GetMapSec_Rival(match_call_t); -static bool32 MatchCall_IsRematchable_Type0(match_call_t); -static bool32 MatchCall_IsRematchable_Type1(match_call_t); +static bool32 MatchCall_IsRematchable_NPC(match_call_t); +static bool32 MatchCall_IsRematchable_Trainer(match_call_t); static bool32 MatchCall_IsRematchable_Wally(match_call_t); static bool32 MatchCall_IsRematchable_Birch(match_call_t); static bool32 MatchCall_IsRematchable_Rival(match_call_t); -static bool32 MatchCall_HasCheckPage_Type0(match_call_t); -static bool32 MatchCall_HasCheckPage_Type1(match_call_t); +static bool32 MatchCall_HasCheckPage_NPC(match_call_t); +static bool32 MatchCall_HasCheckPage_Trainer(match_call_t); static bool32 MatchCall_HasCheckPage_Wally(match_call_t); static bool32 MatchCall_HasCheckPage_Birch(match_call_t); static bool32 MatchCall_HasCheckPage_Rival(match_call_t); -static u32 MatchCall_GetRematchTableIdx_Type0(match_call_t); -static u32 MatchCall_GetRematchTableIdx_Type1(match_call_t); +static u32 MatchCall_GetRematchTableIdx_NPC(match_call_t); +static u32 MatchCall_GetRematchTableIdx_Trainer(match_call_t); static u32 MatchCall_GetRematchTableIdx_Wally(match_call_t); static u32 MatchCall_GetRematchTableIdx_Birch(match_call_t); static u32 MatchCall_GetRematchTableIdx_Rival(match_call_t); -static void MatchCall_GetMessage_Type0(match_call_t, u8 *); -static void MatchCall_GetMessage_Type1(match_call_t, u8 *); +static void MatchCall_GetMessage_NPC(match_call_t, u8 *); +static void MatchCall_GetMessage_Trainer(match_call_t, u8 *); static void MatchCall_GetMessage_Wally(match_call_t, u8 *); static void MatchCall_GetMessage_Birch(match_call_t, u8 *); static void MatchCall_GetMessage_Rival(match_call_t, u8 *); -static void MatchCall_GetNameAndDesc_Type0(match_call_t, const u8 **, const u8 **); -static void MatchCall_GetNameAndDesc_Type1(match_call_t, const u8 **, const u8 **); +static void MatchCall_GetNameAndDesc_NPC(match_call_t, const u8 **, const u8 **); +static void MatchCall_GetNameAndDesc_Trainer(match_call_t, const u8 **, const u8 **); static void MatchCall_GetNameAndDesc_Wally(match_call_t, const u8 **, const u8 **); static void MatchCall_GetNameAndDesc_Birch(match_call_t, const u8 **, const u8 **); static void MatchCall_GetNameAndDesc_Rival(match_call_t, const u8 **, const u8 **); static void MatchCall_BufferCallMessageText(const match_call_text_data_t *, u8 *); -static void sub_81D199C(const match_call_text_data_t *, u16, u8 *); +static void MatchCall_BufferCallMessageTextByRematchTeam(const match_call_text_data_t *, u16, u8 *); static void MatchCall_GetNameAndDescByRematchIdx(u32, const u8 **, const u8 **); extern const u8 MatchCall_Text_MrStone1[]; @@ -304,9 +297,9 @@ static const match_call_text_data_t sMrStoneTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct0 sMrStoneMatchCallHeader = +static const struct MatchCallStructNPC sMrStoneMatchCallHeader = { - .type = 0, + .type = MC_TYPE_NPC, .mapSec = MAPSEC_RUSTBORO_CITY, .flag = 0xFFFF, .desc = gText_MrStoneMatchCallDesc, @@ -327,9 +320,9 @@ static const match_call_text_data_t sNormanTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sNormanMatchCallHeader = +static const struct MatchCallStructTrainer sNormanMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_PETALBURG_CITY, .flag = FLAG_ENABLE_NORMAN_MATCH_CALL, .rematchTableIdx = REMATCH_NORMAN, @@ -354,9 +347,9 @@ static const match_call_text_data_t sMomTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct0 sMomMatchCallHeader = +static const struct MatchCallStructNPC sMomMatchCallHeader = { - .type = 0, + .type = MC_TYPE_NPC, .mapSec = MAPSEC_LITTLEROOT_TOWN, .flag = FLAG_ENABLE_MOM_MATCH_CALL, .desc = gText_MomMatchCallDesc, @@ -375,9 +368,9 @@ static const match_call_text_data_t sStevenTextScripts[] = { { NULL, 0xFFFF, 0xFFFF }, }; -static const struct MatchCallStruct0 sStevenMatchCallHeader = +static const struct MatchCallStructNPC sStevenMatchCallHeader = { - .type = 0, + .type = MC_TYPE_NPC, .mapSec = MAPSEC_NONE, .flag = FLAG_REGISTERED_STEVEN_POKENAV, .desc = gText_StevenMatchCallDesc, @@ -454,7 +447,7 @@ static const match_call_text_data_t sWallyTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -const struct MatchCallSubstruct2 sWallyLocationData[] = { +const struct MatchCallLocationOverride sWallyLocationData[] = { { FLAG_HIDE_MAUVILLE_CITY_WALLY, MAPSEC_VERDANTURF_TOWN }, { FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT, MAPSEC_NONE }, { FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY, MAPSEC_VICTORY_ROAD }, @@ -484,7 +477,7 @@ static const match_call_text_data_t sScottTextScripts[] = { }; -static const struct MatchCallStruct0 sScottMatchCallHeader = +static const struct MatchCallStructNPC sScottMatchCallHeader = { .type = 0, .mapSec = MAPSEC_NONE, @@ -502,9 +495,9 @@ static const match_call_text_data_t sRoxanneTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sRoxanneMatchCallHeader = +static const struct MatchCallStructTrainer sRoxanneMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_RUSTBORO_CITY, .flag = FLAG_ENABLE_ROXANNE_MATCH_CALL, .rematchTableIdx = REMATCH_ROXANNE, @@ -521,9 +514,9 @@ static const match_call_text_data_t sBrawlyTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sBrawlyMatchCallHeader = +static const struct MatchCallStructTrainer sBrawlyMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_DEWFORD_TOWN, .flag = FLAG_ENABLE_BRAWLY_MATCH_CALL, .rematchTableIdx = REMATCH_BRAWLY, @@ -540,9 +533,9 @@ static const match_call_text_data_t sWattsonTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sWattsonMatchCallHeader = +static const struct MatchCallStructTrainer sWattsonMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_MAUVILLE_CITY, .flag = FLAG_ENABLE_WATTSON_MATCH_CALL, .rematchTableIdx = REMATCH_WATTSON, @@ -559,9 +552,9 @@ static const match_call_text_data_t sFlanneryTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sFlanneryMatchCallHeader = +static const struct MatchCallStructTrainer sFlanneryMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_LAVARIDGE_TOWN, .flag = FLAG_ENABLE_FLANNERY_MATCH_CALL, .rematchTableIdx = REMATCH_FLANNERY, @@ -578,9 +571,9 @@ static const match_call_text_data_t sWinonaTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sWinonaMatchCallHeader = +static const struct MatchCallStructTrainer sWinonaMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_FORTREE_CITY, .flag = FLAG_ENABLE_WINONA_MATCH_CALL, .rematchTableIdx = REMATCH_WINONA, @@ -597,9 +590,9 @@ static const match_call_text_data_t sTateLizaTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sTateLizaMatchCallHeader = +static const struct MatchCallStructTrainer sTateLizaMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_MOSSDEEP_CITY, .flag = FLAG_ENABLE_TATE_AND_LIZA_MATCH_CALL, .rematchTableIdx = REMATCH_TATE_AND_LIZA, @@ -616,9 +609,9 @@ static const match_call_text_data_t sJuanTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sJuanMatchCallHeader = +static const struct MatchCallStructTrainer sJuanMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_SOOTOPOLIS_CITY, .flag = FLAG_ENABLE_JUAN_MATCH_CALL, .rematchTableIdx = REMATCH_JUAN, @@ -632,9 +625,9 @@ static const match_call_text_data_t sSidneyTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sSidneyMatchCallHeader = +static const struct MatchCallStructTrainer sSidneyMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_SIDNEY, .rematchTableIdx = REMATCH_SIDNEY, @@ -648,9 +641,9 @@ static const match_call_text_data_t sPhoebeTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sPhoebeMatchCallHeader = +static const struct MatchCallStructTrainer sPhoebeMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_PHOEBE, .rematchTableIdx = REMATCH_PHOEBE, @@ -664,9 +657,9 @@ static const match_call_text_data_t sGlaciaTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sGlaciaMatchCallHeader = +static const struct MatchCallStructTrainer sGlaciaMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_GLACIA, .rematchTableIdx = REMATCH_GLACIA, @@ -680,9 +673,9 @@ static const match_call_text_data_t sDrakeTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sDrakeMatchCallHeader = +static const struct MatchCallStructTrainer sDrakeMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_DRAKE, .rematchTableIdx = REMATCH_DRAKE, @@ -696,9 +689,9 @@ static const match_call_text_data_t sWallaceTextScripts[] = { { NULL, 0xFFFF, 0xFFFF } }; -static const struct MatchCallStruct5 sWallaceMatchCallHeader = +static const struct MatchCallStructTrainer sWallaceMatchCallHeader = { - .type = 5, + .type = MC_TYPE_LEADER, .mapSec = MAPSEC_EVER_GRANDE_CITY, .flag = FLAG_REMATCH_WALLACE, .rematchTableIdx = REMATCH_WALLACE, @@ -708,86 +701,86 @@ static const struct MatchCallStruct5 sWallaceMatchCallHeader = }; static const match_call_t sMatchCallHeaders[] = { - [MC_HEADER_MR_STONE] = {.type0 = &sMrStoneMatchCallHeader}, - [MC_HEADER_PROF_BIRCH] = {.birch = &sProfBirchMatchCallHeader}, - [MC_HEADER_BRENDAN] = {.rival = &sBrendanMatchCallHeader}, - [MC_HEADER_MAY] = {.rival = &sMayMatchCallHeader}, - [MC_HEADER_WALLY] = {.wally = &sWallyMatchCallHeader}, - [MC_HEADER_NORMAN] = {.type5 = &sNormanMatchCallHeader}, - [MC_HEADER_MOM] = {.type0 = &sMomMatchCallHeader}, - [MC_HEADER_STEVEN] = {.type0 = &sStevenMatchCallHeader}, - [MC_HEADER_SCOTT] = {.type0 = &sScottMatchCallHeader}, - [MC_HEADER_ROXANNE] = {.type5 = &sRoxanneMatchCallHeader}, - [MC_HEADER_BRAWLY] = {.type5 = &sBrawlyMatchCallHeader}, - [MC_HEADER_WATTSON] = {.type5 = &sWattsonMatchCallHeader}, - [MC_HEADER_FLANNERY] = {.type5 = &sFlanneryMatchCallHeader}, - [MC_HEADER_WINONA] = {.type5 = &sWinonaMatchCallHeader}, - [MC_HEADER_TATE_LIZA] = {.type5 = &sTateLizaMatchCallHeader}, - [MC_HEADER_JUAN] = {.type5 = &sJuanMatchCallHeader}, - [MC_HEADER_SIDNEY] = {.type5 = &sSidneyMatchCallHeader}, - [MC_HEADER_PHOEBE] = {.type5 = &sPhoebeMatchCallHeader}, - [MC_HEADER_GLACIA] = {.type5 = &sGlaciaMatchCallHeader}, - [MC_HEADER_DRAKE] = {.type5 = &sDrakeMatchCallHeader}, - [MC_HEADER_WALLACE] = {.type5 = &sWallaceMatchCallHeader} + [MC_HEADER_MR_STONE] = {.npc = &sMrStoneMatchCallHeader}, + [MC_HEADER_PROF_BIRCH] = {.birch = &sProfBirchMatchCallHeader}, + [MC_HEADER_BRENDAN] = {.rival = &sBrendanMatchCallHeader}, + [MC_HEADER_MAY] = {.rival = &sMayMatchCallHeader}, + [MC_HEADER_WALLY] = {.wally = &sWallyMatchCallHeader}, + [MC_HEADER_NORMAN] = {.leader = &sNormanMatchCallHeader}, + [MC_HEADER_MOM] = {.npc = &sMomMatchCallHeader}, + [MC_HEADER_STEVEN] = {.npc = &sStevenMatchCallHeader}, + [MC_HEADER_SCOTT] = {.npc = &sScottMatchCallHeader}, + [MC_HEADER_ROXANNE] = {.leader = &sRoxanneMatchCallHeader}, + [MC_HEADER_BRAWLY] = {.leader = &sBrawlyMatchCallHeader}, + [MC_HEADER_WATTSON] = {.leader = &sWattsonMatchCallHeader}, + [MC_HEADER_FLANNERY] = {.leader = &sFlanneryMatchCallHeader}, + [MC_HEADER_WINONA] = {.leader = &sWinonaMatchCallHeader}, + [MC_HEADER_TATE_LIZA] = {.leader = &sTateLizaMatchCallHeader}, + [MC_HEADER_JUAN] = {.leader = &sJuanMatchCallHeader}, + [MC_HEADER_SIDNEY] = {.leader = &sSidneyMatchCallHeader}, + [MC_HEADER_PHOEBE] = {.leader = &sPhoebeMatchCallHeader}, + [MC_HEADER_GLACIA] = {.leader = &sGlaciaMatchCallHeader}, + [MC_HEADER_DRAKE] = {.leader = &sDrakeMatchCallHeader}, + [MC_HEADER_WALLACE] = {.leader = &sWallaceMatchCallHeader} }; -static bool32 (*const sMatchCallGetFlagFuncs[])(match_call_t) = { - MatchCallGetFlag_Type0, - MatchCallGetFlag_Type1, - MatchCallGetFlag_Wally, - MatchCallGetFlag_Rival, - MatchCallGetFlag_Birch +static bool32 (*const sMatchCallGetEnabledFuncs[])(match_call_t) = { + MatchCall_GetEnabled_NPC, + MatchCall_GetEnabled_Trainer, + MatchCall_GetEnabled_Wally, + MatchCall_GetEnabled_Rival, + MatchCall_GetEnabled_Birch }; static u8 (*const sMatchCallGetMapSecFuncs[])(match_call_t) = { - MatchCallGetMapSec_Type0, - MatchCallGetMapSec_Type1, - MatchCallGetMapSec_Wally, - MatchCallGetMapSec_Rival, - MatchCallGetMapSec_Birch + MatchCall_GetMapSec_NPC, + MatchCall_GetMapSec_Trainer, + MatchCall_GetMapSec_Wally, + MatchCall_GetMapSec_Rival, + MatchCall_GetMapSec_Birch }; static bool32 (*const sMatchCall_IsRematchableFunctions[])(match_call_t) = { - MatchCall_IsRematchable_Type0, - MatchCall_IsRematchable_Type1, + MatchCall_IsRematchable_NPC, + MatchCall_IsRematchable_Trainer, MatchCall_IsRematchable_Wally, MatchCall_IsRematchable_Rival, MatchCall_IsRematchable_Birch }; static bool32 (*const sMatchCall_HasCheckPageFunctions[])(match_call_t) = { - MatchCall_HasCheckPage_Type0, - MatchCall_HasCheckPage_Type1, + MatchCall_HasCheckPage_NPC, + MatchCall_HasCheckPage_Trainer, MatchCall_HasCheckPage_Wally, MatchCall_HasCheckPage_Rival, MatchCall_HasCheckPage_Birch }; static u32 (*const sMatchCall_GetRematchTableIdxFunctions[])(match_call_t) = { - MatchCall_GetRematchTableIdx_Type0, - MatchCall_GetRematchTableIdx_Type1, + MatchCall_GetRematchTableIdx_NPC, + MatchCall_GetRematchTableIdx_Trainer, MatchCall_GetRematchTableIdx_Wally, MatchCall_GetRematchTableIdx_Rival, MatchCall_GetRematchTableIdx_Birch }; static void (*const sMatchCall_GetMessageFunctions[])(match_call_t, u8 *) = { - MatchCall_GetMessage_Type0, - MatchCall_GetMessage_Type1, + MatchCall_GetMessage_NPC, + MatchCall_GetMessage_Trainer, MatchCall_GetMessage_Wally, MatchCall_GetMessage_Rival, MatchCall_GetMessage_Birch }; static void (*const sMatchCall_GetNameAndDescFunctions[])(match_call_t, const u8 **, const u8 **) = { - MatchCall_GetNameAndDesc_Type0, - MatchCall_GetNameAndDesc_Type1, + MatchCall_GetNameAndDesc_NPC, + MatchCall_GetNameAndDesc_Trainer, MatchCall_GetNameAndDesc_Wally, MatchCall_GetNameAndDesc_Rival, MatchCall_GetNameAndDesc_Birch }; -static const struct MatchCallOverride sMatchCallCheckPageOverrides[] = { +static const struct MatchCallCheckPageOverride sCheckPageOverrides[] = { { .idx = MC_HEADER_STEVEN, .facilityClass = FACILITY_CLASS_STEVEN, @@ -830,11 +823,11 @@ static u32 MatchCallGetFunctionIndex(match_call_t matchCall) { switch (matchCall.common->type) { - case MC_TYPE_0: default: + case MC_TYPE_NPC: return 0; - case MC_TYPE_1: - case MC_TYPE_5: + case MC_TYPE_TRAINER: + case MC_TYPE_LEADER: return 1; case MC_TYPE_WALLY: return 2; @@ -862,40 +855,40 @@ s32 GetRematchIdxByTrainerIdx(s32 trainerIdx) return -1; } -bool32 MatchCallFlagGetByIndex(u32 idx) +bool32 MatchCall_GetEnabled(u32 idx) { match_call_t matchCall; u32 i; - if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1) + if (idx >= ARRAY_COUNT(sMatchCallHeaders)) return FALSE; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); - return sMatchCallGetFlagFuncs[i](matchCall); + return sMatchCallGetEnabledFuncs[i](matchCall); } -static bool32 MatchCallGetFlag_Type0(match_call_t matchCall) +static bool32 MatchCall_GetEnabled_NPC(match_call_t matchCall) { - if (matchCall.type0->flag == 0xFFFF) + if (matchCall.npc->flag == 0xFFFF) return TRUE; - return FlagGet(matchCall.type0->flag); + return FlagGet(matchCall.npc->flag); } -static bool32 MatchCallGetFlag_Type1(match_call_t matchCall) +static bool32 MatchCall_GetEnabled_Trainer(match_call_t matchCall) { - if (matchCall.type1->flag == 0xFFFF) + if (matchCall.trainer->flag == 0xFFFF) return TRUE; - return FlagGet(matchCall.type1->flag); + return FlagGet(matchCall.trainer->flag); } -static bool32 MatchCallGetFlag_Wally(match_call_t matchCall) +static bool32 MatchCall_GetEnabled_Wally(match_call_t matchCall) { if (matchCall.wally->flag == 0xFFFF) return TRUE; return FlagGet(matchCall.wally->flag); } -static bool32 MatchCallGetFlag_Rival(match_call_t matchCall) +static bool32 MatchCall_GetEnabled_Rival(match_call_t matchCall) { if (matchCall.rival->playerGender != gSaveBlock2Ptr->playerGender) return FALSE; @@ -904,34 +897,34 @@ static bool32 MatchCallGetFlag_Rival(match_call_t matchCall) return FlagGet(matchCall.rival->flag); } -static bool32 MatchCallGetFlag_Birch(match_call_t matchCall) +static bool32 MatchCall_GetEnabled_Birch(match_call_t matchCall) { return FlagGet(matchCall.birch->flag); } -u8 MatchCallMapSecGetByIndex(u32 idx) +u8 MatchCall_GetMapSec(u32 idx) { match_call_t matchCall; u32 i; - if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1) + if (idx >= ARRAY_COUNT(sMatchCallHeaders)) return 0; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); return sMatchCallGetMapSecFuncs[i](matchCall); } -static u8 MatchCallGetMapSec_Type0(match_call_t matchCall) +static u8 MatchCall_GetMapSec_NPC(match_call_t matchCall) { - return matchCall.type0->mapSec; + return matchCall.npc->mapSec; } -static u8 MatchCallGetMapSec_Type1(match_call_t matchCall) +static u8 MatchCall_GetMapSec_Trainer(match_call_t matchCall) { - return matchCall.type1->mapSec; + return matchCall.trainer->mapSec; } -static u8 MatchCallGetMapSec_Wally(match_call_t matchCall) +static u8 MatchCall_GetMapSec_Wally(match_call_t matchCall) { s32 i; @@ -943,12 +936,12 @@ static u8 MatchCallGetMapSec_Wally(match_call_t matchCall) return matchCall.wally->locationData[i].mapSec; } -static u8 MatchCallGetMapSec_Rival(match_call_t matchCall) +static u8 MatchCall_GetMapSec_Rival(match_call_t matchCall) { return MAPSEC_NONE; } -static u8 MatchCallGetMapSec_Birch(match_call_t matchCall) +static u8 MatchCall_GetMapSec_Birch(match_call_t matchCall) { return MAPSEC_NONE; } @@ -958,23 +951,23 @@ bool32 MatchCall_IsRematchable(u32 idx) match_call_t matchCall; u32 i; - if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1) + if (idx >= ARRAY_COUNT(sMatchCallHeaders)) return 0; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); return sMatchCall_IsRematchableFunctions[i](matchCall); } -static bool32 MatchCall_IsRematchable_Type0(match_call_t matchCall) +static bool32 MatchCall_IsRematchable_NPC(match_call_t matchCall) { return FALSE; } -static bool32 MatchCall_IsRematchable_Type1(match_call_t matchCall) +static bool32 MatchCall_IsRematchable_Trainer(match_call_t matchCall) { - if (matchCall.type1->rematchTableIdx >= REMATCH_ELITE_FOUR_ENTRIES) + if (matchCall.trainer->rematchTableIdx >= REMATCH_ELITE_FOUR_ENTRIES) return FALSE; - return gSaveBlock1Ptr->trainerRematches[matchCall.type1->rematchTableIdx] ? TRUE : FALSE; + return gSaveBlock1Ptr->trainerRematches[matchCall.trainer->rematchTableIdx] ? TRUE : FALSE; } static bool32 MatchCall_IsRematchable_Wally(match_call_t matchCall) @@ -997,26 +990,26 @@ bool32 MatchCall_HasCheckPage(u32 idx) match_call_t matchCall; u32 i; - if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1) + if (idx >= ARRAY_COUNT(sMatchCallHeaders)) return FALSE; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); if (sMatchCall_HasCheckPageFunctions[i](matchCall)) return TRUE; - for (i = 0; i < ARRAY_COUNT(sMatchCallCheckPageOverrides); i++) + for (i = 0; i < ARRAY_COUNT(sCheckPageOverrides); i++) { - if (sMatchCallCheckPageOverrides[i].idx == idx) + if (sCheckPageOverrides[i].idx == idx) return TRUE; } return FALSE; } -static bool32 MatchCall_HasCheckPage_Type0(match_call_t matchCall) +static bool32 MatchCall_HasCheckPage_NPC(match_call_t matchCall) { return FALSE; } -static bool32 MatchCall_HasCheckPage_Type1(match_call_t matchCall) +static bool32 MatchCall_HasCheckPage_Trainer(match_call_t matchCall) { return TRUE; } @@ -1041,21 +1034,21 @@ u32 MatchCall_GetRematchTableIdx(u32 idx) match_call_t matchCall; u32 i; - if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1) + if (idx >= ARRAY_COUNT(sMatchCallHeaders)) return REMATCH_TABLE_ENTRIES; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); return sMatchCall_GetRematchTableIdxFunctions[i](matchCall); } -static u32 MatchCall_GetRematchTableIdx_Type0(match_call_t matchCall) +static u32 MatchCall_GetRematchTableIdx_NPC(match_call_t matchCall) { return REMATCH_TABLE_ENTRIES; } -static u32 MatchCall_GetRematchTableIdx_Type1(match_call_t matchCall) +static u32 MatchCall_GetRematchTableIdx_Trainer(match_call_t matchCall) { - return matchCall.type1->rematchTableIdx; + return matchCall.trainer->rematchTableIdx; } static u32 MatchCall_GetRematchTableIdx_Wally(match_call_t matchCall) @@ -1078,24 +1071,25 @@ void MatchCall_GetMessage(u32 idx, u8 *dest) match_call_t matchCall; u32 i; - if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1) + if (idx >= ARRAY_COUNT(sMatchCallHeaders)) return; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); sMatchCall_GetMessageFunctions[i](matchCall, dest); } -static void MatchCall_GetMessage_Type0(match_call_t matchCall, u8 *dest) +static void MatchCall_GetMessage_NPC(match_call_t matchCall, u8 *dest) { - MatchCall_BufferCallMessageText(matchCall.type0->textData, dest); + MatchCall_BufferCallMessageText(matchCall.npc->textData, dest); } -static void MatchCall_GetMessage_Type1(match_call_t matchCall, u8 *dest) +// This is the one functional difference between MC_TYPE_TRAINER and MC_TYPE_LEADER +static void MatchCall_GetMessage_Trainer(match_call_t matchCall, u8 *dest) { - if (matchCall.common->type != MC_TYPE_5) - MatchCall_BufferCallMessageText(matchCall.type1->textData, dest); + if (matchCall.common->type != MC_TYPE_LEADER) + MatchCall_BufferCallMessageText(matchCall.trainer->textData, dest); else - sub_81D199C(matchCall.type5->textData, matchCall.type5->rematchTableIdx, dest); + MatchCall_BufferCallMessageTextByRematchTeam(matchCall.leader->textData, matchCall.leader->rematchTableIdx, dest); } static void MatchCall_GetMessage_Wally(match_call_t matchCall, u8 *dest) @@ -1110,7 +1104,7 @@ static void MatchCall_GetMessage_Rival(match_call_t matchCall, u8 *dest) static void MatchCall_GetMessage_Birch(match_call_t matchCall, u8 *dest) { - sub_8197080(dest); + BufferPokedexRatingForMatchCall(dest); } static void MatchCall_BufferCallMessageText(const match_call_text_data_t *textData, u8 *dest) @@ -1131,7 +1125,7 @@ static void MatchCall_BufferCallMessageText(const match_call_text_data_t *textDa StringExpandPlaceholders(dest, textData[i].text); } -static void sub_81D199C(const match_call_text_data_t *textData, u16 idx, u8 *dest) +static void MatchCall_BufferCallMessageTextByRematchTeam(const match_call_text_data_t *textData, u16 idx, u8 *dest) { u32 i; for (i = 0; textData[i].text != NULL; i++) @@ -1168,32 +1162,32 @@ static void sub_81D199C(const match_call_text_data_t *textData, u16 idx, u8 *des } } -void sub_81D1A78(u32 idx, const u8 **desc, const u8 **name) +void MatchCall_GetNameAndDesc(u32 idx, const u8 **desc, const u8 **name) { match_call_t matchCall; u32 i; - if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1) + if (idx >= ARRAY_COUNT(sMatchCallHeaders)) return; matchCall = sMatchCallHeaders[idx]; i = MatchCallGetFunctionIndex(matchCall); sMatchCall_GetNameAndDescFunctions[i](matchCall, desc, name); } -static void MatchCall_GetNameAndDesc_Type0(match_call_t matchCall, const u8 **desc, const u8 **name) +static void MatchCall_GetNameAndDesc_NPC(match_call_t matchCall, const u8 **desc, const u8 **name) { - *desc = matchCall.type0->desc; - *name = matchCall.type0->name; + *desc = matchCall.npc->desc; + *name = matchCall.npc->name; } -static void MatchCall_GetNameAndDesc_Type1(match_call_t matchCall, const u8 **desc, const u8 **name) +static void MatchCall_GetNameAndDesc_Trainer(match_call_t matchCall, const u8 **desc, const u8 **name) { match_call_t _matchCall = matchCall; - if (_matchCall.type1->name == NULL) - MatchCall_GetNameAndDescByRematchIdx(_matchCall.type1->rematchTableIdx, desc, name); + if (_matchCall.trainer->name == NULL) + MatchCall_GetNameAndDescByRematchIdx(_matchCall.trainer->rematchTableIdx, desc, name); else - *name = _matchCall.type1->name; - *desc = _matchCall.type1->desc; + *name = _matchCall.trainer->name; + *desc = _matchCall.trainer->desc; } static void MatchCall_GetNameAndDesc_Wally(match_call_t matchCall, const u8 **desc, const u8 **name) @@ -1225,21 +1219,21 @@ const u8 *MatchCall_GetOverrideFlavorText(u32 idx, u32 offset) { u32 i; - for (i = 0; i < ARRAY_COUNT(sMatchCallCheckPageOverrides); i++) + for (i = 0; i < ARRAY_COUNT(sCheckPageOverrides); i++) { - if (sMatchCallCheckPageOverrides[i].idx == idx) + if (sCheckPageOverrides[i].idx == idx) { while (1) { - if (i + 1 >= ARRAY_COUNT(sMatchCallCheckPageOverrides)) + if (i + 1 >= ARRAY_COUNT(sCheckPageOverrides)) break; - if (sMatchCallCheckPageOverrides[i + 1].idx != idx) + if (sCheckPageOverrides[i + 1].idx != idx) break; - if (!FlagGet(sMatchCallCheckPageOverrides[i + 1].flag)) + if (!FlagGet(sCheckPageOverrides[i + 1].flag)) break; i++; } - return sMatchCallCheckPageOverrides[i].flavorTexts[offset]; + return sCheckPageOverrides[i].flavorTexts[offset]; } } return NULL; @@ -1249,15 +1243,15 @@ int MatchCall_GetOverrideFacilityClass(u32 idx) { u32 i; - for (i = 0; i < ARRAY_COUNT(sMatchCallCheckPageOverrides); i++) + for (i = 0; i < ARRAY_COUNT(sCheckPageOverrides); i++) { - if (sMatchCallCheckPageOverrides[i].idx == idx) - return sMatchCallCheckPageOverrides[i].facilityClass; + if (sCheckPageOverrides[i].idx == idx) + return sCheckPageOverrides[i].facilityClass; } return -1; } -bool32 sub_81D1BF8(u32 idx) +bool32 MatchCall_HasRematchId(u32 idx) { int i; diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 552bf2cb7..f6546ec50 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -91,7 +91,7 @@ u32 LoopedTask_sub_81C83F0(s32 state); u32 LoopedTask_sub_81C85A0(s32 state); u32 LoopedTask_sub_81C8870(s32 state); u32 LoopedTask_sub_81C8A28(s32 state); -u32 LoopedTask_sub_81C8958(s32 state); +u32 LoopedTask_PrintCheckPageInfo(s32 state); static const u16 sMatchcallArrowPaletteData[] = INCBIN_U16("graphics/pokenav/arrows_matchcall.gbapal"); static const u32 sMatchcallArrowSpriteSheetData[] = INCBIN_U32("graphics/pokenav/arrows_matchcall.4bpp.lz"); @@ -467,12 +467,12 @@ void sub_81C877C(void) structPtr->unk8A0 = CreateLoopedTask(LoopedTask_sub_81C8870, 6); } -void sub_81C87AC(s16 a0) +void PrintCheckPageInfo(s16 a0) { struct PokenavSub17 *structPtr = GetSubstructPtr(17); structPtr->unk888.windowTopIndex += a0; structPtr->unk89C = 0; - structPtr->unk8A0 = CreateLoopedTask(LoopedTask_sub_81C8958, 6); + structPtr->unk8A0 = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6); } void sub_81C87F0(void) @@ -496,6 +496,7 @@ void sub_81C8838(void) CopyWindowToVram(structPtr->unk0.unk0.windowId, 1); } +// TODO: u32 LoopedTask_sub_81C8870(s32 state) { struct PokenavSub17 *structPtr = GetSubstructPtr(17); @@ -543,7 +544,7 @@ u32 LoopedTask_sub_81C8870(s32 state) return LT_FINISH; } -u32 LoopedTask_sub_81C8958(s32 state) +u32 LoopedTask_PrintCheckPageInfo(s32 state) { struct PokenavSub17 *structPtr = GetSubstructPtr(17); if (IsDma3ManagerBusyWithBgCopy()) @@ -683,7 +684,7 @@ void sub_81C8B70(struct UnknownSubSubStruct_0203CF40 *a0, s32 a1, s32 a2) } for (a2--; a2 != -1; a1 = (a1 + 1) & 0xF, a2--) - sub_81CBD48(a0->windowId, a1); + ClearRematchPokeballIcon(a0->windowId, a1); CopyWindowToVram(a0->windowId, 1); } diff --git a/src/pokenav_unk_1.c b/src/pokenav_unk_1.c index 7d531c2f7..8bf3ebd2a 100644 --- a/src/pokenav_unk_1.c +++ b/src/pokenav_unk_1.c @@ -64,7 +64,7 @@ bool32 PokenavCallback_Init_0(void) state->menuType = GetPokenavMainMenuType(); state->cursorPos = 0; state->descriptionId = 0; - state->helpBarIndex = 0; + state->helpBarIndex = HELPBAR_NONE; sub_81C939C(state); return TRUE; } @@ -78,7 +78,7 @@ bool32 PokenavCallback_Init_4(void) state->menuType = GetPokenavMainMenuType(); state->cursorPos = 2; state->descriptionId = 2; - state->helpBarIndex = 0; + state->helpBarIndex = HELPBAR_NONE; sub_81C939C(state); return TRUE; } @@ -105,7 +105,7 @@ bool32 PokenavCallback_Init_2(void) state->menuType = 3; state->cursorPos = 0; state->descriptionId = 5; - state->helpBarIndex = 0; + state->helpBarIndex = HELPBAR_NONE; sub_81C939C(state); return TRUE; } @@ -119,7 +119,7 @@ bool32 PokenavCallback_Init_3(void) state->menuType = 4; state->cursorPos = sub_81C76AC(); state->descriptionId = state->cursorPos + 8; - state->helpBarIndex = 0; + state->helpBarIndex = HELPBAR_NONE; sub_81C939C(state); return TRUE; } @@ -179,7 +179,7 @@ static u32 sub_81C943C(struct Pokenav1Struct *a0) switch (sDescriptionIds[a0->menuType][a0->cursorPos]) { case 0: - a0->helpBarIndex = gSaveBlock2Ptr->regionMapZoom ? 2 : 1; + a0->helpBarIndex = gSaveBlock2Ptr->regionMapZoom ? HELPBAR_MAP_ZOOMED_IN : HELPBAR_MAP_ZOOMED_OUT; sub_81C97B0(a0, POKENAV_MENU_6); return 8; case 1: @@ -189,13 +189,13 @@ static u32 sub_81C943C(struct Pokenav1Struct *a0) a0->callback = sub_81C963C; return 2; case 2: - a0->helpBarIndex = 6; + a0->helpBarIndex = HELPBAR_MC_TRAINER_LIST; sub_81C97B0(a0, POKENAV_MENU_B); return 8; case 3: if (CanViewRibbonsMenu()) { - a0->helpBarIndex = 9; + a0->helpBarIndex = HELPBAR_RIBBONS_MON_LIST; sub_81C97B0(a0, POKENAV_MENU_C); return 8; } @@ -224,7 +224,7 @@ static u32 sub_81C9520(struct Pokenav1Struct *a0) { if (sDescriptionIds[a0->menuType][a0->cursorPos] == 2) { - a0->helpBarIndex = 6; + a0->helpBarIndex = HELPBAR_MC_TRAINER_LIST; sub_81C97B0(a0, POKENAV_MENU_B); return 8; } @@ -259,7 +259,7 @@ static u32 sub_81C9588(struct Pokenav1Struct *a0) } else if (v0 == 2) { - a0->helpBarIndex = 6; + a0->helpBarIndex = HELPBAR_MC_TRAINER_LIST; sub_81C97B0(a0, POKENAV_MENU_B); return 8; } @@ -349,7 +349,7 @@ static u32 sub_81C96FC(struct Pokenav1Struct *a0) { sub_81C7694(v0 - 8); sub_81C97B0(a0, POKENAV_MENU_8); - a0->helpBarIndex = 3; + a0->helpBarIndex = HELPBAR_CONDITION_MON_LIST; return 8; } else @@ -459,7 +459,7 @@ int sub_81C98B4(void) return state->descriptionId; } -u16 sub_81C98C4(void) +u16 GetHelpBarTextId(void) { struct Pokenav1Struct *state = GetSubstructPtr(1); return state->helpBarIndex; diff --git a/src/pokenav_unk_10.c b/src/pokenav_unk_10.c index 0d82f1a9c..761f65c4b 100644 --- a/src/pokenav_unk_10.c +++ b/src/pokenav_unk_10.c @@ -576,7 +576,7 @@ u32 sub_81D0A6C(s32 state) return LT_PAUSE; case 7: sub_81D12D8(structPtr); - sub_81C7BA4(10); + PrintHelpBarText(HELPBAR_RIBBONS_LIST); return LT_INC_AND_PAUSE; case 8: if (!IsDma3ManagerBusyWithBgCopy()) @@ -670,7 +670,7 @@ u32 sub_81D0D2C(s32 state) if (!sub_81D1524(structPtr)) { sub_81D0EFC(structPtr); - sub_81C7BA4(11); + PrintHelpBarText(HELPBAR_RIBBONS_CHECK); return LT_INC_AND_PAUSE; } return LT_PAUSE; @@ -724,7 +724,7 @@ u32 sub_81D0E00(s32 state) if (!sub_81D1524(structPtr)) { sub_81D0E84(structPtr); - sub_81C7BA4(10); + PrintHelpBarText(HELPBAR_RIBBONS_LIST); return LT_INC_AND_PAUSE; } return LT_PAUSE; diff --git a/src/pokenav_unk_2.c b/src/pokenav_unk_2.c index ed9da0800..39c1f09a5 100644 --- a/src/pokenav_unk_2.c +++ b/src/pokenav_unk_2.c @@ -707,10 +707,10 @@ static u32 sub_81C9F28(s32 state) switch (state) { case 0: - sub_81C7BA4(sub_81C98C4()); + PrintHelpBarText(GetHelpBarTextId()); return LT_INC_AND_PAUSE; case 1: - if (IsDma3ManagerBusyWithBgCopy_()) + if (WaitForHelpBar()) return LT_PAUSE; sub_81C7880(); sub_81CA9C8(); diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c index 6289bd2cb..183c2e424 100755 --- a/src/pokenav_unk_3.c +++ b/src/pokenav_unk_3.c @@ -15,17 +15,18 @@ #include "constants/flags.h" #include "constants/songs.h" -//#define ?? id1 -#define mapSec id2 // naming multi-purpose field -#define headerId data // naming multi-purpose field +// naming multi-purpose fields +#define isSpecialTrainer id1 // Gym Leaders, for example. As opposed to regular NPC +#define mapSec id2 +#define headerId data struct Pokenav3Struct { - u16 unk0; - u16 unk2; + u16 optionCursorPos; + u16 maxOptionId; const u8 *matchCallOptions; u16 headerId; - u16 unkA; + u16 numRegistered; u16 unkC; u32 unk10; u32 unk14; @@ -35,9 +36,9 @@ struct Pokenav3Struct static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *); static u32 sub_81CABFC(struct Pokenav3Struct *); -static u32 sub_81CAC04(struct Pokenav3Struct *); -static u32 sub_81CACB8(struct Pokenav3Struct *); -static u32 sub_81CACF8(struct Pokenav3Struct *); +static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *); +static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *); +static u32 CB2_HandleCallInput(struct Pokenav3Struct *); static u32 sub_81CAD20(s32); static bool32 sub_81CB1D0(void); @@ -95,18 +96,19 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) if (gMain.newKeys & A_BUTTON) { - state->callback = sub_81CAC04; - state->unk0 = 0; + state->callback = CB2_HandleMatchCallOptionsInput; + state->optionCursorPos = 0; selection = GetSelectedMatchCall(); - if (!state->matchCallEntries[selection].id1 || MatchCall_HasCheckPage(state->matchCallEntries[selection].headerId)) + + if (!state->matchCallEntries[selection].isSpecialTrainer || MatchCall_HasCheckPage(state->matchCallEntries[selection].headerId)) { state->matchCallOptions = sMatchCallOptionsHasCheckPage; - state->unk2 = 2; + state->maxOptionId = ARRAY_COUNT(sMatchCallOptionsHasCheckPage) - 1; } else { state->matchCallOptions = sMatchCallOptionsNoCheckPage; - state->unk2 = 1; + state->maxOptionId = ARRAY_COUNT(sMatchCallOptionsNoCheckPage) - 1; } return POKENAV_MC_FUNC_SELECT; @@ -134,68 +136,68 @@ static u32 sub_81CABFC(struct Pokenav3Struct *state) return POKENAV_MENU_4; } -static u32 sub_81CAC04(struct Pokenav3Struct *state) +static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state) { - if ((gMain.newKeys & DPAD_UP) && state->unk0) + if ((gMain.newKeys & DPAD_UP) && state->optionCursorPos) { - state->unk0--; - return POKENAV_MC_FUNC_6; + state->optionCursorPos--; + return POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR; } - if ((gMain.newKeys & DPAD_DOWN) && state->unk0 < state->unk2) + if ((gMain.newKeys & DPAD_DOWN) && state->optionCursorPos < state->maxOptionId) { - state->unk0++; - return POKENAV_MC_FUNC_6; + state->optionCursorPos++; + return POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR; } if (gMain.newKeys & A_BUTTON) { - switch (state->matchCallOptions[state->unk0]) + switch (state->matchCallOptions[state->optionCursorPos]) { case MATCH_CALL_OPTION_CANCEL: state->callback = CB2_HandleMatchCallInput; - return POKENAV_MC_FUNC_7; + return POKENAV_MC_FUNC_CANCEL; case MATCH_CALL_OPTION_CALL: if (GetPokenavMode() == POKENAV_MODE_FORCE_CALL_READY) SetPokenavMode(POKENAV_MODE_FORCE_CALL_EXIT); - state->callback = sub_81CACF8; + state->callback = CB2_HandleCallInput; if (sub_81CB1D0()) return POKENAV_MC_FUNC_NEARBY_MSG; return POKENAV_MC_FUNC_CALL_MSG; case MATCH_CALL_OPTION_CHECK: - state->callback = sub_81CACB8; - return POKENAV_MC_FUNC_11; + state->callback = CB2_HandleCheckPageInput; + return POKENAV_MC_FUNC_SHOW_CHECK_PAGE; } } if (gMain.newKeys & B_BUTTON) { state->callback = CB2_HandleMatchCallInput; - return POKENAV_MC_FUNC_7; + return POKENAV_MC_FUNC_CANCEL; } return POKENAV_MC_FUNC_NONE; } -static u32 sub_81CACB8(struct Pokenav3Struct *state) +static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *state) { if (gMain.newAndRepeatedKeys & DPAD_UP) - return POKENAV_MC_FUNC_12; + return POKENAV_MC_FUNC_CHECK_PAGE_UP; if (gMain.newAndRepeatedKeys & DPAD_DOWN) - return POKENAV_MC_FUNC_13; + return POKENAV_MC_FUNC_CHECK_PAGE_DOWN; if (gMain.newKeys & B_BUTTON) { state->callback = CB2_HandleMatchCallInput; - return POKENAV_MC_FUNC_14; + return POKENAV_MC_FUNC_EXIT_CHECK_PAGE; } return POKENAV_MC_FUNC_NONE; } -static u32 sub_81CACF8(struct Pokenav3Struct *state) +static u32 CB2_HandleCallInput(struct Pokenav3Struct *state) { if (gMain.newKeys & (A_BUTTON | B_BUTTON)) { @@ -214,17 +216,17 @@ static u32 sub_81CAD20(s32 taskState) { case 0: state->headerId = 0; - state->unkA = 0; + state->numRegistered = 0; return LT_INC_AND_CONTINUE; case 1: for (i = 0, j = state->headerId; i < 30; i++, j++) { - if (MatchCallFlagGetByIndex(j)) + if (MatchCall_GetEnabled(j)) { - state->matchCallEntries[state->unkA].headerId = j; - state->matchCallEntries[state->unkA].id1 = TRUE; - state->matchCallEntries[state->unkA].mapSec = MatchCallMapSecGetByIndex(j); - state->unkA++; + state->matchCallEntries[state->numRegistered].headerId = j; + state->matchCallEntries[state->numRegistered].isSpecialTrainer = TRUE; + state->matchCallEntries[state->numRegistered].mapSec = MatchCall_GetMapSec(j); + state->numRegistered++; } if (++state->headerId >= MC_HEADER_COUNT) @@ -239,12 +241,12 @@ static u32 sub_81CAD20(s32 taskState) case 2: for (i = 0, j = state->headerId; i < 30; i++, j++) { - if (!sub_81D1BF8(state->headerId) && IsRematchEntryRegistered(state->headerId)) + if (!MatchCall_HasRematchId(state->headerId) && IsRematchEntryRegistered(state->headerId)) { - state->matchCallEntries[state->unkA].headerId = state->headerId; - state->matchCallEntries[state->unkA].id1 = FALSE; - state->matchCallEntries[state->unkA].mapSec = sub_81CB0C8(j); - state->unkA++; + state->matchCallEntries[state->numRegistered].headerId = state->headerId; + state->matchCallEntries[state->numRegistered].isSpecialTrainer = FALSE; + state->matchCallEntries[state->numRegistered].mapSec = sub_81CB0C8(j); + state->numRegistered++; } if (++state->headerId > REMATCH_TABLE_ENTRIES - 1) @@ -274,10 +276,10 @@ int sub_81CAE28(void) return state->unk10; } -int sub_81CAE38(void) +int GetNumberRegistered(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); - return state->unkA; + return state->numRegistered; } int sub_81CAE48(void) @@ -289,14 +291,14 @@ int sub_81CAE48(void) int unref_sub_81CAE58(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); - return state->unkA - state->unkC; + return state->numRegistered - state->unkC; } int unref_sub_81CAE6C(int arg0) { struct Pokenav3Struct *state = GetSubstructPtr(5); arg0 += state->unkC; - if (arg0 >= state->unkA) + if (arg0 >= state->numRegistered) return REMATCH_TABLE_ENTRIES; return state->matchCallEntries[arg0].headerId; @@ -308,16 +310,16 @@ struct PokenavMonList *sub_81CAE94(void) return state->matchCallEntries; } -u16 sub_81CAEA4(int index) +u16 GetMatchCallMapSec(int index) { struct Pokenav3Struct *state = GetSubstructPtr(5); return state->matchCallEntries[index].mapSec; } -bool32 sub_81CAEBC(int index) +bool32 ShouldDrawRematchPokeballIcon(int index) { struct Pokenav3Struct *state = GetSubstructPtr(5); - if (!state->matchCallEntries[index].id1) + if (!state->matchCallEntries[index].isSpecialTrainer) index = state->matchCallEntries[index].headerId; else index = MatchCall_GetRematchTableIdx(state->matchCallEntries[index].headerId); @@ -332,7 +334,7 @@ int GetMatchCallTrainerPic(int index) { int var0; struct Pokenav3Struct *state = GetSubstructPtr(5); - if (!state->matchCallEntries[index].id1) + if (!state->matchCallEntries[index].isSpecialTrainer) { index = GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId); return gTrainers[index].trainerPic; @@ -357,7 +359,7 @@ const u8 *GetMatchCallMessageText(int index, u8 *arg1) if (!Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType)) return gText_CallCantBeMadeHere; - if (!state->matchCallEntries[index].id1) + if (!state->matchCallEntries[index].isSpecialTrainer) *arg1 = SelectMatchCallMessage(GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId), gStringVar4); else MatchCall_GetMessage(state->matchCallEntries[index].headerId, gStringVar4); @@ -369,7 +371,7 @@ const u8 *GetMatchCallFlavorText(int index, int checkPageEntry) { int rematchId; struct Pokenav3Struct *state = GetSubstructPtr(5); - if (state->matchCallEntries[index].id1) + if (state->matchCallEntries[index].isSpecialTrainer) { rematchId = MatchCall_GetRematchTableIdx(state->matchCallEntries[index].headerId); if (rematchId == REMATCH_TABLE_ENTRIES) @@ -383,28 +385,28 @@ const u8 *GetMatchCallFlavorText(int index, int checkPageEntry) return gMatchCallFlavorTexts[rematchId][checkPageEntry]; } -u16 sub_81CB01C(void) +u16 GetMatchCallOptionCursorPos(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); - return state->unk0; + return state->optionCursorPos; } -u16 sub_81CB02C(int arg0) +u16 GetMatchCallOptionId(int optionId) { struct Pokenav3Struct *state = GetSubstructPtr(5); - if (state->unk2 < arg0) + if (state->maxOptionId < optionId) return MATCH_CALL_OPTION_COUNT; - return state->matchCallOptions[arg0]; + return state->matchCallOptions[optionId]; } -void sub_81CB050(struct PokenavMonList * arg0, u8 *str) +void BufferMatchCallNameAndDesc(struct PokenavMonList *matchCallEntry, u8 *str) { const u8 *trainerName; const u8 *className; - if (!arg0->id1) + if (!matchCallEntry->isSpecialTrainer) { - int index = GetTrainerIdxByRematchIdx(arg0->headerId); + int index = GetTrainerIdxByRematchIdx(matchCallEntry->headerId); const struct Trainer *trainer = &gTrainers[index]; int class = trainer->trainerClass; className = gTrainerClassNames[class]; @@ -412,7 +414,7 @@ void sub_81CB050(struct PokenavMonList * arg0, u8 *str) } else { - sub_81D1A78(arg0->headerId, &className, &trainerName); + MatchCall_GetNameAndDesc(matchCallEntry->headerId, &className, &trainerName); } if (className && trainerName) @@ -433,13 +435,13 @@ u8 sub_81CB0C8(int rematchIndex) return Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum)->regionMapSectionId; } -int sub_81CB0E4(int index) +int GetIndexDeltaOfNextCheckPageDown(int index) { struct Pokenav3Struct *state = GetSubstructPtr(5); int count = 1; - while (++index < state->unkA) + while (++index < state->numRegistered) { - if (!state->matchCallEntries[index].id1) + if (!state->matchCallEntries[index].isSpecialTrainer) return count; if (MatchCall_HasCheckPage(state->matchCallEntries[index].headerId)) return count; @@ -450,13 +452,13 @@ int sub_81CB0E4(int index) return 0; } -int sub_81CB128(int index) +int GetIndexDeltaOfNextCheckPageUp(int index) { struct Pokenav3Struct *state = GetSubstructPtr(5); int count = -1; while (--index >= 0) { - if (!state->matchCallEntries[index].id1) + if (!state->matchCallEntries[index].isSpecialTrainer) return count; if (MatchCall_HasCheckPage(state->matchCallEntries[index].headerId)) return count; @@ -479,7 +481,7 @@ bool32 unref_sub_81CB16C(void) for (i = 0; i < MC_HEADER_COUNT; i++) { - if (MatchCallFlagGetByIndex(i)) + if (MatchCall_GetEnabled(i)) { int index = MatchCall_GetRematchTableIdx(i); if (gSaveBlock1Ptr->trainerRematches[index]) @@ -494,9 +496,9 @@ static bool32 sub_81CB1D0(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); int selection = GetSelectedMatchCall(); - if (!state->matchCallEntries[selection].id1) + if (!state->matchCallEntries[selection].isSpecialTrainer) { - if (sub_81CAEA4(selection) == gMapHeader.regionMapSectionId) + if (GetMatchCallMapSec(selection) == gMapHeader.regionMapSectionId) { if (!gSaveBlock1Ptr->trainerRematches[state->matchCallEntries[selection].headerId]) return TRUE; @@ -506,7 +508,7 @@ static bool32 sub_81CB1D0(void) { if (state->matchCallEntries[selection].headerId == MC_HEADER_WATTSON) { - if (sub_81CAEA4(selection) == gMapHeader.regionMapSectionId + if (GetMatchCallMapSec(selection) == gMapHeader.regionMapSectionId && FlagGet(FLAG_BADGE05_GET) == TRUE) { if (!FlagGet(FLAG_WATTSON_REMATCH_AVAILABLE)) diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index b1cabe147..bc98d4f75 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -39,8 +39,8 @@ struct Pokenav4Struct u8 unused18; u8 unk19; u16 unk1A; - struct Sprite *unk1C; - struct Sprite *unk20; + struct Sprite *optionsCursorSprite; + struct Sprite *trainerPicSprite; u8 unk24[0x800]; u8 unk824[0x800]; u8 unk1024[0x800]; @@ -62,26 +62,26 @@ static void sub_81CC214(void); static void sub_81CBC38(int); static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *); static bool32 sub_81CBFC4(struct Pokenav4Struct *); -static void sub_81CC344(struct Pokenav4Struct *, int); -static bool32 sub_81CC004(struct Pokenav4Struct *); -static void sub_81CBFF0(struct Pokenav4Struct *); -static void sub_81CC058(struct Pokenav4Struct *); -static bool32 sub_81CC0D0(struct Pokenav4Struct *); +static void UpdateCursorGfxPos(struct Pokenav4Struct *, int); +static bool32 IsDma3ManagerBusyWithBgCopy1(struct Pokenav4Struct *); +static void UpdateWindowsReturnToTrainerList(struct Pokenav4Struct *); +static void DrawMsgBoxForMatchCallMsg(struct Pokenav4Struct *); +static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav4Struct *); static void PrintCallingDots(struct Pokenav4Struct *); static bool32 WaitForCallingDotsText(struct Pokenav4Struct *); static void PrintMatchCallMessage(struct Pokenav4Struct *); static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *); -static void sub_81CC09C(struct Pokenav4Struct *); +static void DrawMsgBoxForCloseByMsg(struct Pokenav4Struct *); static void PrintTrainerIsCloseBy(struct Pokenav4Struct *); static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *); -static void sub_81CC1DC(struct Pokenav4Struct *); -static bool32 sub_81CC204(struct Pokenav4Struct *); -static void sub_81CC014(struct Pokenav4Struct *); -static void sub_81CC39C(struct Pokenav4Struct *); -static bool32 sub_81CC42C(struct Pokenav4Struct *); -static void sub_81CC420(struct Pokenav4Struct *); +static void DrawSpinningPokenavForCall(struct Pokenav4Struct *); +static bool32 WaitForSpinningPokenav(struct Pokenav4Struct *); +static void UpdateWindowsToShowCheckPage(struct Pokenav4Struct *); +static void LoadCheckPageTrainerPic(struct Pokenav4Struct *); +static bool32 WaitForTrainerPic(struct Pokenav4Struct *); +static void TrainerPicSlideOffscreen(struct Pokenav4Struct *); static void sub_81CBC64(u8 taskId); -static void sub_81CBCEC(u16 windowId, u32, u32); +static void TryDrawRematchPokeballIcon(u16 windowId, u32, u32); static void PrintNumberRegisteredLabel(u16 windowId); static void PrintNumberRegistered(u16 windowId); static void PrintNumberOfBattlesLabel(u16 windowId); @@ -90,39 +90,39 @@ static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top); static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top); static void sub_81CC2F0(struct Pokenav4Struct *, int); static void CloseMatchCallSelectOptionsWindow(struct Pokenav4Struct *); -static struct Sprite *sub_81CC370(void); -static void sub_81CC440(struct Sprite *sprite); -static void sub_81CC4A4(struct Sprite *sprite); -void sub_81CC34C(struct Sprite *sprite); +static struct Sprite *CreateTrainerPicSprite(void); +static void SpriteCB_TrainerPicSlideOnscreen(struct Sprite *sprite); +static void SpriteCB_TrainerPicSlideOffscreen(struct Sprite *sprite); +void SpriteCB_OptionsCursor(struct Sprite *sprite); u32 MatchCallListCursorDown(s32); u32 MatchCallListCursorUp(s32); u32 MatchCallListPageDown(s32); u32 MatchCallListPageUp(s32); u32 SelectMatchCallEntry(s32); -u32 sub_81CB734(s32); -u32 sub_81CB75C(s32); +u32 MoveMatchCallOptionsCursor(s32); +static u32 CancelMatchCallSelection(s32); u32 DoMatchCallMessage(s32); u32 DoTrainerCloseByMessage(s32); u32 sub_81CB888(s32); -u32 sub_81CB93C(s32); -u32 sub_81CBAD4(s32); -u32 sub_81CB9C8(s32); -u32 sub_81CBA68(s32); -u32 sub_81CBB74(s32); +u32 ShowCheckPage(s32); +u32 ShowCheckPageUp(s32); +u32 ShowCheckPageDown(s32); +u32 ExitCheckPage(s32); +u32 ExitMatchCall(s32); -extern const struct WindowTemplate gUnknown_08622808; -extern const struct SpriteTemplate gUnknown_08622830; -extern const struct SpriteTemplate gUnknown_08622850; +extern const struct WindowTemplate sCallMsgBoxWindowTemplate; +extern const struct SpriteTemplate sOptionsCursorSpriteTemplate; +extern const struct SpriteTemplate sTrainerPicSpriteTemplate; -const u16 gUnknown_08622510[] = INCBIN_U16("graphics/pokenav/ui_matchcall.gbapal"); -const u32 gUnknown_08622530[] = INCBIN_U32("graphics/pokenav/ui_matchcall.4bpp.lz"); -const u32 gUnknown_086225D4[] = INCBIN_U32("graphics/pokenav/ui_matchcall.bin.lz"); -const u16 gUnknown_08622698[] = INCBIN_U16("graphics/pokenav/arrow2.gbapal"); -const u32 gUnknown_086226B8[] = INCBIN_U32("graphics/pokenav/arrow2.4bpp.lz"); -const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/86226E0.gbapal"); -const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/8622700.gbapal"); -const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/pokeball_matchcall.gbapal"); -const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/pokeball_matchcall.4bpp.lz"); +static const u16 sMatchCallUI_Pal[] = INCBIN_U16("graphics/pokenav/ui_matchcall.gbapal"); +static const u32 sMatchCallUI_Gfx[] = INCBIN_U32("graphics/pokenav/ui_matchcall.4bpp.lz"); +static const u32 sMatchCallUI_Tilemap[] = INCBIN_U32("graphics/pokenav/ui_matchcall.bin.lz"); +static const u16 gUnknown_08622698[] = INCBIN_U16("graphics/pokenav/arrow2.gbapal"); +static const u32 gUnknown_086226B8[] = INCBIN_U32("graphics/pokenav/arrow2.4bpp.lz"); +static const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/86226E0.gbapal"); +static const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/8622700.gbapal"); +static const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/pokeball_matchcall.gbapal"); +static const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/pokeball_matchcall.4bpp.lz"); const struct BgTemplate gUnknown_0862278C[3] = { @@ -155,7 +155,7 @@ const struct BgTemplate gUnknown_0862278C[3] = } }; -const LoopedTask gUnknown_08622798[] = +static const LoopedTask sMatchCallLoopTaskFuncs[] = { [POKENAV_MC_FUNC_NONE] = NULL, [POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown, @@ -163,16 +163,16 @@ const LoopedTask gUnknown_08622798[] = [POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown, [POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp, [POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry, - [POKENAV_MC_FUNC_6] = sub_81CB734, - [POKENAV_MC_FUNC_7] = sub_81CB75C, + [POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR] = MoveMatchCallOptionsCursor, + [POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection, [POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage, [POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage, [POKENAV_MC_FUNC_10] = sub_81CB888, - [POKENAV_MC_FUNC_11] = sub_81CB93C, - [POKENAV_MC_FUNC_12] = sub_81CBAD4, - [POKENAV_MC_FUNC_13] = sub_81CB9C8, - [POKENAV_MC_FUNC_14] = sub_81CBA68, - [POKENAV_MC_FUNC_15] = sub_81CBB74 + [POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage, + [POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp, + [POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown, + [POKENAV_MC_FUNC_EXIT_CHECK_PAGE] = ExitCheckPage, + [POKENAV_MC_FUNC_EXIT] = ExitMatchCall }; static const struct WindowTemplate sMatchCallLocationWindowTemplate = @@ -205,9 +205,9 @@ static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = }; // The series of 5 dots that appear when someone is called with Match Call -const u8 gText_CallingDots[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); +static const u8 sText_CallingDots[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); -const struct WindowTemplate gUnknown_08622808 = +const struct WindowTemplate sCallMsgBoxWindowTemplate = { .bg = 1, .tilemapLeft = 1, @@ -223,13 +223,12 @@ const struct CompressedSpriteSheet gUnknown_08622810[1] = {gUnknown_086226B8, 0x40, 7} }; -const struct SpritePalette gUnknown_08622818[] = +const struct SpritePalette gUnknown_08622818[2] = { - {gUnknown_08622698, 12}, - {} + {gUnknown_08622698, 12} }; -const struct OamData gUnknown_08622828 = +static const struct OamData sOptionsCursorOamData = { .y = 0, .affineMode = 0, @@ -243,18 +242,18 @@ const struct OamData gUnknown_08622828 = .paletteNum = 0, }; -const struct SpriteTemplate gUnknown_08622830 = +static const struct SpriteTemplate sOptionsCursorSpriteTemplate = { .tileTag = 7, .paletteTag = 12, - .oam = &gUnknown_08622828, + .oam = &sOptionsCursorOamData, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81CC34C, + .callback = SpriteCB_OptionsCursor, }; -const struct OamData gUnknown_08622848 = +static const struct OamData sTrainerPicOamData = { .y = 0, .affineMode = 0, @@ -268,11 +267,11 @@ const struct OamData gUnknown_08622848 = .paletteNum = 0, }; -const struct SpriteTemplate gUnknown_08622850 = +static const struct SpriteTemplate sTrainerPicSpriteTemplate = { .tileTag = 8, .paletteTag = 13, - .oam = &gUnknown_08622848, + .oam = &sTrainerPicOamData, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -294,7 +293,7 @@ bool32 sub_81CB260(void) void sub_81CB29C(s32 index) { struct Pokenav4Struct *state = GetSubstructPtr(6); - state->unk4 = CreateLoopedTask(gUnknown_08622798[index], 1); + state->unk4 = CreateLoopedTask(sMatchCallLoopTaskFuncs[index], 1); state->unk0 = sub_81CB310; } @@ -330,11 +329,11 @@ static u32 sub_81CB324(s32 taskState) InitBgTemplates(gUnknown_0862278C, ARRAY_COUNT(gUnknown_0862278C)); ChangeBgX(2, 0, 0); ChangeBgY(2, 0, 0); - decompress_and_copy_tile_data_to_vram(2, gUnknown_08622530, 0, 0, 0); + decompress_and_copy_tile_data_to_vram(2, sMatchCallUI_Gfx, 0, 0, 0); SetBgTilemapBuffer(2, state->unk1024); - CopyToBgTilemapBuffer(2, gUnknown_086225D4, 0, 0); + CopyToBgTilemapBuffer(2, sMatchCallUI_Tilemap, 0, 0); CopyBgTilemapBufferToVram(2); - CopyPaletteIntoBufferUnfaded(gUnknown_08622510, 0x20, 0x20); + CopyPaletteIntoBufferUnfaded(sMatchCallUI_Pal, 0x20, 0x20); CopyBgTilemapBufferToVram(2); return LT_INC_AND_PAUSE; case 1: @@ -550,7 +549,7 @@ u32 SelectMatchCallEntry(s32 taskState) case 0: PlaySE(SE_SELECT); PrintMatchCallSelectionOptions(state); - sub_81C7BA4(7); + PrintHelpBarText(HELPBAR_MC_CALL_MENU); return LT_INC_AND_PAUSE; case 1: if (sub_81CBFC4(state)) @@ -561,30 +560,30 @@ u32 SelectMatchCallEntry(s32 taskState) return LT_FINISH; } -u32 sub_81CB734(s32 taskState) +u32 MoveMatchCallOptionsCursor(s32 taskState) { struct Pokenav4Struct *state; - u16 var0; + u16 cursorPos; PlaySE(SE_SELECT); state = GetSubstructPtr(6); - var0 = sub_81CB01C(); - sub_81CC344(state, var0); + cursorPos = GetMatchCallOptionCursorPos(); + UpdateCursorGfxPos(state, cursorPos); return LT_FINISH; } -u32 sub_81CB75C(s32 taskState) +u32 CancelMatchCallSelection(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) { case 0: PlaySE(SE_SELECT); - sub_81CBFF0(state); - sub_81C7BA4(6); + UpdateWindowsReturnToTrainerList(state); + PrintHelpBarText(HELPBAR_MC_TRAINER_LIST); return LT_INC_AND_PAUSE; case 1: - if (sub_81CC004(state)) + if (IsDma3ManagerBusyWithBgCopy1(state)) return LT_PAUSE; break; } @@ -599,10 +598,10 @@ u32 DoMatchCallMessage(s32 taskState) { case 0: ToggleMatchCallVerticalArrows(TRUE); - sub_81CC058(state); + DrawMsgBoxForMatchCallMsg(state); return LT_INC_AND_PAUSE; case 1: - if (sub_81CC0D0(state)) + if (IsDma3ManagerBusyWithBgCopy2(state)) return LT_PAUSE; PrintCallingDots(state); @@ -631,12 +630,12 @@ u32 DoTrainerCloseByMessage(s32 taskState) { case 0: PlaySE(SE_SELECT); - sub_81CC09C(state); + DrawMsgBoxForCloseByMsg(state); ToggleMatchCallVerticalArrows(TRUE); state->unkE = 1; return LT_INC_AND_PAUSE; case 1: - if (sub_81CC0D0(state)) + if (IsDma3ManagerBusyWithBgCopy2(state)) return LT_PAUSE; PrintTrainerIsCloseBy(state); @@ -664,23 +663,23 @@ u32 sub_81CB888(s32 taskState) PlaySE(SE_SELECT); break; case 1: - sub_81CC1DC(state); + DrawSpinningPokenavForCall(state); break; case 2: - if (sub_81CC204(state)) + if (WaitForSpinningPokenav(state)) result = LT_PAUSE; break; case 3: - sub_81CBFF0(state); + UpdateWindowsReturnToTrainerList(state); break; case 4: - if (sub_81CC004(state)) + if (IsDma3ManagerBusyWithBgCopy1(state)) result = LT_PAUSE; - sub_81C7BA4(6); + PrintHelpBarText(HELPBAR_MC_TRAINER_LIST); break; case 5: - if (IsDma3ManagerBusyWithBgCopy_()) + if (WaitForHelpBar()) { result = LT_PAUSE; } @@ -714,7 +713,7 @@ u32 sub_81CB888(s32 taskState) return result; } -u32 sub_81CB93C(s32 taskState) +u32 ShowCheckPage(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) @@ -722,20 +721,20 @@ u32 sub_81CB93C(s32 taskState) case 0: PlaySE(SE_SELECT); sub_81C877C(); - sub_81CC014(state); + UpdateWindowsToShowCheckPage(state); return LT_INC_AND_PAUSE; case 1: - if (sub_81C8820() || sub_81CC004(state)) + if (sub_81C8820() || IsDma3ManagerBusyWithBgCopy1(state)) return LT_PAUSE; - sub_81C7BA4(8); + PrintHelpBarText(HELPBAR_MC_CHECK_PAGE); return LT_INC_AND_PAUSE; case 2: - sub_81C87AC(0); - sub_81CC39C(state); + PrintCheckPageInfo(0); + LoadCheckPageTrainerPic(state); return LT_INC_AND_PAUSE; case 3: - if (sub_81C8820() || sub_81CC42C(state) || IsDma3ManagerBusyWithBgCopy_()) + if (sub_81C8820() || WaitForTrainerPic(state) || WaitForHelpBar()) return LT_PAUSE; break; } @@ -743,38 +742,38 @@ u32 sub_81CB93C(s32 taskState) return LT_FINISH; } -u32 sub_81CB9C8(s32 taskState) +u32 ShowCheckPageDown(s32 taskState) { - int index; - int var0; + int topId; + int delta; struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) { case 0: - index = GetMatchCallListTopIndex(); - var0 = sub_81CB0E4(index); - if (var0) + topId = GetMatchCallListTopIndex(); + delta = GetIndexDeltaOfNextCheckPageDown(topId); + if (delta) { PlaySE(SE_SELECT); - state->unk16 = var0; - sub_81CC420(state); + state->unk16 = delta; + TrainerPicSlideOffscreen(state); return LT_INC_AND_PAUSE; } break; case 1: - if (sub_81CC42C(state)) + if (WaitForTrainerPic(state)) return LT_PAUSE; PrintMatchCallLocation(state, state->unk16); return LT_INC_AND_PAUSE; case 2: - sub_81C87AC(state->unk16); + PrintCheckPageInfo(state->unk16); return LT_INC_AND_PAUSE; case 3: - sub_81CC39C(state); + LoadCheckPageTrainerPic(state); return LT_INC_AND_PAUSE; case 4: - if (sub_81C8820() || sub_81CC42C(state)) + if (sub_81C8820() || WaitForTrainerPic(state)) return LT_PAUSE; break; } @@ -782,21 +781,21 @@ u32 sub_81CB9C8(s32 taskState) return LT_FINISH; } -u32 sub_81CBA68(s32 taskState) +u32 ExitCheckPage(s32 taskState) { struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) { case 0: PlaySE(SE_SELECT); - sub_81CC420(state); + TrainerPicSlideOffscreen(state); sub_81C87F0(); return LT_INC_AND_PAUSE; case 1: - if (sub_81C8820() || sub_81CC42C(state)) + if (sub_81C8820() || WaitForTrainerPic(state)) return LT_PAUSE; - sub_81C7BA4(6); + PrintHelpBarText(HELPBAR_MC_TRAINER_LIST); UpdateMatchCallInfoBox(state); return LT_INC_AND_PAUSE; case 2: @@ -808,38 +807,38 @@ u32 sub_81CBA68(s32 taskState) return LT_FINISH; } -u32 sub_81CBAD4(s32 taskState) +u32 ShowCheckPageUp(s32 taskState) { - int index; - int var0; + int topId; + int delta; struct Pokenav4Struct *state = GetSubstructPtr(6); switch (taskState) { case 0: - index = GetMatchCallListTopIndex(); - var0 = sub_81CB128(index); - if (var0) + topId = GetMatchCallListTopIndex(); + delta = GetIndexDeltaOfNextCheckPageUp(topId); + if (delta) { PlaySE(SE_SELECT); - state->unk16 = var0; - sub_81CC420(state); + state->unk16 = delta; + TrainerPicSlideOffscreen(state); return LT_INC_AND_PAUSE; } break; case 1: - if (sub_81CC42C(state)) + if (WaitForTrainerPic(state)) return LT_PAUSE; PrintMatchCallLocation(state, state->unk16); return LT_INC_AND_PAUSE; case 2: - sub_81C87AC(state->unk16); + PrintCheckPageInfo(state->unk16); return LT_INC_AND_PAUSE; case 3: - sub_81CC39C(state); + LoadCheckPageTrainerPic(state); return LT_INC_AND_PAUSE; case 4: - if (sub_81C8820() || sub_81CC42C(state)) + if (sub_81C8820() || WaitForTrainerPic(state)) return LT_PAUSE; break; } @@ -847,7 +846,7 @@ u32 sub_81CBAD4(s32 taskState) return LT_FINISH; } -u32 sub_81CBB74(s32 taskState) +u32 ExitMatchCall(s32 taskState) { switch (taskState) { @@ -872,7 +871,7 @@ static void sub_81CBBB8(void) { struct MatchCallListTemplate template; template.unk0 = sub_81CAE94(); - template.unk4 = sub_81CAE38(); + template.unk4 = GetNumberRegistered(); template.unk8 = 4; template.unk6 = 0; template.unk9 = 13; @@ -881,8 +880,8 @@ static void sub_81CBBB8(void) template.unkC = 8; template.unkD = 3; template.unkE = 7; - template.unk10 = sub_81CB050; - template.unk14 = sub_81CBCEC; + template.unk10 = BufferMatchCallNameAndDesc; + template.unk14 = TryDrawRematchPokeballIcon; sub_81C81D4(&gUnknown_0862278C[2], &template, 2); CreateTask(sub_81CBC64, 7); } @@ -914,12 +913,12 @@ static void sub_81CBC64(u8 taskId) } } -static void sub_81CBCEC(u16 windowId, u32 arg1, u32 arg2) +static void TryDrawRematchPokeballIcon(u16 windowId, u32 rematchId, u32 arg2) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); u16 *tilemap = GetBgTilemapBuffer(bg); tilemap += arg2 * 0x40 + 0x1D; - if (sub_81CAEBC(arg1)) + if (ShouldDrawRematchPokeballIcon(rematchId)) { tilemap[0] = 0x5000; tilemap[0x20] = 0x5001; @@ -931,7 +930,7 @@ static void sub_81CBCEC(u16 windowId, u32 arg1, u32 arg2) } } -void sub_81CBD48(u16 windowId, u32 arg0) +void ClearRematchPokeballIcon(u16 windowId, u32 arg0) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); u16 *tilemap = GetBgTilemapBuffer(bg); @@ -969,7 +968,7 @@ static void PrintNumberRegisteredLabel(u16 windowId) static void PrintNumberRegistered(u16 windowId) { u8 str[3]; - ConvertIntToDecimalStringN(str, sub_81CAE38(), STR_CONV_MODE_LEFT_ALIGN, 3); + ConvertIntToDecimalStringN(str, GetNumberRegistered(), STR_CONV_MODE_LEFT_ALIGN, 3); PrintMatchCallInfoNumber(windowId, str, 1); } @@ -1007,9 +1006,9 @@ static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) u8 mapName[32]; int x; int index = GetSelectedMatchCall() + arg1; - int regionMapSection = sub_81CAEA4(index); - if (regionMapSection != MAPSEC_NONE) - GetMapName(mapName, regionMapSection, 0); + int mapSec = GetMatchCallMapSec(index); + if (mapSec != MAPSEC_NONE) + GetMapName(mapName, mapSec, 0); else StringCopy(mapName, gText_Unknown); @@ -1025,7 +1024,7 @@ static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state) FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); for (i = 0; i < MATCH_CALL_OPTION_COUNT; i++) { - int optionText = sub_81CB02C(i); + int optionText = GetMatchCallOptionId(i); if (optionText == MATCH_CALL_OPTION_COUNT) break; @@ -1039,25 +1038,25 @@ static bool32 sub_81CBFC4(struct Pokenav4Struct *state) { if (!IsDma3ManagerBusyWithBgCopy()) { - sub_81CC2F0(state, sub_81CB01C()); + sub_81CC2F0(state, GetMatchCallOptionCursorPos()); return FALSE; } return TRUE; } -static void sub_81CBFF0(struct Pokenav4Struct *state) +static void UpdateWindowsReturnToTrainerList(struct Pokenav4Struct *state) { CloseMatchCallSelectOptionsWindow(state); UpdateMatchCallInfoBox(state); } -static bool32 sub_81CC004(struct Pokenav4Struct *state) +static bool32 IsDma3ManagerBusyWithBgCopy1(struct Pokenav4Struct *state) { return IsDma3ManagerBusyWithBgCopy(); } -static void sub_81CC014(struct Pokenav4Struct *state) +static void UpdateWindowsToShowCheckPage(struct Pokenav4Struct *state) { CloseMatchCallSelectOptionsWindow(state); FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); @@ -1066,12 +1065,12 @@ static void sub_81CC014(struct Pokenav4Struct *state) static void sub_81CC034(struct Pokenav4Struct *state) { - state->msgBoxWindowId = AddWindow(&gUnknown_08622808); + state->msgBoxWindowId = AddWindow(&sCallMsgBoxWindowTemplate); sub_8197184(state->msgBoxWindowId, 1, 4); sub_81C7B40(); } -static void sub_81CC058(struct Pokenav4Struct *state) +static void DrawMsgBoxForMatchCallMsg(struct Pokenav4Struct *state) { struct Sprite *sprite; sub_8197184(state->msgBoxWindowId, 1, 4); @@ -1085,7 +1084,7 @@ static void sub_81CC058(struct Pokenav4Struct *state) sprite->pos2.y = 0; } -static void sub_81CC09C(struct Pokenav4Struct *state) +static void DrawMsgBoxForCloseByMsg(struct Pokenav4Struct *state) { LoadUserWindowBorderGfx(state->msgBoxWindowId, 1, 0x40); DrawTextBorderOuter(state->msgBoxWindowId, 1, 4); @@ -1094,14 +1093,14 @@ static void sub_81CC09C(struct Pokenav4Struct *state) CopyWindowToVram(state->msgBoxWindowId, 3); } -static bool32 sub_81CC0D0(struct Pokenav4Struct *state) +static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav4Struct *state) { return IsDma3ManagerBusyWithBgCopy(); } static void PrintCallingDots(struct Pokenav4Struct *state) { - AddTextPrinterParameterized(state->msgBoxWindowId, 1, gText_CallingDots, 32, 1, 1, NULL); + AddTextPrinterParameterized(state->msgBoxWindowId, 1, sText_CallingDots, 32, 1, 1, NULL); } static bool32 WaitForCallingDotsText(struct Pokenav4Struct *state) @@ -1140,16 +1139,16 @@ static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *state) return IsTextPrinterActive(state->msgBoxWindowId); } -static void sub_81CC1DC(struct Pokenav4Struct *state) +static void DrawSpinningPokenavForCall(struct Pokenav4Struct *state) { ResumeSpinningPokenavSprite(); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); CopyBgTilemapBufferToVram(1); } -static bool32 sub_81CC204(struct Pokenav4Struct *state) +static bool32 WaitForSpinningPokenav(struct Pokenav4Struct *state) { - return IsDma3ManagerBusyWithBgCopy(); + return IsDma3ManagerBusyWithBgCopy(); } static void sub_81CC214(void) @@ -1163,24 +1162,24 @@ static void sub_81CC214(void) LoadCompressedSpriteSheet(&gUnknown_08622810[i]); Pokenav_AllocAndLoadPalettes(gUnknown_08622818); - state->unk1C = NULL; + state->optionsCursorSprite = NULL; spriteSheet.data = state->unk1828; spriteSheet.size = 0x800; spriteSheet.tag = 8; state->unk1824 = (u8 *)OBJ_VRAM0 + LoadSpriteSheet(&spriteSheet) * 0x20; paletteNum = AllocSpritePalette(13); state->unk1A = 0x100 + paletteNum * 0x10; - state->unk20 = sub_81CC370(); - state->unk20->invisible = 1; + state->trainerPicSprite = CreateTrainerPicSprite(); + state->trainerPicSprite->invisible = TRUE; } static void sub_81CC2B4(void) { struct Pokenav4Struct *state = GetSubstructPtr(6); - if (state->unk1C) - DestroySprite(state->unk1C); - if (state->unk20) - DestroySprite(state->unk20); + if (state->optionsCursorSprite) + DestroySprite(state->optionsCursorSprite); + if (state->trainerPicSprite) + DestroySprite(state->trainerPicSprite); FreeSpriteTilesByTag(8); FreeSpriteTilesByTag(7); @@ -1190,26 +1189,26 @@ static void sub_81CC2B4(void) static void sub_81CC2F0(struct Pokenav4Struct *state, int top) { - if (!state->unk1C) + if (!state->optionsCursorSprite) { - u8 spriteId = CreateSprite(&gUnknown_08622830, 4, 80, 5); - state->unk1C = &gSprites[spriteId]; - sub_81CC344(state, top); + u8 spriteId = CreateSprite(&sOptionsCursorSpriteTemplate, 4, 80, 5); + state->optionsCursorSprite = &gSprites[spriteId]; + UpdateCursorGfxPos(state, top); } } static void CloseMatchCallSelectOptionsWindow(struct Pokenav4Struct *state) { - DestroySprite(state->unk1C); - state->unk1C = NULL; + DestroySprite(state->optionsCursorSprite); + state->optionsCursorSprite = NULL; } -static void sub_81CC344(struct Pokenav4Struct *state, int top) +static void UpdateCursorGfxPos(struct Pokenav4Struct *state, int top) { - state->unk1C->pos2.y = top * 16; + state->optionsCursorSprite->pos2.y = top * 16; } -void sub_81CC34C(struct Sprite *sprite) +void SpriteCB_OptionsCursor(struct Sprite *sprite) { if (++sprite->data[0] > 3) { @@ -1218,13 +1217,13 @@ void sub_81CC34C(struct Sprite *sprite) } } -static struct Sprite *sub_81CC370(void) +static struct Sprite *CreateTrainerPicSprite(void) { - u8 spriteId = CreateSprite(&gUnknown_08622850, 44, 104, 6); + u8 spriteId = CreateSprite(&sTrainerPicSpriteTemplate, 44, 104, 6); return &gSprites[spriteId]; } -static void sub_81CC39C(struct Pokenav4Struct *state) +static void LoadCheckPageTrainerPic(struct Pokenav4Struct *state) { u16 cursor; int trainerPic = GetMatchCallTrainerPic(GetSelectedMatchCall()); @@ -1234,23 +1233,23 @@ static void sub_81CC39C(struct Pokenav4Struct *state) LZ77UnCompWram(gTrainerFrontPicPaletteTable[trainerPic].data, state->unk2028); cursor = RequestDma3Copy(state->unk1828, state->unk1824, 0x800, 1); LoadPalette(state->unk2028, state->unk1A, 0x20); - state->unk20->data[0] = 0; - state->unk20->data[7] = cursor; - state->unk20->callback = sub_81CC440; + state->trainerPicSprite->data[0] = 0; + state->trainerPicSprite->data[7] = cursor; + state->trainerPicSprite->callback = SpriteCB_TrainerPicSlideOnscreen; } } -static void sub_81CC420(struct Pokenav4Struct *state) +static void TrainerPicSlideOffscreen(struct Pokenav4Struct *state) { - state->unk20->callback = sub_81CC4A4; + state->trainerPicSprite->callback = SpriteCB_TrainerPicSlideOffscreen; } -static bool32 sub_81CC42C(struct Pokenav4Struct *state) +static bool32 WaitForTrainerPic(struct Pokenav4Struct *state) { - return state->unk20->callback != SpriteCallbackDummy; + return state->trainerPicSprite->callback != SpriteCallbackDummy; } -static void sub_81CC440(struct Sprite *sprite) +static void SpriteCB_TrainerPicSlideOnscreen(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1258,7 +1257,7 @@ static void sub_81CC440(struct Sprite *sprite) if (CheckForSpaceForDma3Request(sprite->data[7]) != -1) { sprite->pos2.x = -80; - sprite->invisible = 0; + sprite->invisible = FALSE; sprite->data[0]++; } break; @@ -1273,12 +1272,12 @@ static void sub_81CC440(struct Sprite *sprite) } } -static void sub_81CC4A4(struct Sprite *sprite) +static void SpriteCB_TrainerPicSlideOffscreen(struct Sprite *sprite) { sprite->pos2.x -= 8; if (sprite->pos2.x <= -80) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = SpriteCallbackDummy; } } diff --git a/src/pokenav_unk_5.c b/src/pokenav_unk_5.c index 03ac05d4d..a1fd6cb72 100755 --- a/src/pokenav_unk_5.c +++ b/src/pokenav_unk_5.c @@ -401,10 +401,10 @@ u32 sub_81CC878(s32 taskState) if (sub_8123514() || sub_81CCC88()) return 2; - sub_81C7BA4(1); + PrintHelpBarText(HELPBAR_MAP_ZOOMED_OUT); return 0; case 2: - if (IsDma3ManagerBusyWithBgCopy_()) + if (WaitForHelpBar()) return 2; sub_81C7E14(4); @@ -434,10 +434,10 @@ u32 sub_81CC8D8(s32 taskState) if (sub_8123514() || sub_81CCC88()) return 2; - sub_81C7BA4(2); + PrintHelpBarText(HELPBAR_MAP_ZOOMED_IN); return 0; case 3: - if (IsDma3ManagerBusyWithBgCopy_()) + if (WaitForHelpBar()) return 2; sub_81C7E14(5); diff --git a/src/pokenav_unk_7.c b/src/pokenav_unk_7.c index 34432a077..af4519738 100644 --- a/src/pokenav_unk_7.c +++ b/src/pokenav_unk_7.c @@ -195,8 +195,8 @@ u32 sub_81CDE94(s32 state) { case 0: if (sub_81CD3C4() != TRUE) - return 2; - return 0; + return LT_PAUSE; + return LT_INC_AND_PAUSE; case 1: InitBgTemplates(gUnknown_08623358, ARRAY_COUNT(gUnknown_08623358)); ChangeBgX(1, 0, 0); @@ -209,15 +209,15 @@ u32 sub_81CDE94(s32 state) SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG3); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(11, 4)); decompress_and_copy_tile_data_to_vram(3, gPokenavCondition_Gfx, 0, 0, 0); - return 0; + return LT_INC_AND_PAUSE; case 2: if (free_temp_tile_data_buffers_if_possible()) - return 2; + return LT_PAUSE; decompress_and_copy_tile_data_to_vram(2, gUnknown_08623228, 0, 0, 0); - return 0; + return LT_INC_AND_PAUSE; case 3: if (free_temp_tile_data_buffers_if_possible()) - return 2; + return LT_PAUSE; LZ77UnCompVram(gPokenavCondition_Tilemap, structPtr->tilemapBuffers[0]); SetBgTilemapBuffer(3, structPtr->tilemapBuffers[0]); @@ -228,26 +228,26 @@ u32 sub_81CDE94(s32 state) CopyPaletteIntoBufferUnfaded(gPokenavCondition_Pal, 0x10, 0x20); CopyPaletteIntoBufferUnfaded(gUnknown_08623208, 0xF0, 0x20); structPtr->unk1814 = -80; - return 0; + return LT_INC_AND_PAUSE; case 4: if (free_temp_tile_data_buffers_if_possible()) - return 2; + return LT_PAUSE; LZ77UnCompVram(gUnknown_0862323C, structPtr->tilemapBuffers[2]); SetBgTilemapBuffer(2, structPtr->tilemapBuffers[2]); CopyBgTilemapBufferToVram(2); CopyPaletteIntoBufferUnfaded(gUnknown_086231E8, 0x30, 0x20); sub_81D21DC(2); - return 0; + return LT_INC_AND_PAUSE; case 5: sub_8199DF0(1, 0, 0, 1); sub_8199DF0(1, 17, 1, 1); CpuFill32(0, structPtr->tilemapBuffers[1], BG_SCREEN_SIZE); SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]); - return 0; + return LT_INC_AND_PAUSE; case 6: if (free_temp_tile_data_buffers_if_possible()) - return 2; + return LT_PAUSE; structPtr->unk1820 = AddWindow(&gUnknown_08623364); if (sub_81CDD5C() == TRUE) @@ -257,29 +257,29 @@ u32 sub_81CDE94(s32 state) structPtr->unk1823 = AddWindow(&gUnknown_0862337C); } DeactivateAllTextPrinters(); - return 0; + return LT_INC_AND_PAUSE; case 7: sub_81CED30(0); - return 0; + return LT_INC_AND_PAUSE; case 8: sub_81CE9E4(); - return 0; + return LT_INC_AND_PAUSE; case 9: if (sub_81CDD5C() == TRUE) sub_81CE934(); - return 0; + return LT_INC_AND_PAUSE; case 10: sub_81CE754(0, sub_81CDC84(), TRUE); - return 0; + return LT_INC_AND_PAUSE; case 11: sub_81CE754(1, sub_81CDC84(), TRUE); - return 0; + return LT_INC_AND_PAUSE; case 12: sub_81CE754(2, sub_81CDC84(), TRUE); - return 0; + return LT_INC_AND_PAUSE; case 13: if (sub_81CE754(3, sub_81CDC84(), TRUE) != TRUE) - return 2; + return LT_PAUSE; PutWindowTilemap(structPtr->unk1820); if (sub_81CDD5C() == TRUE) { @@ -287,14 +287,14 @@ u32 sub_81CDE94(s32 state) PutWindowTilemap(structPtr->unk1822); PutWindowTilemap(structPtr->unk1823); } - return 0; + return LT_INC_AND_PAUSE; case 14: ShowBg(1); HideBg(2); ShowBg(3); if (sub_81CDD5C() == TRUE) - sub_81C7BA4(4); - return 0; + PrintHelpBarText(HELPBAR_CONDITION_MON_STATUS); + return LT_INC_AND_PAUSE; case 15: sub_81C7AC0(1); if (!sub_81CDD5C()) @@ -303,25 +303,25 @@ u32 sub_81CDE94(s32 state) sub_81C7FA0(1, TRUE, 0); sub_81C7FA0(6, TRUE, 0); } - return 0; + return LT_INC_AND_PAUSE; case 16: if (IsPaletteFadeActive()) - return 2; + return LT_PAUSE; if (!sub_81CDD5C() && sub_81C8010()) - return 2; + return LT_PAUSE; SetVBlankCallback_(sub_81CEE44); - return 0; + return LT_INC_AND_PAUSE; case 17: sub_81CEE90(); sub_81D20AC(sub_81CDC70()); - return 0; + return LT_INC_AND_PAUSE; case 18: if (sub_81D20BC(sub_81CDC70())) - return 2; - return 0; + return LT_PAUSE; + return LT_INC_AND_PAUSE; case 19: sub_81CEE74(TRUE); - return 0; + return LT_INC_AND_PAUSE; case 20: if (!sub_81D3178(sub_81CDC70(), &structPtr->unk1814)) { @@ -329,12 +329,12 @@ u32 sub_81CDE94(s32 state) if (sub_81CDD5C() == TRUE || sub_81CDC60() != sub_81CDC50()) sub_81D3480(structPtr->unk28e0, structPtr->unk1816, sub_81CDDB0()); - return 4; + return LT_FINISH; } - return 2; + return LT_PAUSE; } - return 4; + return LT_FINISH; } u32 sub_81CE2D0(s32 state) @@ -367,7 +367,7 @@ u32 sub_81CE2D0(s32 state) return 1; } - return 4; + return LT_FINISH; } u32 sub_81CE37C(s32 state) @@ -424,7 +424,7 @@ u32 sub_81CE37C(s32 state) return 2; } - return 4; + return LT_FINISH; } u32 sub_81CE4D8(s32 state) @@ -468,7 +468,7 @@ u32 sub_81CE4D8(s32 state) return 2; } - return 4; + return LT_FINISH; } u32 sub_81CE5E4(s32 state) @@ -506,7 +506,7 @@ u32 sub_81CE5E4(s32 state) return 2; } - return 4; + return LT_FINISH; } u32 sub_81CE6BC(s32 state) @@ -514,18 +514,18 @@ u32 sub_81CE6BC(s32 state) switch (state) { case 0: - sub_811FAA4(sub_81CDD7C(), 0xb0, 0x20); + sub_811FAA4(sub_81CDD7C(), 176, 32); return 1; case 1: - sub_81C7BA4(5); + PrintHelpBarText(HELPBAR_CONDITION_MARKINGS); return 1; case 2: - if (IsDma3ManagerBusyWithBgCopy_() == TRUE) + if (WaitForHelpBar() == TRUE) return 2; return 1; } - return 4; + return LT_FINISH; } u32 sub_81CE700(s32 state) @@ -536,18 +536,18 @@ u32 sub_81CE700(s32 state) sub_811FAF8(); return 1; case 1: - sub_81C7BA4(4); + PrintHelpBarText(HELPBAR_CONDITION_MON_STATUS); return 1; case 2: - if (IsDma3ManagerBusyWithBgCopy_() == TRUE) + if (WaitForHelpBar() == TRUE) return 2; return 1; } - return 4; + return LT_FINISH; } -u8 *sub_81CE738(u8 *dst, u16 num) +static u8 *UnusedPrintNumberString(u8 *dst, u16 num) { u8 *txtPtr = ConvertIntToDecimalStringN(dst, num, STR_CONV_MODE_RIGHT_ALIGN, 4); txtPtr = StringCopy(txtPtr, gText_Number2); diff --git a/src/pokenav_unk_8.c b/src/pokenav_unk_8.c index f3d0b76f9..6871292bf 100644 --- a/src/pokenav_unk_8.c +++ b/src/pokenav_unk_8.c @@ -435,7 +435,7 @@ static u32 sub_81CF418(s32 state) if (sub_81C8224()) return LT_PAUSE; sub_81CF7C8(unk); - sub_81C7BA4(3); + PrintHelpBarText(HELPBAR_CONDITION_MON_LIST); return LT_INC_AND_PAUSE; case 4: if (free_temp_tile_data_buffers_if_possible()) diff --git a/src/pokenav_unk_9.c b/src/pokenav_unk_9.c index e8078ea02..2f7d37382 100644 --- a/src/pokenav_unk_9.c +++ b/src/pokenav_unk_9.c @@ -448,7 +448,7 @@ static u32 sub_81CFEB8(s32 state) return LT_PAUSE; ShowBg(2); HideBg(3); - sub_81C7BA4(9); + PrintHelpBarText(HELPBAR_RIBBONS_MON_LIST); sub_81C7AC0(1); if (!unk->unkC) { From 51179df017a6ae51c129d1f30a1115adf7d1d33e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 8 Dec 2019 15:49:36 -0500 Subject: [PATCH 04/35] Clean up match call doc --- include/gym_leader_rematch.h | 2 +- include/strings.h | 107 +++++++++++++++++++++++++++++ src/pokenav_main_menu.c | 4 +- src/pokenav_match_call_data.c | 123 ---------------------------------- src/pokenav_unk_3.c | 10 +-- src/pokenav_unk_4.c | 22 +++--- 6 files changed, 126 insertions(+), 142 deletions(-) diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index 81ce3da23..dd9ead8b7 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -66,7 +66,7 @@ enum { REMATCH_TRENT, REMATCH_SAWYER, REMATCH_KIRA_AND_DAN, - REMATCH_WALLY_3, // Entries above WALLY are considered normal NPCs, from Wally below are special trainers + REMATCH_WALLY_3, // Entries above WALLY are considered normal trainers, from Wally below are special trainers REMATCH_ROXANNE, REMATCH_BRAWLY, REMATCH_WATTSON, diff --git a/include/strings.h b/include/strings.h index 8cebdcfa0..ccc27c01f 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2348,6 +2348,113 @@ extern const u8 MatchCall_BattlePyramidText11[]; extern const u8 MatchCall_BattlePyramidText12[]; extern const u8 MatchCall_BattlePyramidText13[]; extern const u8 MatchCall_BattlePyramidText14[]; +extern const u8 MatchCall_Text_MrStone1[]; +extern const u8 MatchCall_Text_MrStone2[]; +extern const u8 MatchCall_Text_MrStone3[]; +extern const u8 MatchCall_Text_MrStone4[]; +extern const u8 MatchCall_Text_MrStone5[]; +extern const u8 MatchCall_Text_MrStone6[]; +extern const u8 MatchCall_Text_MrStone7[]; +extern const u8 MatchCall_Text_MrStone8[]; +extern const u8 MatchCall_Text_MrStone9[]; +extern const u8 MatchCall_Text_MrStone10[]; +extern const u8 MatchCall_Text_MrStone11[]; +extern const u8 MatchCall_Text_Norman1[]; +extern const u8 MatchCall_Text_Norman2[]; +extern const u8 MatchCall_Text_Norman3[]; +extern const u8 MatchCall_Text_Norman4[]; +extern const u8 MatchCall_Text_Norman5[]; +extern const u8 MatchCall_Text_Norman6[]; +extern const u8 MatchCall_Text_Norman7[]; +extern const u8 MatchCall_Text_Norman8[]; +extern const u8 MatchCall_Text_Norman9[]; +extern const u8 MatchCall_Text_Mom1[]; +extern const u8 MatchCall_Text_Mom2[]; +extern const u8 MatchCall_Text_Mom3[]; +extern const u8 MatchCall_Text_Steven1[]; +extern const u8 MatchCall_Text_Steven2[]; +extern const u8 MatchCall_Text_Steven3[]; +extern const u8 MatchCall_Text_Steven4[]; +extern const u8 MatchCall_Text_Steven5[]; +extern const u8 MatchCall_Text_Steven6[]; +extern const u8 MatchCall_Text_Steven7[]; +extern const u8 MatchCall_Text_May1[]; +extern const u8 MatchCall_Text_May2[]; +extern const u8 MatchCall_Text_May3[]; +extern const u8 MatchCall_Text_May4[]; +extern const u8 MatchCall_Text_May5[]; +extern const u8 MatchCall_Text_May6[]; +extern const u8 MatchCall_Text_May7[]; +extern const u8 MatchCall_Text_May8[]; +extern const u8 MatchCall_Text_May9[]; +extern const u8 MatchCall_Text_May10[]; +extern const u8 MatchCall_Text_May11[]; +extern const u8 MatchCall_Text_May12[]; +extern const u8 MatchCall_Text_May13[]; +extern const u8 MatchCall_Text_May14[]; +extern const u8 MatchCall_Text_May15[]; +extern const u8 MatchCall_Text_Brendan1[]; +extern const u8 MatchCall_Text_Brendan2[]; +extern const u8 MatchCall_Text_Brendan3[]; +extern const u8 MatchCall_Text_Brendan4[]; +extern const u8 MatchCall_Text_Brendan5[]; +extern const u8 MatchCall_Text_Brendan6[]; +extern const u8 MatchCall_Text_Brendan7[]; +extern const u8 MatchCall_Text_Brendan8[]; +extern const u8 MatchCall_Text_Brendan9[]; +extern const u8 MatchCall_Text_Brendan10[]; +extern const u8 MatchCall_Text_Brendan11[]; +extern const u8 MatchCall_Text_Brendan12[]; +extern const u8 MatchCall_Text_Brendan13[]; +extern const u8 MatchCall_Text_Brendan14[]; +extern const u8 MatchCall_Text_Brendan15[]; +extern const u8 MatchCall_Text_Wally1[]; +extern const u8 MatchCall_Text_Wally2[]; +extern const u8 MatchCall_Text_Wally3[]; +extern const u8 MatchCall_Text_Wally4[]; +extern const u8 MatchCall_Text_Wally5[]; +extern const u8 MatchCall_Text_Wally6[]; +extern const u8 MatchCall_Text_Wally7[]; +extern const u8 MatchCall_Text_Scott1[]; +extern const u8 MatchCall_Text_Scott2[]; +extern const u8 MatchCall_Text_Scott3[]; +extern const u8 MatchCall_Text_Scott4[]; +extern const u8 MatchCall_Text_Scott5[]; +extern const u8 MatchCall_Text_Scott6[]; +extern const u8 MatchCall_Text_Scott7[]; +extern const u8 MatchCall_Text_Roxanne1[]; +extern const u8 MatchCall_Text_Roxanne2[]; +extern const u8 MatchCall_Text_Roxanne3[]; +extern const u8 MatchCall_Text_Roxanne4[]; +extern const u8 MatchCall_Text_Brawly1[]; +extern const u8 MatchCall_Text_Brawly2[]; +extern const u8 MatchCall_Text_Brawly3[]; +extern const u8 MatchCall_Text_Brawly4[]; +extern const u8 MatchCall_Text_Wattson1[]; +extern const u8 MatchCall_Text_Wattson2[]; +extern const u8 MatchCall_Text_Wattson3[]; +extern const u8 MatchCall_Text_Wattson4[]; +extern const u8 MatchCall_Text_Flannery1[]; +extern const u8 MatchCall_Text_Flannery2[]; +extern const u8 MatchCall_Text_Flannery3[]; +extern const u8 MatchCall_Text_Flannery4[]; +extern const u8 MatchCall_Text_Winona1[]; +extern const u8 MatchCall_Text_Winona2[]; +extern const u8 MatchCall_Text_Winona3[]; +extern const u8 MatchCall_Text_Winona4[]; +extern const u8 MatchCall_Text_TateLiza1[]; +extern const u8 MatchCall_Text_TateLiza2[]; +extern const u8 MatchCall_Text_TateLiza3[]; +extern const u8 MatchCall_Text_TateLiza4[]; +extern const u8 MatchCall_Text_Juan1[]; +extern const u8 MatchCall_Text_Juan2[]; +extern const u8 MatchCall_Text_Juan3[]; +extern const u8 MatchCall_Text_Juan4[]; +extern const u8 MatchCall_Text_Sidney[]; +extern const u8 MatchCall_Text_Phoebe[]; +extern const u8 MatchCall_Text_Glacia[]; +extern const u8 MatchCall_Text_Drake[]; +extern const u8 MatchCall_Text_Wallace[]; extern const u8 gText_MrStoneMatchCallDesc[]; extern const u8 gText_MrStoneMatchCallName[]; extern const u8 gText_StevenMatchCallDesc[]; diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index ea15a5198..10544d6a9 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -642,10 +642,10 @@ void sub_81C7AC0(s32 a0) BeginNormalPaletteFade(structPtr->unk14, -2, 16, 0, RGB_BLACK); break; case 2: - BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK); //out + BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK); break; case 3: - BeginNormalPaletteFade(0xFFFFFFFF, -2, 16, 0, RGB_BLACK); //in + BeginNormalPaletteFade(0xFFFFFFFF, -2, 16, 0, RGB_BLACK); break; } } diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 34cc41bd2..91dbe4005 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -157,129 +157,6 @@ static void MatchCall_BufferCallMessageText(const match_call_text_data_t *, u8 * static void MatchCall_BufferCallMessageTextByRematchTeam(const match_call_text_data_t *, u16, u8 *); static void MatchCall_GetNameAndDescByRematchIdx(u32, const u8 **, const u8 **); -extern const u8 MatchCall_Text_MrStone1[]; -extern const u8 MatchCall_Text_MrStone2[]; -extern const u8 MatchCall_Text_MrStone3[]; -extern const u8 MatchCall_Text_MrStone4[]; -extern const u8 MatchCall_Text_MrStone5[]; -extern const u8 MatchCall_Text_MrStone6[]; -extern const u8 MatchCall_Text_MrStone7[]; -extern const u8 MatchCall_Text_MrStone8[]; -extern const u8 MatchCall_Text_MrStone9[]; -extern const u8 MatchCall_Text_MrStone10[]; -extern const u8 MatchCall_Text_MrStone11[]; - -extern const u8 MatchCall_Text_Norman1[]; -extern const u8 MatchCall_Text_Norman2[]; -extern const u8 MatchCall_Text_Norman3[]; -extern const u8 MatchCall_Text_Norman4[]; -extern const u8 MatchCall_Text_Norman5[]; -extern const u8 MatchCall_Text_Norman6[]; -extern const u8 MatchCall_Text_Norman7[]; -extern const u8 MatchCall_Text_Norman8[]; -extern const u8 MatchCall_Text_Norman9[]; - -extern const u8 MatchCall_Text_Mom1[]; -extern const u8 MatchCall_Text_Mom2[]; -extern const u8 MatchCall_Text_Mom3[]; - -extern const u8 MatchCall_Text_Steven1[]; -extern const u8 MatchCall_Text_Steven2[]; -extern const u8 MatchCall_Text_Steven3[]; -extern const u8 MatchCall_Text_Steven4[]; -extern const u8 MatchCall_Text_Steven5[]; -extern const u8 MatchCall_Text_Steven6[]; -extern const u8 MatchCall_Text_Steven7[]; - -extern const u8 MatchCall_Text_May1[]; -extern const u8 MatchCall_Text_May2[]; -extern const u8 MatchCall_Text_May3[]; -extern const u8 MatchCall_Text_May4[]; -extern const u8 MatchCall_Text_May5[]; -extern const u8 MatchCall_Text_May6[]; -extern const u8 MatchCall_Text_May7[]; -extern const u8 MatchCall_Text_May8[]; -extern const u8 MatchCall_Text_May9[]; -extern const u8 MatchCall_Text_May10[]; -extern const u8 MatchCall_Text_May11[]; -extern const u8 MatchCall_Text_May12[]; -extern const u8 MatchCall_Text_May13[]; -extern const u8 MatchCall_Text_May14[]; -extern const u8 MatchCall_Text_May15[]; - -extern const u8 MatchCall_Text_Brendan1[]; -extern const u8 MatchCall_Text_Brendan2[]; -extern const u8 MatchCall_Text_Brendan3[]; -extern const u8 MatchCall_Text_Brendan4[]; -extern const u8 MatchCall_Text_Brendan5[]; -extern const u8 MatchCall_Text_Brendan6[]; -extern const u8 MatchCall_Text_Brendan7[]; -extern const u8 MatchCall_Text_Brendan8[]; -extern const u8 MatchCall_Text_Brendan9[]; -extern const u8 MatchCall_Text_Brendan10[]; -extern const u8 MatchCall_Text_Brendan11[]; -extern const u8 MatchCall_Text_Brendan12[]; -extern const u8 MatchCall_Text_Brendan13[]; -extern const u8 MatchCall_Text_Brendan14[]; -extern const u8 MatchCall_Text_Brendan15[]; - -extern const u8 MatchCall_Text_Wally1[]; -extern const u8 MatchCall_Text_Wally2[]; -extern const u8 MatchCall_Text_Wally3[]; -extern const u8 MatchCall_Text_Wally4[]; -extern const u8 MatchCall_Text_Wally5[]; -extern const u8 MatchCall_Text_Wally6[]; -extern const u8 MatchCall_Text_Wally7[]; - -extern const u8 MatchCall_Text_Scott1[]; -extern const u8 MatchCall_Text_Scott2[]; -extern const u8 MatchCall_Text_Scott3[]; -extern const u8 MatchCall_Text_Scott4[]; -extern const u8 MatchCall_Text_Scott5[]; -extern const u8 MatchCall_Text_Scott6[]; -extern const u8 MatchCall_Text_Scott7[]; - -extern const u8 MatchCall_Text_Roxanne1[]; -extern const u8 MatchCall_Text_Roxanne2[]; -extern const u8 MatchCall_Text_Roxanne3[]; -extern const u8 MatchCall_Text_Roxanne4[]; - -extern const u8 MatchCall_Text_Brawly1[]; -extern const u8 MatchCall_Text_Brawly2[]; -extern const u8 MatchCall_Text_Brawly3[]; -extern const u8 MatchCall_Text_Brawly4[]; - -extern const u8 MatchCall_Text_Wattson1[]; -extern const u8 MatchCall_Text_Wattson2[]; -extern const u8 MatchCall_Text_Wattson3[]; -extern const u8 MatchCall_Text_Wattson4[]; - -extern const u8 MatchCall_Text_Flannery1[]; -extern const u8 MatchCall_Text_Flannery2[]; -extern const u8 MatchCall_Text_Flannery3[]; -extern const u8 MatchCall_Text_Flannery4[]; - -extern const u8 MatchCall_Text_Winona1[]; -extern const u8 MatchCall_Text_Winona2[]; -extern const u8 MatchCall_Text_Winona3[]; -extern const u8 MatchCall_Text_Winona4[]; - -extern const u8 MatchCall_Text_TateLiza1[]; -extern const u8 MatchCall_Text_TateLiza2[]; -extern const u8 MatchCall_Text_TateLiza3[]; -extern const u8 MatchCall_Text_TateLiza4[]; - -extern const u8 MatchCall_Text_Juan1[]; -extern const u8 MatchCall_Text_Juan2[]; -extern const u8 MatchCall_Text_Juan3[]; -extern const u8 MatchCall_Text_Juan4[]; - -extern const u8 MatchCall_Text_Sidney[]; -extern const u8 MatchCall_Text_Phoebe[]; -extern const u8 MatchCall_Text_Glacia[]; -extern const u8 MatchCall_Text_Drake[]; -extern const u8 MatchCall_Text_Wallace[]; - // .rodata static const match_call_text_data_t sMrStoneTextScripts[] = { diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c index 183c2e424..6a5fb3f8a 100755 --- a/src/pokenav_unk_3.c +++ b/src/pokenav_unk_3.c @@ -16,7 +16,7 @@ #include "constants/songs.h" // naming multi-purpose fields -#define isSpecialTrainer id1 // Gym Leaders, for example. As opposed to regular NPC +#define isSpecialTrainer id1 // Entries with their own match call header in pokenav_match_call_data.c #define mapSec id2 #define headerId data @@ -332,7 +332,7 @@ bool32 ShouldDrawRematchPokeballIcon(int index) int GetMatchCallTrainerPic(int index) { - int var0; + int headerId; struct Pokenav3Struct *state = GetSubstructPtr(5); if (!state->matchCallEntries[index].isSpecialTrainer) { @@ -340,15 +340,15 @@ int GetMatchCallTrainerPic(int index) return gTrainers[index].trainerPic; } - var0 = state->matchCallEntries[index].headerId; - index = MatchCall_GetRematchTableIdx(var0); + headerId = state->matchCallEntries[index].headerId; + index = MatchCall_GetRematchTableIdx(headerId); if (index != REMATCH_TABLE_ENTRIES) { index = GetTrainerIdxByRematchIdx(index); return gTrainers[index].trainerPic; } - index = MatchCall_GetOverrideFacilityClass(var0); + index = MatchCall_GetOverrideFacilityClass(headerId); return gFacilityClassToPicIndex[index]; } diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index bc98d4f75..37ff1d90c 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -34,7 +34,7 @@ struct Pokenav4Struct u8 unkF; u16 locWindowId; u16 infoBoxWindowId; - u16 msgBoxWindowId; //windowId + u16 msgBoxWindowId; s16 unk16; u8 unused18; u8 unk19; @@ -157,16 +157,16 @@ const struct BgTemplate gUnknown_0862278C[3] = static const LoopedTask sMatchCallLoopTaskFuncs[] = { - [POKENAV_MC_FUNC_NONE] = NULL, - [POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown, - [POKENAV_MC_FUNC_UP] = MatchCallListCursorUp, - [POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown, - [POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp, - [POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry, - [POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR] = MoveMatchCallOptionsCursor, - [POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection, - [POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage, - [POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage, + [POKENAV_MC_FUNC_NONE] = NULL, + [POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown, + [POKENAV_MC_FUNC_UP] = MatchCallListCursorUp, + [POKENAV_MC_FUNC_PG_DOWN] = MatchCallListPageDown, + [POKENAV_MC_FUNC_PG_UP] = MatchCallListPageUp, + [POKENAV_MC_FUNC_SELECT] = SelectMatchCallEntry, + [POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR] = MoveMatchCallOptionsCursor, + [POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection, + [POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage, + [POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage, [POKENAV_MC_FUNC_10] = sub_81CB888, [POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage, [POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp, From 77bf40d32b7bbab40db36030399586430ae57010 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 8 Dec 2019 16:57:09 -0500 Subject: [PATCH 05/35] Fix modern build for #925 --- src/pokenav_unk_4.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index 37ff1d90c..0b7239545 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -110,10 +110,6 @@ u32 ShowCheckPageDown(s32); u32 ExitCheckPage(s32); u32 ExitMatchCall(s32); -extern const struct WindowTemplate sCallMsgBoxWindowTemplate; -extern const struct SpriteTemplate sOptionsCursorSpriteTemplate; -extern const struct SpriteTemplate sTrainerPicSpriteTemplate; - static const u16 sMatchCallUI_Pal[] = INCBIN_U16("graphics/pokenav/ui_matchcall.gbapal"); static const u32 sMatchCallUI_Gfx[] = INCBIN_U32("graphics/pokenav/ui_matchcall.4bpp.lz"); static const u32 sMatchCallUI_Tilemap[] = INCBIN_U32("graphics/pokenav/ui_matchcall.bin.lz"); @@ -207,7 +203,7 @@ static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = // The series of 5 dots that appear when someone is called with Match Call static const u8 sText_CallingDots[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); -const struct WindowTemplate sCallMsgBoxWindowTemplate = +static const struct WindowTemplate sCallMsgBoxWindowTemplate = { .bg = 1, .tilemapLeft = 1, From f34b8f564af13f756fe64c4af1aec49a7361ec19 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Wed, 11 Dec 2019 05:34:56 +0800 Subject: [PATCH 06/35] InitEventObjectStateFromTemplate --- include/global.fieldmap.h | 4 +- src/event_object_movement.c | 172 ++---------------------------------- 2 files changed, 8 insertions(+), 168 deletions(-) diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index de08fd1ec..e6421f37c 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -59,8 +59,8 @@ struct EventObjectTemplate /*0x06*/ s16 y; /*0x08*/ u8 elevation; /*0x09*/ u8 movementType; - /*0x0A*/ u8 movementRangeX:4; - u8 movementRangeY:4; + /*0x0A*/ u16 movementRangeX:4; + u16 movementRangeY:4; /*0x0C*/ u16 trainerType; /*0x0E*/ u16 trainerRange_berryTreeId; /*0x10*/ const u8 *script; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index c746f08b1..eed9d520b 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1199,8 +1199,6 @@ static u8 GetEventObjectIdByLocalId(u8 localId) return EVENT_OBJECTS_COUNT; } -// This function has the same nonmatching quirk as in Ruby/Sapphire. -#ifdef NONMATCHING static u8 InitEventObjectStateFromTemplate(struct EventObjectTemplate *template, u8 mapNum, u8 mapGroup) { struct EventObject *eventObject; @@ -1208,11 +1206,8 @@ static u8 InitEventObjectStateFromTemplate(struct EventObjectTemplate *template, s16 x; s16 y; - // mapNum and mapGroup are in the wrong registers (r7/r6 instead of r6/r7) if (GetAvailableEventObjectId(template->localId, mapNum, mapGroup, &eventObjectId)) - { return EVENT_OBJECTS_COUNT; - } eventObject = &gEventObjects[eventObjectId]; ClearEventObject(eventObject); x = template->x + 7; @@ -1223,6 +1218,7 @@ static u8 InitEventObjectStateFromTemplate(struct EventObjectTemplate *template, eventObject->movementType = template->movementType; eventObject->localId = template->localId; eventObject->mapNum = mapNum; + eventObject++; eventObject--; eventObject->mapGroup = mapGroup; eventObject->initialCoords.x = x; eventObject->initialCoords.y = y; @@ -1232,7 +1228,6 @@ static u8 InitEventObjectStateFromTemplate(struct EventObjectTemplate *template, eventObject->previousCoords.y = y; eventObject->currentElevation = template->elevation; eventObject->previousElevation = template->elevation; - // For some reason, 0x0F is placed in r9, to be used later eventObject->range.as_nybbles.x = template->movementRangeX; eventObject->range.as_nybbles.y = template->movementRangeY; eventObject->trainerType = template->trainerType; @@ -1240,177 +1235,22 @@ static u8 InitEventObjectStateFromTemplate(struct EventObjectTemplate *template, eventObject->previousMovementDirection = gInitialMovementTypeFacingDirections[template->movementType]; SetEventObjectDirection(eventObject, eventObject->previousMovementDirection); SetEventObjectDynamicGraphicsId(eventObject); - +#ifndef NONMATCHING + asm("":::"r5", "r6"); +#endif if (gRangedMovementTypes[eventObject->movementType]) { - if ((eventObject->range.as_nybbles.x) == 0) + if (eventObject->range.as_nybbles.x == 0) { - // r9 is invoked here eventObject->range.as_nybbles.x++; } - if ((eventObject->range.as_nybbles.y) == 0) + if (eventObject->range.as_nybbles.y == 0) { eventObject->range.as_nybbles.y++; } } return eventObjectId; } -#else -static NAKED u8 InitEventObjectStateFromTemplate(struct EventObjectTemplate *template, u8 mapId, u8 mapGroupId) -{ - asm_unified("\tpush {r4-r7,lr}\n" - "\tmov r7, r9\n" - "\tmov r6, r8\n" - "\tpush {r6,r7}\n" - "\tsub sp, 0x4\n" - "\tadds r5, r0, 0\n" - "\tlsls r1, 24\n" - "\tlsrs r6, r1, 24\n" - "\tlsls r2, 24\n" - "\tlsrs r7, r2, 24\n" - "\tldrb r0, [r5]\n" - "\tadds r1, r6, 0\n" - "\tadds r2, r7, 0\n" - "\tmov r3, sp\n" - "\tbl GetAvailableEventObjectId\n" - "\tlsls r0, 24\n" - "\tcmp r0, 0\n" - "\tbeq _0808D66E\n" - "\tmovs r0, 0x10\n" - "\tb _0808D762\n" - "_0808D66E:\n" - "\tmov r0, sp\n" - "\tldrb r1, [r0]\n" - "\tlsls r0, r1, 3\n" - "\tadds r0, r1\n" - "\tlsls r0, 2\n" - "\tldr r1, =gEventObjects\n" - "\tadds r4, r0, r1\n" - "\tadds r0, r4, 0\n" - "\tbl ClearEventObject\n" - "\tldrh r3, [r5, 0x4]\n" - "\tadds r3, 0x7\n" - "\tlsls r3, 16\n" - "\tlsrs r3, 16\n" - "\tldrh r2, [r5, 0x6]\n" - "\tadds r2, 0x7\n" - "\tlsls r2, 16\n" - "\tlsrs r2, 16\n" - "\tldrb r0, [r4]\n" - "\tmovs r1, 0x1\n" - "\torrs r0, r1\n" - "\tmovs r1, 0x4\n" - "\torrs r0, r1\n" - "\tstrb r0, [r4]\n" - "\tldrb r0, [r5, 0x1]\n" - "\tstrb r0, [r4, 0x5]\n" - "\tldrb r0, [r5, 0x9]\n" - "\tstrb r0, [r4, 0x6]\n" - "\tldrb r0, [r5]\n" - "\tstrb r0, [r4, 0x8]\n" - "\tstrb r6, [r4, 0x9]\n" - "\tstrb r7, [r4, 0xA]\n" - "\tstrh r3, [r4, 0xC]\n" - "\tstrh r2, [r4, 0xE]\n" - "\tstrh r3, [r4, 0x10]\n" - "\tstrh r2, [r4, 0x12]\n" - "\tstrh r3, [r4, 0x14]\n" - "\tstrh r2, [r4, 0x16]\n" - "\tldrb r0, [r5, 0x8]\n" - "\tmovs r7, 0xF\n" - "\tadds r1, r7, 0\n" - "\tands r1, r0\n" - "\tldrb r2, [r4, 0xB]\n" - "\tmovs r0, 0x10\n" - "\tnegs r0, r0\n" - "\tmov r8, r0\n" - "\tands r0, r2\n" - "\torrs r0, r1\n" - "\tstrb r0, [r4, 0xB]\n" - "\tldrb r1, [r5, 0x8]\n" - "\tlsls r1, 4\n" - "\tands r0, r7\n" - "\torrs r0, r1\n" - "\tstrb r0, [r4, 0xB]\n" - "\tldrb r1, [r5, 0xA]\n" - "\tlsls r1, 28\n" - "\tmovs r0, 0xF\n" - "\tmov r9, r0\n" - "\tlsrs r1, 28\n" - "\tldrb r2, [r4, 0x19]\n" - "\tmov r0, r8\n" - "\tands r0, r2\n" - "\torrs r0, r1\n" - "\tstrb r0, [r4, 0x19]\n" - "\tldrb r1, [r5, 0xA]\n" - "\tlsrs r1, 4\n" - "\tlsls r1, 4\n" - "\tands r0, r7\n" - "\torrs r0, r1\n" - "\tstrb r0, [r4, 0x19]\n" - "\tldrh r0, [r5, 0xC]\n" - "\tstrb r0, [r4, 0x7]\n" - "\tldrh r0, [r5, 0xE]\n" - "\tstrb r0, [r4, 0x1D]\n" - "\tldr r1, =gInitialMovementTypeFacingDirections\n" - "\tldrb r0, [r5, 0x9]\n" - "\tadds r0, r1\n" - "\tldrb r1, [r0]\n" - "\tadds r0, r4, 0\n" - "\tadds r0, 0x20\n" - "\tstrb r1, [r0]\n" - "\tldrb r1, [r0]\n" - "\tadds r0, r4, 0\n" - "\tbl SetEventObjectDirection\n" - "\tadds r0, r4, 0\n" - "\tbl SetEventObjectDynamicGraphicsId\n" - "\tldr r1, =gRangedMovementTypes\n" - "\tldrb r0, [r4, 0x6]\n" - "\tadds r0, r1\n" - "\tldrb r0, [r0]\n" - "\tcmp r0, 0\n" - "\tbeq _0808D75E\n" - "\tldrb r2, [r4, 0x19]\n" - "\tadds r0, r7, 0\n" - "\tands r0, r2\n" - "\tcmp r0, 0\n" - "\tbne _0808D746\n" - "\tlsls r0, r2, 28\n" - "\tlsrs r0, 28\n" - "\tadds r0, 0x1\n" - "\tmov r1, r9\n" - "\tands r0, r1\n" - "\tmov r1, r8\n" - "\tands r1, r2\n" - "\torrs r1, r0\n" - "\tstrb r1, [r4, 0x19]\n" - "_0808D746:\n" - "\tldrb r2, [r4, 0x19]\n" - "\tmovs r0, 0xF0\n" - "\tands r0, r2\n" - "\tcmp r0, 0\n" - "\tbne _0808D75E\n" - "\tlsrs r1, r2, 4\n" - "\tadds r1, 0x1\n" - "\tlsls r1, 4\n" - "\tadds r0, r7, 0\n" - "\tands r0, r2\n" - "\torrs r0, r1\n" - "\tstrb r0, [r4, 0x19]\n" - "_0808D75E:\n" - "\tmov r0, sp\n" - "\tldrb r0, [r0]\n" - "_0808D762:\n" - "\tadd sp, 0x4\n" - "\tpop {r3,r4}\n" - "\tmov r8, r3\n" - "\tmov r9, r4\n" - "\tpop {r4-r7}\n" - "\tpop {r1}\n" - "\tbx r1\n" - ".pool"); -} -#endif u8 Unref_TryInitLocalEventObject(u8 localId) { From fcd8d37d62f04f4d412ebb3dad8798d48b528a24 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 6 Dec 2019 21:25:46 -0500 Subject: [PATCH 07/35] Document Battle Palace scripts --- .../scripts.inc | 8 +- .../scripts.inc | 411 +++++++++--------- .../scripts.inc | 92 ++-- .../BattleFrontier_BattlePalaceLobby/map.json | 18 +- .../scripts.inc | 404 +++++++++-------- .../scripts.inc | 14 +- .../scripts.inc | 20 +- 7 files changed, 475 insertions(+), 492 deletions(-) diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index 6669446a5..f2251165c 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -145,7 +145,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent:: @ 82576B0 call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_BattleArenaBattleRoom_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ProceedChallengeNoRecord + goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1 switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge @@ -154,7 +154,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent:: @ 82576B0 case 3, BattleFrontier_BattleArenaBattleRoom_EventScript_AskRetireChallenge case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleArenaBattleRoom_EventScript_ProceedChallengeNoRecord:: @ 8257768 +BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponentNoRecord:: @ 8257768 multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge @@ -254,7 +254,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon:: @ 82578D4 waitmessage call BattleFrontier_BattleArenaBattleRoom_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ProceedChallengeGretaNoRecord + goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoonNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1 switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta @@ -263,7 +263,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon:: @ 82578D4 case 3, BattleFrontier_BattleArenaBattleRoom_EventScript_AskRetireChallenge case MULTI_B_PRESSED, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon -BattleFrontier_BattleArenaBattleRoom_EventScript_ProceedChallengeGretaNoRecord:: @ 825792B +BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoonNoRecord:: @ 825792B multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 00017c089..27445d482 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -1,167 +1,169 @@ BattleFrontier_BattlePalaceBattleRoom_MapScripts:: @ 824F815 - map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePalaceBattleRoom_MapScript1_24F825 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceBattleRoom_MapScript2_24F861 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceBattleRoom_MapScript2_24FE34 + map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePalaceBattleRoom_OnTransition + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceBattleRoom_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceBattleRoom_OnWarp .byte 0 -BattleFrontier_BattlePalaceBattleRoom_MapScript1_24F825: @ 824F825 + @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden + @ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_0 + @ The opponent is represented by objct event 2, which has the gfx id VAR_OBJ_GFX_ID_1 + +BattleFrontier_BattlePalaceBattleRoom_OnTransition: @ 824F825 frontier_settrainers - call BattleFrontier_BattlePalaceBattleRoom_EventScript_24F833 + call BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfx end -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F833:: @ 824F833 +BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfx:: @ 824F833 checkplayergender compare VAR_RESULT, MALE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24F84B + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxMale compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24F856 + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxFemale return -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F84B:: @ 824F84B +@ The opponent's gfx are set to the players by default +BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxMale:: @ 824F84B setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F856:: @ 824F856 +BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxFemale:: @ 824F856 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return -BattleFrontier_BattlePalaceBattleRoom_MapScript2_24F861: @ 824F861 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F86B +BattleFrontier_BattlePalaceBattleRoom_OnFrame: @ 824F861 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_EnterRoom .2byte 0 -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F86B:: @ 824F86B +BattleFrontier_BattlePalaceBattleRoom_EventScript_EnterRoom:: @ 824F86B showobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8B5 - applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE9B + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge + applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerReturnToChallenge waitmovement 0 - applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEAC + applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown setvar VAR_TEMP_2, 1 frontier_set FRONTIER_DATA_6, 1 - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8B5:: @ 824F8B5 - applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE92 +BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge:: @ 824F8B5 + applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerEnterRoom waitmovement 0 - -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8BF:: @ 824F8BF +BattleFrontier_BattlePalaceBattleRoom_EventScript_NextOpponentEnter:: @ 824F8BF tower_setopponent addobject 2 - applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA1 + applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentEnter waitmovement 0 palace_getopponentintro msgbox gStringVar4, MSGBOX_DEFAULT waitmessage - call BattleFrontier_BattlePalaceBattleRoom_EventScript_24FDF7 + call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle switch VAR_RESULT - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F911 - -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA:: @ 824F8FA + case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedOpponent +BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost:: @ 824F8FA frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24FEBB + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobby -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F911:: @ 824F911 +BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedOpponent:: @ 824F911 call BattleFrontier_EventScript_IncrementWinStreak frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT - case 7, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28 - applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA7 + case 7, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon + applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentExit waitmovement 0 removeobject 2 - applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE99 - applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEAC + applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp + applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown waitmovement 0 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_24FF00, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons, MSGBOX_DEFAULT special LoadPlayerParty special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty - -BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A:: @ 824F98A +BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent:: @ 824F98A frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB61 + goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE66 + call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor2ndOpponent compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE6D + call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor3rdOpponent compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE74 + call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor4thOpponent compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE7B + call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor5thOpponent compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE82 + call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor6thOpponent compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE89 + call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_BattlePalaceBattleRoom_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA42 + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB14 - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA78 - case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4 - case 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_ContinueChallenge + case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRecordBattle + case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskPauseChallenge + case 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA42:: @ 824FA42 +BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponentNoRecord:: @ 824FA42 multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB14 - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4 - case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_ContinueChallenge + case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskPauseChallenge + case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA78:: @ 824FA78 - message BattleFrontier_BattlePalaceBattleRoom_Text_25009E +BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRecordBattle:: @ 824FA78 + message BattleFrontier_BattlePalaceBattleRoom_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A - case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAAA - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent + case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_RecordBattle + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAAA:: @ 824FAAA +BattleFrontier_BattlePalaceBattleRoom_EventScript_RecordBattle:: @ 824FAAA call BattleFrontier_EventScript_SaveBattle - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4:: @ 824FAB4 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_250030, MSGBOX_YESNO +BattleFrontier_BattlePalaceBattleRoom_EventScript_AskPauseChallenge:: @ 824FAB4 + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SaveAndQuitGame, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A - case YES, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB3F - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + case NO, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent + case YES, BattleFrontier_BattlePalaceBattleRoom_EventScript_PauseChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2:: @ 824FAE2 - message BattleFrontier_BattlePalaceBattleRoom_Text_25005A +BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRetireChallenge:: @ 824FAE2 + message BattleFrontier_BattlePalaceBattleRoom_Text_WishToQuitChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A - case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24F98A + case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent + case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB14:: @ 824FB14 - applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE97 - applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE97 +BattleFrontier_BattlePalaceBattleRoom_EventScript_ContinueChallenge:: @ 824FB14 + applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight + applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight closemessage - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8BF + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_NextOpponentEnter -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28:: @ 824FB28 +BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon:: @ 824FB28 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24FEBB + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobby -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB3F:: @ 824FB3F - message BattleFrontier_BattlePalaceBattleRoom_Text_25007E +BattleFrontier_BattlePalaceBattleRoom_EventScript_PauseChallenge:: @ 824FB3F + message BattleFrontier_BattlePalaceBattleRoom_Text_SavingData waitmessage palace_save CHALLENGE_STATUS_PAUSED playse SE_SAVE @@ -170,76 +172,75 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB3F:: @ 824FB3F frontier_reset end -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB61:: @ 824FB61 +BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext:: @ 824FB61 compare VAR_TEMP_2, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_2500DD, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_ChallengingPalaceMaven, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 - -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79:: @ 824FB79 - message BattleFrontier_BattlePalaceBattleRoom_Text_25014A +BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven:: @ 824FB79 + message BattleFrontier_BattlePalaceBattleRoom_Text_ReadyForPalaceMaven waitmessage call BattleFrontier_BattlePalaceBattleRoom_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FBD0 + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMavenNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FC06 - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FA78 - case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4 - case 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79 + case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser + case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRecordBattle + case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskPauseChallenge + case 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FBD0:: @ 824FBD0 +BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMavenNoRecord:: @ 824FBD0 multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FC06 - case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAB4 - case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FAE2 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB79 + case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser + case 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskPauseChallenge + case 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FC06:: @ 824FC06 +BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser:: @ 824FC06 call BattleFrontier_EventScript_SetBrainObjectGfx - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_25017C, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_AnnounceArrivalOfSpenser, MSGBOX_DEFAULT closemessage - applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE97 - applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE97 + applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight + applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight setobjectxyperm 2, 15, 1 addobject 2 hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM setobjectxy 2, 13, 1 setobjectxyperm 2, 13, 1 - applymovement 4, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEDF - applymovement 5, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEE7 - applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEF2 + applymovement 4, BattleFrontier_BattlePalaceBattleRoom_Movement_DusclopsEnter + applymovement 5, BattleFrontier_BattlePalaceBattleRoom_Movement_AzurillEnter + applymovement 2, BattleFrontier_BattlePalaceBattleRoom_Movement_SpenserEnter waitmovement 0 switch VAR_TEMP_F - case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD3A - case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCAA - case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD67 + case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePalaceBattleRoom_EventScript_IntroSpenserGold + case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver + case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCAA - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_2501C1, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserFirstIntro, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCAA:: @ 824FCAA - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_2502C4, MSGBOX_DEFAULT - call BattleFrontier_BattlePalaceBattleRoom_EventScript_24FDF7 +BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver:: @ 824FCAA + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_ProveYourBondWithMons, MSGBOX_DEFAULT + call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCC7 - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCC7:: @ 824FCC7 +BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver:: @ 824FCC7 palace_incrementstreak frontier_getsymbols compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_2502FF, MSGBOX_DEFAULT - applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE99 - applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEAC - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_25036D, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserPostSilverBattle, MSGBOX_DEFAULT + applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp + applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetsSeeFrontierPass, MSGBOX_DEFAULT playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattlePalaceBattleRoom_Text_2503DC + message BattleFrontier_BattlePalaceBattleRoom_Text_ReceivedSpiritsSymbol waitmessage waitfanfare frontier_givesymbol @@ -248,33 +249,33 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FCC7:: @ 824FCC7 applymovement 1, Common_Movement_WalkInPlaceFastestRight applymovement 3, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_250412, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28 + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserAwaitNextTime, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD3A:: @ 824FD3A +BattleFrontier_BattlePalaceBattleRoom_EventScript_IntroSpenserGold:: @ 824FD3A frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD67 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_250485, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserThisTimeWontHoldBack, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD67:: @ 824FD67 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_250572, MSGBOX_DEFAULT - call BattleFrontier_BattlePalaceBattleRoom_EventScript_24FDF7 +BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold:: @ 824FD67 + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_Kaaah, MSGBOX_DEFAULT + call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD84 - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24F8FA + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD84:: @ 824FD84 +BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold:: @ 824FD84 palace_incrementstreak frontier_getsymbols compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_25057E, MSGBOX_DEFAULT - applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE99 - applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEAC - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_250629, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserYourTeamIsAdmirable, MSGBOX_DEFAULT + applymovement 1, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp + applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_HurryWithFrontierPass, MSGBOX_DEFAULT playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattlePalaceBattleRoom_Text_250699 + message BattleFrontier_BattlePalaceBattleRoom_Text_SpiritsSymbolTookGoldenShine waitmessage waitfanfare frontier_givesymbol @@ -283,11 +284,10 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24FD84:: @ 824FD84 applymovement 1, Common_Movement_WalkInPlaceFastestRight applymovement 3, Common_Movement_WalkInPlaceFastestRight waitmovement 0 - msgbox BattleFrontier_BattlePalaceBattleRoom_Text_2506C4, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceBattleRoom_EventScript_24FB28 + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserComeSeeMeAgain, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FDF7:: @ 824FDF7 -VerdanturfTown_BattleTentBattleRoom_EventScript_24FDF7:: @ 824FDF7 +BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle:: @ 824FDF7 closemessage setvar VAR_TEMP_2, 0 frontier_set FRONTIER_DATA_6, 0 @@ -301,70 +301,69 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_24FDF7:: @ 824FDF7 frontier_resetsketch return -BattleFrontier_BattlePalaceBattleRoom_MapScript2_24FE34: @ 824FE34 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE3E +BattleFrontier_BattlePalaceBattleRoom_OnWarp: @ 824FE34 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_SetUpRoomObjects .2byte 0 -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE3E:: @ 824FE3E +BattleFrontier_BattlePalaceBattleRoom_EventScript_SetUpRoomObjects:: @ 824FE3E hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM - call BattleFrontier_BattlePalaceBattleRoom_EventScript_24F833 + call BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfx setvar VAR_TEMP_1, 1 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE90 + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible removeobject 2 - applymovement 4, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE90 - applymovement 5, BattleFrontier_BattlePalaceBattleRoom_Movement_24FE90 + applymovement 4, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible + applymovement 5, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible end -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE66:: @ 824FE66 - message BattleFrontier_BattlePalaceBattleRoom_Text_24FF28 +BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor2ndOpponent:: @ 824FE66 + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor2ndOpponent waitmessage return -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE6D:: @ 824FE6D - message BattleFrontier_BattlePalaceBattleRoom_Text_24FF54 +BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor3rdOpponent:: @ 824FE6D + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor3rdOpponent waitmessage return -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE74:: @ 824FE74 - message BattleFrontier_BattlePalaceBattleRoom_Text_24FF80 +BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor4thOpponent:: @ 824FE74 + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor4thOpponent waitmessage return -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE7B:: @ 824FE7B - message BattleFrontier_BattlePalaceBattleRoom_Text_24FFAC +BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor5thOpponent:: @ 824FE7B + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor5thOpponent waitmessage return -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE82:: @ 824FE82 - message BattleFrontier_BattlePalaceBattleRoom_Text_24FFD8 +BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor6thOpponent:: @ 824FE82 + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor6thOpponent waitmessage return -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FE89:: @ 824FE89 - message BattleFrontier_BattlePalaceBattleRoom_Text_250004 +BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor7thOpponent:: @ 824FE89 + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor7thOpponent waitmessage return -BattleFrontier_BattlePalaceBattleRoom_Movement_24FE90: @ 824FE90 +BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible: @ 824FE90 set_invisible step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FE92: @ 824FE92 +BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerEnterRoom: @ 824FE92 set_visible walk_up walk_up walk_up walk_up - -BattleFrontier_BattlePalaceBattleRoom_Movement_24FE97: @ 824FE97 +BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight: @ 824FE97 face_right step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FE99: @ 824FE99 +BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp: @ 824FE99 face_up step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FE9B: @ 824FE9B +BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerReturnToChallenge: @ 824FE9B set_visible walk_up walk_up @@ -372,7 +371,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_24FE9B: @ 824FE9B walk_up step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA1: @ 824FEA1 +BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentEnter: @ 824FEA1 walk_down walk_down walk_down @@ -380,50 +379,50 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA1: @ 824FEA1 face_left step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEA7: @ 824FEA7 +BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentExit: @ 824FEA7 walk_up walk_up walk_up walk_up step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEAC: @ 824FEAC +BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown: @ 824FEAC face_down step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEAE: @ 824FEAE +BattleFrontier_BattlePalaceBattleRoom_Movement_UnusedOpponentEnter1: @ 824FEAE set_visible walk_slow_down walk_slow_down face_left step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEB3: @ 824FEB3 +BattleFrontier_BattlePalaceBattleRoom_Movement_UnusedOpponentEnter2: @ 824FEB3 set_visible walk_slow_down step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEB6: @ 824FEB6 +BattleFrontier_BattlePalaceBattleRoom_Movement_UnusedOpponentEnter3: @ 824FEB6 walk_slow_down walk_slow_down walk_slow_down face_left step_end -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FEBB:: @ 824FEBB +BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobby:: @ 824FEBB copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_24FED5 + goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 5, 7 waitstate end -BattleFrontier_BattlePalaceBattleRoom_EventScript_24FED5:: @ 824FED5 +BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles:: @ 824FED5 warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 19, 7 waitstate end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEDF: @ 824FEDF +BattleFrontier_BattlePalaceBattleRoom_Movement_DusclopsEnter: @ 824FEDF delay_16 delay_16 set_visible @@ -433,7 +432,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_24FEDF: @ 824FEDF walk_in_place_fastest_left step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEE7: @ 824FEE7 +BattleFrontier_BattlePalaceBattleRoom_Movement_AzurillEnter: @ 824FEE7 set_visible walk_fast_down walk_fast_right @@ -446,7 +445,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_24FEE7: @ 824FEE7 delay_16 step_end -BattleFrontier_BattlePalaceBattleRoom_Movement_24FEF2: @ 824FEF2 +BattleFrontier_BattlePalaceBattleRoom_Movement_SpenserEnter: @ 824FEF2 delay_16 delay_16 delay_16 @@ -462,70 +461,64 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_24FEF2: @ 824FEF2 face_left step_end -BattleFrontier_BattlePalaceBattleRoom_Text_24FF00: @ 824FF00 -VerdanturfTown_BattleTentBattleRoom_Text_24FF00: @ 824FF00 +BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons: @ 824FF00 .string "Excellent…\n" .string "Let me restore your POKéMON.$" -BattleFrontier_BattlePalaceBattleRoom_Text_24FF28: @ 824FF28 -VerdanturfTown_BattleTentBattleRoom_Text_24FF28: @ 824FF28 +BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor2ndOpponent: @ 824FF28 .string "The 2nd opponent is next.\n" .string "Are you prepared?$" -BattleFrontier_BattlePalaceBattleRoom_Text_24FF54: @ 824FF54 -VerdanturfTown_BattleTentBattleRoom_Text_24FF54: @ 824FF54 +BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor3rdOpponent: @ 824FF54 .string "The 3rd opponent is next.\n" .string "Are you prepared?$" -BattleFrontier_BattlePalaceBattleRoom_Text_24FF80: @ 824FF80 +BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor4thOpponent: @ 824FF80 .string "The 4th opponent is next.\n" .string "Are you prepared?$" -BattleFrontier_BattlePalaceBattleRoom_Text_24FFAC: @ 824FFAC +BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor5thOpponent: @ 824FFAC .string "The 5th opponent is next.\n" .string "Are you prepared?$" -BattleFrontier_BattlePalaceBattleRoom_Text_24FFD8: @ 824FFD8 +BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor6thOpponent: @ 824FFD8 .string "The 6th opponent is next.\n" .string "Are you prepared?$" -BattleFrontier_BattlePalaceBattleRoom_Text_250004: @ 8250004 +BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor7thOpponent: @ 8250004 .string "The 7th opponent is next.\n" .string "Are you prepared?$" -BattleFrontier_BattlePalaceBattleRoom_Text_250030: @ 8250030 -VerdanturfTown_BattleTentBattleRoom_Text_250030: @ 8250030 +BattleFrontier_BattlePalaceBattleRoom_Text_SaveAndQuitGame: @ 8250030 .string "Would you like to save and quit\n" .string "the game?$" -BattleFrontier_BattlePalaceBattleRoom_Text_25005A: @ 825005A -VerdanturfTown_BattleTentBattleRoom_Text_25005A: @ 825005A +BattleFrontier_BattlePalaceBattleRoom_Text_WishToQuitChallenge: @ 825005A .string "Do you wish to quit your challenge?$" -BattleFrontier_BattlePalaceBattleRoom_Text_25007E: @ 825007E -VerdanturfTown_BattleTentBattleRoom_Text_25007E: @ 825007E +BattleFrontier_BattlePalaceBattleRoom_Text_SavingData: @ 825007E .string "Saving the data.\n" .string "Have patience…$" -BattleFrontier_BattlePalaceBattleRoom_Text_25009E: @ 825009E +BattleFrontier_BattlePalaceBattleRoom_Text_RecordLastMatch: @ 825009E .string "Do you wish to record your latest\n" .string "match on your FRONTIER PASS?$" -BattleFrontier_BattlePalaceBattleRoom_Text_2500DD: @ 82500DD +BattleFrontier_BattlePalaceBattleRoom_Text_ChallengingPalaceMaven: @ 82500DD .string "And now…\p" .string "By winning consistently, you have\n" .string "earned the privilege of challenging\l" .string "our master, the PALACE MAVEN…$" -BattleFrontier_BattlePalaceBattleRoom_Text_25014A: @ 825014A +BattleFrontier_BattlePalaceBattleRoom_Text_ReadyForPalaceMaven: @ 825014A .string "I shall send for the PALACE MAVEN.\n" .string "Are you ready?$" -BattleFrontier_BattlePalaceBattleRoom_Text_25017C: @ 825017C +BattleFrontier_BattlePalaceBattleRoom_Text_AnnounceArrivalOfSpenser: @ 825017C .string "Let great fanfare announce the arrival\n" .string "of the PALACE MAVEN, SPENSER!$" -BattleFrontier_BattlePalaceBattleRoom_Text_2501C1: @ 82501C1 +BattleFrontier_BattlePalaceBattleRoom_Text_SpenserFirstIntro: @ 82501C1 .string "SPENSER: My physical being is with\n" .string "POKéMON always!\p" .string "My heart beats as one with\n" @@ -537,34 +530,34 @@ BattleFrontier_BattlePalaceBattleRoom_Text_2501C1: @ 82501C1 .string "If your bonds of trust are frail,\n" .string "you will never beat my brethren!$" -BattleFrontier_BattlePalaceBattleRoom_Text_2502C4: @ 82502C4 +BattleFrontier_BattlePalaceBattleRoom_Text_ProveYourBondWithMons: @ 82502C4 .string "The bond you share with your POKéMON!\n" .string "Prove it to me here!$" -BattleFrontier_BattlePalaceBattleRoom_Text_2502FF: @ 82502FF +BattleFrontier_BattlePalaceBattleRoom_Text_SpenserPostSilverBattle: @ 82502FF .string "SPENSER: Gwahahah!\p" .string "Hah, you never fell for my bluster!\n" .string "Sorry for trying that stunt!\p" .string "Here!\n" .string "Bring me the thing!$" -BattleFrontier_BattlePalaceBattleRoom_Text_25036D: @ 825036D +BattleFrontier_BattlePalaceBattleRoom_Text_LetsSeeFrontierPass: @ 825036D .string "My, my, if only you could maintain that\n" .string "facade of distinguished authority…\p" .string "Here!\n" .string "Let's see your FRONTIER PASS!$" -BattleFrontier_BattlePalaceBattleRoom_Text_2503DC: @ 82503DC +BattleFrontier_BattlePalaceBattleRoom_Text_ReceivedSpiritsSymbol: @ 82503DC .string "The Spirits Symbol was embossed on\n" .string "the FRONTIER PASS!$" -BattleFrontier_BattlePalaceBattleRoom_Text_250412: @ 8250412 +BattleFrontier_BattlePalaceBattleRoom_Text_SpenserAwaitNextTime: @ 8250412 .string "SPENSER: Your POKéMON's eyes are \n" .string "truly clear and unclouded.\p" .string "I will eagerly await the next\n" .string "opportunity to see you.$" -BattleFrontier_BattlePalaceBattleRoom_Text_250485: @ 8250485 +BattleFrontier_BattlePalaceBattleRoom_Text_SpenserThisTimeWontHoldBack: @ 8250485 .string "SPENSER: Gwahahah!\n" .string "You've battled your way up again?\p" .string "You must have developed a truly\n" @@ -575,10 +568,10 @@ BattleFrontier_BattlePalaceBattleRoom_Text_250485: @ 8250485 .string "Ready now?\n" .string "Prepare to lose!$" -BattleFrontier_BattlePalaceBattleRoom_Text_250572: @ 8250572 +BattleFrontier_BattlePalaceBattleRoom_Text_Kaaah: @ 8250572 .string "… … …Kaaah!$" -BattleFrontier_BattlePalaceBattleRoom_Text_25057E: @ 825057E +BattleFrontier_BattlePalaceBattleRoom_Text_SpenserYourTeamIsAdmirable: @ 825057E .string "SPENSER: Well, that was some display!\n" .string "Even fully unleashed, my brethren\l" .string "could not overpower you.\p" @@ -586,17 +579,17 @@ BattleFrontier_BattlePalaceBattleRoom_Text_25057E: @ 825057E .string "Here!\n" .string "Bring me that thing, will you?$" -BattleFrontier_BattlePalaceBattleRoom_Text_250629: @ 8250629 +BattleFrontier_BattlePalaceBattleRoom_Text_HurryWithFrontierPass: @ 8250629 .string "My, my, if only you could maintain\n" .string "a certain level of decorum…\p" .string "Gaaah, here!\n" .string "Hurry with that FRONTIER PASS, you!$" -BattleFrontier_BattlePalaceBattleRoom_Text_250699: @ 8250699 +BattleFrontier_BattlePalaceBattleRoom_Text_SpiritsSymbolTookGoldenShine: @ 8250699 .string "The Spirits Symbol took on\n" .string "a golden shine!$" -BattleFrontier_BattlePalaceBattleRoom_Text_2506C4: @ 82506C4 +BattleFrontier_BattlePalaceBattleRoom_Text_SpenserComeSeeMeAgain: @ 82506C4 .string "SPENSER: Gwahahah!\p" .string "Come see me time and again!\n" .string "My brethren and I will be waiting!$" diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc index 5d834532d..46ab902fa 100644 --- a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc @@ -1,89 +1,88 @@ BattleFrontier_BattlePalaceCorridor_MapScripts:: @ 824F4A3 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceCorridor_MapScript2_24F4A9 + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceCorridor_OnFrame .byte 0 -BattleFrontier_BattlePalaceCorridor_MapScript2_24F4A9: @ 824F4A9 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePalaceCorridor_EventScript_24F4B3 +BattleFrontier_BattlePalaceCorridor_OnFrame: @ 824F4A9 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePalaceCorridor_EventScript_WalkThroughCorridor .2byte 0 -BattleFrontier_BattlePalaceCorridor_EventScript_24F4B3:: @ 824F4B3 +BattleFrontier_BattlePalaceCorridor_EventScript_WalkThroughCorridor:: @ 824F4B3 delay 16 - applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_24F5B8 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_24F5B8 + applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_EnterCorridor + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_EnterCorridor waitmovement 0 lockall palace_getcomment compare VAR_RESULT, 0 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F58B + call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment1 compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F594 + call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment2 compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F59D + call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment3 compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F5A6 + call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_StreakComment compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F5AF + call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_LongStreakComment closemessage frontier_get FRONTIER_DATA_LVL_MODE compare VAR_RESULT, FRONTIER_LVL_OPEN - goto_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_24F553 - applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_24F5BD - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_24F5C4 + goto_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom + applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkTo50BattleRoom + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkTo50BattleRoom waitmovement 0 opendoor 6, 3 waitdooranim - applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_24F5DA - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_24F5D9 + applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_AttendantEnterBattleRoom + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerEnterBattleRoom waitmovement 0 closedoor 6, 3 waitdooranim - goto BattleFrontier_BattlePalaceCorridor_EventScript_24F581 + goto BattleFrontier_BattlePalaceCorridor_EventScript_WarpToBattleRoom -BattleFrontier_BattlePalaceCorridor_EventScript_24F553:: @ 824F553 - applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_24F5CB - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_24F5D2 +BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom:: @ 824F553 + applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkToOpenBattleRoom + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkToOpenBattleRoom waitmovement 0 opendoor 10, 3 waitdooranim - applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_24F5DA - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_24F5D9 + applymovement 1, BattleFrontier_BattlePalaceCorridor_Movement_AttendantEnterBattleRoom + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerEnterBattleRoom waitmovement 0 closedoor 10, 3 waitdooranim - -BattleFrontier_BattlePalaceCorridor_EventScript_24F581:: @ 824F581 +BattleFrontier_BattlePalaceCorridor_EventScript_WarpToBattleRoom:: @ 824F581 warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM, 255, 7, 4 waitstate end -BattleFrontier_BattlePalaceCorridor_EventScript_24F58B:: @ 824F58B - msgbox BattleFrontier_BattlePalaceCorridor_Text_24F5DD, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment1:: @ 824F58B + msgbox BattleFrontier_BattlePalaceCorridor_Text_PeopleAndMonAreSame, MSGBOX_DEFAULT return -BattleFrontier_BattlePalaceCorridor_EventScript_24F594:: @ 824F594 - msgbox BattleFrontier_BattlePalaceCorridor_Text_24F65B, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment2:: @ 824F594 + msgbox BattleFrontier_BattlePalaceCorridor_Text_LetMonDoWhatItLikes, MSGBOX_DEFAULT return -BattleFrontier_BattlePalaceCorridor_EventScript_24F59D:: @ 824F59D - msgbox BattleFrontier_BattlePalaceCorridor_Text_24F718, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment3:: @ 824F59D + msgbox BattleFrontier_BattlePalaceCorridor_Text_MonDifferentWhenCornered, MSGBOX_DEFAULT return -BattleFrontier_BattlePalaceCorridor_EventScript_24F5A6:: @ 824F5A6 - msgbox BattleFrontier_BattlePalaceCorridor_Text_24F78C, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceCorridor_EventScript_StreakComment:: @ 824F5A6 + msgbox BattleFrontier_BattlePalaceCorridor_Text_BeginningToUnderstandNature, MSGBOX_DEFAULT return -BattleFrontier_BattlePalaceCorridor_EventScript_24F5AF:: @ 824F5AF - msgbox BattleFrontier_BattlePalaceCorridor_Text_24F7D4, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceCorridor_EventScript_LongStreakComment:: @ 824F5AF + msgbox BattleFrontier_BattlePalaceCorridor_Text_HeartfeltBondBetweenYouAndMons, MSGBOX_DEFAULT return -BattleFrontier_BattlePalaceCorridor_Movement_24F5B8: @ 824F5B8 +BattleFrontier_BattlePalaceCorridor_Movement_EnterCorridor: @ 824F5B8 walk_up walk_up walk_up walk_up step_end -BattleFrontier_BattlePalaceCorridor_Movement_24F5BD: @ 824F5BD +BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkTo50BattleRoom: @ 824F5BD walk_up walk_up walk_left @@ -92,7 +91,7 @@ BattleFrontier_BattlePalaceCorridor_Movement_24F5BD: @ 824F5BD walk_up step_end -BattleFrontier_BattlePalaceCorridor_Movement_24F5C4: @ 824F5C4 +BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkTo50BattleRoom: @ 824F5C4 walk_up walk_up walk_up @@ -101,7 +100,7 @@ BattleFrontier_BattlePalaceCorridor_Movement_24F5C4: @ 824F5C4 walk_up step_end -BattleFrontier_BattlePalaceCorridor_Movement_24F5CB: @ 824F5CB +BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkToOpenBattleRoom: @ 824F5CB walk_up walk_right walk_right @@ -110,7 +109,7 @@ BattleFrontier_BattlePalaceCorridor_Movement_24F5CB: @ 824F5CB walk_up step_end -BattleFrontier_BattlePalaceCorridor_Movement_24F5D2: @ 824F5D2 +BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkToOpenBattleRoom: @ 824F5D2 walk_up walk_up walk_right @@ -119,39 +118,38 @@ BattleFrontier_BattlePalaceCorridor_Movement_24F5D2: @ 824F5D2 walk_up step_end -BattleFrontier_BattlePalaceCorridor_Movement_24F5D9: @ 824F5D9 +BattleFrontier_BattlePalaceCorridor_Movement_PlayerEnterBattleRoom: @ 824F5D9 walk_up - -BattleFrontier_BattlePalaceCorridor_Movement_24F5DA: @ 824F5DA +BattleFrontier_BattlePalaceCorridor_Movement_AttendantEnterBattleRoom: @ 824F5DA walk_up set_invisible step_end -BattleFrontier_BattlePalaceCorridor_Text_24F5DD: @ 824F5DD +BattleFrontier_BattlePalaceCorridor_Text_PeopleAndMonAreSame: @ 824F5DD .string "People and POKéMON, they are but\n" .string "the same…\p" .string "Their individual nature makes them\n" .string "good at certain things, and not good\l" .string "at others.$" -BattleFrontier_BattlePalaceCorridor_Text_24F65B: @ 824F65B +BattleFrontier_BattlePalaceCorridor_Text_LetMonDoWhatItLikes: @ 824F65B .string "Rather than trying to make a POKéMON\n" .string "do what it dislikes, try to let it do\l" .string "what it likes and is good at doing.\p" .string "Put yourself in the POKéMON's position\n" .string "and consider what moves it would like.$" -BattleFrontier_BattlePalaceCorridor_Text_24F718: @ 824F718 +BattleFrontier_BattlePalaceCorridor_Text_MonDifferentWhenCornered: @ 824F718 .string "A POKéMON's nature is a remarkable\n" .string "thing…\p" .string "Some POKéMON behave in a completely\n" .string "different way when they are cornered.$" -BattleFrontier_BattlePalaceCorridor_Text_24F78C: @ 824F78C +BattleFrontier_BattlePalaceCorridor_Text_BeginningToUnderstandNature: @ 824F78C .string "Are you beginning to understand how\n" .string "a POKéMON's nature makes it behave?$" -BattleFrontier_BattlePalaceCorridor_Text_24F7D4: @ 824F7D4 +BattleFrontier_BattlePalaceCorridor_Text_HeartfeltBondBetweenYouAndMons: @ 824F7D4 .string "Ah… I see a strong, heartfelt bond\n" .string "between you and your POKéMON…$" diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/map.json b/data/maps/BattleFrontier_BattlePalaceLobby/map.json index c1d79ee50..f35780171 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/map.json +++ b/data/maps/BattleFrontier_BattlePalaceLobby/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24D944", + "script": "BattleFrontier_BattlePalaceLobby_EventScript_SinglesAttendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24DC82", + "script": "BattleFrontier_BattlePalaceLobby_EventScript_BlackBelt", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24DC9D", + "script": "BattleFrontier_BattlePalaceLobby_EventScript_Maniac", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24DC8B", + "script": "BattleFrontier_BattlePalaceLobby_EventScript_Man", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24DC94", + "script": "BattleFrontier_BattlePalaceLobby_EventScript_Beauty", "flag": "0" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24D956", + "script": "BattleFrontier_BattlePalaceLobby_EventScript_DoublesAttendant", "flag": "0" } ], @@ -124,7 +124,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24DC50" + "script": "BattleFrontier_BattlePalaceLobby_EventScript_ShowSinglesResults" }, { "type": "sign", @@ -132,7 +132,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24DC69" + "script": "BattleFrontier_BattlePalaceLobby_EventScript_ShowDoublesResults" }, { "type": "sign", @@ -140,7 +140,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "BattleFrontier_BattlePalaceLobby_EventScript_24DCA6" + "script": "BattleFrontier_BattlePalaceLobby_EventScript_RulesBoard" } ] } \ No newline at end of file diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index 5c4714d80..64000a6ac 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -1,32 +1,32 @@ BattleFrontier_BattlePalaceLobby_MapScripts:: @ 824D77E - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceLobby_MapScript2_24D79D - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceLobby_MapScript2_24D789 + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceLobby_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceLobby_OnWarp .byte 0 -BattleFrontier_BattlePalaceLobby_MapScript2_24D789: @ 824D789 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePalaceLobby_EventScript_24D793 +BattleFrontier_BattlePalaceLobby_OnWarp: @ 824D789 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePalaceLobby_EventScript_TurnPlayerNorth .2byte 0 -BattleFrontier_BattlePalaceLobby_EventScript_24D793:: @ 824D793 +BattleFrontier_BattlePalaceLobby_EventScript_TurnPlayerNorth:: @ 824D793 setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePalaceLobby_MapScript2_24D79D: @ 824D79D - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePalaceLobby_EventScript_24D7C7 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePalaceLobby_EventScript_24D7D0 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePalaceLobby_EventScript_24D908 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePalaceLobby_EventScript_24D817 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePalaceLobby_EventScript_24D873 +BattleFrontier_BattlePalaceLobby_OnFrame: @ 824D79D + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePalaceLobby_EventScript_GetChallengeStatus + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePalaceLobby_EventScript_QuitWithoutSaving + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePalaceLobby_EventScript_ResumeChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePalaceLobby_EventScript_LostChallenge .2byte 0 -BattleFrontier_BattlePalaceLobby_EventScript_24D7C7:: @ 824D7C7 +BattleFrontier_BattlePalaceLobby_EventScript_GetChallengeStatus:: @ 824D7C7 frontier_getstatus end -BattleFrontier_BattlePalaceLobby_EventScript_24D7D0:: @ 824D7D0 +BattleFrontier_BattlePalaceLobby_EventScript_QuitWithoutSaving:: @ 824D7D0 lockall - msgbox BattleFrontier_BattlePalaceLobby_Text_24E636, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_FailedToSaveBeforeEndingChallenge, MSGBOX_DEFAULT closemessage palace_set PALACE_DATA_WIN_STREAK, 0 palace_set PALACE_DATA_WIN_STREAK_ACTIVE, FALSE @@ -35,42 +35,42 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D7D0:: @ 824D7D0 releaseall end -BattleFrontier_BattlePalaceLobby_EventScript_24D817:: @ 824D817 +BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge:: @ 824D817 lockall frontier_isbrain compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24D838 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E497, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24D840 + goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_DefeatedMaven + msgbox BattleFrontier_BattlePalaceLobby_Text_FirmTrueBondsFor7WinStreak, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_GiveBattlePoints -BattleFrontier_BattlePalaceLobby_EventScript_24D838:: @ 824D838 - msgbox BattleFrontier_BattlePalaceLobby_Text_24EE81, MSGBOX_DEFAULT -BattleFrontier_BattlePalaceLobby_EventScript_24D840:: @ 824D840 - msgbox BattleFrontier_BattlePalaceLobby_Text_24EEB9, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceLobby_EventScript_DefeatedMaven:: @ 824D838 + msgbox BattleFrontier_BattlePalaceLobby_Text_ToDefeatMavenAnd7Trainers, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceLobby_EventScript_GiveBattlePoints:: @ 824D840 + msgbox BattleFrontier_BattlePalaceLobby_Text_PresentYouWithBattlePoints, MSGBOX_DEFAULT frontier_givepoints msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS - message BattleFrontier_BattlePalaceLobby_Text_24E4F7 + message BattleFrontier_BattlePalaceLobby_Text_FeatWillBeRecorded waitmessage - call BattleFrontier_BattlePalaceLobby_EventScript_24D8A1 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, MSGBOX_DEFAULT + call BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge + msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -BattleFrontier_BattlePalaceLobby_EventScript_24D873:: @ 824D873 +BattleFrontier_BattlePalaceLobby_EventScript_LostChallenge:: @ 824D873 lockall - message BattleFrontier_BattlePalaceLobby_Text_24E41E + message BattleFrontier_BattlePalaceLobby_Text_ResultsWillBeRecorded waitmessage palace_set PALACE_DATA_WIN_STREAK_ACTIVE, FALSE - call BattleFrontier_BattlePalaceLobby_EventScript_24D8A1 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, MSGBOX_DEFAULT + call BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge + msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -BattleFrontier_BattlePalaceLobby_EventScript_24D8A1:: @ 824D8A1 +BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge:: @ 824D8A1 frontier_checkairshow special LoadPlayerParty special HealPlayerParty @@ -79,82 +79,82 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D8A1:: @ 824D8A1 waitse call BattleFrontier_BattlePalaceLobby_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24D907 - message BattleFrontier_BattlePalaceLobby_Text_24EF16 + goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge + message BattleFrontier_BattlePalaceLobby_Text_LikeToRecordMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, BattleFrontier_BattlePalaceLobby_EventScript_24D907 - case 0, BattleFrontier_BattlePalaceLobby_EventScript_24D902 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24D907 + case 1, BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge + case 0, BattleFrontier_BattlePalaceLobby_EventScript_RecordMatch + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24D902:: @ 824D902 +BattleFrontier_BattlePalaceLobby_EventScript_RecordMatch:: @ 824D902 call BattleFrontier_EventScript_SaveBattle -BattleFrontier_BattlePalaceLobby_EventScript_24D907:: @ 824D907 +BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge:: @ 824D907 return -BattleFrontier_BattlePalaceLobby_EventScript_24D908:: @ 824D908 +BattleFrontier_BattlePalaceLobby_EventScript_ResumeChallenge:: @ 824D908 lockall - msgbox BattleFrontier_BattlePalaceLobby_Text_24E5D8, MSGBOX_DEFAULT - message BattleFrontier_BattlePalaceLobby_Text_24E5F6 + msgbox BattleFrontier_BattlePalaceLobby_Text_WeHaveBeenWaiting, MSGBOX_DEFAULT + message BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge waitmessage palace_save CHALLENGE_STATUS_SAVING playse SE_SAVE waitse frontier_set FRONTIER_DATA_PAUSED, FALSE setvar VAR_TEMP_0, 255 - goto BattleFrontier_BattlePalaceLobby_EventScript_24DAF3 + goto BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24D944:: @ 824D944 +BattleFrontier_BattlePalaceLobby_EventScript_SinglesAttendant:: @ 824D944 lock faceplayer setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_PALACE setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - goto BattleFrontier_BattlePalaceLobby_EventScript_24D968 + goto BattleFrontier_BattlePalaceLobby_EventScript_Attendant end -BattleFrontier_BattlePalaceLobby_EventScript_24D956:: @ 824D956 +BattleFrontier_BattlePalaceLobby_EventScript_DoublesAttendant:: @ 824D956 lock faceplayer setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_PALACE setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - goto BattleFrontier_BattlePalaceLobby_EventScript_24D968 + goto BattleFrontier_BattlePalaceLobby_EventScript_Attendant end -BattleFrontier_BattlePalaceLobby_EventScript_24D968:: @ 824D968 +BattleFrontier_BattlePalaceLobby_EventScript_Attendant:: @ 824D968 palace_get PALACE_DATA_PRIZE compare VAR_RESULT, ITEM_NONE - goto_if_ne BattleFrontier_BattlePalaceLobby_EventScript_24D817 + goto_if_ne BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge special SavePlayerParty compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB9E + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForSingleBattle compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBA7 -BattleFrontier_BattlePalaceLobby_EventScript_24D999:: @ 824D999 + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForDoubleBattle +BattleFrontier_BattlePalaceLobby_EventScript_AskTakeChallenge:: @ 824D999 compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBB0 + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_AskTakeSingleBattleChallenge compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DBB6 + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceLobby_EventScript_24D9E6 - case 1, BattleFrontier_BattlePalaceLobby_EventScript_24DB20 - case 2, BattleFrontier_BattlePalaceLobby_EventScript_24DB94 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DB94 + case 0, BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge + case 1, BattleFrontier_BattlePalaceLobby_EventScript_ExplainChallenge + case 2, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24D9E6:: @ 824D9E6 - message BattleFrontier_BattlePalaceLobby_Text_24E119 +BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge:: @ 824D9E6 + message BattleFrontier_BattlePalaceLobby_Text_WhichChallenge waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case FRONTIER_LVL_TENT, BattleFrontier_BattlePalaceLobby_EventScript_24DB94 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DB94 + case FRONTIER_LVL_TENT, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge frontier_checkineligible compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB45 + goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT - msgbox BattleFrontier_BattlePalaceLobby_Text_24E399, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons, MSGBOX_DEFAULT fadescreen 1 call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT @@ -162,14 +162,14 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D9E6:: @ 824D9E6 special ChoosePartyForBattleFrontier waitstate compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB91 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E3C8, MSGBOX_YESNO + goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge + msgbox BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge2, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattlePalaceLobby_EventScript_24DB91 - case YES, BattleFrontier_BattlePalaceLobby_EventScript_24DA87 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DB91 + case NO, BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge + case YES, BattleFrontier_BattlePalaceLobby_EventScript_SaveBeforeChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87 +BattleFrontier_BattlePalaceLobby_EventScript_SaveBeforeChallenge:: @ 824DA87 setvar VAR_TEMP_0, 0 frontier_set FRONTIER_DATA_SELECTED_MON_ORDER palace_init @@ -182,133 +182,132 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB7A - -BattleFrontier_BattlePalaceLobby_EventScript_24DAF3:: @ 824DAF3 + goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed +BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge:: @ 824DAF3 special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE - msgbox BattleFrontier_BattlePalaceLobby_Text_24E408, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_FollowMe, MSGBOX_DEFAULT closemessage - call BattleFrontier_BattlePalaceLobby_EventScript_24DBBC + call BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 255, 8, 13 setvar VAR_TEMP_0, 0 waitstate end -BattleFrontier_BattlePalaceLobby_EventScript_24DB20:: @ 824DB20 +BattleFrontier_BattlePalaceLobby_EventScript_ExplainChallenge:: @ 824DB20 compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB38 - msgbox BattleFrontier_BattlePalaceLobby_Text_24DE17, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24D999 + goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_ExplainDoublesChallenge + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainSingleBattleChallenge, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_AskTakeChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24DB38:: @ 824DB38 - msgbox BattleFrontier_BattlePalaceLobby_Text_24EBC2, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24D999 +BattleFrontier_BattlePalaceLobby_EventScript_ExplainDoublesChallenge:: @ 824DB38 + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainDoubleBattleChallenge, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_AskTakeChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24DB45:: @ 824DB45 +BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons:: @ 824DB45 switch VAR_RESULT - case FRONTIER_LVL_50, BattleFrontier_BattlePalaceLobby_EventScript_24DB60 - case FRONTIER_LVL_OPEN, BattleFrontier_BattlePalaceLobby_EventScript_24DB6D + case FRONTIER_LVL_50, BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMonsLv50 + case FRONTIER_LVL_OPEN, BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMonsLvOpen -BattleFrontier_BattlePalaceLobby_EventScript_24DB60:: @ 824DB60 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E173, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DB9C +BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMonsLv50:: @ 824DB60 + msgbox BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24DB6D:: @ 824DB6D - msgbox BattleFrontier_BattlePalaceLobby_Text_24E29E, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DB9C +BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMonsLvOpen:: @ 824DB6D + msgbox BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24DB7A:: @ 824DB7A +BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed:: @ 824DB7A frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - goto BattleFrontier_BattlePalaceLobby_EventScript_24DB94 + goto BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge -BattleFrontier_BattlePalaceLobby_EventScript_24DB91:: @ 824DB91 +BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge:: @ 824DB91 special LoadPlayerParty -BattleFrontier_BattlePalaceLobby_EventScript_24DB94:: @ 824DB94 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, MSGBOX_DEFAULT -BattleFrontier_BattlePalaceLobby_EventScript_24DB9C:: @ 824DB9C +BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge:: @ 824DB94 + msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge:: @ 824DB9C release end -BattleFrontier_BattlePalaceLobby_EventScript_24DB9E:: @ 824DB9E - msgbox BattleFrontier_BattlePalaceLobby_Text_24DD5B, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForSingleBattle:: @ 824DB9E + msgbox BattleFrontier_BattlePalaceLobby_Text_WelcomeForSingleBattle, MSGBOX_DEFAULT return -BattleFrontier_BattlePalaceLobby_EventScript_24DBA7:: @ 824DBA7 - msgbox BattleFrontier_BattlePalaceLobby_Text_24EB06, MSGBOX_DEFAULT +BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForDoubleBattle:: @ 824DBA7 + msgbox BattleFrontier_BattlePalaceLobby_Text_WelcomeForDoubleBattle, MSGBOX_DEFAULT return -BattleFrontier_BattlePalaceLobby_EventScript_24DBB0:: @ 824DBB0 - message BattleFrontier_BattlePalaceLobby_Text_24DDE1 +BattleFrontier_BattlePalaceLobby_EventScript_AskTakeSingleBattleChallenge:: @ 824DBB0 + message BattleFrontier_BattlePalaceLobby_Text_TakeSingleBattleChallenge return -BattleFrontier_BattlePalaceLobby_EventScript_24DBB6:: @ 824DBB6 - message BattleFrontier_BattlePalaceLobby_Text_24EB8C +BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge:: @ 824DBB6 + message BattleFrontier_BattlePalaceLobby_Text_TakeDoubleBattleChallenge return -BattleFrontier_BattlePalaceLobby_EventScript_24DBBC:: @ 824DBBC +BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor:: @ 824DBBC compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DC23 + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DC29 - applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_24DC47 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_24DC47 + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant + applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor waitmovement 0 compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DC2F + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DC35 + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_OpenDoublesHallDoor waitdooranim - applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_24DC49 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_24DC4C + applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_AttendantEnterDoor + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_PlayerEnterDoor waitmovement 0 compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DC3B + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CloseSinglesHallDoor compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_24DC41 + call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CloseDoublesHallDoor waitdooranim return -BattleFrontier_BattlePalaceLobby_EventScript_24DC23:: @ 824DC23 +BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant:: @ 824DC23 setvar VAR_LAST_TALKED, 1 return -BattleFrontier_BattlePalaceLobby_EventScript_24DC29:: @ 824DC29 +BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant:: @ 824DC29 setvar VAR_LAST_TALKED, 6 return -BattleFrontier_BattlePalaceLobby_EventScript_24DC2F:: @ 824DC2F +BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor:: @ 824DC2F opendoor 5, 4 return -BattleFrontier_BattlePalaceLobby_EventScript_24DC35:: @ 824DC35 +BattleFrontier_BattlePalaceLobby_EventScript_OpenDoublesHallDoor:: @ 824DC35 opendoor 19, 4 return -BattleFrontier_BattlePalaceLobby_EventScript_24DC3B:: @ 824DC3B +BattleFrontier_BattlePalaceLobby_EventScript_CloseSinglesHallDoor:: @ 824DC3B closedoor 5, 4 return -BattleFrontier_BattlePalaceLobby_EventScript_24DC41:: @ 824DC41 +BattleFrontier_BattlePalaceLobby_EventScript_CloseDoublesHallDoor:: @ 824DC41 closedoor 19, 4 return -BattleFrontier_BattlePalaceLobby_Movement_24DC47: @ 824DC47 +BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor: @ 824DC47 walk_up step_end -BattleFrontier_BattlePalaceLobby_Movement_24DC49: @ 824DC49 +BattleFrontier_BattlePalaceLobby_Movement_AttendantEnterDoor: @ 824DC49 walk_up set_invisible step_end -BattleFrontier_BattlePalaceLobby_Movement_24DC4C: @ 824DC4C +BattleFrontier_BattlePalaceLobby_Movement_PlayerEnterDoor: @ 824DC4C walk_up walk_up set_invisible step_end -BattleFrontier_BattlePalaceLobby_EventScript_24DC50:: @ 824DC50 +BattleFrontier_BattlePalaceLobby_EventScript_ShowSinglesResults:: @ 824DC50 lockall frontier_results FRONTIER_FACILITY_PALACE, FRONTIER_MODE_SINGLES waitbuttonpress @@ -316,7 +315,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DC50:: @ 824DC50 releaseall end -BattleFrontier_BattlePalaceLobby_EventScript_24DC69:: @ 824DC69 +BattleFrontier_BattlePalaceLobby_EventScript_ShowDoublesResults:: @ 824DC69 lockall frontier_results FRONTIER_FACILITY_PALACE, FRONTIER_MODE_DOUBLES waitbuttonpress @@ -324,83 +323,83 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DC69:: @ 824DC69 releaseall end -BattleFrontier_BattlePalaceLobby_EventScript_24DC82:: @ 824DC82 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E6E3, MSGBOX_NPC +BattleFrontier_BattlePalaceLobby_EventScript_BlackBelt:: @ 824DC82 + msgbox BattleFrontier_BattlePalaceLobby_Text_LadyCanTellWhatMonsThink, MSGBOX_NPC end -BattleFrontier_BattlePalaceLobby_EventScript_24DC8B:: @ 824DC8B - msgbox BattleFrontier_BattlePalaceLobby_Text_24E851, MSGBOX_NPC +BattleFrontier_BattlePalaceLobby_EventScript_Man:: @ 824DC8B + msgbox BattleFrontier_BattlePalaceLobby_Text_NatureAndMovesKeyHere, MSGBOX_NPC end -BattleFrontier_BattlePalaceLobby_EventScript_24DC94:: @ 824DC94 - msgbox BattleFrontier_BattlePalaceLobby_Text_24E992, MSGBOX_NPC +BattleFrontier_BattlePalaceLobby_EventScript_Beauty:: @ 824DC94 + msgbox BattleFrontier_BattlePalaceLobby_Text_MonDocileButTransforms, MSGBOX_NPC end -BattleFrontier_BattlePalaceLobby_EventScript_24DC9D:: @ 824DC9D - msgbox BattleFrontier_BattlePalaceLobby_Text_24EA4B, MSGBOX_NPC +BattleFrontier_BattlePalaceLobby_EventScript_Maniac:: @ 824DC9D + msgbox BattleFrontier_BattlePalaceLobby_Text_WhatNatureFavorsChippingAway, MSGBOX_NPC end -BattleFrontier_BattlePalaceLobby_EventScript_24DCA6:: @ 824DCA6 +BattleFrontier_BattlePalaceLobby_EventScript_RulesBoard:: @ 824DCA6 lockall - msgbox BattleFrontier_BattlePalaceLobby_Text_24EF66, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DCB5 + msgbox BattleFrontier_BattlePalaceLobby_Text_RulesAreListed, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePalaceLobby_EventScript_24DCB5:: @ 824DCB5 - message BattleFrontier_BattlePalaceLobby_Text_24EF88 +BattleFrontier_BattlePalaceLobby_EventScript_ReadRulesBoard:: @ 824DCB5 + message BattleFrontier_BattlePalaceLobby_Text_ReadWhichHeading waitmessage multichoice 16, 0, MULTI_BATTLE_PALACE_RULES, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePalaceLobby_EventScript_24DD13 - case 1, BattleFrontier_BattlePalaceLobby_EventScript_24DD21 - case 2, BattleFrontier_BattlePalaceLobby_EventScript_24DD2F - case 3, BattleFrontier_BattlePalaceLobby_EventScript_24DD3D - case 4, BattleFrontier_BattlePalaceLobby_EventScript_24DD4B - case 5, BattleFrontier_BattlePalaceLobby_EventScript_24DD59 - case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_24DD59 + case 0, BattleFrontier_BattlePalaceLobby_EventScript_RulesBasics + case 1, BattleFrontier_BattlePalaceLobby_EventScript_RulesNature + case 2, BattleFrontier_BattlePalaceLobby_EventScript_RulesMoves + case 3, BattleFrontier_BattlePalaceLobby_EventScript_RulesUnderpowered + case 4, BattleFrontier_BattlePalaceLobby_EventScript_RulesWhenInDanger + case 5, BattleFrontier_BattlePalaceLobby_EventScript_ExitRules + case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_ExitRules end -BattleFrontier_BattlePalaceLobby_EventScript_24DD13:: @ 824DD13 - msgbox BattleFrontier_BattlePalaceLobby_Text_24EFAB, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DCB5 +BattleFrontier_BattlePalaceLobby_EventScript_RulesBasics:: @ 824DD13 + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesBasics, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePalaceLobby_EventScript_24DD21:: @ 824DD21 - msgbox BattleFrontier_BattlePalaceLobby_Text_24F049, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DCB5 +BattleFrontier_BattlePalaceLobby_EventScript_RulesNature:: @ 824DD21 + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesNature, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePalaceLobby_EventScript_24DD2F:: @ 824DD2F - msgbox BattleFrontier_BattlePalaceLobby_Text_24F190, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DCB5 +BattleFrontier_BattlePalaceLobby_EventScript_RulesMoves:: @ 824DD2F + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesMoves, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePalaceLobby_EventScript_24DD3D:: @ 824DD3D - msgbox BattleFrontier_BattlePalaceLobby_Text_24F2E8, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DCB5 +BattleFrontier_BattlePalaceLobby_EventScript_RulesUnderpowered:: @ 824DD3D + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesUnderpowered, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePalaceLobby_EventScript_24DD4B:: @ 824DD4B - msgbox BattleFrontier_BattlePalaceLobby_Text_24F3F4, MSGBOX_DEFAULT - goto BattleFrontier_BattlePalaceLobby_EventScript_24DCB5 +BattleFrontier_BattlePalaceLobby_EventScript_RulesWhenInDanger:: @ 824DD4B + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesWhenInDanger, MSGBOX_DEFAULT + goto BattleFrontier_BattlePalaceLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePalaceLobby_EventScript_24DD59:: @ 824DD59 +BattleFrontier_BattlePalaceLobby_EventScript_ExitRules:: @ 824DD59 releaseall end -BattleFrontier_BattlePalaceLobby_Text_24DD5B: @ 824DD5B +BattleFrontier_BattlePalaceLobby_Text_WelcomeForSingleBattle: @ 824DD5B .string "Where the hearts of TRAINERS\n" .string "are put to the test.\p" .string "I welcome you to the BATTLE PALACE.\p" .string "I accept challenges to the SINGLE\n" .string "BATTLE HALLS.$" -BattleFrontier_BattlePalaceLobby_Text_24DDE1: @ 824DDE1 +BattleFrontier_BattlePalaceLobby_Text_TakeSingleBattleChallenge: @ 824DDE1 .string "Do you wish to take\n" .string "the SINGLE BATTLE HALL challenge?$" -BattleFrontier_BattlePalaceLobby_Text_24DE17: @ 824DE17 +BattleFrontier_BattlePalaceLobby_Text_ExplainSingleBattleChallenge: @ 824DE17 .string "In the BATTLE PALACE, there are\n" .string "several auditoriums for SINGLE BATTLES\l" .string "that are named SINGLE BATTLE HALLS.\p" @@ -423,16 +422,16 @@ BattleFrontier_BattlePalaceLobby_Text_24DE17: @ 824DE17 .string "If you don't save before interrupting,\n" .string "you will be disqualified.$" -BattleFrontier_BattlePalaceLobby_Text_24E0D8: @ 824E0D8 +BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified: @ 824E0D8 .string "When you have fortified your heart\n" .string "and POKéMON, you must return.$" -BattleFrontier_BattlePalaceLobby_Text_24E119: @ 824E119 +BattleFrontier_BattlePalaceLobby_Text_WhichChallenge: @ 824E119 .string "There are two BATTLE HALLS,\n" .string "Level 50 and Open Level.\l" .string "Which is your choice of a challenge?$" -BattleFrontier_BattlePalaceLobby_Text_24E173: @ 824E173 +BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLv50: @ 824E173 .string "Sigh…\p" .string "You do not have the three POKéMON\n" .string "required for the challenge.\p" @@ -446,7 +445,7 @@ BattleFrontier_BattlePalaceLobby_Text_24E173: @ 824E173 .string "Come back when you have made\n" .string "your preparations.$" -BattleFrontier_BattlePalaceLobby_Text_24E29E: @ 824E29E +BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLvOpen: @ 824E29E .string "Sigh…\p" .string "You do not have the three POKéMON\n" .string "required for the challenge.\p" @@ -458,65 +457,64 @@ BattleFrontier_BattlePalaceLobby_Text_24E29E: @ 824E29E .string "Come back when you have made\n" .string "your preparations.$" -BattleFrontier_BattlePalaceLobby_Text_24E399: @ 824E399 +BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons: @ 824E399 .string "Good. Now, you must select your\n" .string "three POKéMON.$" -BattleFrontier_BattlePalaceLobby_Text_24E3C8: @ 824E3C8 +BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge2: @ 824E3C8 .string "I must save before I show you to\n" .string "the BATTLE HALL. Is that okay?$" -BattleFrontier_BattlePalaceLobby_Text_24E408: @ 824E408 +BattleFrontier_BattlePalaceLobby_Text_FollowMe: @ 824E408 .string "Good.\n" .string "Now, follow me.$" -BattleFrontier_BattlePalaceLobby_Text_24E41E: @ 824E41E +BattleFrontier_BattlePalaceLobby_Text_ResultsWillBeRecorded: @ 824E41E .string "I feel privileged for having seen\n" .string "your POKéMON's exploits.\p" .string "The results will be recorded.\n" .string "I must ask you to briefly wait.$" -BattleFrontier_BattlePalaceLobby_Text_24E497: @ 824E497 +BattleFrontier_BattlePalaceLobby_Text_FirmTrueBondsFor7WinStreak: @ 824E497 .string "To achieve a 7-win streak…\p" .string "The bonds that bind your heart with\n" .string "your POKéMON seem firm and true.$" -BattleFrontier_BattlePalaceLobby_Text_24E4F7: @ 824E4F7 +BattleFrontier_BattlePalaceLobby_Text_FeatWillBeRecorded: @ 824E4F7 .string "Your feat will be recorded.\n" .string "I must ask you to briefly wait.$" -BattleFrontier_BattlePalaceLobby_Text_24E533: @ 824E5333 +@ Unused +BattleFrontier_BattlePalaceLobby_Text_BattlePointsFor7WinStreak: @ 824E5333 .string "For the feat of your 7-win streak,\n" .string "we present you with Battle Point(s).$" -VerdanturfTown_BattleTentLobby_Text_24E57B: @ 824E57B +BattleFrontier_BattlePalaceLobby_Text_NoSpaceForPrize: @ 824E57B .string "You seem to have no space for\n" .string "our prize.\p" .string "You should return when you have\n" .string "organized your BAG.$" -BattleFrontier_BattlePalaceLobby_Text_24E5D8: @ 824E5D8 -VerdanturfTown_BattleTentLobby_Text_24E5D8: @ 824E5D8 +BattleFrontier_BattlePalaceLobby_Text_WeHaveBeenWaiting: @ 824E5D8 .string "We have been waiting for you…$" -BattleFrontier_BattlePalaceLobby_Text_24E5F6: @ 824E5F6 -VerdanturfTown_BattleTentLobby_Text_24E5F6: @ 824E5F6 +BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge: @ 824E5F6 .string "I must save before I show you to\n" .string "the BATTLE HALL. Is that okay?$" -BattleFrontier_BattlePalaceLobby_Text_24E636: @ 824E636 -VerdanturfTown_BattleTentLobby_Text_24E636: @ 824E636 +BattleFrontier_BattlePalaceLobby_Text_FailedToSaveBeforeEndingChallenge: @ 824E636 .string "Sigh…\p" .string "You failed to save before you ended\n" .string "your challenge the last time.\p" .string "As a result, your challenge has been\n" .string "disqualified. It is most unfortunate.$" -BattleFrontier_BattlePalaceLobby_Text_24E6C9: @ 824E6C9 +@ Unused +BattleFrontier_BattlePalaceLobby_Text_ReceivedPrize: @ 824E6C9 .string "{PLAYER} received the prize\n" .string "{STR_VAR_1}.$" -BattleFrontier_BattlePalaceLobby_Text_24E6E3: @ 824E6E3 +BattleFrontier_BattlePalaceLobby_Text_LadyCanTellWhatMonsThink: @ 824E6E3 .string "For a hardy fellow like me,\n" .string "hardy POKéMON are the best.\p" .string "Offense is the best defense!\n" @@ -532,7 +530,7 @@ BattleFrontier_BattlePalaceLobby_Text_24E6E3: @ 824E6E3 .string "Huh?\n" .string "Why are you looking at me like that?$" -BattleFrontier_BattlePalaceLobby_Text_24E851: @ 824E851 +BattleFrontier_BattlePalaceLobby_Text_NatureAndMovesKeyHere: @ 824E851 .string "Hmm…\p" .string "It appears that the nature of POKéMON\n" .string "and the moves that they have been\l" @@ -545,7 +543,7 @@ BattleFrontier_BattlePalaceLobby_Text_24E851: @ 824E851 .string "you may need to examine how well\l" .string "its moves match its nature.$" -BattleFrontier_BattlePalaceLobby_Text_24E992: @ 824E992 +BattleFrontier_BattlePalaceLobby_Text_MonDocileButTransforms: @ 824E992 .string "My POKéMON is usually very docile.\p" .string "But when it's in a BATTLE HALL,\n" .string "it sometimes seems to become\l" @@ -553,25 +551,25 @@ BattleFrontier_BattlePalaceLobby_Text_24E992: @ 824E992 .string "It becomes totally intimidating.\n" .string "It's shocking, even.$" -BattleFrontier_BattlePalaceLobby_Text_24EA4B: @ 824EA4B +BattleFrontier_BattlePalaceLobby_Text_WhatNatureFavorsChippingAway: @ 824EA4B .string "I wonder what sort of nature a POKéMON\n" .string "would have if it favored enfeebling its\l" .string "opponents and chipping away slowly.\p" .string "I'd be surprised if it was a LAX nature.\p" .string "But, nah, that can't be right.$" -BattleFrontier_BattlePalaceLobby_Text_24EB06: @ 824EB06 +BattleFrontier_BattlePalaceLobby_Text_WelcomeForDoubleBattle: @ 824EB06 .string "Where the hearts of TRAINERS\n" .string "are put to the test.\p" .string "I welcome you to the BATTLE PALACE.\p" .string "I accept challenges to the DOUBLE\n" .string "BATTLE HALLS.$" -BattleFrontier_BattlePalaceLobby_Text_24EB8C: @ 824EB8C +BattleFrontier_BattlePalaceLobby_Text_TakeDoubleBattleChallenge: @ 824EB8C .string "Do you wish to take\n" .string "the DOUBLE BATTLE HALL challenge?$" -BattleFrontier_BattlePalaceLobby_Text_24EBC2: @ 824EBC2 +BattleFrontier_BattlePalaceLobby_Text_ExplainDoubleBattleChallenge: @ 824EBC2 .string "In the BATTLE PALACE, there are\n" .string "several auditoriums for DOUBLE BATTLES\l" .string "that are named DOUBLE BATTLE HALLS.\p" @@ -594,37 +592,34 @@ BattleFrontier_BattlePalaceLobby_Text_24EBC2: @ 824EBC2 .string "If you don't save before interrupting,\n" .string "you will be disqualified.$" -BattleFrontier_BattlePalaceLobby_Text_24EE81: @ 824EE81 +BattleFrontier_BattlePalaceLobby_Text_ToDefeatMavenAnd7Trainers: @ 824EE81 .string "To defeat the PALACE MAVEN\n" .string "and seven TRAINERS in a row…$" -BattleFrontier_BattlePalaceLobby_Text_24EEB9: @ 824EEB9 +BattleFrontier_BattlePalaceLobby_Text_PresentYouWithBattlePoints: @ 824EEB9 .string "In honor of the bond you share with\n" .string "your POKéMON, we present you with\l" .string "these Battle Point(s).$" -BattleFrontier_BattlePalaceLobby_Text_24EF16: @ 824EF16 +BattleFrontier_BattlePalaceLobby_Text_LikeToRecordMatch: @ 824EF16 .string "Would you like to record your latest\n" .string "BATTLE PALACE match on your\l" .string "FRONTIER PASS?$" -BattleFrontier_BattlePalaceLobby_Text_24EF66: @ 824EF66 +BattleFrontier_BattlePalaceLobby_Text_RulesAreListed: @ 824EF66 .string "The BATTLE HALL rules are listed.$" -BattleFrontier_BattlePalaceLobby_Text_24EF88: @ 824EF88 -VerdanturfTown_BattleTentLobby_Text_24EF88: @ 824EF88 +BattleFrontier_BattlePalaceLobby_Text_ReadWhichHeading: @ 824EF88 .string "Which heading do you want to read?$" -BattleFrontier_BattlePalaceLobby_Text_24EFAB: @ 824EFAB -VerdanturfTown_BattleTentLobby_Text_24EFAB: @ 824EFAB +BattleFrontier_BattlePalaceLobby_Text_ExplainRulesBasics: @ 824EFAB .string "Here, POKéMON are required to think\n" .string "and battle by themselves.\p" .string "Unlike in the wild, POKéMON that live\n" .string "with people behave differently\l" .string "depending on their nature.$" -BattleFrontier_BattlePalaceLobby_Text_24F049: @ 824F049 -VerdanturfTown_BattleTentLobby_Text_24F049: @ 824F049 +BattleFrontier_BattlePalaceLobby_Text_ExplainRulesNature: @ 824F049 .string "Depending on its nature, a POKéMON\n" .string "may prefer to attack no matter what.\p" .string "Another POKéMON may prefer to protect\n" @@ -637,8 +632,7 @@ VerdanturfTown_BattleTentLobby_Text_24F049: @ 824F049 .string "It may also dislike certain moves that\n" .string "it has trouble using.$" -BattleFrontier_BattlePalaceLobby_Text_24F190: @ 824F190 -VerdanturfTown_BattleTentLobby_Text_24F190: @ 824F190 +BattleFrontier_BattlePalaceLobby_Text_ExplainRulesMoves: @ 824F190 .string "There are offensive moves that inflict\n" .string "direct damage on the foe.\p" .string "There are defensive moves that are\n" @@ -651,8 +645,7 @@ VerdanturfTown_BattleTentLobby_Text_24F190: @ 824F190 .string "POKéMON will consider using moves in\n" .string "these three categories.$" -BattleFrontier_BattlePalaceLobby_Text_24F2E8: @ 824F2E8 -VerdanturfTown_BattleTentLobby_Text_24F2E8: @ 824F2E8 +BattleFrontier_BattlePalaceLobby_Text_ExplainRulesUnderpowered: @ 824F2E8 .string "When not under command by its TRAINER,\n" .string "a POKéMON may be unable to effectively\l" .string "use certain moves.\p" @@ -662,8 +655,7 @@ VerdanturfTown_BattleTentLobby_Text_24F2E8: @ 824F2E8 .string "do not match its nature, it will often\l" .string "be unable to live up to its potential.$" -BattleFrontier_BattlePalaceLobby_Text_24F3F4: @ 824F3F4 -VerdanturfTown_BattleTentLobby_Text_24F3F4: @ 824F3F4 +BattleFrontier_BattlePalaceLobby_Text_ExplainRulesWhenInDanger: @ 824F3F4 .string "Depending on its nature, a POKéMON may\n" .string "start using moves that don't match its\l" .string "nature when it is in trouble.\p" diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index 5ef8100cc..4760880e2 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -46,7 +46,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20236F:: @ 820236F battletent_getopponentintro msgbox gStringVar4, MSGBOX_DEFAULT waitmessage - call VerdanturfTown_BattleTentBattleRoom_EventScript_24FDF7 + call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle switch VAR_RESULT case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_2023C8 @@ -68,7 +68,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_2023C8:: @ 82023C8 applymovement 3, Common_Movement_WalkInPlaceFastestDown applymovement 1, Common_Movement_WalkInPlaceFastestUp waitmovement 0 - msgbox VerdanturfTown_BattleTentBattleRoom_Text_24FF00, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons, MSGBOX_DEFAULT special LoadPlayerParty special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE @@ -89,14 +89,14 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20243C:: @ 820243C case 2, VerdanturfTown_BattleTentBattleRoom_EventScript_2024B8 VerdanturfTown_BattleTentBattleRoom_EventScript_20248A:: @ 820248A - msgbox VerdanturfTown_BattleTentBattleRoom_Text_250030, MSGBOX_YESNO + msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SaveAndQuitGame, MSGBOX_YESNO switch VAR_RESULT case NO, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C case YES, VerdanturfTown_BattleTentBattleRoom_EventScript_20251F case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C VerdanturfTown_BattleTentBattleRoom_EventScript_2024B8:: @ 82024B8 - message VerdanturfTown_BattleTentBattleRoom_Text_25005A + message BattleFrontier_BattlePalaceBattleRoom_Text_WishToQuitChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT @@ -118,7 +118,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_202501:: @ 8202501 waitstate VerdanturfTown_BattleTentBattleRoom_EventScript_20251F:: @ 820251F - message VerdanturfTown_BattleTentBattleRoom_Text_25007E + message BattleFrontier_BattlePalaceBattleRoom_Text_SavingData waitmessage verdanturftent_save CHALLENGE_STATUS_PAUSED playse SE_SAVE @@ -140,12 +140,12 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20254B:: @ 820254B end VerdanturfTown_BattleTentBattleRoom_EventScript_202565:: @ 8202565 - message VerdanturfTown_BattleTentBattleRoom_Text_24FF28 + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor2ndOpponent waitmessage return VerdanturfTown_BattleTentBattleRoom_EventScript_20256C:: @ 820256C - message VerdanturfTown_BattleTentBattleRoom_Text_24FF54 + message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor3rdOpponent waitmessage return diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index 6add7d182..f15bbd4f8 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -26,7 +26,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201719:: @ 8201719 VerdanturfTown_BattleTentLobby_EventScript_201722:: @ 8201722 lockall - msgbox VerdanturfTown_BattleTentLobby_Text_24E636, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_FailedToSaveBeforeEndingChallenge, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_TEMP_0, 255 @@ -62,7 +62,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201791:: @ 8201791 end VerdanturfTown_BattleTentLobby_EventScript_2017DD:: @ 82017DD - msgbox VerdanturfTown_BattleTentLobby_Text_24E57B, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_NoSpaceForPrize, MSGBOX_DEFAULT waitmessage closemessage setvar VAR_TEMP_0, 255 @@ -91,8 +91,8 @@ VerdanturfTown_BattleTentLobby_EventScript_2017FD:: @ 82017FD VerdanturfTown_BattleTentLobby_EventScript_201837:: @ 8201837 lockall - msgbox VerdanturfTown_BattleTentLobby_Text_24E5D8, MSGBOX_DEFAULT - message VerdanturfTown_BattleTentLobby_Text_24E5F6 + msgbox BattleFrontier_BattlePalaceLobby_Text_WeHaveBeenWaiting, MSGBOX_DEFAULT + message BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge waitmessage verdanturftent_save CHALLENGE_STATUS_SAVING playse SE_SAVE @@ -282,7 +282,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201B02:: @ 8201B02 end VerdanturfTown_BattleTentLobby_EventScript_201B11:: @ 8201B11 - message VerdanturfTown_BattleTentLobby_Text_24EF88 + message BattleFrontier_BattlePalaceLobby_Text_ReadWhichHeading waitmessage setvar VAR_0x8004, SCROLL_MULTI_BATTLE_TENT_RULES special ShowScrollableMultichoice @@ -304,27 +304,27 @@ VerdanturfTown_BattleTentLobby_EventScript_201B7E:: @ 8201B7E end VerdanturfTown_BattleTentLobby_EventScript_201B8C:: @ 8201B8C - msgbox VerdanturfTown_BattleTentLobby_Text_24EFAB, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesBasics, MSGBOX_DEFAULT goto VerdanturfTown_BattleTentLobby_EventScript_201B11 end VerdanturfTown_BattleTentLobby_EventScript_201B9A:: @ 8201B9A - msgbox VerdanturfTown_BattleTentLobby_Text_24F049, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesNature, MSGBOX_DEFAULT goto VerdanturfTown_BattleTentLobby_EventScript_201B11 end VerdanturfTown_BattleTentLobby_EventScript_201BA8:: @ 8201BA8 - msgbox VerdanturfTown_BattleTentLobby_Text_24F190, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesMoves, MSGBOX_DEFAULT goto VerdanturfTown_BattleTentLobby_EventScript_201B11 end VerdanturfTown_BattleTentLobby_EventScript_201BB6:: @ 8201BB6 - msgbox VerdanturfTown_BattleTentLobby_Text_24F2E8, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesUnderpowered, MSGBOX_DEFAULT goto VerdanturfTown_BattleTentLobby_EventScript_201B11 end VerdanturfTown_BattleTentLobby_EventScript_201BC4:: @ 8201BC4 - msgbox VerdanturfTown_BattleTentLobby_Text_24F3F4, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesWhenInDanger, MSGBOX_DEFAULT goto VerdanturfTown_BattleTentLobby_EventScript_201B11 end From fe164529990dd73921a22cb2bbb365241c76fc75 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 6 Dec 2019 21:30:22 -0500 Subject: [PATCH 08/35] Typo fix --- data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 27445d482..3f635767d 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -6,7 +6,7 @@ BattleFrontier_BattlePalaceBattleRoom_MapScripts:: @ 824F815 @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden @ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_0 - @ The opponent is represented by objct event 2, which has the gfx id VAR_OBJ_GFX_ID_1 + @ The opponent is represented by object event 2, which has the gfx id VAR_OBJ_GFX_ID_1 BattleFrontier_BattlePalaceBattleRoom_OnTransition: @ 824F825 frontier_settrainers From ed1ff0ad774c67e7184fb0c862005e487fed42ec Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 10 Dec 2019 13:48:20 -0500 Subject: [PATCH 09/35] Document misc strings and text colors --- asm/berry_crush.s | 36 +- data/berry_crush.s | 22 +- data/contest_link_80F57C4.s | 4 +- include/strings.h | 174 +++++---- src/battle_factory_screen.c | 40 +- src/battle_pyramid_bag.c | 2 +- src/battle_script_commands.c | 4 +- src/berry_crush.c | 4 +- src/berry_fix_program.c | 54 +-- src/berry_tag_screen.c | 2 +- src/contest_link_80F57C4.c | 6 +- src/data/union_room.h | 695 +++++++++++++++++------------------ src/dodrio_berry_picking.c | 40 +- src/easy_chat.c | 12 +- src/ereader_screen.c | 28 +- src/frontier_pass.c | 50 +-- src/hall_of_fame.c | 33 +- src/item_menu.c | 4 +- src/link.c | 17 +- src/mail.c | 12 +- src/main_menu.c | 20 +- src/menu.c | 16 +- src/menu_specialized.c | 22 +- src/mevent_801BAAC.c | 22 +- src/naming_screen.c | 38 +- src/party_menu.c | 4 +- src/pokedex.c | 24 +- src/pokemon_jump.c | 8 +- src/pokemon_storage_system.c | 16 +- src/pokemon_summary_screen.c | 6 +- src/pokenav_main_menu.c | 6 +- src/pokenav_match_call_ui.c | 4 +- src/pokenav_unk_10.c | 4 +- src/pokenav_unk_2.c | 37 +- src/pokenav_unk_4.c | 11 +- src/slot_machine.c | 4 +- src/starter_choose.c | 50 +-- src/strings.c | 396 ++++++++++---------- src/trainer_card.c | 64 ++-- src/union_room.c | 154 ++++---- src/union_room_chat.c | 10 +- src/use_pokeblock.c | 10 +- 42 files changed, 1076 insertions(+), 1089 deletions(-) diff --git a/asm/berry_crush.s b/asm/berry_crush.s index b6d07662e..cd70df741 100755 --- a/asm/berry_crush.s +++ b/asm/berry_crush.s @@ -296,7 +296,7 @@ _08021C5E: lsrs r2, 24 mov r1, r10 lsrs r3, r1, 24 - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] movs r4, 0 str r4, [sp, 0x4] @@ -338,7 +338,7 @@ _08021CC8: ldrb r0, [r0] mov r4, r10 lsrs r3, r4, 24 - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] movs r1, 0 str r1, [sp, 0x4] @@ -402,7 +402,7 @@ sub_8021D34: @ 8021D34 ldrh r1, [r2, 0x4] bl sub_8021944 ldrb r0, [r4] - ldr r4, =gUnknown_082F32D8 + ldr r4, =sBerryCrushTextColors1 str r4, [sp] str r6, [sp, 0x4] ldr r1, =gText_TimeColon @@ -423,7 +423,7 @@ sub_8021D34: @ 8021D34 lsrs r6, r0, 24 mov r2, r9 ldrb r0, [r2] - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] mov r2, r10 str r2, [sp, 0x4] @@ -464,7 +464,7 @@ sub_8021D34: @ 8021D34 lsrs r6, r0, 24 mov r4, r9 ldrb r0, [r4] - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] mov r2, r10 str r2, [sp, 0x4] @@ -484,7 +484,7 @@ sub_8021D34: @ 8021D34 lsrs r6, r0, 24 mov r1, r9 ldrb r0, [r1] - ldr r2, =gUnknown_082F32D8 + ldr r2, =sBerryCrushTextColors1 str r2, [sp] mov r1, r10 str r1, [sp, 0x4] @@ -515,7 +515,7 @@ sub_8021D34: @ 8021D34 lsrs r6, r0, 24 mov r4, r9 ldrb r0, [r4] - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] mov r2, r10 str r2, [sp, 0x4] @@ -529,7 +529,7 @@ sub_8021D34: @ 8021D34 lsls r0, 24 lsrs r7, r0, 24 ldrb r0, [r4] - ldr r4, =gUnknown_082F32D8 + ldr r4, =sBerryCrushTextColors1 str r4, [sp] mov r1, r10 str r1, [sp, 0x4] @@ -552,7 +552,7 @@ sub_8021D34: @ 8021D34 lsrs r6, r0, 24 mov r1, r9 ldrb r0, [r1] - ldr r2, =gUnknown_082F32D8 + ldr r2, =sBerryCrushTextColors1 str r2, [sp] mov r1, r10 str r1, [sp, 0x4] @@ -633,7 +633,7 @@ _08021F0A: lsls r0, 1 add r0, r8 ldrb r0, [r0] - ldr r1, =gUnknown_082F32E7 + ldr r1, =sBerryCrushTextColors4 str r1, [sp] movs r1, 0 str r1, [sp, 0x4] @@ -649,7 +649,7 @@ _08021FC4: lsls r0, 1 add r0, r8 ldrb r0, [r0] - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] str r2, [sp, 0x4] str r4, [sp, 0x8] @@ -667,7 +667,7 @@ _08021FDE: add r8, r4 mov r1, r8 ldrb r0, [r1] - ldr r2, =gUnknown_082F32D8 + ldr r2, =sBerryCrushTextColors1 mov r9, r2 str r2, [sp] movs r5, 0 @@ -1019,7 +1019,7 @@ _080222D0: lsls r0, 24 lsrs r7, r0, 24 ldrb r0, [r6, 0x2] - ldr r5, =gUnknown_082F32E1 + ldr r5, =sBerryCrushTextColorTable str r5, [sp] mov r1, r9 str r1, [sp, 0x4] @@ -1062,7 +1062,7 @@ _08022336: ldr r1, =gText_Var1Players bl StringExpandPlaceholders ldrb r0, [r6, 0x2] - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] movs r1, 0 str r1, [sp, 0x4] @@ -1082,7 +1082,7 @@ _08022336: lsls r1, 24 lsrs r7, r1, 24 ldrb r0, [r6, 0x2] - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] movs r1, 0 str r1, [sp, 0x4] @@ -1155,7 +1155,7 @@ _080223CA: lsls r0, 24 lsrs r7, r0, 24 ldrb r0, [r6, 0x2] - ldr r1, =gUnknown_082F32D8 + ldr r1, =sBerryCrushTextColors1 str r1, [sp] movs r1, 0 str r1, [sp, 0x4] @@ -1405,7 +1405,7 @@ _08022616: mov r1, r8 str r1, [sp] str r1, [sp, 0x4] - ldr r1, =gUnknown_082F32DB + ldr r1, =sBerryCrushTextColors2 str r1, [sp, 0x8] mov r1, r8 str r1, [sp, 0xC] @@ -1432,7 +1432,7 @@ _08022668: mov r1, r8 str r1, [sp] str r1, [sp, 0x4] - ldr r1, =gUnknown_082F32DE + ldr r1, =sBerryCrushTextColors3 str r1, [sp, 0x8] mov r1, r8 str r1, [sp, 0xC] diff --git a/data/berry_crush.s b/data/berry_crush.s index fa1170062..a2b0f2658 100755 --- a/data/berry_crush.s +++ b/data/berry_crush.s @@ -47,21 +47,21 @@ gUnknown_082F32CC:: @ 82F32CC struct BgTemplate? not sure .byte 0xb3, 0x30, 0x00, 0x00 .align 2 -gUnknown_082F32D8:: @ 82F32D8 - .byte 0x01, 0x02, 0x03 +sBerryCrushTextColors1:: @ 82F32D8 + .byte 0x01, 0x02, 0x03 @ TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY -gUnknown_082F32DB:: @ 82F32DB - .byte 0x00, 0x01, 0x02 +sBerryCrushTextColors2:: @ 82F32DB + .byte 0x00, 0x01, 0x02 @ TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY -gUnknown_082F32DE:: @ 82F32DE - .byte 0x00, 0x03, 0x04 +sBerryCrushTextColors3:: @ 82F32DE + .byte 0x00, 0x03, 0x04 @ TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GREY, TEXT_COLOR_RED -gUnknown_082F32E1:: @ 82F32E1 - .byte 0x01, 0x08, 0x09 - .byte 0x01, 0x06, 0x07 +sBerryCrushTextColorTable:: @ 82F32E1 + .byte 0x01, 0x08, 0x09 @ TEXT_COLOR_WHITE, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_BLUE + .byte 0x01, 0x06, 0x07 @ TEXT_COLOR_WHITE, TEXT_COLOR_GREEN, TEXT_COLOR_LIGHT_GREEN -gUnknown_082F32E7:: @ 82F32E7 - .byte 0x01, 0x04, 0x05 +sBerryCrushTextColors4:: @ 82F32E7 + .byte 0x01, 0x04, 0x05 @ TEXT_COLOR_WHITE, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED .align 2 gUnknown_082F32EC:: @ 82F32EC diff --git a/data/contest_link_80F57C4.s b/data/contest_link_80F57C4.s index a434eee28..40a5636a0 100644 --- a/data/contest_link_80F57C4.s +++ b/data/contest_link_80F57C4.s @@ -83,6 +83,6 @@ gUnknown_0858D8E0:: @ 858D8E0 obj_tiles gMiscBlank_Gfx, 0x0200, 0x56ce .align 2 -gUnknown_0858D8E8:: @ 858D8E8 - .byte 0x01, 0x0f, 0x0e, 0x00 +sContestLinkTextColors:: @ 858D8E8 + .byte 0x01, 0x0f, 0x0e, 0x00 @ TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5 diff --git a/include/strings.h b/include/strings.h index f814ad29f..ec1ca401d 100644 --- a/include/strings.h +++ b/include/strings.h @@ -373,7 +373,7 @@ extern const u8 gBerryFirmnessString_Hard[]; extern const u8 gBerryFirmnessString_VeryHard[]; extern const u8 gBerryFirmnessString_SuperHard[]; extern const u8 gText_BerryTag[]; -extern const u8 gText_UnkF908Var1Var2[]; +extern const u8 gText_NumberVar1Var2[]; extern const u8 gText_SizeSlash[]; extern const u8 gText_Var1DotVar2[]; extern const u8 gText_ThreeMarks[]; @@ -382,7 +382,7 @@ extern const u8 gText_FirmSlash[]; // item menu screen text extern const u8 gText_CloseBag[]; extern const u8 gText_ClearTo11Var1Clear5Var2[]; -extern const u8 gText_UnkF908Var1Clear7Var2[]; +extern const u8 gText_NumberVar1Clear7Var2[]; extern const u8 gText_xVar1[]; extern const u8 gText_ReturnToVar1[]; extern const u8 gText_SelectorArrow2[]; @@ -471,20 +471,20 @@ extern const u8 gText_EggCantBattle[]; extern const u8 gText_PkmnAlreadySelected[]; extern const u8 gText_PkmnAlreadyInBattle[]; extern const u8 gText_PkmnCantSwitchOut[]; -extern const u8 gUnknown_085EEA46[]; -extern const u8 gUnknown_085EEA4E[]; -extern const u8 gUnknown_085EEA55[]; -extern const u8 gUnknown_085EEA63[]; -extern const u8 gUnknown_085EEA6B[]; -extern const u8 gUnknown_085EEA5D[]; +extern const u8 gText_MaxHP[]; +extern const u8 gText_Attack[]; +extern const u8 gText_Defense[]; +extern const u8 gText_SpAtk[]; +extern const u8 gText_SpDef[]; +extern const u8 gText_Speed[]; extern const u8 gText_Dash[]; -extern const u8 gText_UnkCtrlF904[]; +extern const u8 gText_Plus[]; //pokedex text extern const u8 gText_CryOf[]; extern const u8 gText_SizeComparedTo[]; extern const u8 gText_PokedexRegistration[]; -extern const u8 gText_UnkCtrlF908Clear01[]; +extern const u8 gText_NumberClear01[]; extern const u8 gText_5MarksPokemon[]; extern const u8 gText_UnkHeight[]; extern const u8 gText_UnkWeight[]; @@ -492,7 +492,7 @@ extern const u8 gText_HTHeight[]; extern const u8 gText_WTWeight[]; extern const u8 gText_SearchingPleaseWait[]; extern const u8 gText_SearchCompleted[]; -extern const u8 gUnknown_085E8785[]; +extern const u8 gText_NoMatchingPkmnWereFound[]; extern const u8 gText_SelectorArrow[]; // birch dex rating text @@ -920,7 +920,7 @@ extern const u8 gText_Accuracy2[]; extern const u8 gText_Appeal[]; extern const u8 gText_Jam[]; extern const u8 gText_OTSlash[]; -extern const u8 gText_UnkCtrlF907F908[]; +extern const u8 gText_IDNumber2[]; extern const u8 gText_XNature[]; extern const u8 gText_XNatureHatchedAtYZ[]; extern const u8 gText_XNatureHatchedSomewhereAt[]; @@ -1078,15 +1078,15 @@ extern const u8 gTrickHouse_Mechadoll_Seven2[]; extern const u8 gTrickHouse_Mechadoll_Eight2[]; // Pokedex strings -extern const u8 gUnknown_085E87A5[]; -extern const u8 gUnknown_085E87D6[]; -extern const u8 gUnknown_085E87EF[]; -extern const u8 gUnknown_085E8806[]; -extern const u8 gUnknown_085E881F[]; -extern const u8 gUnknown_085E8840[]; -extern const u8 gUnknown_085E887C[]; -extern const u8 gUnknown_085E88A6[]; -extern const u8 gUnknown_085E88C8[]; +extern const u8 gText_SeachForPkmnBasedOnParameters[]; +extern const u8 gText_SwitchPokedexListings[]; +extern const u8 gText_ReturnToPokedex[]; +extern const u8 gText_SelectPokedexMode[]; +extern const u8 gText_SelectPokedexListingMode[]; +extern const u8 gText_ListByFirstLetter[]; +extern const u8 gText_ListByBodyColor[]; +extern const u8 gText_ListByType[]; +extern const u8 gText_ExecuteSearchSwitch[]; extern const u8 gText_DexHoennTitle[]; extern const u8 gText_DexNatTitle[]; extern const u8 gText_DexSortNumericalTitle[]; @@ -2030,14 +2030,14 @@ extern const u8 gText_LeagueChamp[]; extern const u8 gText_HOFNumber[]; extern const u8 gText_PickNextCancel[]; extern const u8 gText_PickCancel[]; -extern const u8 gText_UnkCtrlF800Exit[]; +extern const u8 gText_AButtonExit[]; extern const u8 gText_HOFCorrupted[]; extern const u8 gText_WelcomeToHOF[]; extern const u8 gText_Number[]; extern const u8 gText_Level[]; extern const u8 gText_IDNumber[]; extern const u8 gText_Name[]; -extern const u8 gText_MainMenuTime[]; +extern const u8 gText_Time[]; // daycare extern const u8 gText_MaleSymbol4[]; @@ -2123,9 +2123,6 @@ extern const u8 gText_XSentOverY[]; extern const u8 gText_TakeGoodCareOfX[]; extern const u8 gText_CommunicationStandby5[]; -// roulette -extern const u8 gUnknown_082A5B89[]; - // match call extern const u8 MatchCall_WildBattleText1[]; extern const u8 MatchCall_WildBattleText2[]; @@ -2371,35 +2368,35 @@ extern const u8 gText_BattlePtsWon[]; extern const u8 gText_SymbolsEarned[]; extern const u8 gText_BattleRecord[]; extern const u8 gText_BattlePoints[]; -extern const u8 gUnknown_085EDA96[]; -extern const u8 gUnknown_085ED932[]; -extern const u8 gUnknown_085ED94D[]; -extern const u8 gUnknown_085ED961[]; -extern const u8 gUnknown_085ED977[]; -extern const u8 gUnknown_085ED993[]; -extern const u8 gUnknown_085ED9AF[]; -extern const u8 gUnknown_085ED9C7[]; -extern const u8 gUnknown_085ED9E5[]; -extern const u8 gUnknown_085EDA02[]; -extern const u8 gUnknown_085EDA21[]; -extern const u8 gUnknown_085EDA3C[]; -extern const u8 gUnknown_085EDA5E[]; -extern const u8 gUnknown_085EDA78[]; -extern const u8 gUnknown_085ED931[]; -extern const u8 gUnknown_085EDAB1[]; -extern const u8 gUnknown_085EDB0F[]; -extern const u8 gUnknown_085EDABE[]; -extern const u8 gUnknown_085EDB4E[]; -extern const u8 gUnknown_085EDACA[]; -extern const u8 gUnknown_085EDB8B[]; -extern const u8 gUnknown_085EDAD8[]; -extern const u8 gUnknown_085EDBC2[]; -extern const u8 gUnknown_085EDAE5[]; -extern const u8 gUnknown_085EDC00[]; -extern const u8 gUnknown_085EDAF4[]; -extern const u8 gUnknown_085EDC45[]; -extern const u8 gUnknown_085EDB00[]; -extern const u8 gUnknown_085EDC84[]; +extern const u8 gText_ThereIsNoBattleRecord[]; +extern const u8 gText_CheckFrontierMap[]; +extern const u8 gText_CheckTrainerCard[]; +extern const u8 gText_ViewRecordedBattle[]; +extern const u8 gText_PutAwayFrontierPass[]; +extern const u8 gText_CurrentBattlePoints[]; +extern const u8 gText_CollectedSymbols[]; +extern const u8 gText_BattleTowerAbilitySymbol[]; +extern const u8 gText_BattleDomeTacticsSymbol[]; +extern const u8 gText_BattlePalaceSpiritsSymbol[]; +extern const u8 gText_BattleArenaGutsSymbol[]; +extern const u8 gText_BattleFactoryKnowledgeSymbol[]; +extern const u8 gText_BattlePikeLuckSymbol[]; +extern const u8 gText_BattlePyramidBraveSymbol[]; +extern const u8 gText_EmptyString7[]; +extern const u8 gText_BattleTower3[]; +extern const u8 gText_BattleDome2[]; +extern const u8 gText_BattlePalace2[]; +extern const u8 gText_BattleArena2[]; +extern const u8 gText_BattleFactory2[]; +extern const u8 gText_BattlePike2[]; +extern const u8 gText_BattlePyramid2[]; +extern const u8 gText_BattleTowerDesc[]; +extern const u8 gText_BattleDomeDesc[]; +extern const u8 gText_BattlePalaceDesc[]; +extern const u8 gText_BattleArenaDesc[]; +extern const u8 gText_BattleFactoryDesc[]; +extern const u8 gText_BattlePikeDesc[]; +extern const u8 gText_BattlePyramidDesc[]; // Apprentice extern const u8 gText_Give[]; @@ -2550,24 +2547,19 @@ extern const u8 gText_UnionRoomChatKeyboard_Emoji9[]; extern const u8 gText_UnionRoomChatKeyboard_Emoji10[]; // E-Reader -extern const u8 gUnknown_085EDFD6[]; -extern const u8 gUnknown_085EDFF5[]; -extern const u8 gUnknown_085EE014[]; -extern const u8 gUnknown_085EE035[]; -extern const u8 gUnknown_085EE05C[]; -extern const u8 gUnknown_085EE06B[]; -extern const u8 gUnknown_085EE080[]; -extern const u8 gUnknown_085EE097[]; -extern const u8 gUnknown_085EE0A3[]; -extern const u8 gUnknown_085EE0BF[]; -extern const u8 gUnknown_085EE0DC[]; -extern const u8 gUnknown_085EE0FA[]; -extern const u8 gUnknown_085EE107[]; -extern const u8 gUnknown_085EE120[]; -extern const u8 gUnknown_085EE12D[]; -extern const u8 gUnknown_085EE14B[]; -extern const u8 gUnknown_085EE14F[]; -extern const u8 gUnknown_085EE154[]; +extern const u8 gJPText_ReceiveMysteryGiftWithEReader[]; +extern const u8 gJPText_SelectConnectFromEReaderMenu[]; +extern const u8 gJPText_SelectConnectWithGBA[]; +extern const u8 gJPText_LinkIsIncorrect[]; +extern const u8 gJPText_CardReadingHasBeenHalted[]; +extern const u8 gJPText_Connecting[]; +extern const u8 gJPText_ConnectionErrorCheckLink[]; +extern const u8 gJPText_ConnectionErrorTryAgain[]; +extern const u8 gJPText_AllowEReaderToLoadCard[]; +extern const u8 gJPText_ConnectionComplete[]; +extern const u8 gJPText_NewTrainerHasComeToHoenn[]; +extern const u8 gJPText_PleaseWaitAMoment[]; +extern const u8 gJPText_WriteErrorUnableToSaveData[]; // Berry Powder Menu extern const u8 gText_Powder[]; @@ -2582,7 +2574,7 @@ extern const u8 gText_Battle[]; extern const u8 gText_Lets[]; extern const u8 gText_Ok[]; extern const u8 gText_Sorry[]; -extern const u8 gText_YayUnkF9F9[]; +extern const u8 gText_YaySmileEmoji[]; extern const u8 gText_ThankYou[]; extern const u8 gText_ByeBye[]; @@ -2745,26 +2737,26 @@ extern const u8 gText_Unknown[]; extern const u8 gText_TrainerCloseBy[]; // pokenav_unk_2 -extern const u8 gUnknown_085EBCC5[]; -extern const u8 gUnknown_085EBCE8[]; -extern const u8 gUnknown_085EBD01[]; -extern const u8 gUnknown_085EBD1C[]; -extern const u8 gUnknown_085EBD34[]; -extern const u8 gUnknown_085EBD83[]; -extern const u8 gUnknown_085EBDA2[]; -extern const u8 gUnknown_085EBDBF[]; -extern const u8 gUnknown_085EBDDB[]; -extern const u8 gUnknown_085EBDEE[]; -extern const u8 gUnknown_085EBE06[]; -extern const u8 gUnknown_085EBE19[]; -extern const u8 gUnknown_085EBE2D[]; -extern const u8 gUnknown_085EBE41[]; +extern const u8 gText_CheckMapOfHoenn[]; +extern const u8 gText_CheckPokemonInDetail[]; +extern const u8 gText_CallRegisteredTrainer[]; +extern const u8 gText_CheckObtainedRibbons[]; +extern const u8 gText_PutAwayPokenav[]; +extern const u8 gText_CheckPartyPokemonInDetail[]; +extern const u8 gText_CheckAllPokemonInDetail[]; +extern const u8 gText_ReturnToPokenavMenu[]; +extern const u8 gText_FindCoolPokemon[]; +extern const u8 gText_FindBeautifulPokemon[]; +extern const u8 gText_FindCutePokemon[]; +extern const u8 gText_FindSmartPokemon[]; +extern const u8 gText_FindToughPokemon[]; +extern const u8 gText_ReturnToConditionMenu[]; extern const u8 gText_NoRibbonWinners[]; // pokenav_unk_4 -extern const u8 gUnknown_085EC017[]; -extern const u8 gUnknown_085EC01C[]; -extern const u8 gUnknown_085EC022[]; +extern const u8 gText_Call[]; +extern const u8 gText_Check[]; +extern const u8 gText_Cancel6[]; // pokenav_unk_8 extern const u8 gText_NumberF700[]; diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 0d1dbb077..de2f3a10c 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -375,8 +375,8 @@ static const struct WindowTemplate sSelect_WindowTemplates[] = static const u16 gUnknown_0861046C[] = INCBIN_U16("graphics/unknown/unknown_61046C.gbapal"); -static const u8 gUnknown_08610476[] = {0x00, 0x02, 0x00}; -static const u8 gUnknown_08610479[] = {0x00, 0x04, 0x00}; +static const u8 sMenuOptionTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_TRANSPARENT}; +static const u8 sSpeciesNameTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_RED, TEXT_COLOR_TRANSPARENT}; static const struct OamData gUnknown_0861047C = { @@ -985,8 +985,8 @@ static const struct WindowTemplate sSwap_WindowTemplates[] = }; static const u16 gUnknown_08610918[] = {RGB_BLACK, RGB_BLACK, RGB_WHITE, RGB_BLACK, RGB_RED}; // Palette. -static const u8 gUnknown_08610922[] = {0x0, 0x02, 0x0}; -static const u8 gUnknown_08610925[] = {0x0, 0x04, 0x0}; +static const u8 sSwapMenuOptionsTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_TRANSPARENT}; +static const u8 sSwapSpeciesNameTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_RED, TEXT_COLOR_TRANSPARENT}; static const struct SwapActionIdAndFunc sSwap_PlayerScreenActions[] = { @@ -1808,7 +1808,7 @@ static void Select_PrintMonSpecies(void) species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(1, 1, x, 1, gUnknown_08610479, 0, gStringVar4); + AddTextPrinterParameterized3(1, 1, x, 1, sSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(1, 2); } @@ -1843,13 +1843,13 @@ static void Select_PrintMenuOptions(void) PutWindowTilemap(3); FillWindowPixelBuffer(3, PIXEL_FILL(0)); - AddTextPrinterParameterized3(3, 1, 7, 1, gUnknown_08610476, 0, gText_Summary); + AddTextPrinterParameterized3(3, 1, 7, 1, sMenuOptionTextColors, 0, gText_Summary); if (selectedId != 0) - AddTextPrinterParameterized3(3, 1, 7, 17, gUnknown_08610476, 0, gText_Deselect); + AddTextPrinterParameterized3(3, 1, 7, 17, sMenuOptionTextColors, 0, gText_Deselect); else - AddTextPrinterParameterized3(3, 1, 7, 17, gUnknown_08610476, 0, gText_Rent); + AddTextPrinterParameterized3(3, 1, 7, 17, sMenuOptionTextColors, 0, gText_Rent); - AddTextPrinterParameterized3(3, 1, 7, 33, gUnknown_08610476, 0, gText_Others2); + AddTextPrinterParameterized3(3, 1, 7, 33, sMenuOptionTextColors, 0, gText_Others2); CopyWindowToVram(3, 3); } @@ -1857,8 +1857,8 @@ static void Select_PrintYesNoOptions(void) { PutWindowTilemap(4); FillWindowPixelBuffer(4, PIXEL_FILL(0)); - AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610476, 0, gText_Yes2); - AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610476, 0, gText_No2); + AddTextPrinterParameterized3(4, 1, 7, 1, sMenuOptionTextColors, 0, gText_Yes2); + AddTextPrinterParameterized3(4, 1, 7, 17, sMenuOptionTextColors, 0, gText_No2); CopyWindowToVram(4, 3); } @@ -3599,7 +3599,7 @@ static void Swap_PrintMonSpecies(void) species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(1, 1, x, 1, gUnknown_08610925, 0, gStringVar4); + AddTextPrinterParameterized3(1, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(1, 3); } } @@ -3615,9 +3615,9 @@ static void Swap_PrintMenuOptions(void) { PutWindowTilemap(3); FillWindowPixelBuffer(3, PIXEL_FILL(0)); - AddTextPrinterParameterized3(3, 1, 15, 1, gUnknown_08610922, 0, gText_Summary2); - AddTextPrinterParameterized3(3, 1, 15, 17, gUnknown_08610922, 0, gText_Swap); - AddTextPrinterParameterized3(3, 1, 15, 33, gUnknown_08610922, 0, gText_Rechoose); + AddTextPrinterParameterized3(3, 1, 15, 1, sSwapMenuOptionsTextColors, 0, gText_Summary2); + AddTextPrinterParameterized3(3, 1, 15, 17, sSwapMenuOptionsTextColors, 0, gText_Swap); + AddTextPrinterParameterized3(3, 1, 15, 33, sSwapMenuOptionsTextColors, 0, gText_Rechoose); CopyWindowToVram(3, 3); } @@ -3625,15 +3625,15 @@ static void Swap_PrintYesNoOptions(void) { PutWindowTilemap(4); FillWindowPixelBuffer(4, PIXEL_FILL(0)); - AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610922, 0, gText_Yes3); - AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610922, 0, gText_No3); + AddTextPrinterParameterized3(4, 1, 7, 1, sSwapMenuOptionsTextColors, 0, gText_Yes3); + AddTextPrinterParameterized3(4, 1, 7, 17, sSwapMenuOptionsTextColors, 0, gText_No3); CopyWindowToVram(4, 3); } static void Swap_PrintActionString(const u8 *str, u32 y, u32 windowId) { s32 x = GetStringRightAlignXOffset(0, str, 0x46); - AddTextPrinterParameterized3(windowId, 0, x, y, gUnknown_08610922, 0, str); + AddTextPrinterParameterized3(windowId, 0, x, y, sSwapMenuOptionsTextColors, 0, str); } static void Swap_PrintActionStrings(void) @@ -3707,7 +3707,7 @@ static void Swap_PrintMonSpecies2(void) species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(7, 1, x, 1, gUnknown_08610925, 0, gStringVar4); + AddTextPrinterParameterized3(7, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(7, 3); } } @@ -3733,7 +3733,7 @@ static void Swap_PrintMonSpecies3(void) species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(1, 1, x, 1, gUnknown_08610925, 0, gStringVar4); + AddTextPrinterParameterized3(1, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(1, 3); } } diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 040dab122..59592e49d 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -589,7 +589,7 @@ static void PyramidBag_CopyItemName(u8 *dst, u16 itemId) { ConvertIntToDecimalStringN(gStringVar1, ITEM_TO_BERRY(itemId), STR_CONV_MODE_LEADING_ZEROS, 2); CopyItemName(itemId, gStringVar2); - StringExpandPlaceholders(dst, gText_UnkF908Var1Clear7Var2); + StringExpandPlaceholders(dst, gText_NumberVar1Clear7Var2); } else { diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index c44411f8d..8924c6729 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6278,7 +6278,7 @@ static void DrawLevelUpWindow1(void) u16 currStats[NUM_STATS]; GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], currStats); - DrawLevelUpWindowPg1(0xD, gBattleResources->beforeLvlUp->stats, currStats, 0xE, 0xD, 0xF); + DrawLevelUpWindowPg1(0xD, gBattleResources->beforeLvlUp->stats, currStats, TEXT_DYNAMIC_COLOR_5, TEXT_DYNAMIC_COLOR_4, TEXT_DYNAMIC_COLOR_6); } static void DrawLevelUpWindow2(void) @@ -6286,7 +6286,7 @@ static void DrawLevelUpWindow2(void) u16 currStats[NUM_STATS]; GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], currStats); - DrawLevelUpWindowPg2(0xD, currStats, 0xE, 0xD, 0xF); + DrawLevelUpWindowPg2(0xD, currStats, TEXT_DYNAMIC_COLOR_5, TEXT_DYNAMIC_COLOR_4, TEXT_DYNAMIC_COLOR_6); } static void sub_804F17C(void) diff --git a/src/berry_crush.c b/src/berry_crush.c index 74a71f089..5303da11a 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -153,7 +153,7 @@ extern const u16 gUnknown_082F41E8[]; extern const s8 gUnknown_082F41CC[][2]; extern const s8 gUnknown_082F41D2[][2]; extern const u32 gUnknown_082F334C[]; -extern const u8 gUnknown_082F32D8[][3]; +extern const u8 sBerryCrushTextColors1[][3]; struct BerryCrushGame *sub_8020C00(void) { @@ -821,5 +821,5 @@ void sub_8021944(struct BerryCrushGame_138 *arg0, u16 arg1) void sub_80219C8(u8 windowId, u8 left, u8 colorId, const u8 *string) { left = (left * 4) - (GetStringWidth(2, string, -1) / 2u); - AddTextPrinterParameterized3(windowId, 2, left, 0, gUnknown_082F32D8[colorId], 0, string); + AddTextPrinterParameterized3(windowId, 2, left, 0, sBerryCrushTextColors1[colorId], 0, string); } diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index e3c4e2675..f42531f15 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -36,16 +36,16 @@ static void berry_fix_bg_hide(void); // .rodata -static const u8 sUnknown_08617E78[] = _("Berry Program Update"); -static const u8 sUnknown_08617E8D[] = _("Ruby/Sapphire"); -static const u8 sUnknown_08617E9B[] = _("Emerald"); +static const u8 sText_BerryProgramUpdate[] = _("Berry Program Update"); +static const u8 sText_RubySapphire[] = _("Ruby/Sapphire"); +static const u8 sText_Emerald[] = _("Emerald"); -static const u8 Unknown_08617EA3[] = _("The Berry Program on your POKéMON\nRuby/Sapphire Game Pak will be updated.\n{COLOR RED}{SHADOW LIGHT_RED}Press the A Button."); -static const u8 Unknown_08617F07[] = _("Please ensure the connection of your\nGame Boy Advance system matches this.\n{COLOR RED}{SHADOW LIGHT_RED}YES: Press the A Button.\nNO: Turn off the power and try again."); -static const u8 Unknown_08617F97[] = _("Please turn on the power of POKéMON\nRuby/Sapphire while holding START and\nSELECT simultaneously. Then, ensure\nthe picture above appears."); -static const u8 Unknown_08618020[] = _("Transmitting. Please wait.\n{COLOR RED}{SHADOW LIGHT_RED}Please do not turn off the power or\nunplug the Game Boy Advance Game\nLink Cable."); -static const u8 Unknown_08618092[] = _("Please follow the instructions on your\nPOKéMON Ruby/Sapphire screen."); -static const u8 Unknown_086180D7[] = _("Transmission failure.\n{COLOR RED}{SHADOW LIGHT_RED}Please try again."); +static const u8 sText_BerryProgramWillBeUpdatedPressA[] = _("The Berry Program on your POKéMON\nRuby/Sapphire Game Pak will be updated.\n{COLOR RED}{SHADOW LIGHT_RED}Press the A Button."); +static const u8 sText_EnsureGBAConnectionMatches[] = _("Please ensure the connection of your\nGame Boy Advance system matches this.\n{COLOR RED}{SHADOW LIGHT_RED}YES: Press the A Button.\nNO: Turn off the power and try again."); +static const u8 sText_TurnOffPowerHoldingStartSelect[] = _("Please turn on the power of POKéMON\nRuby/Sapphire while holding START and\nSELECT simultaneously. Then, ensure\nthe picture above appears."); +static const u8 sText_TransmittingPleaseWait[] = _("Transmitting. Please wait.\n{COLOR RED}{SHADOW LIGHT_RED}Please do not turn off the power or\nunplug the Game Boy Advance Game\nLink Cable."); +static const u8 sText_PleaseFollowInstructionsOnScreen[] = _("Please follow the instructions on your\nPOKéMON Ruby/Sapphire screen."); +static const u8 sText_TransmissionFailureTryAgain[] = _("Transmission failure.\n{COLOR RED}{SHADOW LIGHT_RED}Please try again."); static const struct BgTemplate gUnknown_08618108[] = { { @@ -70,16 +70,16 @@ static const u16 sUnknown_08618138[] = { 0x675a, 0, 0, 0 }; -static const u8 sUnknown_08618158[] = {10, 11, 12}; -static const u8 sUnknown_0861815B[] = { 0, 10, 13}; +static const u8 sBerryProgramTextColors[] = {TEXT_DYNAMIC_COLOR_1, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3}; +static const u8 sGameTitleTextColors[] = { TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_1, TEXT_DYNAMIC_COLOR_4}; -static const u8 *const gUnknown_08618160[] = { - Unknown_08617F07, - Unknown_08617F97, - Unknown_08618020, - Unknown_08618092, - Unknown_086180D7, - Unknown_08617EA3 +static const u8 *const sBerryProgramTexts[] = { + sText_EnsureGBAConnectionMatches, + sText_TurnOffPowerHoldingStartSelect, + sText_TransmittingPleaseWait, + sText_PleaseFollowInstructionsOnScreen, + sText_TransmissionFailureTryAgain, + sText_BerryProgramWillBeUpdatedPressA }; static const void *const gUnknown_08618178[][3] = { @@ -230,21 +230,21 @@ static void berry_fix_gpu_set(void) FillWindowPixelBuffer(3, PIXEL_FILL(0)); FillWindowPixelBuffer(0, PIXEL_FILL(0xA)); - width = GetStringWidth(0, sUnknown_08617E9B, 0); + width = GetStringWidth(0, sText_Emerald, 0); left = (0x78 - width) / 2; - AddTextPrinterParameterized3(2, 0, left, 3, sUnknown_0861815B, TEXT_SPEED_FF, sUnknown_08617E9B); + AddTextPrinterParameterized3(2, 0, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_Emerald); - width = GetStringWidth(0, sUnknown_08617E8D, 0); + width = GetStringWidth(0, sText_RubySapphire, 0); left = (0x78 - width) / 2 + 0x78; - AddTextPrinterParameterized3(2, 0, left, 3, sUnknown_0861815B, TEXT_SPEED_FF, sUnknown_08617E8D); + AddTextPrinterParameterized3(2, 0, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); - width = GetStringWidth(0, sUnknown_08617E8D, 0); + width = GetStringWidth(0, sText_RubySapphire, 0); left = (0x70 - width) / 2; - AddTextPrinterParameterized3(3, 0, left, 0, sUnknown_0861815B, TEXT_SPEED_FF, sUnknown_08617E8D); + AddTextPrinterParameterized3(3, 0, left, 0, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); - width = GetStringWidth(1, sUnknown_08617E78, 0); + width = GetStringWidth(1, sText_BerryProgramUpdate, 0); left = (0xD0 - width) / 2; - AddTextPrinterParameterized3(0, 1, left, 2, sUnknown_08618158, TEXT_SPEED_FF, sUnknown_08617E78); + AddTextPrinterParameterized3(0, 1, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate); CopyWindowToVram(2, 2); CopyWindowToVram(3, 2); @@ -274,7 +274,7 @@ static void berry_fix_text_print(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); FillWindowPixelBuffer(1, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(1, 1, 0, 0, sUnknown_08618158, -1, gUnknown_08618160[scene]); + AddTextPrinterParameterized3(1, 1, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]); PutWindowTilemap(1); CopyWindowToVram(1, 2); switch (scene) diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index e7f6291c4..873d01dc7 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -403,7 +403,7 @@ static void PrintBerryNumberAndName(void) const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); ConvertIntToDecimalStringN(gStringVar1, sBerryTag->berryId, STR_CONV_MODE_LEADING_ZEROS, 2); StringCopy(gStringVar2, berry->name); - StringExpandPlaceholders(gStringVar4, gText_UnkF908Var1Var2); + StringExpandPlaceholders(gStringVar4, gText_NumberVar1Var2); PrintTextInBerryTagScreen(WIN_BERRY_NAME, gStringVar4, 0, 1, 0, 0); } diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c index 872aed14e..8a1fce64b 100644 --- a/src/contest_link_80F57C4.c +++ b/src/contest_link_80F57C4.c @@ -89,7 +89,7 @@ extern const struct CompressedSpriteSheet gUnknown_0858D878[]; extern const struct CompressedSpritePalette gUnknown_0858D880[]; extern const struct SpriteSheet gUnknown_0858D8E0; extern const struct SpriteTemplate gSpriteTemplate_858D8C8; -extern const u8 gUnknown_0858D8E8[]; +extern const u8 sContestLinkTextColors[]; extern const u8 gUnknown_0858D6D0[]; extern const struct SpriteTemplate gSpriteTemplate_858D7F8; extern const struct SpriteSheet gUnknown_0858D810[]; @@ -935,7 +935,7 @@ s32 sub_80F6B78(const u8 *text, u8 spriteId) if (strWidth > 30) strWidth = 30; - AddTextPrinterParameterized3(windowId, 1, (strWidth * 8 - origWidth) / 2, 1, gUnknown_0858D8E8, -1, text); + AddTextPrinterParameterized3(windowId, 1, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text); windowTilesPtr = (u8 *)(GetWindowAttribute(windowId, WINDOW_TILE_DATA)); src = (u8 *)(gUnknown_0858D6D0); @@ -1029,7 +1029,7 @@ _080F6BD0:\n\ asrs r2, 1\n\ lsls r2, 24\n\ lsrs r2, 24\n\ - ldr r0, =gUnknown_0858D8E8\n\ + ldr r0, =sContestLinkTextColors\n\ str r0, [sp]\n\ movs r0, 0x1\n\ negs r0, r0\n\ diff --git a/src/data/union_room.h b/src/data/union_room.h index de155aee8..5e9cb297e 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -1,210 +1,213 @@ // const rom data -ALIGNED(4) const u8 gText_EmptyString[] = _(""); -ALIGNED(4) const u8 gText_Colon[] = _(":"); -ALIGNED(4) const u8 gText_UnkCtrlCodeF907[] = _("{ID}"); -ALIGNED(4) const u8 gText_PleaseStartOver[] = _("Please start over from the beginning."); -ALIGNED(4) const u8 gText_WirelessSearchCanceled[] = _("The WIRELESS COMMUNICATION\nSYSTEM search has been canceled."); -ALIGNED(4) const u8 unref_text_union_room_0[] = _("Awaiting communication\nfrom another player."); -ALIGNED(4) const u8 gText_AwaitingCommunication[] = _("{STR_VAR_1}! Awaiting\ncommunication from another player."); -ALIGNED(4) const u8 gText_AwaitingLink[] = _("{STR_VAR_1}! Awaiting link!\nPress START when everyone's ready."); -ALIGNED(4) const u8 gJPText_SingleBattle[] = _("シングルバトルを かいさいする"); -ALIGNED(4) const u8 gJPText_DoubleBattle[] = _("ダブルバトルを かいさいする"); -ALIGNED(4) const u8 gJPText_MultiBattle[] = _("マルチバトルを かいさいする"); -ALIGNED(4) const u8 gJPText_TradePokemon[] = _("ポケモンこうかんを かいさいする"); -ALIGNED(4) const u8 gJPText_Chat[] = _("チャットを かいさいする"); -ALIGNED(4) const u8 gJPText_DistWonderCard[] = _("ふしぎなカードをくばる"); -ALIGNED(4) const u8 gJPText_DistWonderNews[] = _("ふしぎなニュースをくばる"); -ALIGNED(4) const u8 unref_text_union_room_1[] = _("ふしぎなできごとを かいさいする"); -ALIGNED(4) const u8 gJPText_HoldPokemonJump[] = _("なわとびを かいさいする"); -ALIGNED(4) const u8 gJPText_HoldBerryCrush[] = _("きのみマッシャーを かいさいする"); -ALIGNED(4) const u8 gJPText_HoldBerryPicking[] = _("きのみどりを かいさいする"); -ALIGNED(4) const u8 gJPText_HoldSpinTrade[] = _("ぐるぐるこうかんを かいさいする"); -ALIGNED(4) const u8 gJPText_HoldSpinShop[] = _("ぐるぐるショップを かいさいする"); +ALIGNED(4) static const u8 sText_EmptyString[] = _(""); +ALIGNED(4) const u8 sText_Colon[] = _(":"); +ALIGNED(4) const u8 sText_ID[] = _("{ID}"); +ALIGNED(4) const u8 sText_PleaseStartOver[] = _("Please start over from the beginning."); +ALIGNED(4) const u8 sText_WirelessSearchCanceled[] = _("The WIRELESS COMMUNICATION\nSYSTEM search has been canceled."); +ALIGNED(4) const u8 sText_AwaitingCommunucation2[] = _("Awaiting communication\nfrom another player."); // Unused +ALIGNED(4) const u8 sText_AwaitingCommunication[] = _("{STR_VAR_1}! Awaiting\ncommunication from another player."); +ALIGNED(4) const u8 sText_AwaitingLinkPressStart[] = _("{STR_VAR_1}! Awaiting link!\nPress START when everyone's ready."); +ALIGNED(4) const u8 sJPText_SingleBattle[] = _("シングルバトルを かいさいする"); +ALIGNED(4) const u8 sJPText_DoubleBattle[] = _("ダブルバトルを かいさいする"); +ALIGNED(4) const u8 sJPText_MultiBattle[] = _("マルチバトルを かいさいする"); +ALIGNED(4) const u8 sJPText_TradePokemon[] = _("ポケモンこうかんを かいさいする"); +ALIGNED(4) const u8 sJPText_Chat[] = _("チャットを かいさいする"); +ALIGNED(4) const u8 sJPText_DistWonderCard[] = _("ふしぎなカードをくばる"); +ALIGNED(4) const u8 sJPText_DistWonderNews[] = _("ふしぎなニュースをくばる"); +ALIGNED(4) const u8 sJPText_DistMysteryEvent[] = _("ふしぎなできごとを かいさいする"); // Unused +ALIGNED(4) const u8 sJPText_HoldPokemonJump[] = _("なわとびを かいさいする"); +ALIGNED(4) const u8 sJPText_HoldBerryCrush[] = _("きのみマッシャーを かいさいする"); +ALIGNED(4) const u8 sJPText_HoldBerryPicking[] = _("きのみどりを かいさいする"); +ALIGNED(4) const u8 sJPText_HoldSpinTrade[] = _("ぐるぐるこうかんを かいさいする"); +ALIGNED(4) const u8 sJPText_HoldSpinShop[] = _("ぐるぐるショップを かいさいする"); -const u8 *const unref_text_ptrs_union_room_0[] = { - gJPText_SingleBattle, - gJPText_DoubleBattle, - gJPText_MultiBattle, - gJPText_TradePokemon, - gJPText_Chat, - gJPText_DistWonderCard, - gJPText_DistWonderNews, - gJPText_DistWonderCard, - gJPText_HoldPokemonJump, - gJPText_HoldBerryCrush, - gJPText_HoldBerryPicking, - gJPText_HoldBerryPicking, - gJPText_HoldSpinTrade, - gJPText_HoldSpinShop +// Unused +const u8 *const sJPLinkGroupActionTexts[] = { + sJPText_SingleBattle, + sJPText_DoubleBattle, + sJPText_MultiBattle, + sJPText_TradePokemon, + sJPText_Chat, + sJPText_DistWonderCard, + sJPText_DistWonderNews, + sJPText_DistWonderCard, + sJPText_HoldPokemonJump, + sJPText_HoldBerryCrush, + sJPText_HoldBerryPicking, + sJPText_HoldBerryPicking, + sJPText_HoldSpinTrade, + sJPText_HoldSpinShop }; -const u8 gText_1PlayerNeeded[] = _("1 player\nneeded."); -const u8 gText_2PlayersNeeded[] = _("2 players\nneeded."); -const u8 gText_3PlayersNeeded[] = _("3 players\nneeded."); -const u8 gText_4PlayersNeeded[] = _("4 players\nneeded."); -const u8 gText_2PlayerMode[] = _("2-PLAYER\nMODE"); -const u8 gText_3PlayerMode[] = _("3-PLAYER\nMODE"); -const u8 gText_4PlayerMode[] = _("4-PLAYER\nMODE"); -const u8 gText_5PlayerMode[] = _("5-PLAYER\nMODE"); +const u8 sText_1PlayerNeeded[] = _("1 player\nneeded."); +const u8 sText_2PlayersNeeded[] = _("2 players\nneeded."); +const u8 sText_3PlayersNeeded[] = _("3 players\nneeded."); +const u8 sText_4PlayersNeeded[] = _("4 players\nneeded."); +const u8 sText_2PlayerMode[] = _("2-PLAYER\nMODE"); +const u8 sText_3PlayerMode[] = _("3-PLAYER\nMODE"); +const u8 sText_4PlayerMode[] = _("4-PLAYER\nMODE"); +const u8 sText_5PlayerMode[] = _("5-PLAYER\nMODE"); -const u8 *const gUnknown_082EDB60[][5] = { +static const u8 *const sPlayersNeededOrModeTexts[][5] = { { - gText_1PlayerNeeded, - gText_2PlayerMode + sText_1PlayerNeeded, + sText_2PlayerMode }, { - gText_3PlayersNeeded, - gText_2PlayersNeeded, - gText_1PlayerNeeded, - gText_4PlayerMode + sText_3PlayersNeeded, + sText_2PlayersNeeded, + sText_1PlayerNeeded, + sText_4PlayerMode }, { - gText_1PlayerNeeded, - gText_2PlayerMode, - gText_3PlayerMode, - gText_4PlayerMode, - gText_5PlayerMode + sText_1PlayerNeeded, + sText_2PlayerMode, + sText_3PlayerMode, + sText_4PlayerMode, + sText_5PlayerMode }, { - gText_2PlayersNeeded, - gText_1PlayerNeeded, - gText_3PlayerMode, - gText_4PlayerMode, - gText_5PlayerMode + sText_2PlayersNeeded, + sText_1PlayerNeeded, + sText_3PlayerMode, + sText_4PlayerMode, + sText_5PlayerMode }, { - gText_1PlayerNeeded, - gText_2PlayerMode, - gText_3PlayerMode, - gText_4PlayerMode + sText_1PlayerNeeded, + sText_2PlayerMode, + sText_3PlayerMode, + sText_4PlayerMode } }; -ALIGNED(4) const u8 gUnknown_082EDBC4[] = _("{B_BUTTON}CANCEL"); -ALIGNED(4) const u8 unref_text_union_room_2[] = _("ため\nさんかしゃ ぼしゅうちゅう です!"); -ALIGNED(4) const u8 gUnknown_082EDBE8[] = _("{STR_VAR_2} contacted you for\n{STR_VAR_1}. Accept?"); -ALIGNED(4) const u8 gUnknown_082EDC0C[] = _("{STR_VAR_2} contacted you.\nWill you share {STR_VAR_1}?"); -ALIGNED(4) const u8 gUnknown_082EDC34[] = _("{STR_VAR_2} contacted you.\nAdd to the members?"); -ALIGNED(4) const u8 gUnknown_082EDC5C[] = _("{STR_VAR_1}!\nAre these members OK?"); -ALIGNED(4) const u8 gUnknown_082EDC78[] = _("Cancel {STR_VAR_1} MODE\nwith these members?"); -ALIGNED(4) const u8 gUnknown_082EDC9C[] = _("An “OK” was sent\nto {STR_VAR_1}."); -ALIGNED(4) const u8 gUnknown_082EDCB4[] = _("The other TRAINER doesn't appear\nto be available now…\p"); -ALIGNED(4) const u8 gUnknown_082EDCEC[] = _("You can't transmit with a TRAINER\nwho is too far away.\p"); -ALIGNED(4) const u8 gUnknown_082EDD24[] = _("The other TRAINER(S) is/are not\nready yet.\p"); +ALIGNED(4) const u8 sText_BButtonCancel[] = _("{B_BUTTON}CANCEL"); +ALIGNED(4) const u8 sJPText_InvitationSentToPlayer[] = _("ため\nさんかしゃ ぼしゅうちゅう です!"); // Unused +ALIGNED(4) const u8 sText_PlayerContactedYouForXAccept[] = _("{STR_VAR_2} contacted you for\n{STR_VAR_1}. Accept?"); +ALIGNED(4) const u8 sText_PlayerContactedYouShareX[] = _("{STR_VAR_2} contacted you.\nWill you share {STR_VAR_1}?"); +ALIGNED(4) const u8 sText_PlayerContactedYouAddToMembers[] = _("{STR_VAR_2} contacted you.\nAdd to the members?"); +ALIGNED(4) const u8 sText_AreTheseMembersOK[] = _("{STR_VAR_1}!\nAre these members OK?"); +ALIGNED(4) const u8 sText_CancelModeWithTheseMembers[] = _("Cancel {STR_VAR_1} MODE\nwith these members?"); +ALIGNED(4) const u8 sText_AnOKWasSentToPlayer[] = _("An “OK” was sent\nto {STR_VAR_1}."); +ALIGNED(4) const u8 sText_OtherTrainerUnavailableNow[] = _("The other TRAINER doesn't appear\nto be available now…\p"); +ALIGNED(4) const u8 sText_CantTransmitTrainerTooFar[] = _("You can't transmit with a TRAINER\nwho is too far away.\p"); +ALIGNED(4) const u8 sText_TrainersNotReadyYet[] = _("The other TRAINER(S) is/are not\nready yet.\p"); -const u8 *const gUnknown_082EDD50[] = { - gUnknown_082EDCEC, - gUnknown_082EDD24 +const u8 *const sCantTransmitToTrainerTexts[] = { + sText_CantTransmitTrainerTooFar, + sText_TrainersNotReadyYet }; -ALIGNED(4) const u8 gUnknown_082EDD58[] = _("The {STR_VAR_1} MODE with\nthese members will be canceled.{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EDD8C[] = _("There is a member who can no\nlonger remain available.\p"); +ALIGNED(4) const u8 sText_ModeWithTheseMembersWillBeCanceled[] = _("The {STR_VAR_1} MODE with\nthese members will be canceled.{PAUSE 60}"); +ALIGNED(4) const u8 sText_MemberNoLongerAvailable[] = _("There is a member who can no\nlonger remain available.\p"); -const u8 *const gUnknown_082EDDC4[] = { - gUnknown_082EDCB4, - gUnknown_082EDD8C +const u8 *const sPlayerUnavailableTexts[] = { + sText_OtherTrainerUnavailableNow, + sText_MemberNoLongerAvailable }; -ALIGNED(4) const u8 gUnknown_082EDDCC[] = _("The other TRAINER appears\nunavailable…\p"); -ALIGNED(4) const u8 gUnknown_082EDDF4[] = _("{STR_VAR_1} sent back an “OK”!"); -ALIGNED(4) const u8 gUnknown_082EDE0C[] = _("{STR_VAR_1} OK'd your registration as\na member."); -ALIGNED(4) const u8 gUnknown_082EDE34[] = _("{STR_VAR_1} replied, “No…”\p"); -ALIGNED(4) const u8 gUnknown_082EDE48[] = _("{STR_VAR_1}!\nAwaiting other members!"); -ALIGNED(4) const u8 gUnknown_082EDE64[] = _("Quit being a member?"); -ALIGNED(4) const u8 gUnknown_082EDE7C[] = _("You stopped being a member.\p"); +ALIGNED(4) const u8 sText_TrainerAppearsUnavailable[] = _("The other TRAINER appears\nunavailable…\p"); +ALIGNED(4) const u8 sText_PlayerSentBackOK[] = _("{STR_VAR_1} sent back an “OK”!"); +ALIGNED(4) const u8 sText_PlayerOKdRegistration[] = _("{STR_VAR_1} OK'd your registration as\na member."); +ALIGNED(4) const u8 sText_PlayerRepliedNo[] = _("{STR_VAR_1} replied, “No…”\p"); +ALIGNED(4) const u8 sText_AwaitingOtherMembers[] = _("{STR_VAR_1}!\nAwaiting other members!"); +ALIGNED(4) const u8 sText_QuitBeingMember[] = _("Quit being a member?"); +ALIGNED(4) const u8 sText_StoppedBeingMember[] = _("You stopped being a member.\p"); -const u8 *const gUnknown_082EDE9C[] = { +const u8 *const sPlayerDisconnectedTexts[] = { NULL, - gUnknown_082EDD8C, - gUnknown_082EDDCC, + sText_MemberNoLongerAvailable, + sText_TrainerAppearsUnavailable, NULL, NULL, NULL, - gUnknown_082EDE34, + sText_PlayerRepliedNo, NULL, NULL, - gUnknown_082EDE7C + sText_StoppedBeingMember }; -ALIGNED(4) const u8 gUnknown_082EDEC4[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been established."); -ALIGNED(4) const u8 gUnknown_082EDF04[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been dropped…"); -ALIGNED(4) const u8 gUnknown_082EDF40[] = _("The link with your friend has been\ndropped…"); -ALIGNED(4) const u8 gUnknown_082EDF6C[] = _("{STR_VAR_1} replied, “No…”"); +ALIGNED(4) const u8 sText_WirelessLinkEstablished[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been established."); +ALIGNED(4) const u8 sText_WirelessLinkDropped[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been dropped…"); +ALIGNED(4) const u8 sText_LinkWithFriendDropped[] = _("The link with your friend has been\ndropped…"); +ALIGNED(4) const u8 sText_PlayerRepliedNo2[] = _("{STR_VAR_1} replied, “No…”"); -const u8 *const gUnknown_082EDF80[] = { +const u8 *const sLinkDroppedTexts[] = { NULL, - gUnknown_082EDF40, - gUnknown_082EDF40, + sText_LinkWithFriendDropped, + sText_LinkWithFriendDropped, NULL, NULL, NULL, - gUnknown_082EDF6C, + sText_PlayerRepliedNo2, NULL, NULL, NULL }; -ALIGNED(4) const u8 gUnknown_082EDFA8[] = _("Do you want the {STR_VAR_2}\nMODE?"); -ALIGNED(4) const u8 gUnknown_082EDFC4[] = _("Do you want the {STR_VAR_2}\nMODE?"); +ALIGNED(4) const u8 sText_DoYouWantXMode[] = _("Do you want the {STR_VAR_2}\nMODE?"); +ALIGNED(4) const u8 sText_DoYouWantXMode2[] = _("Do you want the {STR_VAR_2}\nMODE?"); -const u8 *const unref_text_ptrs_union_room_1[] = { - gUnknown_082EDFA8, - gUnknown_082EDFC4 +// Unused +static const u8 *const sDoYouWantModeTexts[] = { + sText_DoYouWantXMode, + sText_DoYouWantXMode2 }; -ALIGNED(4) const u8 unref_text_union_room_3[] = _("Communicating…\nPlease wait."); -ALIGNED(4) const u8 gUnknown_082EE004[] = _("Awaiting {STR_VAR_1}'s response about\nthe trade…"); -ALIGNED(4) const u8 gUnknown_082EE02C[] = _("Communicating{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); -ALIGNED(4) const u8 gUnknown_082EE098[] = _("Communicating with {STR_VAR_1}{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); -ALIGNED(4) const u8 gUnknown_082EE104[] = _("Please wait a while{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); +ALIGNED(4) const u8 sText_CommunicatingPleaseWait[] = _("Communicating…\nPlease wait."); // Unused +ALIGNED(4) const u8 sText_AwaitingPlayersResponseAboutTrade[] = _("Awaiting {STR_VAR_1}'s response about\nthe trade…"); +ALIGNED(4) const u8 sText_Communicating[] = _("Communicating{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); +ALIGNED(4) const u8 sText_CommunicatingWithPlayer[] = _("Communicating with {STR_VAR_1}{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); +ALIGNED(4) const u8 sText_PleaseWaitAWhile[] = _("Please wait a while{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); -const u8 *const gUnknown_082EE17C[] = { - gUnknown_082EE02C, - gUnknown_082EE098, - gUnknown_082EE104 +static const u8 *const sCommunicatingWaitTexts[] = { + sText_Communicating, + sText_CommunicatingWithPlayer, + sText_PleaseWaitAWhile }; -ALIGNED(4) const u8 gUnknown_082EE188[] = _("Hiya! Is there something that you\nwanted to do?"); -ALIGNED(4) const u8 gUnknown_082EE1B8[] = _("Hello!\nWould you like to do something?"); -ALIGNED(4) const u8 gUnknown_082EE1E0[] = _("{STR_VAR_1}: Hiya, we meet again!\nWhat are you up for this time?"); -ALIGNED(4) const u8 gUnknown_082EE218[] = _("{STR_VAR_1}: Oh! {PLAYER}, hello!\nWould you like to do something?"); +ALIGNED(4) const u8 sText_HiDoSomethingMale[] = _("Hiya! Is there something that you\nwanted to do?"); +ALIGNED(4) const u8 sText_HiDoSomethingFemale[] = _("Hello!\nWould you like to do something?"); +ALIGNED(4) const u8 sText_HiDoSomethingAgainMale[] = _("{STR_VAR_1}: Hiya, we meet again!\nWhat are you up for this time?"); +ALIGNED(4) const u8 sText_HiDoSomethingAgainFemale[] = _("{STR_VAR_1}: Oh! {PLAYER}, hello!\nWould you like to do something?"); -const u8 *const gUnknown_082EE24C[][2] = { +static const u8 *const sHiDoSomethingTexts[][GENDER_COUNT] = { { - gUnknown_082EE188, - gUnknown_082EE1B8 + sText_HiDoSomethingMale, + sText_HiDoSomethingFemale }, { - gUnknown_082EE1E0, - gUnknown_082EE218 + sText_HiDoSomethingAgainMale, + sText_HiDoSomethingAgainFemale } }; -ALIGNED(4) const u8 gUnknown_082EE25C[] = _("Want to do something?"); -ALIGNED(4) const u8 gUnknown_082EE274[] = _("Would you like to do something?"); -ALIGNED(4) const u8 gUnknown_082EE294[] = _("{STR_VAR_1}: What would you like to\ndo now?"); -ALIGNED(4) const u8 unref_text_union_room_4[] = _("{STR_VAR_1}: Want to do anything else?"); +ALIGNED(4) const u8 sText_DoSomethingMale[] = _("Want to do something?"); +ALIGNED(4) const u8 sText_DoSomethingFemale[] = _("Would you like to do something?"); +ALIGNED(4) const u8 sText_DoSomethingAgainMale[] = _("{STR_VAR_1}: What would you like to\ndo now?"); +ALIGNED(4) const u8 sText_DoSomethingAgainFemale[] = _("{STR_VAR_1}: Want to do anything else?"); // Unused -const u8 *const unref_text_ptrs_union_room_2[][2] = { +// Unused +static const u8 *const sDoSomethingTexts[][GENDER_COUNT] = { { - gUnknown_082EE25C, - gUnknown_082EE274 + sText_DoSomethingMale, + sText_DoSomethingFemale }, { - gUnknown_082EE294, - gUnknown_082EE294 + sText_DoSomethingAgainMale, + sText_DoSomethingAgainMale // was probably supposed to be sText_DoSomethingAgainFemale } }; ALIGNED(4) const u8 sText_SomebodyHasContactedYou[] = _("Somebody has contacted you.{PAUSE 60}"); -ALIGNED(4) const u8 sText_XHasContactedYou[] = _("{STR_VAR_1} has contacted you.{PAUSE 60}"); +ALIGNED(4) const u8 sText_PlayerHasContactedYou[] = _("{STR_VAR_1} has contacted you.{PAUSE 60}"); -static const u8 *const gUnknown_082EE324[] = { +static const u8 *const sPlayerContactedYouTexts[] = { sText_SomebodyHasContactedYou, - sText_XHasContactedYou + sText_PlayerHasContactedYou }; -ALIGNED(4) const u8 sUnionRoom_AwaitingResponseFromTrainer[] = _("Awaiting a response from\nthe other TRAINER…"); -ALIGNED(4) const u8 sUnionRoom_AwaitingResponseFromX[] = _("Awaiting a response from\n{STR_VAR_1}…"); +ALIGNED(4) const u8 sText_AwaitingResponseFromTrainer[] = _("Awaiting a response from\nthe other TRAINER…"); +ALIGNED(4) const u8 sText_AwaitingResponseFromPlayer[] = _("Awaiting a response from\n{STR_VAR_1}…"); -static const u8 *const sUnionRoomTexts_AwaitingResponse[] = { - sUnionRoom_AwaitingResponseFromTrainer, - sUnionRoom_AwaitingResponseFromX +static const u8 *const sAwaitingResponseTexts[] = { + sText_AwaitingResponseFromTrainer, + sText_AwaitingResponseFromPlayer }; ALIGNED(4) const u8 sText_ShowTrainerCard[] = _("The other TRAINER showed\nyou their TRAINER CARD.\pWould you like to show your\nTRAINER CARD?"); @@ -218,7 +221,7 @@ ALIGNED(4) const u8 sText_OfferDeclined2[] = _("You declined the offer.\p"); ALIGNED(4) const u8 sText_ChatEnded[] = _("The chat was ended.\p"); // Unused -static const u8 *const sUnionRoomTexts_Invitation[] = { +static const u8 *const sInvitationTexts[] = { sText_ShowTrainerCard, sText_BattleChallenge, sText_ChatInvitation, @@ -230,7 +233,7 @@ ALIGNED(4) const u8 sText_PlayerJoinChatMale[] = _("{STR_VAR_1}: Hey, {PLAYER}!\ ALIGNED(4) const u8 sText_JoinChatFemale[] = _("Oh, hi! We're having a chat now.\nWould you like to join us?"); ALIGNED(4) const u8 sText_PlayerJoinChatFemale[] = _("{STR_VAR_1}: Oh, hi, {PLAYER}!\nWe're having a chat now.\lWould you like to join us?"); -const u8 *const sUnionRoomTexts_JoinChat[][GENDER_COUNT] = { +static const u8 *const sJoinChatTexts[][GENDER_COUNT] = { { sText_JoinChatMale, sText_JoinChatFemale @@ -241,170 +244,164 @@ const u8 *const sUnionRoomTexts_JoinChat[][GENDER_COUNT] = { }; ALIGNED(4) const u8 sText_TrainerAppearsBusy[] = _("……\nThe TRAINER appears to be busy…\p"); -ALIGNED(4) const u8 gUnknown_082EE6EC[] = _("A battle, huh?\nAll right, just give me some time."); -ALIGNED(4) const u8 gUnknown_082EE720[] = _("You want to chat, huh?\nSure, just wait a little."); -ALIGNED(4) const u8 gUnknown_082EE754[] = _("Sure thing! As my “Greetings,”\nhere's my TRAINER CARD."); -ALIGNED(4) const u8 gUnknown_082EE78C[] = _("A battle? Of course, but I need\ntime to get ready."); -ALIGNED(4) const u8 gUnknown_082EE7C0[] = _("Did you want to chat?\nOkay, but please wait a moment."); -ALIGNED(4) const u8 gUnknown_082EE7F8[] = _("As my introduction, I'll show you\nmy TRAINER CARD."); +ALIGNED(4) const u8 sText_WaitForBattleMale[] = _("A battle, huh?\nAll right, just give me some time."); +ALIGNED(4) const u8 sText_WaitForChatMale[] = _("You want to chat, huh?\nSure, just wait a little."); +ALIGNED(4) const u8 sText_ShowTrainerCardMale[] = _("Sure thing! As my “Greetings,”\nhere's my TRAINER CARD."); +ALIGNED(4) const u8 sText_WaitForBattleFemale[] = _("A battle? Of course, but I need\ntime to get ready."); +ALIGNED(4) const u8 sText_WaitForChatFemale[] = _("Did you want to chat?\nOkay, but please wait a moment."); +ALIGNED(4) const u8 sText_ShowTrainerCardFemale[] = _("As my introduction, I'll show you\nmy TRAINER CARD."); -const u8 *const gUnknown_082EE82C[][4] = { +const u8 *const sText_WaitOrShowCardTexts[GENDER_COUNT][4] = { { - gUnknown_082EE6EC, - gUnknown_082EE720, + sText_WaitForBattleMale, + sText_WaitForChatMale, NULL, - gUnknown_082EE754 + sText_ShowTrainerCardMale }, { - gUnknown_082EE78C, - gUnknown_082EE7C0, + sText_WaitForBattleFemale, + sText_WaitForChatFemale, NULL, - gUnknown_082EE7F8 + sText_ShowTrainerCardFemale } }; -ALIGNED(4) const u8 unref_text_union_room_5[] = _("You want to chat, huh?\nSure, just wait a little."); -ALIGNED(4) const u8 gUnknown_082EE880[] = _("Thanks for waiting!\nLet's get our battle started!{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EE8B8[] = _("All right!\nLet's chat!{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EE8D4[] = _("Sorry I made you wait!\nLet's get started!{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EE904[] = _("Sorry I made you wait!\nLet's chat.{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EE92C[] = _("The trade will be started.{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EE94C[] = _("The battle will be started.{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EE96C[] = _("Entering the chat…{PAUSE 60}"); +ALIGNED(4) const u8 sText_WaitForChatMale2[] = _("You want to chat, huh?\nSure, just wait a little."); // Unused +ALIGNED(4) const u8 sText_DoneWaitingBattleMale[] = _("Thanks for waiting!\nLet's get our battle started!{PAUSE 60}"); +ALIGNED(4) const u8 sText_DoneWaitingChatMale[] = _("All right!\nLet's chat!{PAUSE 60}"); +ALIGNED(4) const u8 sText_DoneWaitingBattleFemale[] = _("Sorry I made you wait!\nLet's get started!{PAUSE 60}"); +ALIGNED(4) const u8 sText_DoneWaitingChatFemale[] = _("Sorry I made you wait!\nLet's chat.{PAUSE 60}"); +ALIGNED(4) const u8 sText_TradeWillBeStarted[] = _("The trade will be started.{PAUSE 60}"); +ALIGNED(4) const u8 sText_BattleWillBeStarted[] = _("The battle will be started.{PAUSE 60}"); +ALIGNED(4) const u8 sText_EnteringChat[] = _("Entering the chat…{PAUSE 60}"); -const u8 *const gUnknown_082EE984[][2][3] = { +const u8 *const sStartActivityTexts[][GENDER_COUNT][3] = { { { - gUnknown_082EE94C, - gUnknown_082EE96C, - gUnknown_082EE92C + sText_BattleWillBeStarted, + sText_EnteringChat, + sText_TradeWillBeStarted }, { - gUnknown_082EE94C, - gUnknown_082EE96C, - gUnknown_082EE92C + sText_BattleWillBeStarted, + sText_EnteringChat, + sText_TradeWillBeStarted } }, { { - gUnknown_082EE880, - gUnknown_082EE8B8, - gUnknown_082EE92C + sText_DoneWaitingBattleMale, + sText_DoneWaitingChatMale, + sText_TradeWillBeStarted }, { - gUnknown_082EE8D4, - gUnknown_082EE904, - gUnknown_082EE92C + sText_DoneWaitingBattleFemale, + sText_DoneWaitingChatFemale, + sText_TradeWillBeStarted } } }; -ALIGNED(4) const u8 gUnknown_082EE9B4[] = _("Sorry! My POKéMON don't seem to\nbe feeling too well right now.\lLet me battle you another time.\p"); -ALIGNED(4) const u8 gUnknown_082EEA14[] = _("I'm terribly sorry, but my POKéMON\naren't feeling well…\pLet's battle another time.\p"); +ALIGNED(4) const u8 sText_BattleDeclinedMale[] = _("Sorry! My POKéMON don't seem to\nbe feeling too well right now.\lLet me battle you another time.\p"); +ALIGNED(4) const u8 sText_BattleDeclinedFemale[] = _("I'm terribly sorry, but my POKéMON\naren't feeling well…\pLet's battle another time.\p"); -const u8 *const gUnknown_082EEA68[] = { - gUnknown_082EE9B4, - gUnknown_082EEA14 +const u8 *const sBattleDeclinedTexts[GENDER_COUNT] = { + sText_BattleDeclinedMale, + sText_BattleDeclinedFemale }; -ALIGNED(4) const u8 gUnknown_082EEA70[] = _("Huh? My TRAINER CARD…\nWhere'd it go now?\lSorry! I'll show you another time!\p"); -ALIGNED(4) const u8 gUnknown_082EEAC0[] = _("Oh? Now where did I put my\nTRAINER CARD?…\lSorry! I'll show you later!\p"); +ALIGNED(4) const u8 sText_ShowTrainerCardDeclinedMale[] = _("Huh? My TRAINER CARD…\nWhere'd it go now?\lSorry! I'll show you another time!\p"); +ALIGNED(4) const u8 sText_ShowTrainerCardDeclinedFemale[] = _("Oh? Now where did I put my\nTRAINER CARD?…\lSorry! I'll show you later!\p"); -const u8 *const gUnknown_082EEB08[] = { - gUnknown_082EEA70, - gUnknown_082EEAC0 +const u8 *const sShowTrainerCardDeclinedTexts[GENDER_COUNT] = { + sText_ShowTrainerCardDeclinedMale, + sText_ShowTrainerCardDeclinedFemale }; -ALIGNED(4) const u8 gUnknown_082EEB10[] = _("If you want to do something with\nme, just give me a shout!\p"); -ALIGNED(4) const u8 gUnknown_082EEB4C[] = _("If you want to do something with\nme, don't be shy.\p"); +ALIGNED(4) const u8 sText_IfYouWantToDoSomethingMale[] = _("If you want to do something with\nme, just give me a shout!\p"); +ALIGNED(4) const u8 sText_IfYouWantToDoSomethingFemale[] = _("If you want to do something with\nme, don't be shy.\p"); -const u8 *const gUnknown_082EEB80[] = { - gUnknown_082EEB10, - gUnknown_082EEB4C +const u8 *const sIfYouWantToDoSomethingTexts[GENDER_COUNT] = { + sText_IfYouWantToDoSomethingMale, + sText_IfYouWantToDoSomethingFemale }; ALIGNED(4) const u8 sText_TrainerBattleBusy[] = _("Whoops! Sorry, but I have to do\nsomething else.\lAnother time, okay?\p"); ALIGNED(4) const u8 sText_NeedTwoMonsOfLevel30OrLower1[] = _("If you want to battle, you need\ntwo POKéMON that are below\lLv. 30.\p"); ALIGNED(4) const u8 sText_NeedTwoMonsOfLevel30OrLower2[] = _("For a battle, you need two\nPOKéMON that are below Lv. 30.\p"); ALIGNED(4) const u8 sText_DeclineBattleMale[] = _("Oh, all right.\nCome see me anytime, okay?\p"); -ALIGNED(4) const u8 sText_DeclineBattleFemale[] = _("Oh…\nPlease come by anytime.\p"); +ALIGNED(4) const u8 stext_DeclineBattleFemale[] = _("Oh…\nPlease come by anytime.\p"); -const u8 *const sUnionRoomTexts_DeclineBattle[GENDER_COUNT] = { - [MALE] = sText_DeclineBattleMale, - [FEMALE] = sText_DeclineBattleFemale +static const u8 *const sDeclineBattleTexts[GENDER_COUNT] = { + sText_DeclineBattleMale, + stext_DeclineBattleFemale }; -ALIGNED(4) const u8 gUnknown_082EECA4[] = _("Oh, sorry!\nI just can't right this instant.\lLet's chat another time.\p"); -ALIGNED(4) const u8 gUnknown_082EECEC[] = _("Oh, I'm sorry.\nI have too much to do right now.\lLet's chat some other time.\p"); +ALIGNED(4) const u8 sText_ChatDeclinedMale[] = _("Oh, sorry!\nI just can't right this instant.\lLet's chat another time.\p"); +ALIGNED(4) const u8 sText_ChatDeclinedFemale[] = _("Oh, I'm sorry.\nI have too much to do right now.\lLet's chat some other time.\p"); -const u8 *const gUnknown_082EED3C[] = { - gUnknown_082EECA4, - gUnknown_082EECEC +const u8 *const sChatDeclinedTexts[GENDER_COUNT] = { + sText_ChatDeclinedMale, + sText_ChatDeclinedFemale }; -ALIGNED(4) const u8 gUnknown_082EED44[] = _("Whoa!\nI can tell you're pretty tough!\p"); -ALIGNED(4) const u8 gUnknown_082EED6C[] = _("You used that move?\nThat's good strategy!\p"); -ALIGNED(4) const u8 gUnknown_082EED98[] = _("Way to go!\nThat was an eye-opener!\p"); -ALIGNED(4) const u8 gUnknown_082EEDBC[] = _("Oh! How could you use that\nPOKéMON in that situation?\p"); -ALIGNED(4) const u8 gUnknown_082EEDF4[] = _("That POKéMON…\nIt's been raised really well!\p"); -ALIGNED(4) const u8 gUnknown_082EEE24[] = _("That's it!\nThis is the right move now!\p"); -ALIGNED(4) const u8 gUnknown_082EEE4C[] = _("That's awesome!\nYou can battle that way?\p"); -ALIGNED(4) const u8 gUnknown_082EEE78[] = _("You have exquisite timing for\nswitching POKéMON!\p"); +ALIGNED(4) const u8 sText_YoureToughMale[] = _("Whoa!\nI can tell you're pretty tough!\p"); +ALIGNED(4) const u8 sText_UsedGoodMoveMale[] = _("You used that move?\nThat's good strategy!\p"); +ALIGNED(4) const u8 sText_BattleSurpriseMale[] = _("Way to go!\nThat was an eye-opener!\p"); +ALIGNED(4) const u8 sText_SwitchedMonsMale[] = _("Oh! How could you use that\nPOKéMON in that situation?\p"); +ALIGNED(4) const u8 sText_YoureToughFemale[] = _("That POKéMON…\nIt's been raised really well!\p"); +ALIGNED(4) const u8 sText_UsedGoodMoveFemale[] = _("That's it!\nThis is the right move now!\p"); +ALIGNED(4) const u8 sText_BattleSurpriseFemale[] = _("That's awesome!\nYou can battle that way?\p"); +ALIGNED(4) const u8 sText_SwitchedMonsFemale[] = _("You have exquisite timing for\nswitching POKéMON!\p"); -const u8 *const gUnknown_082EEEAC[GENDER_COUNT][4] = { - [MALE] = +const u8 *const sBattleReactionTexts[GENDER_COUNT][4] = { { - gUnknown_082EED44, - gUnknown_082EED6C, - gUnknown_082EED98, - gUnknown_082EEDBC + sText_YoureToughMale, + sText_UsedGoodMoveMale, + sText_BattleSurpriseMale, + sText_SwitchedMonsMale }, - [FEMALE] = { - gUnknown_082EEDF4, - gUnknown_082EEE24, - gUnknown_082EEE4C, - gUnknown_082EEE78 + sText_YoureToughFemale, + sText_UsedGoodMoveFemale, + sText_BattleSurpriseFemale, + sText_SwitchedMonsFemale } }; -ALIGNED(4) const u8 gUnknown_082EEECC[] = _("Oh, I see!\nThis is educational!\p"); -ALIGNED(4) const u8 gUnknown_082EEEF0[] = _("Don't say anything funny anymore!\nI'm sore from laughing!\p"); -ALIGNED(4) const u8 gUnknown_082EEF2C[] = _("Oh?\nSomething like that happened.\p"); -ALIGNED(4) const u8 gUnknown_082EEF50[] = _("Hmhm… What?\nSo is this what you're saying?\p"); -ALIGNED(4) const u8 gUnknown_082EEF7C[] = _("Is that right?\nI didn't know that.\p"); -ALIGNED(4) const u8 gUnknown_082EEFA0[] = _("Ahaha!\nWhat is that about?\p"); -ALIGNED(4) const u8 gUnknown_082EEFBC[] = _("Yes, that's exactly it!\nThat's what I meant.\p"); -ALIGNED(4) const u8 gUnknown_082EEFEC[] = _("In other words…\nYes! That's right!\p"); +ALIGNED(4) const u8 sText_LearnedSomethingMale[] = _("Oh, I see!\nThis is educational!\p"); +ALIGNED(4) const u8 sText_ThatsFunnyMale[] = _("Don't say anything funny anymore!\nI'm sore from laughing!\p"); +ALIGNED(4) const u8 sText_RandomChatMale1[] = _("Oh?\nSomething like that happened.\p"); +ALIGNED(4) const u8 sText_RandomChatMale2[] = _("Hmhm… What?\nSo is this what you're saying?\p"); +ALIGNED(4) const u8 sText_LearnedSomethingFemale[] = _("Is that right?\nI didn't know that.\p"); +ALIGNED(4) const u8 sText_ThatsFunnyFemale[] = _("Ahaha!\nWhat is that about?\p"); +ALIGNED(4) const u8 sText_RandomChatFemale1[] = _("Yes, that's exactly it!\nThat's what I meant.\p"); +ALIGNED(4) const u8 sText_RandomChatFemale2[] = _("In other words…\nYes! That's right!\p"); -const u8 *const gUnknown_082EF010[GENDER_COUNT][4] = { - [MALE] = +const u8 *const sChatReactionTexts[GENDER_COUNT][4] = { { - gUnknown_082EEECC, - gUnknown_082EEEF0, - gUnknown_082EEF2C, - gUnknown_082EEF50 + sText_LearnedSomethingMale, + sText_ThatsFunnyMale, + sText_RandomChatMale1, + sText_RandomChatMale2 }, - [FEMALE] = { - gUnknown_082EEF7C, - gUnknown_082EEFA0, - gUnknown_082EEFBC, - gUnknown_082EEFEC + sText_LearnedSomethingFemale, + sText_ThatsFunnyFemale, + sText_RandomChatFemale1, + sText_RandomChatFemale2 } }; -ALIGNED(4) const u8 gUnknown_082EF030[] = _("I'm just showing my TRAINER CARD\nas my way of greeting.\p"); -ALIGNED(4) const u8 gUnknown_082EF06C[] = _("I hope I get to know you better!\p"); -ALIGNED(4) const u8 gUnknown_082EF090[] = _("We're showing each other our\nTRAINER CARDS to get acquainted.\p"); -ALIGNED(4) const u8 gUnknown_082EF0D0[] = _("Glad to meet you.\nPlease don't be a stranger!\p"); +ALIGNED(4) const u8 sText_ShowedTrainerCardMale1[] = _("I'm just showing my TRAINER CARD\nas my way of greeting.\p"); +ALIGNED(4) const u8 sText_ShowedTrainerCardMale2[] = _("I hope I get to know you better!\p"); +ALIGNED(4) const u8 sText_ShowedTrainerCardFemale1[] = _("We're showing each other our\nTRAINER CARDS to get acquainted.\p"); +ALIGNED(4) const u8 sText_ShowedTrainerCardFemale2[] = _("Glad to meet you.\nPlease don't be a stranger!\p"); -const u8 *const gUnknown_082EF100[GENDER_COUNT][2] = { - [MALE] = +const u8 *const sTrainerCardReactionTexts[GENDER_COUNT][2] = { { - gUnknown_082EF030, - gUnknown_082EF06C + sText_ShowedTrainerCardMale1, + sText_ShowedTrainerCardMale2 }, - [FEMALE] = { - gUnknown_082EF090, - gUnknown_082EF0D0 + sText_ShowedTrainerCardFemale1, + sText_ShowedTrainerCardFemale2 } }; @@ -413,13 +410,11 @@ ALIGNED(4) const u8 sText_MaleTraded2[] = _("Finally, a trade got me that\nPOKé ALIGNED(4) const u8 sText_FemaleTraded1[] = _("I'm trading POKéMON right now.\p"); ALIGNED(4) const u8 sText_FemaleTraded2[] = _("I finally got that POKéMON I\nwanted in a trade!\p"); -const u8 *const sUnionRoomTexts_Traded[GENDER_COUNT][4] = { - [MALE] = +const u8 *const sTradeReactionTexts[GENDER_COUNT][4] = { { sText_MaleTraded1, sText_MaleTraded2 }, - [FEMALE] = { sText_FemaleTraded1, sText_FemaleTraded2 @@ -442,17 +437,17 @@ ALIGNED(4) const u8 sText_RegistrationCanceled2[] = _("The registration has been ALIGNED(4) const u8 sText_TradeTrainersWillBeListed[] = _("TRAINERS wishing to make a trade\nwill be listed."); // unused ALIGNED(4) const u8 sText_ChooseTrainerToTradeWith2[] = _("Please choose the TRAINER with whom\nyou would like to trade POKéMON."); // unused ALIGNED(4) const u8 sText_AskTrainerToMakeTrade[] = _("Would you like to ask {STR_VAR_1} to\nmake a trade?"); -ALIGNED(4) const u8 sText_AwaitingResponseFromTrainer[] = _("Awaiting a response from\nthe other TRAINER…"); // unused +ALIGNED(4) const u8 sText_AwaitingResponseFromTrainer2[] = _("Awaiting a response from\nthe other TRAINER…"); // unused ALIGNED(4) const u8 sText_NotRegisteredAMonForTrade[] = _("You have not registered a POKéMON\nfor trading.\p"); // unused ALIGNED(4) const u8 sText_DontHaveTypeTrainerWants[] = _("You don't have a {STR_VAR_2}-type\nPOKéMON that {STR_VAR_1} wants.\p"); ALIGNED(4) const u8 sText_DontHaveEggTrainerWants[] = _("You don't have an EGG that\n{STR_VAR_1} wants.\p"); -ALIGNED(4) const u8 sText_CantTradeMonRightNow[] = _("{STR_VAR_1} can't make a trade for\nyour POKéMON right now.\p"); -ALIGNED(4) const u8 sText_CantTradePartnersMonRightNow[] = _("You can't make a trade for\n{STR_VAR_1}'s POKéMON right now.\p"); +ALIGNED(4) const u8 sText_PlayerCantTradeForYourMon[] = _("{STR_VAR_1} can't make a trade for\nyour POKéMON right now.\p"); +ALIGNED(4) const u8 sText_CantTradeForPartnersMon[] = _("You can't make a trade for\n{STR_VAR_1}'s POKéMON right now.\p"); -// unused -const u8 *const sUnionRoomTexts_CantTradeRightNow[] = { - sText_CantTradeMonRightNow, - sText_CantTradePartnersMonRightNow +// Unused +const u8 *const sCantTradeMonTexts[] = { + sText_PlayerCantTradeForYourMon, + sText_CantTradeForPartnersMon }; ALIGNED(4) const u8 sText_TradeOfferRejected[] = _("Your trade offer was rejected.\p"); @@ -504,27 +499,27 @@ static const u8 *const sChooseTrainerTexts[NUM_LINK_GROUP_TYPES] = [LINK_GROUP_BATTLE_TOWER_OPEN] = sText_ChooseLeaderBattleTowerOpenLv }; -ALIGNED(4) const u8 gUnknown_082EFBC8[] = _("Searching for a WIRELESS\nCOMMUNICATION SYSTEM. Wait..."); -ALIGNED(4) const u8 unref_text_union_room_12[] = _("For a DOUBLE BATTLE, you must have\nat least two POKéMON.\p"); -ALIGNED(4) const u8 gUnknown_082EFC3C[] = _("Awaiting {STR_VAR_1}'s response…"); -ALIGNED(4) const u8 gUnknown_082EFC54[] = _("{STR_VAR_1} has been asked to register\nyou as a member. Please wait."); -ALIGNED(4) const u8 gUnknown_082EFC90[] = _("Awaiting a response from the\nWIRELESS COMMUNICATION SYSTEM."); -ALIGNED(4) const u8 unref_text_union_room_13[] = _("Please wait for other TRAINERS to\ngather and get ready."); -ALIGNED(4) const u8 gUnknown_082EFD04[] = _("No CARDS appear to be shared \nright now."); -ALIGNED(4) const u8 gUnknown_082EFD30[] = _("No NEWS appears to be shared\nright now."); +ALIGNED(4) const u8 sText_SearchingForWirelessSystemWait[] = _("Searching for a WIRELESS\nCOMMUNICATION SYSTEM. Wait..."); +ALIGNED(4) const u8 sText_MustHaveTwoMonsForDoubleBattle[] = _("For a DOUBLE BATTLE, you must have\nat least two POKéMON.\p"); // Unused +ALIGNED(4) const u8 sText_AwaitingPlayersResponse[] = _("Awaiting {STR_VAR_1}'s response…"); +ALIGNED(4) const u8 sText_PlayerHasBeenAskedToRegisterYouPleaseWait[] = _("{STR_VAR_1} has been asked to register\nyou as a member. Please wait."); +ALIGNED(4) const u8 sText_AwaitingResponseFromWirelessSystem[] = _("Awaiting a response from the\nWIRELESS COMMUNICATION SYSTEM."); +ALIGNED(4) const u8 sText_PleaseWaitForOtherTrainersToGather[] = _("Please wait for other TRAINERS to\ngather and get ready."); // Unused +ALIGNED(4) const u8 sText_NoCardsSharedRightNow[] = _("No CARDS appear to be shared \nright now."); +ALIGNED(4) const u8 sText_NoNewsSharedRightNow[] = _("No NEWS appears to be shared\nright now."); -const u8 *const gUnknown_082EFD58[] = { - gUnknown_082EFD04, - gUnknown_082EFD30 +const u8 *const sNoWonderSharedTexts[] = { + sText_NoCardsSharedRightNow, + sText_NoNewsSharedRightNow }; -ALIGNED(4) const u8 gUnknown_082EFD60[] = _("BATTLE"); -ALIGNED(4) const u8 gUnknown_082EFD68[] = _("CHAT"); -ALIGNED(4) const u8 gUnknown_082EFD70[] = _("GREETINGS"); -ALIGNED(4) const u8 gUnknown_082EFD7C[] = _("EXIT"); -ALIGNED(4) const u8 gUnknown_082EFD84[] = _("EXIT"); -ALIGNED(4) const u8 gUnknown_082EFD8C[] = _("INFO"); -ALIGNED(4) const u8 gUnknown_082EFD94[] = _("NAME{CLEAR_TO 0x3C}WANTED{CLEAR_TO 0x6E}OFFER{CLEAR_TO 0xC6}LV."); +ALIGNED(4) const u8 sText_Battle[] = _("BATTLE"); +ALIGNED(4) const u8 sText_Chat2[] = _("CHAT"); +ALIGNED(4) const u8 sText_Greetings[] = _("GREETINGS"); +ALIGNED(4) const u8 sText_Exit[] = _("EXIT"); +ALIGNED(4) const u8 sText_Exit2[] = _("EXIT"); +ALIGNED(4) const u8 sText_Info[] = _("INFO"); +ALIGNED(4) const u8 sText_NameWantedOfferLv[] = _("NAME{CLEAR_TO 0x3C}WANTED{CLEAR_TO 0x6E}OFFER{CLEAR_TO 0xC6}LV."); ALIGNED(4) const u8 sText_SingleBattle[] = _("SINGLE BATTLE"); ALIGNED(4) const u8 sText_DoubleBattle[] = _("DOUBLE BATTLE"); ALIGNED(4) const u8 sText_MultiBattle[] = _("MULTI BATTLE"); @@ -560,20 +555,20 @@ static const u8 *const sCardColorTexts[] = { sText_ItsGoldCard }; -ALIGNED(4) const u8 gUnknown_082EFF64[] = _("This is {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}'s\nTRAINER CARD…\l{SPECIAL_F7 0x02}\pPOKéDEX: {SPECIAL_F7 0x03}\nTIME: {SPECIAL_F7 0x04}:{SPECIAL_F7 0x05}\p"); -ALIGNED(4) const u8 gUnknown_082EFFA4[] = _("BATTLES: WINS: {SPECIAL_F7 0x00} LOSSES: {SPECIAL_F7 0x02}\nTRADES: {SPECIAL_F7 0x03}\p“{SPECIAL_F7 0x04} {SPECIAL_F7 0x05}\n{SPECIAL_F7 0x06} {SPECIAL_F7 0x07}”\p"); -ALIGNED(4) const u8 gUnknown_082EFFDC[] = _("{SPECIAL_F7 0x01}: Glad to have met you!{PAUSE 60}"); -ALIGNED(4) const u8 gUnknown_082EFFFC[] = _("{SPECIAL_F7 0x01}: Glad to meet you!{PAUSE 60}"); +ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}'s\nTRAINER CARD…\l{SPECIAL_F7 0x02}\pPOKéDEX: {SPECIAL_F7 0x03}\nTIME: {SPECIAL_F7 0x04}:{SPECIAL_F7 0x05}\p"); +ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {SPECIAL_F7 0x00} LOSSES: {SPECIAL_F7 0x02}\nTRADES: {SPECIAL_F7 0x03}\p“{SPECIAL_F7 0x04} {SPECIAL_F7 0x05}\n{SPECIAL_F7 0x06} {SPECIAL_F7 0x07}”\p"); +ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{SPECIAL_F7 0x01}: Glad to have met you!{PAUSE 60}"); +ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{SPECIAL_F7 0x01}: Glad to meet you!{PAUSE 60}"); -const u8 *const gUnknown_082F0018[] = { - gUnknown_082EFFDC, - gUnknown_082EFFFC +const u8 *const sGladToMeetYouTexts[GENDER_COUNT] = { + sText_GladToMeetYouMale, + sText_GladToMeetYouFemale }; -ALIGNED(4) const u8 gUnknown_082F0020[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}"); +ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}"); -const u8 *const gUnknown_082F0048[] = { - gText_EmptyString, +const u8 *const sLinkGroupActivityTexts[] = { + sText_EmptyString, sText_SingleBattle, sText_DoubleBattle, sText_MultiBattle, @@ -586,14 +581,14 @@ const u8 *const gUnknown_082F0048[] = { sText_BerryCrush, sText_BerryPicking, sText_Search, - gText_EmptyString, + sText_EmptyString, sText_BattleTowerOpenLv, sText_RecordCorner, sText_BerryBlender, - gText_EmptyString, - gText_EmptyString, - gText_EmptyString, - gText_EmptyString, + sText_EmptyString, + sText_EmptyString, + sText_EmptyString, + sText_EmptyString, sText_WonderCards, sText_WonderNews, sText_CoolContest, @@ -670,11 +665,11 @@ const struct WindowTemplate gUnknown_082F012C = { }; const struct ListMenuItem gUnknown_082F0134[] = { - { gText_EmptyString, 0 }, - { gText_EmptyString, 1 }, - { gText_EmptyString, 2 }, - { gText_EmptyString, 3 }, - { gText_EmptyString, 4 } + { sText_EmptyString, 0 }, + { sText_EmptyString, 1 }, + { sText_EmptyString, 2 }, + { sText_EmptyString, 3 }, + { sText_EmptyString, 4 } }; const struct ListMenuTemplate gUnknown_082F015C = { @@ -719,22 +714,22 @@ const struct WindowTemplate gUnknown_082F017C = { }; const struct ListMenuItem gUnknown_082F0184[] = { - { gText_EmptyString, 0 }, - { gText_EmptyString, 1 }, - { gText_EmptyString, 2 }, - { gText_EmptyString, 3 }, - { gText_EmptyString, 4 }, - { gText_EmptyString, 5 }, - { gText_EmptyString, 6 }, - { gText_EmptyString, 7 }, - { gText_EmptyString, 8 }, - { gText_EmptyString, 9 }, - { gText_EmptyString, 10 }, - { gText_EmptyString, 11 }, - { gText_EmptyString, 12 }, - { gText_EmptyString, 13 }, - { gText_EmptyString, 14 }, - { gText_EmptyString, 15 } + { sText_EmptyString, 0 }, + { sText_EmptyString, 1 }, + { sText_EmptyString, 2 }, + { sText_EmptyString, 3 }, + { sText_EmptyString, 4 }, + { sText_EmptyString, 5 }, + { sText_EmptyString, 6 }, + { sText_EmptyString, 7 }, + { sText_EmptyString, 8 }, + { sText_EmptyString, 9 }, + { sText_EmptyString, 10 }, + { sText_EmptyString, 11 }, + { sText_EmptyString, 12 }, + { sText_EmptyString, 13 }, + { sText_EmptyString, 14 }, + { sText_EmptyString, 15 } }; const struct ListMenuTemplate gUnknown_082F0204 = { @@ -769,10 +764,10 @@ const struct WindowTemplate gUnknown_082F021C = { }; const struct ListMenuItem gUnknown_082F0224[] = { - { gUnknown_082EFD70, 0x208 }, - { gUnknown_082EFD60, 0x241 }, - { gUnknown_082EFD68, 0x245 }, - { gUnknown_082EFD7C, 0x040 } + { sText_Greetings, 0x208 }, + { sText_Battle, 0x241 }, + { sText_Chat2, 0x245 }, + { sText_Exit, 0x040 } }; const struct ListMenuTemplate gUnknown_082F0244 = { @@ -808,8 +803,8 @@ const struct WindowTemplate gUnknown_082F025C = { const struct ListMenuItem gUnknown_082F0264[] = { { gText_Register, 1 }, - { gUnknown_082EFD8C, 2 }, - { gUnknown_082EFD7C, 3 } + { sText_Info, 2 }, + { sText_Exit, 3 } }; const struct ListMenuTemplate gUnknown_082F027C = { @@ -861,7 +856,7 @@ static const struct ListMenuItem sTradingBoardTypes[] = { { gTypeNames[TYPE_DRAGON], TYPE_DRAGON }, { gTypeNames[TYPE_STEEL], TYPE_STEEL }, { gTypeNames[TYPE_DARK], TYPE_DARK }, - { gUnknown_082EFD7C, NUMBER_OF_MON_TYPES } + { sText_Exit, NUMBER_OF_MON_TYPES } }; const struct ListMenuTemplate sMenuTemplate_TradingBoardRequestType = { @@ -906,16 +901,16 @@ const struct WindowTemplate gUnknown_082F034C = { }; const struct ListMenuItem gUnknown_082F0354[] = { - { gText_EmptyString, -3 }, - { gText_EmptyString, 0 }, - { gText_EmptyString, 1 }, - { gText_EmptyString, 2 }, - { gText_EmptyString, 3 }, - { gText_EmptyString, 4 }, - { gText_EmptyString, 5 }, - { gText_EmptyString, 6 }, - { gText_EmptyString, 7 }, - { gUnknown_082EFD84, 8 } + { sText_EmptyString, -3 }, + { sText_EmptyString, 0 }, + { sText_EmptyString, 1 }, + { sText_EmptyString, 2 }, + { sText_EmptyString, 3 }, + { sText_EmptyString, 4 }, + { sText_EmptyString, 5 }, + { sText_EmptyString, 6 }, + { sText_EmptyString, 7 }, + { sText_Exit2, 8 } }; const struct ListMenuTemplate gUnknown_082F03A4 = { @@ -950,22 +945,22 @@ const struct WindowTemplate UnrefWindowTemplate_082F03B4 = { }; const struct ListMenuItem gUnknown_082F03C4[] = { - { gText_EmptyString, 0 }, - { gText_EmptyString, 1 }, - { gText_EmptyString, 2 }, - { gText_EmptyString, 3 }, - { gText_EmptyString, 4 }, - { gText_EmptyString, 5 }, - { gText_EmptyString, 6 }, - { gText_EmptyString, 7 }, - { gText_EmptyString, 8 }, - { gText_EmptyString, 9 }, - { gText_EmptyString, 10 }, - { gText_EmptyString, 11 }, - { gText_EmptyString, 12 }, - { gText_EmptyString, 13 }, - { gText_EmptyString, 14 }, - { gText_EmptyString, 15 } + { sText_EmptyString, 0 }, + { sText_EmptyString, 1 }, + { sText_EmptyString, 2 }, + { sText_EmptyString, 3 }, + { sText_EmptyString, 4 }, + { sText_EmptyString, 5 }, + { sText_EmptyString, 6 }, + { sText_EmptyString, 7 }, + { sText_EmptyString, 8 }, + { sText_EmptyString, 9 }, + { sText_EmptyString, 10 }, + { sText_EmptyString, 11 }, + { sText_EmptyString, 12 }, + { sText_EmptyString, 13 }, + { sText_EmptyString, 14 }, + { sText_EmptyString, 15 } }; const struct ListMenuTemplate UnrefListMenuTemplate_082F0444 = { diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index e731c73c7..958922067 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2704,17 +2704,17 @@ static const u16 gUnknown_082F7B50[][4] = {9999, 9999, 9999, 0}, }; -static const u8 gUnknown_082F7B78[] = _("あいうえおかき"); -static const u8 gUnknown_082F7B80[] = _("ABCDEFG"); -static const u8 gUnknown_082F7B88[] = _("0123456"); +static const u8 sJPText_Vowels[] = _("あいうえおかき"); +static const u8 sText_ABCDEFG[] = _("ABCDEFG"); +static const u8 sText_0123456[] = _("0123456"); -static const u8 *const gUnknown_082F7B90[] = +static const u8 *const sPlaceholderPlayerNames[] = { - gUnknown_082F7B78, - gUnknown_082F7B78, - gUnknown_082F7B78, - gUnknown_082F7B80, - gUnknown_082F7B88 + sJPText_Vowels, + sJPText_Vowels, + sJPText_Vowels, + sText_ABCDEFG, + sText_0123456 }; static void sub_8027D20(void) @@ -2726,8 +2726,8 @@ static void sub_8027D38(void) { u8 i, playerId; - for (playerId = gUnknown_02022C98->unk24; playerId < 5; playerId++) - StringCopy(gLinkPlayers[playerId].name, gUnknown_082F7B90[playerId]); + for (playerId = gUnknown_02022C98->unk24; playerId < ARRAY_COUNT(sPlaceholderPlayerNames); playerId++) + StringCopy(gLinkPlayers[playerId].name, sPlaceholderPlayerNames[playerId]); gUnknown_02022C98->unk24 = 5; for (i = 0; i < 4; i++) @@ -4386,12 +4386,12 @@ struct WinCoords u8 top; }; -static const u8 gUnknown_082FB380[][3] = +static const u8 sTextColorTable[][3] = { - {1, 2, 3}, - {1, 4, 5}, - {1, 8, 9}, - {1, 6, 7}, + {TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}, + {TEXT_COLOR_WHITE, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}, + {TEXT_COLOR_WHITE, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_BLUE}, + {TEXT_COLOR_WHITE, TEXT_COLOR_GREEN, TEXT_COLOR_LIGHT_GREEN}, }; static const struct WinCoords gUnknown_082FB38C[] = {{12, 6}}; @@ -4525,7 +4525,7 @@ static void sub_8029440(void) if (id == GetMultiplayerId()) colorsId = 2; name = sub_8027660(id); - AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[i], 1, left, 1, gUnknown_082FB380[colorsId], -1, name); + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[i], 1, left, 1, sTextColorTable[colorsId], -1, name); CopyWindowToVram(gUnknown_02022CF8->unk3008[i], 2); window.baseBlock += 0xE; sub_8029174(&window); @@ -4609,7 +4609,7 @@ static void sub_80296A8(u8 playersCount_) if (id == GetMultiplayerId()) colorsId = 2; name = sub_8027660(id); - AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, 28, gUnknown_082FB402[i], gUnknown_082FB380[colorsId], -1, name); + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, 28, gUnknown_082FB402[i], sTextColorTable[colorsId], -1, name); ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_LEFT_ALIGN, 7); numWidth = GetStringWidth(1, numString, -1); AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, numString, x - numWidth, gUnknown_082FB402[i], -1, NULL); @@ -4653,7 +4653,7 @@ static void sub_802988C(void) colorsId = 2; name = sub_8027660(i); - AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, 0, gUnknown_082FB3F8[i], gUnknown_082FB380[colorsId], -1, name); + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, 0, gUnknown_082FB3F8[i], sTextColorTable[colorsId], -1, name); for (j = 0; j < 4; j++) { u32 width; @@ -4663,7 +4663,7 @@ static void sub_802988C(void) ConvertIntToDecimalStringN(gStringVar4, result1, STR_CONV_MODE_LEFT_ALIGN, 4); width = GetStringWidth(1, gStringVar4, -1); if (result2 == result1 && result2 != 0) - AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, gUnknown_082FB3F0[j] - width, gUnknown_082FB3F8[i], gUnknown_082FB380[1], -1, gStringVar4); + AddTextPrinterParameterized3(gUnknown_02022CF8->unk3008[1], 1, gUnknown_082FB3F0[j] - width, gUnknown_082FB3F8[i], sTextColorTable[1], -1, gStringVar4); else AddTextPrinterParameterized(gUnknown_02022CF8->unk3008[1], 1, gStringVar4, gUnknown_082FB3F0[j] - width, gUnknown_082FB3F8[i], -1, NULL); } diff --git a/src/easy_chat.c b/src/easy_chat.c index 32478ff1a..995a2bc7e 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3703,7 +3703,7 @@ static void sub_811CFCC(void) xOffset = GetStringCenterAlignXOffset(1, titleText, 144); FillWindowPixelBuffer(0, PIXEL_FILL(0)); - sub_811D058(0, 1, titleText, xOffset, 1, 0xFF, 0, 2, 3); + sub_811D058(0, 1, titleText, xOffset, 1, 0xFF, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY); PutWindowTilemap(0); CopyWindowToVram(0, 3); } @@ -3713,12 +3713,12 @@ void sub_811D028(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, vo AddTextPrinterParameterized(windowId, fontId, str, x, y, speed, callback); } -static void sub_811D058(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, u8 red, u8 green, u8 blue) +static void sub_811D058(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, u8 bg, u8 fg, u8 shadow) { u8 color[3]; - color[0] = red; - color[1] = green; - color[2] = blue; + color[0] = bg; + color[1] = fg; + color[2] = shadow; AddTextPrinterParameterized3(windowId, fontId, left, top, color, speed, str); } @@ -4089,7 +4089,7 @@ static void sub_811D864(u8 arg0, u8 arg1) if (!sub_811BF88(easyChatWord)) sub_811D028(2, 1, sUnknown_0203A11C->unkCC, (j * 13 + 3) * 8, y, 0xFF, NULL); else - sub_811D058(2, 1, sUnknown_0203A11C->unkCC, (j * 13 + 3) * 8, y, 0xFF, 1, 5, 3); + sub_811D058(2, 1, sUnknown_0203A11C->unkCC, (j * 13 + 3) * 8, y, 0xFF, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GREY); } } diff --git a/src/ereader_screen.c b/src/ereader_screen.c index 4497556ea..754bbe445 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -251,7 +251,7 @@ static void sub_81D5084(u8 taskId) switch (data->unk8) { case 0: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EDFD6)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ReceiveMysteryGiftWithEReader)) data->unk8 = 1; break; case 1: @@ -275,9 +275,9 @@ static void sub_81D5084(u8 taskId) } break; case 4: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EDFF5)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_SelectConnectFromEReaderMenu)) { - AddTextPrinterToWindow1(gUnknown_085EE014); + AddTextPrinterToWindow1(gJPText_SelectConnectWithGBA); sub_81D505C(&data->unk0); data->unk8 = 5; } @@ -324,11 +324,11 @@ static void sub_81D5084(u8 taskId) } break; case 7: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE05C)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_LinkIsIncorrect)) data->unk8 = 4; break; case 8: - AddTextPrinterToWindow1(gUnknown_085EE097); + AddTextPrinterToWindow1(gJPText_Connecting); // XXX: This (u32*) cast is discarding the const qualifier from gUnknown_089A3470 sub_81D4D50(&gUnknown_03006370, gMultiBootProgram_BerryGlitchFix_Start - gUnknown_089A3470, (u32*)gUnknown_089A3470); data->unk8 = 9; @@ -347,7 +347,7 @@ static void sub_81D5084(u8 taskId) else if (data->unkE == 1) { sub_81D505C(&data->unk0); - AddTextPrinterToWindow1(gUnknown_085EE120); + AddTextPrinterToWindow1(gJPText_PleaseWaitAMoment); data->unk8 = 11; } else @@ -361,7 +361,7 @@ static void sub_81D5084(u8 taskId) break; case 12: sub_81D4E30(); - AddTextPrinterToWindow1(gUnknown_085EE0DC); + AddTextPrinterToWindow1(gJPText_AllowEReaderToLoadCard); data->unk8 = 13; break; case 13: @@ -370,7 +370,7 @@ static void sub_81D5084(u8 taskId) case 0: break; case 2: - AddTextPrinterToWindow1(gUnknown_085EE097); + AddTextPrinterToWindow1(gJPText_Connecting); data->unk8 = 14; break; case 1: @@ -418,7 +418,7 @@ static void sub_81D5084(u8 taskId) case 17: if (TryWriteTrainerHill((struct EReaderTrainerHillSet *)&gDecompressionBuffer)) { - AddTextPrinterToWindow1(gUnknown_085EE0FA); + AddTextPrinterToWindow1(gJPText_ConnectionComplete); sub_81D505C(&data->unk0); data->unk8 = 18; } @@ -430,7 +430,7 @@ static void sub_81D5084(u8 taskId) case 18: if (sub_81D5064(&data->unk0, 120)) { - AddTextPrinterToWindow1(gUnknown_085EE107); + AddTextPrinterToWindow1(gJPText_NewTrainerHasComeToHoenn); PlayFanfare(MUS_FANFA4); data->unk8 = 19; } @@ -440,19 +440,19 @@ static void sub_81D5084(u8 taskId) data->unk8 = 26; break; case 23: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9,gUnknown_085EE06B)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_CardReadingHasBeenHalted)) data->unk8 = 26; break; case 20: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE0A3)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ConnectionErrorCheckLink)) data->unk8 = 0; break; case 21: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE0BF)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ConnectionErrorTryAgain)) data->unk8 = 0; break; case 22: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gUnknown_085EE12D)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_WriteErrorUnableToSaveData)) data->unk8 = 0; break; case 26: diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 33ac5b0fe..6832c4f66 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -288,9 +288,9 @@ static const struct WindowTemplate sMapWindowTemplates[] = static const u8 sTextColors[][3] = { - {0, 2, 3}, - {0, 1, 9}, - {0, 4, 5}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_BLUE}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}, }; struct @@ -483,21 +483,21 @@ static const struct SpriteTemplate sSpriteTemplate_Head = static const u8 *const sPassAreaDescriptions[] = { - gUnknown_085EDA96, - gUnknown_085ED932, - gUnknown_085ED94D, - gUnknown_085ED961, - gUnknown_085ED977, - gUnknown_085ED993, - gUnknown_085ED9AF, - gUnknown_085ED9C7, - gUnknown_085ED9E5, - gUnknown_085EDA02, - gUnknown_085EDA21, - gUnknown_085EDA3C, - gUnknown_085EDA5E, - gUnknown_085EDA78, - gUnknown_085ED931, + gText_ThereIsNoBattleRecord, + gText_CheckFrontierMap, + gText_CheckTrainerCard, + gText_ViewRecordedBattle, + gText_PutAwayFrontierPass, + gText_CurrentBattlePoints, + gText_CollectedSymbols, + gText_BattleTowerAbilitySymbol, + gText_BattleDomeTacticsSymbol, + gText_BattlePalaceSpiritsSymbol, + gText_BattleArenaGutsSymbol, + gText_BattleFactoryKnowledgeSymbol, + gText_BattlePikeLuckSymbol, + gText_BattlePyramidBraveSymbol, + gText_EmptyString7, }; struct @@ -509,13 +509,13 @@ struct u8 animNum; } static const sMapLandmarks[] = { - {gUnknown_085EDAB1, gUnknown_085EDB0F, 0x59, 0x28, 1}, - {gUnknown_085EDABE, gUnknown_085EDB4E, 0x21, 0x2A, 1}, - {gUnknown_085EDACA, gUnknown_085EDB8B, 0x78, 0x56, 0}, - {gUnknown_085EDAD8, gUnknown_085EDBC2, 0x72, 0x3B, 0}, - {gUnknown_085EDAE5, gUnknown_085EDC00, 0x19, 0x43, 0}, - {gUnknown_085EDAF4, gUnknown_085EDC45, 0x39, 0x39, 1}, - {gUnknown_085EDB00, gUnknown_085EDC84, 0x86, 0x29, 1}, + {gText_BattleTower3, gText_BattleTowerDesc, 0x59, 0x28, 1}, + {gText_BattleDome2, gText_BattleDomeDesc, 0x21, 0x2A, 1}, + {gText_BattlePalace2, gText_BattlePalaceDesc, 0x78, 0x56, 0}, + {gText_BattleArena2, gText_BattleArenaDesc, 0x72, 0x3B, 0}, + {gText_BattleFactory2, gText_BattleFactoryDesc, 0x19, 0x43, 0}, + {gText_BattlePike2, gText_BattlePikeDesc, 0x39, 0x39, 1}, + {gText_BattlePyramid2, gText_BattlePyramidDesc, 0x86, 0x29, 1}, }; // code diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 7c519c830..95cbc11ef 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -138,9 +138,10 @@ static const struct BgTemplate sHof_BgTemplates[] = static const struct WindowTemplate sHof_WindowTemplate = {0, 2, 2, 0xE, 6, 0xE, 1}; -static const u8 sUnknown_085E5388[] = {0, 1, 2, 0}; +static const u8 sMonInfoTextColors[4] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}; +static const u8 sPlayerInfoTextColors[4] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}; -static const u8 sUnknown_085E538C[] = {0, 2, 3, 0, 4, 5, 0, 0}; +static const u8 sUnused_085E538C[] = {4, 5, 0, 0}; static const struct CompressedSpriteSheet sHallOfFame_ConfettiSpriteSheet[] = { @@ -1063,7 +1064,7 @@ static void Task_HofPC_HandleExit(u8 taskId) static void Task_HofPC_PrintDataIsCorrupted(u8 taskId) { - sub_8198180(gText_UnkCtrlF800Exit, 8, TRUE); + sub_8198180(gText_AButtonExit, 8, TRUE); DrawDialogueFrame(0, 0); AddTextPrinterParameterized2(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3); CopyWindowToVram(0, 3); @@ -1086,7 +1087,7 @@ static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2) { FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); - AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sUnknown_085E5388, 0, gText_WelcomeToHOF); + AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sMonInfoTextColors, 0, gText_WelcomeToHOF); CopyWindowToVram(0, 3); } @@ -1122,7 +1123,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u *(stringPtr)++ = CHAR_QUESTION_MARK; } stringPtr[0] = EOS; - AddTextPrinterParameterized3(0, 1, 0x10, 1, sUnknown_085E5388, -1, text); + AddTextPrinterParameterized3(0, 1, 0x10, 1, sMonInfoTextColors, -1, text); } // nick, species names, gender and level @@ -1131,13 +1132,13 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u if (currMon->species == SPECIES_EGG) { width = GetStringCenterAlignXOffset(1, text, 0xD0); - AddTextPrinterParameterized3(0, 1, width, 1, sUnknown_085E5388, -1, text); + AddTextPrinterParameterized3(0, 1, width, 1, sMonInfoTextColors, -1, text); CopyWindowToVram(0, 3); } else { width = GetStringRightAlignXOffset(1, text, 0x80); - AddTextPrinterParameterized3(0, 1, width, 1, sUnknown_085E5388, -1, text); + AddTextPrinterParameterized3(0, 1, width, 1, sMonInfoTextColors, -1, text); text[0] = CHAR_SLASH; stringPtr = StringCopy(text + 1, gSpeciesNames[currMon->species]); @@ -1158,15 +1159,15 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u } stringPtr[0] = EOS; - AddTextPrinterParameterized3(0, 1, 0x80, 1, sUnknown_085E5388, -1, text); + AddTextPrinterParameterized3(0, 1, 0x80, 1, sMonInfoTextColors, -1, text); stringPtr = StringCopy(text, gText_Level); ConvertIntToDecimalStringN(stringPtr, currMon->lvl, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized3(0, 1, 0x24, 0x11, sUnknown_085E5388, -1, text); + AddTextPrinterParameterized3(0, 1, 0x24, 0x11, sMonInfoTextColors, -1, text); stringPtr = StringCopy(text, gText_IDNumber); ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5); - AddTextPrinterParameterized3(0, 1, 0x68, 0x11, sUnknown_085E5388, -1, text); + AddTextPrinterParameterized3(0, 1, 0x68, 0x11, sMonInfoTextColors, -1, text); CopyWindowToVram(0, 3); } @@ -1181,13 +1182,13 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) FillWindowPixelBuffer(1, PIXEL_FILL(1)); PutWindowTilemap(1); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized3(1, 1, 0, 1, sUnknown_085E538C, -1, gText_Name); + AddTextPrinterParameterized3(1, 1, 0, 1, sPlayerInfoTextColors, -1, gText_Name); width = GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 0x70); - AddTextPrinterParameterized3(1, 1, width, 1, sUnknown_085E538C, -1, gSaveBlock2Ptr->playerName); + AddTextPrinterParameterized3(1, 1, width, 1, sPlayerInfoTextColors, -1, gSaveBlock2Ptr->playerName); trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) | (gSaveBlock2Ptr->playerTrainerId[1] << 8); - AddTextPrinterParameterized3(1, 1, 0, 0x11, sUnknown_085E538C, 0, gText_IDNumber); + AddTextPrinterParameterized3(1, 1, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber); text[0] = (trainerId % 100000) / 10000 + CHAR_0; text[1] = (trainerId % 10000) / 1000 + CHAR_0; text[2] = (trainerId % 1000) / 100 + CHAR_0; @@ -1195,9 +1196,9 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) text[4] = (trainerId % 10) / 1 + CHAR_0; text[5] = EOS; width = GetStringRightAlignXOffset(1, text, 0x70); - AddTextPrinterParameterized3(1, 1, width, 0x11, sUnknown_085E538C, -1, text); + AddTextPrinterParameterized3(1, 1, width, 0x11, sPlayerInfoTextColors, -1, text); - AddTextPrinterParameterized3(1, 1, 0, 0x21, sUnknown_085E538C, -1, gText_MainMenuTime); + AddTextPrinterParameterized3(1, 1, 0, 0x21, sPlayerInfoTextColors, -1, gText_Time); text[0] = (gSaveBlock2Ptr->playTimeHours / 100) + CHAR_0; text[1] = (gSaveBlock2Ptr->playTimeHours % 100) / 10 + CHAR_0; text[2] = (gSaveBlock2Ptr->playTimeHours % 10) + CHAR_0; @@ -1213,7 +1214,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) text[6] = EOS; width = GetStringRightAlignXOffset(1, text, 0x70); - AddTextPrinterParameterized3(1, 1, width, 0x21, sUnknown_085E538C, -1, text); + AddTextPrinterParameterized3(1, 1, width, 0x21, sPlayerInfoTextColors, -1, text); CopyWindowToVram(1, 3); } diff --git a/src/item_menu.c b/src/item_menu.c index 3c5095551..6b0226188 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -797,13 +797,13 @@ void GetItemName(s8 *dest, u16 itemId) else { ConvertIntToDecimalStringN(gStringVar1, itemId - ITEM_TM01 + 1, STR_CONV_MODE_LEADING_ZEROS, 2); - StringExpandPlaceholders(dest, gText_UnkF908Var1Clear7Var2); + StringExpandPlaceholders(dest, gText_NumberVar1Clear7Var2); } break; case BERRIES_POCKET: ConvertIntToDecimalStringN(gStringVar1, itemId - ITEM_CHERI_BERRY + 1, STR_CONV_MODE_LEADING_ZEROS, 2); CopyItemName(itemId, gStringVar2); - StringExpandPlaceholders(dest, gText_UnkF908Var1Clear7Var2); + StringExpandPlaceholders(dest, gText_NumberVar1Clear7Var2); break; default: CopyItemName(itemId, dest); diff --git a/src/link.c b/src/link.c index dcc35d7d0..d6ed9f5f3 100644 --- a/src/link.c +++ b/src/link.c @@ -213,10 +213,9 @@ const struct WindowTemplate gUnknown_082ED204[] = { {0x00, 0x00, 0x0D, 0x1E, 0x07, 0x0F, 0x016A}, DUMMY_WIN_TEMPLATE }; -const u8 gUnknown_082ED224[] = { - 0x00, 0x01, 0x02, 0x00, - 0xff, 0xfe, 0xff, 0x00 -}; + +static const u8 sTextColors[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY }; +static const u8 sUnused_082ED224[] = {0x00, 0xff, 0xfe, 0xff, 0x00}; // .text @@ -1688,8 +1687,8 @@ static void sub_800B080(void) LoadPalette(gWirelessLinkDisplayPal, 0, 0x20); FillWindowPixelBuffer(0, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(0, 3, 2, 6, gUnknown_082ED224, 0, gText_CommErrorEllipsis); - AddTextPrinterParameterized3(2, 3, 2, 1, gUnknown_082ED224, 0, gText_MoveCloserToLinkPartner); + AddTextPrinterParameterized3(0, 3, 2, 6, sTextColors, 0, gText_CommErrorEllipsis); + AddTextPrinterParameterized3(2, 3, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner); PutWindowTilemap(0); PutWindowTilemap(2); CopyWindowToVram(0, 0); @@ -1701,7 +1700,7 @@ static void sub_800B138(void) LoadBgTiles(0, g2BlankTilesGfx, 0x20, 0); FillWindowPixelBuffer(1, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(1, 3, 2, 0, gUnknown_082ED224, 0, gText_CommErrorCheckConnections); + AddTextPrinterParameterized3(1, 3, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections); PutWindowTilemap(1); PutWindowTilemap(2); CopyWindowToVram(1, 0); @@ -1741,11 +1740,11 @@ static void CB2_PrintErrorMessage(void) case 130: if (gWirelessCommType == 2) { - AddTextPrinterParameterized3(0, 3, 2, 20, gUnknown_082ED224, 0, gText_ABtnTitleScreen); + AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnTitleScreen); } else if (gWirelessCommType == 1) { - AddTextPrinterParameterized3(0, 3, 2, 20, gUnknown_082ED224, 0, gText_ABtnRegistrationCounter); + AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter); } break; } diff --git a/src/mail.c b/src/mail.c index cdf965545..be2b1dc95 100644 --- a/src/mail.c +++ b/src/mail.c @@ -158,10 +158,10 @@ static const struct WindowTemplate sUnknown_0859F29C[] = { DUMMY_WIN_TEMPLATE }; -static const u8 sUnknown_0859F2AC[] = { - 0, - 10, - 11 +static const u8 sTextColors[] = { + TEXT_COLOR_TRANSPARENT, + TEXT_DYNAMIC_COLOR_1, + TEXT_DYNAMIC_COLOR_2 }; static const u16 sUnknown_0859F2B0[][2] = { @@ -486,14 +486,14 @@ static void sub_8121B1C(void) { continue; } - AddTextPrinterParameterized3(0, 1, sMailRead->layout->var8[i].xOffset + sMailRead->layout->wordsYPos, y + sMailRead->layout->wordsXPos, sUnknown_0859F2AC, 0, sMailRead->strbuf[i]); + AddTextPrinterParameterized3(0, 1, sMailRead->layout->var8[i].xOffset + sMailRead->layout->wordsYPos, y + sMailRead->layout->wordsXPos, sTextColors, 0, sMailRead->strbuf[i]); y += sMailRead->layout->var8[i].lineHeight; } bufptr = StringCopy(strbuf, gText_FromSpace); StringCopy(bufptr, sMailRead->playerName); box_x = GetStringCenterAlignXOffset(1, strbuf, sMailRead->signatureWidth) + 0x68; box_y = sMailRead->layout->signatureYPos + 0x58; - AddTextPrinterParameterized3(0, 1, box_x, box_y, sUnknown_0859F2AC, 0, strbuf); + AddTextPrinterParameterized3(0, 1, box_x, box_y, sTextColors, 0, strbuf); CopyWindowToVram(0, 3); CopyWindowToVram(1, 3); } diff --git a/src/main_menu.c b/src/main_menu.c index ee63b1810..01d9dfe4b 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -412,8 +412,8 @@ static const struct WindowTemplate gNewGameBirchSpeechTextWindows[] = static const u16 sMainMenuBgPal[] = INCBIN_U16("graphics/misc/main_menu_bg.gbapal"); static const u16 sMainMenuTextPal[] = INCBIN_U16("graphics/misc/main_menu_text.gbapal"); -static const u8 sTextColor_Headers[] = {10, 11, 12}; -static const u8 sTextColor_PlayerGenderColor[] = {10, 1, 12}; +static const u8 sTextColor_Headers[] = {TEXT_DYNAMIC_COLOR_1, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3}; +static const u8 sTextColor_MenuInfo[] = {TEXT_DYNAMIC_COLOR_1, TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_3}; static const struct BgTemplate sMainMenuBgTemplates[] = { { @@ -2147,8 +2147,8 @@ static void MainMenu_FormatSavegameText(void) static void MainMenu_FormatSavegamePlayer(void) { StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPlayer); - AddTextPrinterParameterized3(2, 1, 0, 17, sTextColor_PlayerGenderColor, -1, gStringVar4); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_PlayerGenderColor, -1, gSaveBlock2Ptr->playerName); + AddTextPrinterParameterized3(2, 1, 0, 17, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, -1, gSaveBlock2Ptr->playerName); } static void MainMenu_FormatSavegameTime(void) @@ -2157,11 +2157,11 @@ static void MainMenu_FormatSavegameTime(void) u8* ptr; StringExpandPlaceholders(gStringVar4, gText_ContinueMenuTime); - AddTextPrinterParameterized3(2, 1, 0x6C, 17, sTextColor_PlayerGenderColor, -1, gStringVar4); + AddTextPrinterParameterized3(2, 1, 0x6C, 17, sTextColor_MenuInfo, -1, gStringVar4); ptr = ConvertIntToDecimalStringN(str, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3); *ptr = 0xF0; ConvertIntToDecimalStringN(ptr + 1, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 17, sTextColor_PlayerGenderColor, -1, str); + AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 17, sTextColor_MenuInfo, -1, str); } static void MainMenu_FormatSavegamePokedex(void) @@ -2176,9 +2176,9 @@ static void MainMenu_FormatSavegamePokedex(void) else dexCount = GetHoennPokedexCount(FLAG_GET_CAUGHT); StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPokedex); - AddTextPrinterParameterized3(2, 1, 0, 33, sTextColor_PlayerGenderColor, -1, gStringVar4); + AddTextPrinterParameterized3(2, 1, 0, 33, sTextColor_MenuInfo, -1, gStringVar4); ConvertIntToDecimalStringN(str, dexCount, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 100), 33, sTextColor_PlayerGenderColor, -1, str); + AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 100), 33, sTextColor_MenuInfo, -1, str); } } @@ -2194,9 +2194,9 @@ static void MainMenu_FormatSavegameBadges(void) badgeCount++; } StringExpandPlaceholders(gStringVar4, gText_ContinueMenuBadges); - AddTextPrinterParameterized3(2, 1, 0x6C, 33, sTextColor_PlayerGenderColor, -1, gStringVar4); + AddTextPrinterParameterized3(2, 1, 0x6C, 33, sTextColor_MenuInfo, -1, gStringVar4); ConvertIntToDecimalStringN(str, badgeCount, STR_CONV_MODE_LEADING_ZEROS, 1); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 33, sTextColor_PlayerGenderColor, -1, str); + AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 33, sTextColor_MenuInfo, -1, str); } static void LoadMainMenuWindowFrameTiles(u8 bgId, u16 tileOffset) diff --git a/src/menu.c b/src/menu.c index 72844140f..fb7f44ceb 100644 --- a/src/menu.c +++ b/src/menu.c @@ -96,7 +96,7 @@ static const struct WindowTemplate sYesNo_WindowTemplates = }; const u16 gUnknown_0860F0B0[] = INCBIN_U16("graphics/interface/860F0B0.gbapal"); -const u8 gUnknown_0860F0D0[] = { 15, 1, 2 }; +const u8 sTextColors[] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY }; // Table of move info icon offsets in graphics/interface_fr/menu.png const struct MoveMenuInfoIcon gMoveMenuInfoIcons[] = @@ -825,7 +825,7 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram) 0, 0xEC - (GetWindowAttribute(sWindowId, WINDOW_TILEMAP_LEFT) * 8) - a2 - width, 1, - gUnknown_0860F0D0, + sTextColors, 0, string); if (copyToVram) @@ -842,15 +842,15 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo { if (a3 != 0) { - color[0] = 0; - color[1] = 1; - color[2] = 2; + color[0] = TEXT_COLOR_TRANSPARENT; + color[1] = TEXT_COLOR_WHITE; + color[2] = TEXT_COLOR_DARK_GREY; } else { - color[0] = 15; - color[1] = 1; - color[2] = 2; + color[0] = TEXT_DYNAMIC_COLOR_6; + color[1] = TEXT_COLOR_WHITE; + color[2] = TEXT_COLOR_DARK_GREY; } PutWindowTilemap(sWindowId); FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); diff --git a/src/menu_specialized.c b/src/menu_specialized.c index c0f7c510d..252bb7604 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -72,9 +72,9 @@ static const struct WindowTemplate sUnknown_086253E8[] = } }; -static const u8 sUnknown_08625400[] = +static const u8 sPlayerNameTextColors[] = { - 1, 2, 3 + TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY }; static const u8 sEmptyItemName[] = _(""); @@ -267,7 +267,7 @@ static void sub_81D1D44(u8 windowId, s32 itemId, u8 y) length = StringLength(buffer); if (length <= 5) ConvertInternationalString(buffer, LANGUAGE_JAPANESE); - AddTextPrinterParameterized4(windowId, 1, 8, y, 0, 0, sUnknown_08625400, -1, buffer); + AddTextPrinterParameterized4(windowId, 1, 8, y, 0, 0, sPlayerNameTextColors, -1, buffer); } u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page) @@ -1476,14 +1476,14 @@ static void sub_81D35E8(struct Sprite *sprite) } } -static const u8 *const sLvlUpStatStrings[] = +static const u8 *const sLvlUpStatStrings[NUM_STATS] = { - gUnknown_085EEA46, - gUnknown_085EEA4E, - gUnknown_085EEA55, - gUnknown_085EEA63, - gUnknown_085EEA6B, - gUnknown_085EEA5D + gText_MaxHP, + gText_Attack, + gText_Defense, + gText_SpAtk, + gText_SpDef, + gText_Speed }; void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bgClr, u8 fgClr, u8 shadowClr) @@ -1517,7 +1517,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg -1, sLvlUpStatStrings[i]); - StringCopy(text, (statsDiff[i] >= 0) ? gText_UnkCtrlF904 : gText_Dash); + StringCopy(text, (statsDiff[i] >= 0) ? gText_Plus : gText_Dash); AddTextPrinterParameterized3(windowId, 1, 56, diff --git a/src/mevent_801BAAC.c b/src/mevent_801BAAC.c index 0d7fb7699..bc32cda30 100644 --- a/src/mevent_801BAAC.c +++ b/src/mevent_801BAAC.c @@ -63,9 +63,9 @@ void sub_801C61C(void); extern const struct OamData gOamData_AffineOff_ObjNormal_32x16; -const u8 gUnknown_082F0E10[][3] = { - {0, 2, 3}, - {0, 1, 2} +const u8 sTextColorTable[][3] = { + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY} }; const u8 ALIGNED(4) gUnknown_082F0E18[3] = {7, 4, 7}; const struct WindowTemplate gUnknown_082F0E1C[] = { @@ -371,28 +371,28 @@ void sub_801C178(u8 whichWindow) case 0: { s32 x; - AddTextPrinterParameterized3(windowId, 3, 0, 1, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_018B); + AddTextPrinterParameterized3(windowId, 3, 0, 1, sTextColorTable[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_018B); x = 160 - GetStringWidth(3, sWonderCardData->unk_01B4, GetFontAttribute(3, 2)); if (x < 0) x = 0; - AddTextPrinterParameterized3(windowId, 3, x, 17, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01B4); + AddTextPrinterParameterized3(windowId, 3, x, 17, sTextColorTable[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01B4); if (sWonderCardData->unk_0000.unk_04 != 0) { - AddTextPrinterParameterized3(windowId, 1, 166, 17, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01DD); + AddTextPrinterParameterized3(windowId, 1, 166, 17, sTextColorTable[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01DD); } break; } case 1: for (; sp0C < 4; sp0C++) { - AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal2], 0, sWonderCardData->unk_01E4[sp0C]); + AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, sTextColorTable[sWonderCardData->unk_0170->textPal2], 0, sWonderCardData->unk_01E4[sp0C]); } break; case 2: - AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_0288); + AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_0288); if (sWonderCardData->unk_0000.unk_08_0 != 2) { - AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02B1); + AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02B1); } else { @@ -401,11 +401,11 @@ void sub_801C178(u8 whichWindow) s32 spacing = GetFontAttribute(3, 2); for (; sp0C < sWonderCardData->unk_0175; sp0C++) { - AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_01); + AddTextPrinterParameterized3(windowId, 3, x, y, sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_01); if (sWonderCardData->unk_02DC[sp0C].unk_42[0] != EOS) { x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_01, spacing); - AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_42); + AddTextPrinterParameterized3(windowId, 3, x, y, sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_42); x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_42, spacing) + sWonderCardData->unk_02DC[sp0C].unk_00; } } diff --git a/src/naming_screen.c b/src/naming_screen.c index 04258de0c..3d0d71866 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -55,7 +55,7 @@ static const u8 *const sTransferredToPCMessages[] = gText_PkmnTransferredLanettesPCBoxFull }; -static const u8 gUnknown_0858BDC8[] = _("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"); +static const u8 sText_AlphabetUpperLower[] = _("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"); static const struct BgTemplate gUnknown_0858BE00[] = { @@ -222,7 +222,7 @@ static void NamingScreen_TurnOffScreen(void); static void NamingScreen_InitDisplayMode(void); static void VBlankCB_NamingScreen(void); static void sub_80E501C(void); -static bool8 sub_80E503C(u8); +static bool8 IsLetter(u8); void DoNamingScreen(u8 templateNum, u8 *destBuffer, u16 monSpecies, u16 monGender, u32 monPersonality, MainCallback returnCallback) { @@ -1527,8 +1527,8 @@ static void TaskDummy3(void) static const u8 sGenderColors[2][3] = { - {0, 9, 8}, - {0, 5, 4} + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_BLUE, TEXT_COLOR_BLUE}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_RED} }; static void sub_80E49BC(void) @@ -1680,7 +1680,7 @@ static void sub_80E4D10(void) { temp[0] = gNamingScreenData->textBuffer[i]; temp[1] = gExpandedPlaceholder_Empty[0]; - unk2 = (sub_80E503C(temp[0]) == 1) ? 2 : 0; + unk2 = (IsLetter(temp[0]) == TRUE) ? 2 : 0; AddTextPrinterParameterized(gNamingScreenData->windows[2], 1, temp, i * 8 + unk + unk2, 1, 0xFF, NULL); } @@ -1690,17 +1690,17 @@ static void sub_80E4D10(void) PutWindowTilemap(gNamingScreenData->windows[2]); } -struct TextColorThing // needed because of alignment... it's so stupid +struct TextColor // Needed because of alignment { u8 colors[3][4]; }; -static const struct TextColorThing sUnkColorStruct = +static const struct TextColor sTextColorStruct = { { - {13, 1, 2}, - {14, 1, 2}, - {15, 1, 2} + {TEXT_DYNAMIC_COLOR_4, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}, + {TEXT_DYNAMIC_COLOR_5, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}, + {TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY} } }; @@ -1711,11 +1711,11 @@ static const u8 sFillValues[KBPAGE_COUNT] = [KBPAGE_SYMBOLS] = PIXEL_FILL(0xF) }; -static const u8 *const sUnkColors[KBPAGE_COUNT] = +static const u8 *const sKeyboardTextColors[KBPAGE_COUNT] = { - [KBPAGE_LETTERS_LOWER] = sUnkColorStruct.colors[1], - [KBPAGE_LETTERS_UPPER] = sUnkColorStruct.colors[0], - [KBPAGE_SYMBOLS] = sUnkColorStruct.colors[2] + [KBPAGE_LETTERS_LOWER] = sTextColorStruct.colors[1], + [KBPAGE_LETTERS_UPPER] = sTextColorStruct.colors[0], + [KBPAGE_SYMBOLS] = sTextColorStruct.colors[2] }; static void sub_80E4DE4(u8 window, u8 page) @@ -1726,7 +1726,7 @@ static void sub_80E4DE4(u8 window, u8 page) for (i = 0; i < KBROW_COUNT; i++) { - AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sUnkColors[page], 0, sNamingScreenKeyboardText[page][i]); + AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]); } PutWindowTilemap(window); @@ -1768,7 +1768,7 @@ static void sub_80E4E5C(void) static void sub_80E4EF0(void) { - const u8 color[3] = { 15, 1, 2 }; + const u8 color[3] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY }; FillWindowPixelBuffer(gNamingScreenData->windows[4], PIXEL_FILL(15)); AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack); @@ -1816,13 +1816,13 @@ static void sub_80E501C(void) ShowBg(3); } -static bool8 sub_80E503C(u8 character) +static bool8 IsLetter(u8 character) { u8 i; - for (i = 0; gUnknown_0858BDC8[i] != EOS; i++) + for (i = 0; sText_AlphabetUpperLower[i] != EOS; i++) { - if (character == gUnknown_0858BDC8[i]) + if (character == sText_AlphabetUpperLower[i]) return FALSE; } return FALSE; diff --git a/src/party_menu.c b/src/party_menu.c index c711881b0..e8a019d66 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4956,7 +4956,7 @@ static void DisplayLevelUpStatsPg1(u8 taskId) s16 *arrayPtr = sPartyMenuInternal->data; arrayPtr[12] = CreateLevelUpStatsWindow(); - DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], 1, 2, 3); + DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY); CopyWindowToVram(arrayPtr[12], 2); schedule_bg_copy_tilemap_to_vram(2); } @@ -4965,7 +4965,7 @@ static void DisplayLevelUpStatsPg2(u8 taskId) { s16 *arrayPtr = sPartyMenuInternal->data; - DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], 1, 2, 3); + DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY); CopyWindowToVram(arrayPtr[12], 2); schedule_bg_copy_tilemap_to_vram(2); } diff --git a/src/pokedex.c b/src/pokedex.c index 821296370..b5ac066db 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -934,19 +934,19 @@ static const u8 gUnknown_0856ED08[][4] = static const struct UnknownStruct3 gUnknown_0856ED30[] = { { - .text = gUnknown_085E87A5, + .text = gText_SeachForPkmnBasedOnParameters, .unk4 = 0, .unk5 = 0, .unk6 = 5, }, { - .text = gUnknown_085E87D6, + .text = gText_SwitchPokedexListings, .unk4 = 6, .unk5 = 0, .unk6 = 5, }, { - .text = gUnknown_085E87EF, + .text = gText_ReturnToPokedex, .unk4 = 12, .unk5 = 0, .unk6 = 5, @@ -956,7 +956,7 @@ static const struct UnknownStruct3 gUnknown_0856ED30[] = static const struct UnknownStruct4 gUnknown_0856ED48[] = { { - .text = gUnknown_085E8840, + .text = gText_ListByFirstLetter, .unk4 = 0, .unk5 = 2, .unk6 = 5, @@ -965,7 +965,7 @@ static const struct UnknownStruct4 gUnknown_0856ED48[] = .unk9 = 12, }, { - .text = gUnknown_085E887C, + .text = gText_ListByBodyColor, .unk4 = 0, .unk5 = 4, .unk6 = 5, @@ -974,7 +974,7 @@ static const struct UnknownStruct4 gUnknown_0856ED48[] = .unk9 = 12, }, { - .text = gUnknown_085E88A6, + .text = gText_ListByType, .unk4 = 0, .unk5 = 6, .unk6 = 5, @@ -983,7 +983,7 @@ static const struct UnknownStruct4 gUnknown_0856ED48[] = .unk9 = 6, }, { - .text = gUnknown_085E88A6, + .text = gText_ListByType, .unk4 = 0, .unk5 = 6, .unk6 = 5, @@ -992,7 +992,7 @@ static const struct UnknownStruct4 gUnknown_0856ED48[] = .unk9 = 6, }, { - .text = gUnknown_085E881F, + .text = gText_SelectPokedexListingMode, .unk4 = 0, .unk5 = 8, .unk6 = 5, @@ -1001,7 +1001,7 @@ static const struct UnknownStruct4 gUnknown_0856ED48[] = .unk9 = 12, }, { - .text = gUnknown_085E8806, + .text = gText_SelectPokedexMode, .unk4 = 0, .unk5 = 10, .unk6 = 5, @@ -1010,7 +1010,7 @@ static const struct UnknownStruct4 gUnknown_0856ED48[] = .unk9 = 12, }, { - .text = gUnknown_085E88C8, + .text = gText_ExecuteSearchSwitch, .unk4 = 0, .unk5 = 12, .unk6 = 5, @@ -3897,7 +3897,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry) value = NationalToHoennOrder(num); else value = num; - ConvertIntToDecimalStringN(StringCopy(str, gText_UnkCtrlF908Clear01), value, STR_CONV_MODE_LEADING_ZEROS, 3); + ConvertIntToDecimalStringN(StringCopy(str, gText_NumberClear01), value, STR_CONV_MODE_LEADING_ZEROS, 3); PrintInfoPageText(str, 0x60, 0x19); natNum = NationalPokedexNumToSpecies(num); if (natNum) @@ -5067,7 +5067,7 @@ void sub_80C1A4C(u8 taskId) else { PlaySE(SE_HAZURE); - sub_80C2618(gUnknown_085E8785); + sub_80C2618(gText_NoMatchingPkmnWereFound); } gTasks[taskId].func = sub_80C1AB8; CopyWindowToVram(0, 2); diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index b876fdb68..c7ce6ddf7 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3466,7 +3466,7 @@ static void sub_802DB18(u16 left, u16 top, u8 cursorPos) static void sub_802DB8C(void) { - u8 color[] = {0, 2, 3}; + u8 color[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}; PutWindowTilemap(0); PutWindowTilemap(1); @@ -3666,7 +3666,7 @@ static void sub_802DF70(bool32 arg0) if (!arg0) { for (i = 0; i < playersCount; i++) - sub_802DED8(i, 0, 2, 3); + sub_802DED8(i, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY); } else { @@ -3674,9 +3674,9 @@ static void sub_802DF70(bool32 arg0) for (i = 0; i < playersCount; i++) { if (var != i) - sub_802DED8(i, 0, 2, 3); + sub_802DED8(i, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY); else - sub_802DED8(i, 0, 4, 5); + sub_802DED8(i, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED); } } } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index bddf24cb1..fae152bb2 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -778,8 +778,8 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_8571730[] = sSpriteAffineAnim_8571720 }; -static const u8 gUnknown_08571734[] = {4, 0xF, 0xE}; -static const u8 gUnknown_08571737[] = _("/30"); +static const u8 sBoxInfoTextColors[] = {TEXT_COLOR_RED, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5}; +static const u8 sText_OutOf30[] = _("/30"); static const u16 gBoxSelectionPopupPalette[] = INCBIN_U16("graphics/unknown/unknown_57173C.gbapal"); static const u8 gBoxSelectionPopupCenterTiles[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_center.4bpp"); @@ -2090,7 +2090,7 @@ static void sub_80C7BB4(void) static void sub_80C7BE4(void) { - u8 text[16]; + u8 numBoxMonsText[16]; struct WindowTemplate winTemplate; u8 windowId; u8 *boxName = GetBoxNamePtr(gUnknown_02039D04->curBox); @@ -2106,12 +2106,12 @@ static void sub_80C7BE4(void) FillWindowPixelBuffer(windowId, PIXEL_FILL(4)); center = GetStringCenterAlignXOffset(1, boxName, 64); - AddTextPrinterParameterized3(windowId, 1, center, 1, gUnknown_08571734, TEXT_SPEED_FF, boxName); + AddTextPrinterParameterized3(windowId, 1, center, 1, sBoxInfoTextColors, TEXT_SPEED_FF, boxName); - ConvertIntToDecimalStringN(text, nPokemonInBox, STR_CONV_MODE_RIGHT_ALIGN, 2); - StringAppend(text, gUnknown_08571737); - center = GetStringCenterAlignXOffset(1, text, 64); - AddTextPrinterParameterized3(windowId, 1, center, 17, gUnknown_08571734, TEXT_SPEED_FF, text); + ConvertIntToDecimalStringN(numBoxMonsText, nPokemonInBox, STR_CONV_MODE_RIGHT_ALIGN, 2); + StringAppend(numBoxMonsText, sText_OutOf30); + center = GetStringCenterAlignXOffset(1, numBoxMonsText, 64); + AddTextPrinterParameterized3(windowId, 1, center, 17, sBoxInfoTextColors, TEXT_SPEED_FF, numBoxMonsText); winTileData = GetWindowAttribute(windowId, WINDOW_TILE_DATA); CpuCopy32((void *)winTileData, (void *)OBJ_VRAM0 + 0x100 + (GetSpriteTileStartByTag(gUnknown_02039D04->unk_0240) * 32), 0x400); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 32469bb4b..ffd468a9b 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -2716,7 +2716,7 @@ static void PrintNotEggInfo(void) u16 dexNum = SpeciesToPokedexNum(summary->species); if (dexNum != 0xFFFF) { - StringCopy(gStringVar1, &gText_UnkCtrlF908Clear01[0]); + StringCopy(gStringVar1, &gText_NumberClear01[0]); ConvertIntToDecimalStringN(gStringVar2, dexNum, STR_CONV_MODE_LEADING_ZEROS, 3); StringAppend(gStringVar1, gStringVar2); if (!IsMonShiny(mon)) @@ -3055,7 +3055,7 @@ static void PrintMonOTID(void) int xPos; if (InBattleFactory() != TRUE && InSlateportBattleTent() != TRUE) { - ConvertIntToDecimalStringN(StringCopy(gStringVar1, gText_UnkCtrlF907F908), (u16)sMonSummaryScreen->summary.OTID, STR_CONV_MODE_LEADING_ZEROS, 5); + ConvertIntToDecimalStringN(StringCopy(gStringVar1, gText_IDNumber2), (u16)sMonSummaryScreen->summary.OTID, STR_CONV_MODE_LEADING_ZEROS, 5); xPos = GetStringRightAlignXOffset(1, gStringVar1, 56); SummaryScreen_PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ID), gStringVar1, xPos, 1, 0, 1); } @@ -3209,7 +3209,7 @@ static void PrintEggOTName(void) static void PrintEggOTID(void) { int x; - StringCopy(gStringVar1, gText_UnkCtrlF907F908); + StringCopy(gStringVar1, gText_IDNumber2); StringAppend(gStringVar1, gText_FiveMarks); x = GetStringRightAlignXOffset(1, gStringVar1, 56); SummaryScreen_PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ID), gStringVar1, x, 1, 0, 1); diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index accc5a2bf..b61757399 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -130,9 +130,9 @@ const u8 *const sHelpBarTexts[12] = gText_PokenavRibbons_RibbonCheckButtons, }; -const u8 gMenuButtonReminderColor[3] = +static const u8 sHelpBarTextColors[3] = { - 4, 1, 2 + TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY }; static const struct CompressedSpriteSheet gSpinningPokenavSpriteSheet[] = @@ -692,7 +692,7 @@ void sub_81C7BA4(u32 helpBarIndex) struct PokenavMainMenuResources *structPtr = GetSubstructPtr(0); sub_81C7BF8(structPtr->unk10); - AddTextPrinterParameterized3(structPtr->unk10, 1, 0, 1, gMenuButtonReminderColor, 0, sHelpBarTexts[helpBarIndex]); + AddTextPrinterParameterized3(structPtr->unk10, 1, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[helpBarIndex]); } bool32 IsDma3ManagerBusyWithBgCopy_(void) diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 275a4063e..f8ae02b65 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -705,7 +705,7 @@ void sub_81C8C64(struct UnknownSubSubStruct_0203CF40 *a0, u32 a1) void sub_81C8CB4(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1) { - u8 colors[3] = {0, 2, 5}; + u8 colors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_RED}; a1->unk34(a0->unk10 + a0->unkC * a0->windowTopIndex, a1->unkTextBuffer); a1->unk38(a1->unk0.windowId, a0->windowTopIndex, a1->unk0.unkA); @@ -727,7 +727,7 @@ void sub_81C8D4C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct * void PrintMatchCallFieldNames(struct PokenavSub17Substruct *a0, u32 fieldId) { const u8 *fieldNames[] = {gText_PokenavMatchCall_Strategy, gText_PokenavMatchCall_TrainerPokemon, gText_PokenavMatchCall_SelfIntroduction}; - u8 colors[3] = {1, 4, 5}; + u8 colors[3] = {TEXT_COLOR_WHITE, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}; u32 top = (a0->unk0.unkA + 1 + (fieldId * 2)) & 0xF; FillWindowPixelRect(a0->unk0.windowId, PIXEL_FILL(1), 0, top << 4, a0->unk0.unk4, 16); diff --git a/src/pokenav_unk_10.c b/src/pokenav_unk_10.c index a98938a60..8da9cc270 100644 --- a/src/pokenav_unk_10.c +++ b/src/pokenav_unk_10.c @@ -752,7 +752,7 @@ void sub_81D0E60(struct PokenavSub14 *structPtr) void sub_81D0E84(struct PokenavSub14 *structPtr) { - u8 color[] = {4, 2, 3}; + u8 color[] = {TEXT_COLOR_RED, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}; ConvertIntToDecimalStringN(gStringVar1, GetCurrMonRibbonCount(), STR_CONV_MODE_LEFT_ALIGN, 2); DynamicPlaceholderTextUtil_Reset(); @@ -767,7 +767,7 @@ void sub_81D0EFC(struct PokenavSub14 *structPtr) { s32 i; u32 ribbonId = sub_81D0954(); - u8 color[] = {4, 2, 3}; + u8 color[] = {TEXT_COLOR_RED, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}; FillWindowPixelBuffer(structPtr->field_A, PIXEL_FILL(4)); if (ribbonId < 25) diff --git a/src/pokenav_unk_2.c b/src/pokenav_unk_2.c index e335d74e9..befe63f0b 100644 --- a/src/pokenav_unk_2.c +++ b/src/pokenav_unk_2.c @@ -220,25 +220,24 @@ static const struct WindowTemplate gUnknown_086202CC = static const u8 *const gUnknown_086202D4[] = { - gUnknown_085EBCC5, - gUnknown_085EBCE8, - gUnknown_085EBD01, - gUnknown_085EBD1C, - gUnknown_085EBD34, - gUnknown_085EBD83, - gUnknown_085EBDA2, - gUnknown_085EBDBF, - gUnknown_085EBDDB, - gUnknown_085EBDEE, - gUnknown_085EBE06, - gUnknown_085EBE19, - gUnknown_085EBE2D, - gUnknown_085EBE41 + gText_CheckMapOfHoenn, + gText_CheckPokemonInDetail, + gText_CallRegisteredTrainer, + gText_CheckObtainedRibbons, + gText_PutAwayPokenav, + gText_CheckPartyPokemonInDetail, + gText_CheckAllPokemonInDetail, + gText_ReturnToPokenavMenu, + gText_FindCoolPokemon, + gText_FindBeautifulPokemon, + gText_FindCutePokemon, + gText_FindSmartPokemon, + gText_FindToughPokemon, + gText_ReturnToConditionMenu }; -static const u8 gUnknown_0862030C[] = {6, 8, 7}; - -static const u8 gUnknown_0862030F[] = {6, 8, 7, 0, 0}; +static const u8 sOptionDescTextColors[] = {TEXT_COLOR_GREEN, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_GREEN}; +static const u8 sOptionDescTextColors2[] = {TEXT_COLOR_GREEN, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_GREEN}; static const struct OamData gUnknown_08620314 = { @@ -1130,7 +1129,7 @@ static void sub_81CA714(void) const u8 * s = gUnknown_086202D4[i]; u32 width = GetStringWidth(1, s, -1); FillWindowPixelBuffer(ptr->optionDescriptionWindowId, PIXEL_FILL(6)); - AddTextPrinterParameterized3(ptr->optionDescriptionWindowId, 1, (192 - width) / 2, 1, gUnknown_0862030C, 0, s); + AddTextPrinterParameterized3(ptr->optionDescriptionWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors, 0, s); } @@ -1140,7 +1139,7 @@ static void sub_81CA770(void) const u8 * s = gText_NoRibbonWinners; u32 width = GetStringWidth(1, s, -1); FillWindowPixelBuffer(ptr->optionDescriptionWindowId, PIXEL_FILL(6)); - AddTextPrinterParameterized3(ptr->optionDescriptionWindowId, 1, (192 - width) / 2, 1, gUnknown_0862030F, 0, s); + AddTextPrinterParameterized3(ptr->optionDescriptionWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s); } static bool32 sub_81CA7C4(void) diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index b8d9a51e7..36459e56b 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -199,12 +199,13 @@ const struct WindowTemplate gUnknown_086227E0 = const u8 *const gUnknown_086227E8[] = { - gUnknown_085EC017, - gUnknown_085EC01C, - gUnknown_085EC022 + gText_Call, + gText_Check, + gText_Cancel6 }; -const u8 gUnknown_086227F4[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); +// The series of 5 dots that appear when someone is called with Match Call +static const u8 sText_CallingDots[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); const struct WindowTemplate gUnknown_08622808 = { @@ -1100,7 +1101,7 @@ static bool32 sub_81CC0D0(struct Pokenav4Struct *state) static void sub_81CC0E0(struct Pokenav4Struct *state) { - AddTextPrinterParameterized(state->unk14, 1, gUnknown_086227F4, 32, 1, 1, NULL); + AddTextPrinterParameterized(state->unk14, 1, sText_CallingDots, 32, 1, 1, NULL); } static bool32 sub_81CC104(struct Pokenav4Struct *state) diff --git a/src/slot_machine.c b/src/slot_machine.c index 742ec6120..a7dcd1613 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -453,7 +453,7 @@ const struct WindowTemplate gUnknown_085A7444 = 0, 1, 3, 20, 13, 13, 1 }; -const u8 gColors_ReeltimeHelp[] = {3, 1, 2, 0}; +static const u8 sColors_ReeltimeHelp[] = {TEXT_COLOR_LIGHT_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY}; bool8 (*const SlotActions[])(struct Task *task) = { @@ -3126,7 +3126,7 @@ static void InfoBox_8104B80(struct Task *task) static void InfoBox_AddText(struct Task *task) { - AddTextPrinterParameterized3(1, 1, 2, 5, gColors_ReeltimeHelp, 0, gText_ReelTimeHelp); + AddTextPrinterParameterized3(1, 1, 2, 5, sColors_ReeltimeHelp, 0, gText_ReelTimeHelp); CopyWindowToVram(1, 3); BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0)); task->data[0]++; diff --git a/src/starter_choose.c b/src/starter_choose.c index 7f390372e..348491992 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -112,16 +112,16 @@ static const struct WindowTemplate gUnknown_085B1DE4 = static const u8 sPokeballCoords[STARTER_MON_COUNT][2] = { - {0x3c, 0x40}, - {0x78, 0x58}, - {0xb4, 0x40}, + {60, 64}, + {120, 88}, + {180, 64}, }; -static const u8 gStarterChoose_LabelCoords[][2] = +static const u8 sStarterLabelCoords[][2] = { - {0x00, 0x09}, - {0x10, 0x0a}, - {0x08, 0x04}, + {0, 9}, + {16, 10}, + {8, 4}, }; static const u16 sStarterMon[STARTER_MON_COUNT] = @@ -162,7 +162,7 @@ static const struct BgTemplate gUnknown_085B1E00[3] = }, }; -static const u8 gUnknown_085B1E0C[] = {0x00, 0x01, 0x03}; +static const u8 sTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY}; static const struct OamData gOamData_85B1E10 = { @@ -215,11 +215,11 @@ static const struct OamData gOamData_85B1E20 = .affineParam = 0, }; -static const u8 gUnknown_085B1E28[][2] = +static const u8 sCursorCoords[][2] = { - {0x3c, 0x20}, - {0x78, 0x38}, - {0xb4, 0x20}, + {60, 32}, + {120, 56}, + {180, 32}, }; static const union AnimCmd gSpriteAnim_85B1E30[] = @@ -579,36 +579,36 @@ static void Task_StarterChoose6(u8 taskId) static void CreateStarterPokemonLabel(u8 selection) { - u8 text[32]; + u8 categoryText[32]; struct WindowTemplate winTemplate; const u8 *speciesName; s32 width; u8 labelLeft, labelRight, labelTop, labelBottom; u16 species = GetStarterPokemon(selection); - CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text); + CopyMonCategoryText(SpeciesToNationalPokedexNum(species), categoryText); speciesName = gSpeciesNames[species]; winTemplate = gUnknown_085B1DE4; - winTemplate.tilemapLeft = gStarterChoose_LabelCoords[selection][0]; - winTemplate.tilemapTop = gStarterChoose_LabelCoords[selection][1]; + winTemplate.tilemapLeft = sStarterLabelCoords[selection][0]; + winTemplate.tilemapTop = sStarterLabelCoords[selection][1]; sStarterChooseWindowId = AddWindow(&winTemplate); FillWindowPixelBuffer(sStarterChooseWindowId, PIXEL_FILL(0)); - width = GetStringCenterAlignXOffset(7, text, 0x68); - AddTextPrinterParameterized3(sStarterChooseWindowId, 7, width, 1, gUnknown_085B1E0C, 0, text); + width = GetStringCenterAlignXOffset(7, categoryText, 0x68); + AddTextPrinterParameterized3(sStarterChooseWindowId, 7, width, 1, sTextColors, 0, categoryText); width = GetStringCenterAlignXOffset(1, speciesName, 0x68); - AddTextPrinterParameterized3(sStarterChooseWindowId, 1, width, 0x11, gUnknown_085B1E0C, 0, speciesName); + AddTextPrinterParameterized3(sStarterChooseWindowId, 1, width, 0x11, sTextColors, 0, speciesName); PutWindowTilemap(sStarterChooseWindowId); schedule_bg_copy_tilemap_to_vram(0); - labelLeft = gStarterChoose_LabelCoords[selection][0] * 8 - 4; - labelRight = (gStarterChoose_LabelCoords[selection][0] + 13) * 8 + 4; - labelTop = gStarterChoose_LabelCoords[selection][1] * 8; - labelBottom = (gStarterChoose_LabelCoords[selection][1] + 4) * 8; + labelLeft = sStarterLabelCoords[selection][0] * 8 - 4; + labelRight = (sStarterLabelCoords[selection][0] + 13) * 8 + 4; + labelTop = sStarterLabelCoords[selection][1] * 8; + labelBottom = (sStarterLabelCoords[selection][1] + 4) * 8; SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(labelLeft, labelRight)); SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(labelTop, labelBottom)); } @@ -647,8 +647,8 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y) void sub_81346DC(struct Sprite *sprite) { - sprite->pos1.x = gUnknown_085B1E28[gTasks[sprite->data[0]].tStarterSelection][0]; - sprite->pos1.y = gUnknown_085B1E28[gTasks[sprite->data[0]].tStarterSelection][1]; + sprite->pos1.x = sCursorCoords[gTasks[sprite->data[0]].tStarterSelection][0]; + sprite->pos1.y = sCursorCoords[gTasks[sprite->data[0]].tStarterSelection][1]; sprite->pos2.y = Sin(sprite->data[1], 8); sprite->data[1] = (u8)(sprite->data[1]) + 4; } diff --git a/src/strings.c b/src/strings.c index afa567b9f..711e183d8 100644 --- a/src/strings.c +++ b/src/strings.c @@ -28,31 +28,31 @@ const u8 gText_MainMenuMysteryEvents[] = _("MYSTERY EVENTS"); const u8 gText_WirelessNotConnected[] = _("The Wireless Adapter is not\nconnected."); const u8 gText_MysteryGiftCantUse[] = _("MYSTERY GIFT can't be used while\nthe Wireless Adapter is attached."); const u8 gText_MysteryEventsCantUse[] = _("MYSTERY EVENTS can't be used while\nthe Wireless Adapter is attached."); -const u8 gUnknown_085E836D[] = _("Updating save file using external\ndata. Please wait."); -const u8 gUnknown_085E83A2[] = _("The save file has been updated."); +const u8 gText_UpdatingSaveExternalData[] = _("Updating save file using external\ndata. Please wait."); // Unused +const u8 gText_SaveFileUpdated[] = _("The save file has been updated."); // Unused const u8 gText_SaveFileCorrupted[] = _("The save file is corrupted. The\nprevious save file will be loaded."); const u8 gText_SaveFileErased[] = _("The save file has been erased\ndue to corruption or damage."); const u8 gJPText_No1MSubCircuit[] = _("1Mサブきばんが ささっていません!"); const u8 gText_BatteryRunDry[] = _("The internal battery has run dry.\nThe game can be played.\pHowever, clock-based events will\nno longer occur."); -const u8 gUnknown_085E84BF[] = _("PLAYER"); -const u8 gUnknown_085E84C6[] = _("POKéDEX"); -const u8 gText_MainMenuTime[] = _("TIME"); -const u8 gUnknown_085E84D3[] = _("BADGES"); -const u8 gUnknown_085E84DA[] = _("A Button"); -const u8 gUnknown_085E84E3[] = _("B Button"); -const u8 gUnknown_085E84EC[] = _("R Button"); -const u8 gUnknown_085E84F5[] = _("L Button"); -const u8 gUnknown_085E84FE[] = _("START"); -const u8 gUnknown_085E8504[] = _("SELECT"); -const u8 gUnknown_085E850B[] = _("+ Control Pad"); -const u8 gUnknown_085E8519[] = _("L Button R Button"); -const u8 gUnknown_085E852C[] = _("CONTROLS"); -ALIGNED(4) const u8 gUnknown_085E8538[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK"); -ALIGNED(4) const u8 gUnknown_085E8544[] = _("{A_BUTTON}NEXT"); -ALIGNED(4) const u8 gUnknown_085E854C[] = _("{A_BUTTON}NEXT {B_BUTTON}BACK"); +const u8 gText_Player[] = _("PLAYER"); // Unused +const u8 gText_Pokedex[] = _("POKéDEX"); // Unused +const u8 gText_Time[] = _("TIME"); +const u8 gText_Badges[] = _("BADGES"); // Unused +const u8 gText_AButton[] = _("A Button"); // Unused +const u8 gText_BButton[] = _("B Button"); // Unused +const u8 gText_RButton[] = _("R Button"); // Unused +const u8 gText_LButton[] = _("L Button"); // Unused +const u8 gText_Start[] = _("START"); // Unused +const u8 gText_Select[] = _("SELECT"); // Unused +const u8 gText_ControlPad[] = _("+ Control Pad"); // Unused +const u8 gText_LButtonRButton[] = _("L Button R Button"); // Unused +const u8 gText_Controls[] = _("CONTROLS"); // Unused +ALIGNED(4) const u8 gText_PickOk[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}OK"); // Unused +ALIGNED(4) const u8 gText_Next[] = _("{A_BUTTON}NEXT"); // Unused +ALIGNED(4) const u8 gText_NextBack[] = _("{A_BUTTON}NEXT {B_BUTTON}BACK"); // Unused ALIGNED(4) const u8 gText_PickNextCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}NEXT {B_BUTTON}CANCEL"); ALIGNED(4) const u8 gText_PickCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}{B_BUTTON}CANCEL"); -ALIGNED(4) const u8 gText_UnkCtrlF800Exit[] = _("{A_BUTTON}EXIT"); +ALIGNED(4) const u8 gText_AButtonExit[] = _("{A_BUTTON}EXIT"); const u8 gText_BirchBoy[] = _("BOY"); const u8 gText_BirchGirl[] = _("GIRL"); const u8 gText_DefaultNameStu[] = _("STU"); @@ -99,28 +99,28 @@ const u8 gText_ThisIsAPokemon[] = _("This is what we call a “POKéMON.”{PAUS const u8 gText_5MarksPokemon[] = _("????? POKéMON"); const u8 gText_UnkHeight[] = _("{CLEAR_TO 0x0C}??'??”"); const u8 gText_UnkWeight[] = _("????.? lbs."); -const u8 gUnknown_085E86DC[] = _(" POKéMON"); -const u8 gUnknown_085E86FB[] = _("{CLEAR_TO 0x0C} ' ”"); -const u8 gUnknown_085E8709[] = _(" . lbs."); -const u8 gUnknown_085E871A[] = _(""); +const u8 gText_EmptyPkmnCategory[] = _(" POKéMON"); // Unused +const u8 gText_EmptyHeight[] = _("{CLEAR_TO 0x0C} ' ”"); // Unused +const u8 gText_EmptyWeight[] = _(" . lbs."); // Unused +const u8 gText_EmptyPokedexInfo1[] = _(""); // Unused const u8 gText_CryOf[] = _("CRY OF"); -const u8 gUnknown_085E8722[] = _(""); +const u8 gText_EmptyPokedexInfo2[] = _(""); // Unused const u8 gText_SizeComparedTo[] = _("SIZE COMPARED TO "); const u8 gText_PokedexRegistration[] = _("POKéDEX registration completed."); const u8 gText_HTHeight[] = _("HT"); const u8 gText_WTWeight[] = _("WT"); const u8 gText_SearchingPleaseWait[] = _("Searching…\nPlease wait."); const u8 gText_SearchCompleted[] = _("Search completed."); -const u8 gUnknown_085E8785[] = _("No matching POKéMON were found."); -const u8 gUnknown_085E87A5[] = _("Search for POKéMON based on\nselected parameters."); -const u8 gUnknown_085E87D6[] = _("Switch POKéDEX listings."); -const u8 gUnknown_085E87EF[] = _("Return to the POKéDEX."); -const u8 gUnknown_085E8806[] = _("Select the POKéDEX mode."); -const u8 gUnknown_085E881F[] = _("Select the POKéDEX listing mode."); -const u8 gUnknown_085E8840[] = _("List by the first letter in the name.\nSpotted POKéMON only."); -const u8 gUnknown_085E887C[] = _("List by body color.\nSpotted POKéMON only."); -const u8 gUnknown_085E88A6[] = _("List by type.\nOwned POKéMON only."); -const u8 gUnknown_085E88C8[] = _("Execute search/switch."); +const u8 gText_NoMatchingPkmnWereFound[] = _("No matching POKéMON were found."); +const u8 gText_SeachForPkmnBasedOnParameters[] = _("Search for POKéMON based on\nselected parameters."); +const u8 gText_SwitchPokedexListings[] = _("Switch POKéDEX listings."); +const u8 gText_ReturnToPokedex[] = _("Return to the POKéDEX."); +const u8 gText_SelectPokedexMode[] = _("Select the POKéDEX mode."); +const u8 gText_SelectPokedexListingMode[] = _("Select the POKéDEX listing mode."); +const u8 gText_ListByFirstLetter[] = _("List by the first letter in the name.\nSpotted POKéMON only."); +const u8 gText_ListByBodyColor[] = _("List by body color.\nSpotted POKéMON only."); +const u8 gText_ListByType[] = _("List by type.\nOwned POKéMON only."); +const u8 gText_ExecuteSearchSwitch[] = _("Execute search/switch."); const u8 gText_DexHoennTitle[] = _("HOENN DEX"); const u8 gText_DexNatTitle[] = _("NATIONAL DEX"); const u8 gText_DexSortNumericalTitle[] = _("NUMERICAL MODE"); @@ -160,7 +160,7 @@ const u8 gText_DexEmptyString[] = _(""); const u8 gText_DexSearchDontSpecify[] = _("DON'T SPECIFY."); const u8 gText_DexSearchTypeNone[] = _("NONE"); const u8 gText_SelectorArrow[] = _("▶"); -const u8 gUnknown_085E8B3C[] = _(" "); +const u8 gText_EmptySpace[] = _(" "); // Unused const u8 gText_WelcomeToHOF[] = _("Welcome to the HALL OF FAME!"); const u8 gText_HOFDexRating[] = _("Spotted POKéMON: {STR_VAR_1}!\nOwned POKéMON: {STR_VAR_2}!\pPROF. BIRCH's POKéDEX rating!\pPROF. BIRCH: Let's see…\p"); const u8 gText_HOFDexSaving[] = _("SAVING…\nDON'T TURN OFF THE POWER."); @@ -169,12 +169,12 @@ const u8 gText_HOFNumber[] = _("HALL OF FAME No. {STR_VAR_1}"); const u8 gText_LeagueChamp[] = _("LEAGUE CHAMPION!\nCONGRATULATIONS!"); const u8 gText_Number[] = _("No. "); const u8 gText_Level[] = _("Lv. "); -const u8 gUnknown_085E8C40[] = _("IDNo. /"); +const u8 gText_IdNumberSlash[] = _("IDNo. /"); // Unused const u8 gText_Name[] = _("NAME"); const u8 gText_IDNumber[] = _("IDNo."); const u8 gText_BirchInTrouble[] = _("PROF. BIRCH is in trouble!\nRelease a POKéMON and rescue him!"); const u8 gText_ConfirmStarterChoice[] = _("Do you choose this POKéMON?"); -const u8 gUnknown_085E8CAC[] = _("POKéMON"); +const u8 gText_Pokemon4[] = _("POKéMON"); // Unused const u8 gText_FlyToWhere[] = _("FLY to where?"); const u8 gMenuText_Use[] = _("USE"); const u8 gMenuText_Toss[] = _("TOSS"); @@ -187,7 +187,7 @@ const u8 gText_Cancel[] = _("CANCEL"); const u8 gText_Cancel2[] = _("CANCEL"); const u8 gMenuText_Show[] = _("SHOW"); const u8 gText_EmptyString2[] = _(""); -const u8 gUnknown_085E8D04[] = _("CANCEL"); +const u8 gText_Cancel7[] = _("CANCEL"); // Unused const u8 gText_Item[] = _("ITEM"); const u8 gText_Mail[] = _("MAIL"); const u8 gText_Take[] = _("TAKE"); @@ -204,17 +204,17 @@ const u8 gText_ThreeDashes[] = _("---"); const u8 gText_MaleSymbol[] = _("♂"); const u8 gText_FemaleSymbol[] = _("♀"); const u8 gText_LevelSymbol[] = _("{LV}"); -const u8 gText_UnkCtrlF908Clear01[] = _("{NO}{CLEAR 0x01}"); -const u8 gUnknown_085E8D55[] = _("+"); -const u8 gUnknown_085E8D57[] = _("{RIGHT_ARROW}"); -const u8 gText_UnkCtrlF907F908[] = _("{ID}{NO}"); +const u8 gText_NumberClear01[] = _("{NO}{CLEAR 0x01}"); +const u8 gText_PlusSymbol[] = _("+"); // Unused +const u8 gText_RightArrow[] = _("{RIGHT_ARROW}"); // Unused +const u8 gText_IDNumber2[] = _("{ID}{NO}"); const u8 gText_Space[] = _(" "); const u8 gText_SelectorArrow2[] = _("▶"); const u8 gText_GoBackPrevMenu[] = _("Go back to the\nprevious menu."); const u8 gText_WhatWouldYouLike[] = _("What would you like to do?"); const u8 gMenuText_Give2[] = _("GIVE"); const u8 gText_xVar1[] = _("×{STR_VAR_1}"); -const u8 gUnknown_085E8DA4[] = _(" BERRY"); +const u8 gText_Berry2[] = _(" BERRY"); // Unused const u8 gText_Coins[] = _("{STR_VAR_1} COINS"); const u8 gText_CloseBag[] = _("CLOSE BAG"); const u8 gText_Var1IsSelected[] = _("{STR_VAR_1} is\nselected."); @@ -292,7 +292,7 @@ const u8 *const gPocketNamesStringsTable[] = gText_KeyItemsPocket }; -const u8 gText_UnkF908Var1Clear7Var2[] = _("{NO}{STR_VAR_1}{CLEAR 0x07}{STR_VAR_2}"); +const u8 gText_NumberVar1Clear7Var2[] = _("{NO}{STR_VAR_1}{CLEAR 0x07}{STR_VAR_2}"); const u8 gText_ClearTo11Var1Clear5Var2[] = _("{CLEAR_TO 0x11}{STR_VAR_1}{CLEAR 0x05}{STR_VAR_2}"); const u8 gText_SizeSlash[] = _("SIZE /"); const u8 gText_FirmSlash[] = _("FIRM /"); @@ -305,7 +305,7 @@ const u8 gBerryFirmnessString_Hard[] = _("Hard"); const u8 gBerryFirmnessString_VeryHard[] = _("Very hard"); const u8 gBerryFirmnessString_SuperHard[] = _("Super hard"); -const u8 gText_UnkF908Var1Var2[] = _("{NO}{STR_VAR_1} {STR_VAR_2}"); +const u8 gText_NumberVar1Var2[] = _("{NO}{STR_VAR_1} {STR_VAR_2}"); const u8 gText_BerryTag[] = _("BERRY TAG"); const u8 gText_RedPokeblock[] = _("RED {POKEBLOCK}"); const u8 gText_BluePokeblock[] = _("BLUE {POKEBLOCK}"); @@ -326,8 +326,8 @@ const u8 gText_Dry[] = _("DRY"); const u8 gText_Sweet[] = _("SWEET"); const u8 gText_Bitter[] = _("BITTER"); const u8 gText_Sour[] = _("SOUR"); -const u8 gUnknown_085E9339[] = _("TASTY"); -const u8 gUnknown_085E933F[] = _("FEEL"); +const u8 gText_Tasty[] = _("TASTY"); // Unused +const u8 gText_Feel[] = _("FEEL"); // Unused const u8 gText_StowCase[] = _("Stow CASE."); const u8 gText_LvVar1[] = _("{LV}{STR_VAR_1}"); const u8 gText_ThrowAwayVar1[] = _("Throw away this\n{STR_VAR_1}?"); @@ -363,7 +363,7 @@ const u8 gText_Shift[] = _("SHIFT"); const u8 gText_SendOut[] = _("SEND OUT"); const u8 gText_Switch2[] = _("SWITCH"); const u8 gText_Summary5[] = _("SUMMARY"); -const u8 gUnknown_085E96BE[] = _("MOVES"); +const u8 gText_Moves[] = _("MOVES"); // Unused const u8 gText_Enter[] = _("ENTER"); const u8 gText_NoEntry[] = _("NO ENTRY"); const u8 gText_Take2[] = _("TAKE"); @@ -411,7 +411,7 @@ const u8 gText_PkmnWokeUp2[] = _("{STR_VAR_1} woke up.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnBurnHealed[] = _("{STR_VAR_1}'s burn was healed.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnThawedOut[] = _("{STR_VAR_1} was thawed out.{PAUSE_UNTIL_PRESS}"); const u8 gText_PPWasRestored[] = _("PP was restored.{PAUSE_UNTIL_PRESS}"); -const u8 gUnknown_085E9CCA[] = _("{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}"); +const u8 gText_PkmnRegainhedHealth[] = _("{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}"); // Unused const u8 gText_PkmnBecameHealthy[] = _("{STR_VAR_1} became healthy.{PAUSE_UNTIL_PRESS}"); const u8 gText_MovesPPIncreased[] = _("{STR_VAR_1}'s PP increased.{PAUSE_UNTIL_PRESS}"); const u8 gText_PkmnElevatedToLvVar2[] = _("{STR_VAR_1} was elevated to\nLv. {STR_VAR_2}."); @@ -423,7 +423,7 @@ const u8 gText_PkmnSnappedOutOfConfusion[] = _("{STR_VAR_1} snapped out of its\n const u8 gText_PkmnGotOverInfatuation[] = _("{STR_VAR_1} got over its\ninfatuation.{PAUSE_UNTIL_PRESS}"); const u8 gText_ThrowAwayItem[] = _("Throw away this\n{STR_VAR_1}?"); const u8 gText_ItemThrownAway[] = _("The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}"); -const u8 gUnknown_085E9E2E[] = _("Teach which POKéMON?"); +const u8 gText_TeachWhichPokemon2[] = _("Teach which POKéMON?"); // Unused const u8 gText_ChoosePokemon[] = _("Choose a POKéMON."); const u8 gText_MoveToWhere[] = _("Move to where?"); const u8 gText_TeachWhichPokemon[] = _("Teach which POKéMON?"); @@ -487,7 +487,7 @@ const u8 gText_SpAtk4[] = _("SP. ATK"); const u8 gText_SpDef4[] = _("SP. DEF"); const u8 gText_Speed2[] = _("SPEED"); const u8 gText_HP4[] = _("HP"); -const u8 gUnknown_085EA364[] = _(""); +const u8 gText_EmptyString8[] = _(""); // Unused const u8 gText_OTSlash[] = _("OT/"); const u8 gText_RentalPkmn[] = _("RENTAL POKéMON"); const u8 gText_TypeSlash[] = _("TYPE/"); @@ -500,7 +500,7 @@ const u8 gText_ExpPoints[] = _("EXP. POINTS"); const u8 gText_NextLv[] = _("NEXT LV."); const u8 gText_RibbonsVar1[] = _("RIBBONS: {STR_VAR_1}"); const u8 gText_EmptyString5[] = _(""); -const u8 gUnknown_085EA3C1[] = _("EVENTS"); +const u8 gText_Events[] = _("EVENTS"); // Unused const u8 gText_Switch[] = _("SWITCH"); const u8 gText_PkmnInfo[] = _("POKéMON INFO"); const u8 gText_PkmnSkills[] = _("POKéMON SKILLS"); @@ -530,7 +530,7 @@ const u8 gText_OkayToDeleteFromRegistry[] = _("Is it okay to delete {STR_VAR_1}\ const u8 gText_RegisteredDataDeleted[] = _("The registered data was deleted.{PAUSE_UNTIL_PRESS}"); const u8 gText_NoRegistry[] = _("There is no REGISTRY.{PAUSE_UNTIL_PRESS}"); const u8 gText_DelRegist[] = _("DEL REGIST."); -const u8 gUnknown_085EA7A9[] = _("{STR_VAR_3}{STR_VAR_1}/{STR_VAR_2}"); +const u8 gText_Var3Var1SlashVar2[] = _("{STR_VAR_3}{STR_VAR_1}/{STR_VAR_2}"); // Unused const u8 gText_Decorate[] = _("DECORATE"); const u8 gText_PutAway[] = _("PUT AWAY"); const u8 gText_Toss2[] = _("TOSS"); @@ -555,7 +555,7 @@ const u8 gText_CancelDecorating[] = _("Cancel decorating?"); const u8 gText_InUseAlready[] = _("This is in use already."); const u8 gText_NoMoreDecorations[] = _("No more decorations can be placed.\nThe most that can be placed are {STR_VAR_1}."); const u8 gText_NoMoreDecorations2[] = _("No more decorations can be placed.\nThe most that can be placed are {STR_VAR_1}."); -const u8 gUnknown_085EA978[] = _("This can't be placed here.\nIt must be on a DESK, etc."); +const u8 gText_MustBePlacedOnDesk[] = _("This can't be placed here.\nIt must be on a DESK, etc."); // Unused const u8 gText_CantPlaceInRoom[] = _("This decoration can't be placed in\nyour own room."); const u8 gText_CantThrowAwayInUse[] = _("This decoration is in use.\nIt can't be thrown away."); const u8 gText_DecorationWillBeDiscarded[] = _("This {STR_VAR_1} will be discarded.\nIs that okay?"); @@ -627,18 +627,18 @@ const u8 gText_Par[] = _("PAR"); const u8 gText_Slp[] = _("SLP"); const u8 gText_Brn[] = _("BRN"); const u8 gText_Frz[] = _("FRZ"); -const u8 gUnknown_085EAE45[] = _("TOXIC"); -const u8 gUnknown_085EAE4B[] = _("OK"); -const u8 gUnknown_085EAE4E[] = _("QUIT"); +const u8 gText_Toxic[] = _("TOXIC"); // Unused +const u8 gText_Ok3[] = _("OK"); // Unused +const u8 gText_Quit[] = _("QUIT"); // Unused const u8 gText_SawIt[] = _("Saw it"); const u8 gText_NotYet[] = _("Not yet"); const u8 gText_Yes[] = _("YES"); const u8 gText_No[] = _("NO"); -const u8 gUnknown_085EAE69[] = _("INFO"); +const u8 gText_Info4[] = _("INFO"); // Unused const u8 gText_SingleBattle[] = _("SINGLE BATTLE"); const u8 gText_DoubleBattle[] = _("DOUBLE BATTLE"); const u8 gText_MultiBattle[] = _("MULTI BATTLE"); -const u8 gUnknown_085EAE97[] = _("MR. BRINEY"); +const u8 gText_MrBriney[] = _("MR. BRINEY"); // Unused const u8 gText_Challenge[] = _("CHALLENGE"); const u8 gText_Info3[] = _("INFO"); const u8 gText_Lv50[] = _("LV. 50"); @@ -756,7 +756,7 @@ const u8 gText_TradeCenter[] = _("TRADE CENTER"); const u8 gText_Colosseum[] = _("COLOSSEUM"); const u8 gText_RecordCorner[] = _("RECORD CORNER"); const u8 gText_BerryCrush3[] = _("BERRY CRUSH"); -const u8 gUnknown_085EB3A3[] = _(""); +const u8 gText_EmptyLinkService[] = _(""); // Maybe Spin Trade? const u8 gText_PokemonJump[] = _("POKéMON JUMP"); const u8 gText_DodrioBerryPicking[] = _("DODRIO BERRY-PICKING"); const u8 gText_BecomeLeader[] = _("BECOME LEADER"); @@ -807,7 +807,7 @@ const u8 gText_99TimesPlus[] = _("99 times +"); const u8 gText_1MinutePlus[] = _("1 minute +"); const u8 gText_SpaceSeconds[] = _(" seconds"); const u8 gText_SpaceTimes[] = _(" time(s)"); -const u8 gUnknown_085EB5F7[] = _("."); +const u8 gText_Dot[] = _("."); // Unused const u8 gText_BigGuy[] = _("Big guy"); const u8 gText_BigGirl[] = _("Big girl"); const u8 gText_Son[] = _("son"); @@ -925,7 +925,7 @@ const u8 gPCText_PolkaDot[] = _("POLKA-DOT"); const u8 gPCText_Pokecenter[] = _("POKéCENTER"); const u8 gPCText_Machine[] = _("MACHINE"); const u8 gPCText_Simple[] = _("SIMPLE"); -const u8 gUnknown_085EBB56[] = _("What would you like to do?"); +const u8 gText_WhatWouldYouLikeToDo[] = _("What would you like to do?"); // Unused const u8 gText_WithdrawPokemon[] = _("WITHDRAW POKéMON"); const u8 gText_DepositPokemon[] = _("DEPOSIT POKéMON"); const u8 gText_MovePokemon[] = _("MOVE POKéMON"); @@ -939,28 +939,28 @@ const u8 gText_SeeYaDescription[] = _("Return to the previous menu."); const u8 gText_JustOnePkmn[] = _("There is just one POKéMON with you."); const u8 gText_PartyFull[] = _("Your party is full!"); const u8 gText_Box[] = _("BOX"); -const u8 gUnknown_085EBCC5[] = _("Check the map of the HOENN region."); -const u8 gUnknown_085EBCE8[] = _("Check POKéMON in detail."); -const u8 gUnknown_085EBD01[] = _("Call a registered TRAINER."); -const u8 gUnknown_085EBD1C[] = _("Check obtained RIBBONS."); -const u8 gUnknown_085EBD34[] = _("Put away the POKéNAV."); +const u8 gText_CheckMapOfHoenn[] = _("Check the map of the HOENN region."); +const u8 gText_CheckPokemonInDetail[] = _("Check POKéMON in detail."); +const u8 gText_CallRegisteredTrainer[] = _("Call a registered TRAINER."); +const u8 gText_CheckObtainedRibbons[] = _("Check obtained RIBBONS."); +const u8 gText_PutAwayPokenav[] = _("Put away the POKéNAV."); const u8 gText_NoRibbonWinners[] = _("There are no RIBBON winners."); -const u8 gUnknown_085EBD67[] = _("No TRAINERS are registered."); -const u8 gUnknown_085EBD83[] = _("Check party POKéMON in detail."); -const u8 gUnknown_085EBDA2[] = _("Check all POKéMON in detail."); -const u8 gUnknown_085EBDBF[] = _("Return to the POKéNAV menu."); -const u8 gUnknown_085EBDDB[] = _("Find cool POKéMON."); -const u8 gUnknown_085EBDEE[] = _("Find beautiful POKéMON."); -const u8 gUnknown_085EBE06[] = _("Find cute POKéMON."); -const u8 gUnknown_085EBE19[] = _("Find smart POKéMON."); -const u8 gUnknown_085EBE2D[] = _("Find tough POKéMON."); -const u8 gUnknown_085EBE41[] = _("Return to the CONDITION menu."); +const u8 gText_NoTrainersRegistered[] = _("No TRAINERS are registered."); // Unused +const u8 gText_CheckPartyPokemonInDetail[] = _("Check party POKéMON in detail."); +const u8 gText_CheckAllPokemonInDetail[] = _("Check all POKéMON in detail."); +const u8 gText_ReturnToPokenavMenu[] = _("Return to the POKéNAV menu."); +const u8 gText_FindCoolPokemon[] = _("Find cool POKéMON."); +const u8 gText_FindBeautifulPokemon[] = _("Find beautiful POKéMON."); +const u8 gText_FindCutePokemon[] = _("Find cute POKéMON."); +const u8 gText_FindSmartPokemon[] = _("Find smart POKéMON."); +const u8 gText_FindToughPokemon[] = _("Find tough POKéMON."); +const u8 gText_ReturnToConditionMenu[] = _("Return to the CONDITION menu."); const u8 gText_NumberRegistered[] = _("No. registered"); const u8 gText_NumberOfBattles[] = _("No. of battles"); -const u8 gUnknown_085EBE7D[] = _("DETAIL"); -const u8 gUnknown_085EBE84[] = _("CALL"); -const u8 gUnknown_085EBE89[] = _("EXIT"); -const u8 gUnknown_085EBE8E[] = _("Can't call opponent here."); +const u8 gText_Detail[] = _("DETAIL"); // Unused +const u8 gText_Call2[] = _("CALL"); // Unused +const u8 gText_UnusedExit[] = _("EXIT"); // Unused +const u8 gText_CantCallOpponentHere[] = _("Can't call opponent here."); // Unused const u8 gText_PokenavMatchCall_Strategy[] = _("STRATEGY"); const u8 gText_PokenavMatchCall_TrainerPokemon[] = _("TRAINER'S POKéMON"); const u8 gText_PokenavMatchCall_SelfIntroduction[] = _("SELF-INTRODUCTION"); @@ -980,26 +980,26 @@ const u8 gText_NatureSlash[] = _("NATURE/"); const u8 gText_TrainerCloseBy[] = _("That TRAINER is close by.\nTalk to the TRAINER in person!"); const u8 gText_InParty[] = _("IN PARTY"); const u8 gText_Number2[] = _("No. "); -const u8 gUnknown_085EBFDC[] = _("RIBBONS"); -const u8 gUnknown_085EBFE4[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); -const u8 gUnknown_085EBFF6[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); -const u8 gUnknown_085EC008[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}"); +const u8 gText_Ribbons[] = _("RIBBONS"); // Unused +const u8 gText_PokemonMaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused +const u8 gText_PokemonFemaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused +const u8 gText_PokemonNoGenderLv[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}"); // Unused const u8 gText_Unknown[] = _("UNKNOWN"); -const u8 gUnknown_085EC017[] = _("CALL"); -const u8 gUnknown_085EC01C[] = _("CHECK"); -const u8 gUnknown_085EC022[] = _("CANCEL"); +const u8 gText_Call[] = _("CALL"); +const u8 gText_Check[] = _("CHECK"); +const u8 gText_Cancel6[] = _("CANCEL"); const u8 gText_NumberF700[] = _("No. {SPECIAL_F7 0x00}"); const u8 gText_RibbonsF700[] = _("RIBBONS {SPECIAL_F7 0x00}"); -const u8 gUnknown_085EC03B[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); -const u8 gUnknown_085EC04F[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); -const u8 gUnknown_085EC063[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); +const u8 gText_PokemonMaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused +const u8 gText_PokemonFemaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused +const u8 gText_PokemonNoGenderLv2[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused const u8 gText_CombineFourWordsOrPhrases[] = _("Combine four words or phrases"); const u8 gText_AndMakeYourProfile[] = _("and make your profile."); const u8 gText_CombineSixWordsOrPhrases[] = _("Combine six words or phrases"); const u8 gText_AndMakeAMessage[] = _("and make a message."); const u8 gText_FindWordsThatDescribeYour[] = _("Find words that describe your"); const u8 gText_FeelingsRightNow[] = _("feelings right now."); -const u8 gUnknown_085EC104[] = _("With four phrases,"); +const u8 gText_WithFourPhrases[] = _("With four phrases,"); // Unused const u8 gText_CombineNineWordsOrPhrases[] = _("Combine nine words or phrases"); const u8 gText_AndMakeAMessage2[] = _("and make a message."); const u8 gText_ChangeJustOneWordOrPhrase[] = _("Change just one word or phrase"); @@ -1010,7 +1010,7 @@ const u8 gText_WhatYouSayIfYouWin[] = _("What you say if you win a battle"); const u8 gText_WhatYouSayIfYouLose[] = _("What you say if you lose a battle"); const u8 gText_TheAnswer[] = _("The answer"); const u8 gText_TheMailMessage[] = _("The MAIL message"); -const u8 gUnknown_085EC214[] = _("The MAIL salutation"); +const u8 gText_TheMailSalutation[] = _("The MAIL salutation"); // Unused const u8 gText_TheBardsSong2[] = _("The new song"); const u8 gText_CombineTwoWordsOrPhrases[] = _("Combine two words or phrases"); const u8 gText_AndMakeATrendySaying[] = _("and make a trendy saying."); @@ -1027,7 +1027,7 @@ const u8 gText_AndCreateAQuiz[] = _("and create a quiz!"); const u8 gText_PickAWordOrPhraseAnd[] = _("Pick a word or phrase and"); const u8 gText_SetTheQuizAnswer[] = _("set the quiz answer."); const u8 gText_TheAnswerColon[] = _("The answer:"); -const u8 gUnknown_085EC387[] = _("The quiz:"); +const u8 gText_TheQuizColon[] = _("The quiz:"); // Unused const u8 gText_ApprenticePhrase[] = _("Apprentice's phrase:"); const u8 gText_QuitEditing[] = _("Quit editing?"); const u8 gText_StopGivingPkmnMail[] = _("Stop giving the POKéMON MAIL?"); @@ -1035,20 +1035,20 @@ const u8 gText_AndFillOutTheQuestionnaire[] = _("and fill out the questionnaire. const u8 gText_LetsReplyToTheInterview[] = _("Let's reply to the interview!"); const u8 gText_AllTextBeingEditedWill[] = _("All the text being edited will"); const u8 gText_BeDeletedThatOkay[] = _("be deleted. Is that okay?"); -const u8 gUnknown_085EC449[] = _("Quit editing?"); -const u8 gUnknown_085EC457[] = _("The edited text will not be saved."); -const u8 gUnknown_085EC47A[] = _("Is that okay?"); -const u8 gUnknown_085EC488[] = _("Please enter a phrase or word."); -const u8 gUnknown_085EC4A7[] = _("The entire text can't be deleted."); +const u8 gText_QuitEditing2[] = _("Quit editing?"); // Unused +const u8 gText_EditedTextWillNotBeSaved[] = _("The edited text will not be saved."); // Unused +const u8 gText_IsThatOkay[] = _("Is that okay?"); // Unused +const u8 gText_PleaseEnterPhraseOrWord[] = _("Please enter a phrase or word."); // Unused +const u8 gText_EntireTextCantBeDeleted[] = _("The entire text can't be deleted."); const u8 gText_OnlyOnePhrase[] = _("Only one phrase may be changed."); const u8 gText_OriginalSongWillBeUsed[] = _("The original song will be used."); -const u8 gUnknown_085EC509[] = _("That's trendy already!"); +const u8 gText_ThatsTrendyAlready[] = _("That's trendy already!"); // Unused const u8 gText_CombineTwoWordsOrPhrases3[] = _("Combine two words or phrases."); -const u8 gUnknown_085EC53E[] = _("Quit giving information?"); -const u8 gUnknown_085EC557[] = _("Stop giving the POKéMON MAIL?"); -const u8 gUnknown_085EC575[] = _("Create a quiz!"); -const u8 gUnknown_085EC584[] = _("Set the answer!"); -const u8 gUnknown_085EC594[] = _("Cancel the selection?"); +const u8 gText_QuitGivingInfo[] = _("Quit giving information?"); // Unused +const u8 gText_StopGivingPkmnMail2[] = _("Stop giving the POKéMON MAIL?"); // Unused +const u8 gText_CreateAQuiz2[] = _("Create a quiz!"); // Unused +const u8 gText_SetTheAnswer[] = _("Set the answer!"); // Unused +const u8 gText_CancelSelection[] = _("Cancel the selection?"); // Unused const u8 gText_Profile[] = _("PROFILE"); const u8 gText_AtTheBattlesStart[] = _("At the battle's start:"); const u8 gText_UponWinningABattle[] = _("Upon winning a battle:"); @@ -1058,7 +1058,7 @@ const u8 gText_WhatsHipAndHappening[] = _("What's hip and happening?"); const u8 gText_Interview[] = _("Interview"); const u8 gText_GoodSaying[] = _("Good saying"); const u8 gText_FansQuestion[] = _("Fan's question"); -const u8 gUnknown_085EC645[] = _("クイズの こたえは?"); +const u8 gJPText_WhatIsTheQuizAnswer[] = _("クイズの こたえは?"); // Unused const u8 gText_ApprenticesPhrase[] = _("Apprentice's phrase"); const u8 gText_Questionnaire[] = _("QUESTIONNAIRE"); const u8 gText_YouCannotQuitHere[] = _("You cannot quit here."); @@ -1189,13 +1189,13 @@ const u8 gText_Marco[] = _("MARCO"); const u8 gText_TrainerCardName[] = _("NAME: "); const u8 gText_TrainerCardIDNo[] = _("IDNo."); const u8 gText_TrainerCardMoney[] = _("MONEY"); -const u8 gUnknown_085ECF84[] = _("¥"); +const u8 gText_PokeDollar[] = _("¥"); // Unused const u8 gText_TrainerCardPokedex[] = _("POKéDEX"); const u8 gText_EmptyString6[] = _(""); const u8 gText_Colon2[] = _(":"); -const u8 gUnknown_085ECF91[] = _(" points"); +const u8 gText_Points[] = _(" points"); // Unused const u8 gText_TrainerCardTime[] = _("TIME"); -const u8 gUnknown_085ECF9E[] = _("ゲ-ムポイント"); +const u8 gJPText_BattlePoints[] = _("ゲ-ムポイント"); // Unused. Name presumed, translation is Game Points const u8 gText_Var1sTrainerCard[] = _("{STR_VAR_1}'s TRAINER CARD"); const u8 gText_HallOfFameDebut[] = _("HALL OF FAME DEBUT "); const u8 gText_LinkBattles[] = _("LINK BATTLES"); @@ -1239,9 +1239,9 @@ const u8 gText_Round2Results[] = _("Round 2 results!"); const u8 gText_Var1sVar2Won[] = _("{STR_VAR_1}'s {STR_VAR_2} won!"); const u8 gText_CommunicationStandby[] = _("Communication standby…"); const u8 gText_ColorDarkGrey[] = _("{COLOR DARK_GREY}"); -const u8 gUnknown_085ED222[] = _("{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR6 WHITE DYNAMIC_COLOR5}"); +const u8 gText_ColorDynamic6WhiteDynamic5[] = _("{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR6 WHITE DYNAMIC_COLOR5}"); // Unused const u8 gText_HighlightDarkGrey[] = _("{HIGHLIGHT DARK_GREY}"); -const u8 gUnknown_085ED22C[] = _(" "); +const u8 gText_EmptySpace2[] = _(" "); // Unused const u8 gText_DynColor2Male[] = _("{COLOR DYNAMIC_COLOR2}♂"); const u8 gText_DynColor1Female[] = _("{COLOR DYNAMIC_COLOR1}♀"); const u8 gText_DynColor2[] = _("{COLOR DYNAMIC_COLOR2}"); @@ -1257,8 +1257,8 @@ const u8 gText_RegisterTextHere[] = _("Register text here?"); const u8 gText_InputText[] = _("Input text."); const u8 gText_F700JoinedChat[] = _("{SPECIAL_F7 0x00} joined the chat!"); const u8 gText_F700LeftChat[] = _("{SPECIAL_F7 0x00} left the chat."); -const u8 gUnknown_085ED2CF[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめ:"); -const u8 gUnknown_085ED2D9[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめは いません"); +const u8 gJPText_PlayersXPokemon[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめ:"); // Unused +const u8 gJPText_PlayersXPokmonDoesNotExist[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめは いません"); // Unused const u8 gText_ExitingChat[] = _("Exiting the chat…"); const u8 gText_LeaderLeftEndingChat[] = _("The LEADER, {SPECIAL_F7 0x00}, has\nleft, ending the chat."); const u8 gText_RegisteredTextChanged[] = _("The registered text has been changed.\nIs it okay to save the game?"); @@ -1273,7 +1273,7 @@ const u8 gText_Battle[] = _("BATTLE"); const u8 gText_Lets[] = _("LET'S"); const u8 gText_Ok[] = _("OK!"); const u8 gText_Sorry[] = _("SORRY"); -const u8 gText_YayUnkF9F9[] = _("YAY{EMOJI_BIGSMILE}"); +const u8 gText_YaySmileEmoji[] = _("YAY{EMOJI_BIGSMILE}"); const u8 gText_ThankYou[] = _("THANK YOU"); const u8 gText_ByeBye[] = _("BYE-BYE!"); const u8 gMatchCallStevenStrategyText[] = _("Attack the weak points!"); @@ -1327,36 +1327,36 @@ const u8 gText_Var1Players[] = _("{STR_VAR_1} PLAYERS"); const u8 gText_SymbolsEarned[] = _("Symbols Earned"); const u8 gText_BattleRecord[] = _("Battle Record"); const u8 gText_BattlePoints[] = _("Battle Points"); -const u8 gUnknown_085ED92A[] = _("CANCEL"); -const u8 gUnknown_085ED931[] = _(""); -const u8 gUnknown_085ED932[] = _("Check BATTLE FRONTIER MAP."); -const u8 gUnknown_085ED94D[] = _("Check TRAINER CARD."); -const u8 gUnknown_085ED961[] = _("View recorded battle."); -const u8 gUnknown_085ED977[] = _("Put away the FRONTIER PASS."); -const u8 gUnknown_085ED993[] = _("Your current Battle Points."); -const u8 gUnknown_085ED9AF[] = _("Your collected Symbols."); -const u8 gUnknown_085ED9C7[] = _("Battle Tower - Ability Symbol"); -const u8 gUnknown_085ED9E5[] = _("Battle Dome - Tactics Symbol"); -const u8 gUnknown_085EDA02[] = _("Battle Palace - Spirits Symbol"); -const u8 gUnknown_085EDA21[] = _("Battle Arena - Guts Symbol"); -const u8 gUnknown_085EDA3C[] = _("Battle Factory - Knowledge Symbol"); -const u8 gUnknown_085EDA5E[] = _("Battle Pike - Luck Symbol"); -const u8 gUnknown_085EDA78[] = _("Battle Pyramid - Brave Symbol"); -const u8 gUnknown_085EDA96[] = _("There is no Battle Record."); -const u8 gUnknown_085EDAB1[] = _("BATTLE TOWER"); -const u8 gUnknown_085EDABE[] = _("BATTLE DOME"); -const u8 gUnknown_085EDACA[] = _("BATTLE PALACE"); -const u8 gUnknown_085EDAD8[] = _("BATTLE ARENA"); -const u8 gUnknown_085EDAE5[] = _("BATTLE FACTORY"); -const u8 gUnknown_085EDAF4[] = _("BATTLE PIKE"); -const u8 gUnknown_085EDB00[] = _("BATTLE PYRAMID"); -const u8 gUnknown_085EDB0F[] = _("KO opponents and aim for the top!\nYour ability will be tested."); -const u8 gUnknown_085EDB4E[] = _("Keep winning at the tournament!\nYour tactics will be tested."); -const u8 gUnknown_085EDB8B[] = _("Watch your POKéMON battle!\nYour spirit will be tested."); -const u8 gUnknown_085EDBC2[] = _("Win battles with teamed-up POKéMON!\nYour guts will be tested."); -const u8 gUnknown_085EDC00[] = _("Aim for victory using rental POKéMON!\nYour knowledge will be tested."); -const u8 gUnknown_085EDC45[] = _("Select one of three paths to battle!\nYour luck will be tested."); -const u8 gUnknown_085EDC84[] = _("Aim for the top with exploration!\nYour bravery will be tested."); +const u8 gText_UnusedCancel[] = _("CANCEL"); // Unused +const u8 gText_EmptyString7[] = _(""); +const u8 gText_CheckFrontierMap[] = _("Check BATTLE FRONTIER MAP."); +const u8 gText_CheckTrainerCard[] = _("Check TRAINER CARD."); +const u8 gText_ViewRecordedBattle[] = _("View recorded battle."); +const u8 gText_PutAwayFrontierPass[] = _("Put away the FRONTIER PASS."); +const u8 gText_CurrentBattlePoints[] = _("Your current Battle Points."); +const u8 gText_CollectedSymbols[] = _("Your collected Symbols."); +const u8 gText_BattleTowerAbilitySymbol[] = _("Battle Tower - Ability Symbol"); +const u8 gText_BattleDomeTacticsSymbol[] = _("Battle Dome - Tactics Symbol"); +const u8 gText_BattlePalaceSpiritsSymbol[] = _("Battle Palace - Spirits Symbol"); +const u8 gText_BattleArenaGutsSymbol[] = _("Battle Arena - Guts Symbol"); +const u8 gText_BattleFactoryKnowledgeSymbol[] = _("Battle Factory - Knowledge Symbol"); +const u8 gText_BattlePikeLuckSymbol[] = _("Battle Pike - Luck Symbol"); +const u8 gText_BattlePyramidBraveSymbol[] = _("Battle Pyramid - Brave Symbol"); +const u8 gText_ThereIsNoBattleRecord[] = _("There is no Battle Record."); +const u8 gText_BattleTower3[] = _("BATTLE TOWER"); +const u8 gText_BattleDome2[] = _("BATTLE DOME"); +const u8 gText_BattlePalace2[] = _("BATTLE PALACE"); +const u8 gText_BattleArena2[] = _("BATTLE ARENA"); +const u8 gText_BattleFactory2[] = _("BATTLE FACTORY"); +const u8 gText_BattlePike2[] = _("BATTLE PIKE"); +const u8 gText_BattlePyramid2[] = _("BATTLE PYRAMID"); +const u8 gText_BattleTowerDesc[] = _("KO opponents and aim for the top!\nYour ability will be tested."); +const u8 gText_BattleDomeDesc[] = _("Keep winning at the tournament!\nYour tactics will be tested."); +const u8 gText_BattlePalaceDesc[] = _("Watch your POKéMON battle!\nYour spirit will be tested."); +const u8 gText_BattleArenaDesc[] = _("Win battles with teamed-up POKéMON!\nYour guts will be tested."); +const u8 gText_BattleFactoryDesc[] = _("Aim for victory using rental POKéMON!\nYour knowledge will be tested."); +const u8 gText_BattlePikeDesc[] = _("Select one of three paths to battle!\nYour luck will be tested."); +const u8 gText_BattlePyramidDesc[] = _("Aim for the top with exploration!\nYour bravery will be tested."); const u8 gText_ContinueMenuPlayer[] = _("PLAYER"); const u8 gText_ContinueMenuTime[] = _("TIME"); const u8 gText_ContinueMenuPokedex[] = _("POKéDEX"); @@ -1400,27 +1400,27 @@ const u8 gText_2nd[] = _("2nd"); const u8 gText_3rd[] = _("3rd"); const u8 gText_4th[] = _("4th"); const u8 gText_Friend[] = _("Friend"); -const u8 gUnknown_085EDFB7[] = _("POKeMON"); +const u8 gText_Pokemon3[] = _("POKeMON"); // Unused const u8 gJPText_MysteryGift[] = _("ふしぎなもらいもの"); const u8 gJPText_DecideStop[] = _("{A_BUTTON}けってい {B_BUTTON}やめる"); -const u8 gUnknown_085EDFD6[] = _("カードeリーダー{PLUS} で\nふしぎなもらいものを よみこみます"); -const u8 gUnknown_085EDFF5[] = _("カードeリーダー{PLUS}の メニューから\n‘つうしん'を えらび"); -const u8 gUnknown_085EE014[] = _("‘ゲームボーイアドバンスとつうしん'\nを せんたく してください"); -const u8 gUnknown_085EE035[] = _("カードeリーダー{PLUS}の ‘つうしん'を\nえらんで Aボタンを おしてください"); -const u8 gUnknown_085EE05C[] = _("せつぞくが まちがっています"); -const u8 gUnknown_085EE06B[] = _("カードの よみこみを\nちゅうし しました"); -const u8 gUnknown_085EE080[] = _("カードeリーダー{PLUS}と\nつうしん できません"); -const u8 gUnknown_085EE097[] = _("つうしん ちゅう です"); -const u8 gUnknown_085EE0A3[] = _("つうしん エラーです\nせつぞくを たしかめて ください"); -const u8 gUnknown_085EE0BF[] = _("つうしん エラーです\nはじめから やりなおして ください"); -const u8 gUnknown_085EE0DC[] = _("カードeリーダー{PLUS} に\nカードを よみこませて ください"); -const u8 gUnknown_085EE0FA[] = _("つうしん しゅうりょう!"); -const u8 gUnknown_085EE107[] = _("あらたな トレーナーが\nホウエンに やってきた!"); -const u8 gUnknown_085EE120[] = _("しばらく おまちください"); -const u8 gUnknown_085EE12D[] = _("かきこみ エラー です\nデータが ほぞん できませんでした"); +const u8 gJPText_ReceiveMysteryGiftWithEReader[] = _("カードeリーダー{PLUS} で\nふしぎなもらいものを よみこみます"); +const u8 gJPText_SelectConnectFromEReaderMenu[] = _("カードeリーダー{PLUS}の メニューから\n‘つうしん'を えらび"); +const u8 gJPText_SelectConnectWithGBA[] = _("‘ゲームボーイアドバンスとつうしん'\nを せんたく してください"); +const u8 gJPText_SelectConnectAndPressA[] = _("カードeリーダー{PLUS}の ‘つうしん'を\nえらんで Aボタンを おしてください"); // Unused +const u8 gJPText_LinkIsIncorrect[] = _("せつぞくが まちがっています"); +const u8 gJPText_CardReadingHasBeenHalted[] = _("カードの よみこみを\nちゅうし しました"); +const u8 gJPText_UnableConnectWithEReader[] = _("カードeリーダー{PLUS}と\nつうしん できません"); // Unused +const u8 gJPText_Connecting[] = _("つうしん ちゅう です"); +const u8 gJPText_ConnectionErrorCheckLink[] = _("つうしん エラーです\nせつぞくを たしかめて ください"); +const u8 gJPText_ConnectionErrorTryAgain[] = _("つうしん エラーです\nはじめから やりなおして ください"); // Link error +const u8 gJPText_AllowEReaderToLoadCard[] = _("カードeリーダー{PLUS} に\nカードを よみこませて ください"); +const u8 gJPText_ConnectionComplete[] = _("つうしん しゅうりょう!"); +const u8 gJPText_NewTrainerHasComeToHoenn[] = _("あらたな トレーナーが\nホウエンに やってきた!"); +const u8 gJPText_PleaseWaitAMoment[] = _("しばらく おまちください"); +const u8 gJPText_WriteErrorUnableToSaveData[] = _("かきこみ エラー です\nデータが ほぞん できませんでした"); const u8 gText_Red[] = _("RED"); const u8 gText_Blue[] = _("BLUE"); -const u8 gUnknown_085EE154[] = _("---"); +const u8 gText_3Dashes[] = _("---"); // Unused const u8 gText_SingleBattleRoomResults[] = _("{PLAYER}'s Single Battle Room Results"); const u8 gText_DoubleBattleRoomResults[] = _("{PLAYER}'s Double Battle Room Results"); const u8 gText_MultiBattleRoomResults[] = _("{PLAYER}'s Multi Battle Room Results"); @@ -1500,11 +1500,11 @@ const u8 gText_GoldCard[] = _("GOLD"); const u8 gText_Day[] = _("DAY"); const u8 gText_Colon3[] = _(":"); const u8 gText_Confirm2[] = _("CONFIRM"); -const u8 gUnknown_085EE698[] = _("Days"); -const u8 gUnknown_085EE69D[] = _("Time:"); -const u8 gUnknown_085EE6A3[] = _("Game time"); -const u8 gUnknown_085EE6AD[] = _("RTC time"); -const u8 gUnknown_085EE6B6[] = _("Updated time"); +const u8 gText_Days[] = _("Days"); // Unused +const u8 gText_TimeColon2[] = _("Time:"); // Unused +const u8 gText_GameTime[] = _("Game time"); // Unused +const u8 gText_RTCTime[] = _("RTC time"); // Unused +const u8 gText_UpdatedTime[] = _("Updated time"); // Unused const u8 gText_MenuPokedex[] = _("POKéDEX"); const u8 gText_MenuPokemon[] = _("POKéMON"); const u8 gText_MenuBag[] = _("BAG"); @@ -1531,13 +1531,13 @@ const u8 gText_LoadingEvent[] = _("Loading event…"); const u8 gText_DontRemoveCableTurnOff[] = _("Don't remove the Game Link cable.\nDon't turn off the power."); const u8 gText_EventSafelyLoaded[] = _("The event was safely loaded."); const u8 gText_LoadErrorEndingSession[] = _("Loading error.\nEnding session."); -const u8 gUnknown_085EE846[] = _("プレイヤー"); -const u8 gUnknown_085EE84C[] = _("さま"); +const u8 gJPText_Player[] = _("プレイヤー"); // Unused +const u8 gJPText_Sama[] = _("さま"); // Unused const u8 gText_DexHoenn[] = _("HOENN"); const u8 gText_DexNational[] = _("NATIONAL"); const u8 gText_PokedexDiploma[] = _("PLAYER: {CLEAR 0x10}{COLOR RED}{SHADOW LIGHT_RED}{PLAYER}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}\n\nThis document certifies\nthat you have successfully\ncompleted your\n{STR_VAR_1} POKéDEX.\n\n{CLEAR_TO 0x42}{COLOR RED}{SHADOW LIGHT_RED}GAME FREAK"); -const u8 gUnknown_085EE8DC[] = _("{COLOR RED}{SHADOW LIGHT_RED}ゲ-ムフリ-ク"); -const u8 gUnknown_085EE8EA[] = _("{COLOR RED}{SHADOW LIGHT_RED}"); +const u8 gJPText_GameFreak[] = _("{COLOR RED}{SHADOW LIGHT_RED}ゲ-ムフリ-ク"); // Unused +const u8 gText_DiplomaEmpty[] = _("{COLOR RED}{SHADOW LIGHT_RED}"); // Unused const u8 gText_Hoenn[] = _("HOENN"); const u8 gText_OhABite[] = _("Oh! A bite!"); const u8 gText_PokemonOnHook[] = _("A POKéMON's on the hook!{PAUSE_UNTIL_PRESS}"); @@ -1573,13 +1573,13 @@ const u8 gEasyChatGroupName_TrendySaying[] = _("TRENDY SAYING"); const u8 gEasyChatGroupName_Pokemon2[] = _("POKéMON2"); const u8 gText_ThreeQuestionMarks[] = _("???"); -const u8 gUnknown_085EEA46[] = _("MAX. HP"); -const u8 gUnknown_085EEA4E[] = _("ATTACK"); -const u8 gUnknown_085EEA55[] = _("DEFENSE"); -const u8 gUnknown_085EEA5D[] = _("SPEED"); -const u8 gUnknown_085EEA63[] = _("SP. ATK"); -const u8 gUnknown_085EEA6B[] = _("SP. DEF"); -const u8 gText_UnkCtrlF904[] = _("{PLUS}"); +const u8 gText_MaxHP[] = _("MAX. HP"); +const u8 gText_Attack[] = _("ATTACK"); +const u8 gText_Defense[] = _("DEFENSE"); +const u8 gText_Speed[] = _("SPEED"); +const u8 gText_SpAtk[] = _("SP. ATK"); +const u8 gText_SpDef[] = _("SP. DEF"); +const u8 gText_Plus[] = _("{PLUS}"); const u8 gText_Dash[] = _("-"); const u8 gText_FromSpace[] = _("From "); const u8 gText_MixingRecords[] = _("Mixing records…"); @@ -1630,10 +1630,10 @@ const u8 gText_Yes3[] = _("YES"); const u8 gText_No3[] = _("NO"); const u8 gText_PkmnForSwap[] = _("{PKMN} FOR SWAP"); const u8 gText_Cancel3[] = _("CANCEL"); -const u8 gUnknown_085EECE4[] = _("SWAP"); -const u8 gUnknown_085EECE9[] = _("ACCEPT"); +const u8 gText_Swap2[] = _("SWAP"); // Unused +const u8 gText_Accept[] = _("ACCEPT"); // Unused const u8 gText_AcceptThisPkmn[] = _("Accept this POKéMON?"); -const u8 gUnknown_085EED05[] = _(" "); +const u8 gText_4Spaces[] = _(" "); // Unused const u8 gText_SamePkmnInPartyAlready[] = _("Same {PKMN} in party already."); const u8 gText_DecimalPoint[] = _("."); const u8 gText_SavingPlayer[] = _("PLAYER"); @@ -1673,7 +1673,7 @@ ALIGNED(4) const u8 gText_DontHaveCardNewOneInput[] = _("You don't have a WONDER ALIGNED(4) const u8 gText_DontHaveNewsNewOneInput[] = _("You don't have any WONDER NEWS,\nso new NEWS will be input."); ALIGNED(4) const u8 gText_WhereShouldCardBeAccessed[] = _("Where should the WONDER CARD\nbe accessed?"); ALIGNED(4) const u8 gText_WhereShouldNewsBeAccessed[] = _("Where should the WONDER NEWS\nbe accessed?"); -ALIGNED(4) const u8 gUnknown_085EEFC0[] = _("Communication standby…\nB Button: Cancel"); +ALIGNED(4) const u8 gText_CommunicationStandbyBButtonCancel[] = _("Communication standby…\nB Button: Cancel"); // Unused ALIGNED(4) const u8 gText_Communicating[] = _("Communicating…"); ALIGNED(4) const u8 gText_CommunicationCompleted[] = _("Communication completed."); ALIGNED(4) const u8 gText_CommunicationError[] = _("Communication error."); @@ -1747,12 +1747,12 @@ const u8 gText_MoveRelearnerPkmnTryingToLearnMove[] = _("{STR_VAR_1} is trying t const u8 gText_MoveRelearnerStopTryingToTeachMove[] = _("Stop trying to teach\n{STR_VAR_2}?"); const u8 gText_MoveRelearnerAndPoof[] = _("{PAUSE 32}1, {PAUSE 15}2, and {PAUSE 15}… {PAUSE 15}… {PAUSE 15}… {PAUSE 15}{PLAY_SE 0x0038}Poof!\p"); const u8 gText_MoveRelearnerPkmnForgotMoveAndLearnedNew[] = _("{STR_VAR_1} forgot {STR_VAR_3}.\pAnd…\p{STR_VAR_1} learned {STR_VAR_2}."); -const u8 gUnknown_085EF9C8[] = _("{STR_VAR_1} did not learn the\nmove {STR_VAR_2}."); +const u8 gText_MoveRelearnedPkmnDidNotLearnMove[] = _("{STR_VAR_1} did not learn the\nmove {STR_VAR_2}."); // Unused const u8 gText_MoveRelearnerGiveUp[] = _("Give up trying to teach a new\nmove to {STR_VAR_1}?"); const u8 gText_MoveRelearnerWhichMoveToForget[] = _("Which move should be\nforgotten?\p"); const u8 gText_MoveRelearnerBattleMoves[] = _("BATTLE MOVES"); const u8 gText_MoveRelearnerContestMovesTitle[] = _("CONTEST MOVES"); -const u8 gUnknown_085EFA4C[] = _("TYPE/"); +const u8 gText_MoveRelearnerType[] = _("TYPE/"); // Unused const u8 gText_MoveRelearnerPP[] = _("PP/"); const u8 gText_MoveRelearnerPower[] = _("POWER/"); const u8 gText_MoveRelearnerAccuracy[] = _("ACCURACY/"); @@ -1794,21 +1794,21 @@ const u8 gProfBirchMatchCallDesc[] = _("{PKMN} PROF."); const u8 gText_CommStandbyAwaitingOtherPlayer[] = _("Communication standby…\nAwaiting another player to choose."); const u8 gText_BattleWasRefused[] = _("The battle was refused.{PAUSE 60}"); const u8 gText_RefusedBattle[] = _("Refused the battle.{PAUSE 60}"); -const u8 gUnknown_085EFC3E[] = _("NO WEATHER"); -const u8 gUnknown_085EFC49[] = _("SUNNY"); -const u8 gUnknown_085EFC4F[] = _("SUNNY2"); -const u8 gUnknown_085EFC56[] = _("RAIN"); -const u8 gUnknown_085EFC5B[] = _("SNOW"); -const u8 gUnknown_085EFC60[] = _("LIGHTNING"); -const u8 gUnknown_085EFC6A[] = _("FOG"); -const u8 gUnknown_085EFC6E[] = _("VOLCANO ASH"); -const u8 gUnknown_085EFC7A[] = _("SANDSTORM"); -const u8 gUnknown_085EFC84[] = _("FOG2"); -const u8 gUnknown_085EFC89[] = _("SEAFLOOR"); -const u8 gUnknown_085EFC92[] = _("CLOUDY"); -const u8 gUnknown_085EFC99[] = _("SUNNY3"); -const u8 gUnknown_085EFCA0[] = _("HEAVY RAIN"); -const u8 gUnknown_085EFCAB[] = _("SEAFLOOR2"); +const u8 gText_NoWeather[] = _("NO WEATHER"); // Below are unused debug names for weather types +const u8 gText_Sunny[] = _("SUNNY"); // Unused +const u8 gText_Sunny2[] = _("SUNNY2"); // Unused +const u8 gText_Rain[] = _("RAIN"); // Unused +const u8 gText_Snow[] = _("SNOW"); // Unused +const u8 gText_Lightning[] = _("LIGHTNING"); // Unused +const u8 gText_Fog[] = _("FOG"); // Unused +const u8 gText_VolcanoAsh[] = _("VOLCANO ASH"); // Unused +const u8 gText_Sandstorm[] = _("SANDSTORM"); // Unused +const u8 gText_Fog2[] = _("FOG2"); // Unused +const u8 gText_Seafloor[] = _("SEAFLOOR"); // Unused +const u8 gText_Cloudy[] = _("CLOUDY"); // Unused +const u8 gText_Sunny3[] = _("SUNNY3"); // Unused +const u8 gText_HeavyRain[] = _("HEAVY RAIN"); // Unused +const u8 gText_Seafloor2[] = _("SEAFLOOR2"); // Unused const u8 gText_DelAll[] = _("DEL. ALL"); const u8 gText_Cancel5[] = _("CANCEL"); const u8 gText_Ok2[] = _("OK"); diff --git a/src/trainer_card.c b/src/trainer_card.c index 9fa686e16..5ea076c2a 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -281,8 +281,8 @@ static const u16 *const gFireRedTrainerCardStarPals[] = gFireRedTrainerCard4Star_Pal, }; -static const u8 gUnknown_0856FB0C[] = {0, 2, 3}; -static const u8 gUnknown_0856FB0F[] = {0, 4, 5}; +static const u8 sTrainerCardTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY}; +static const u8 sTrainerCardStatColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}; static const u8 gUnknown_0856FB12[6] = {0}; static const u8 gUnknown_0856FB18[][2][2] = @@ -973,9 +973,9 @@ static void PrintNameOnCard(void) StringCopy(txtPtr, sData->trainerCard.playerName); ConvertInternationalString(txtPtr, sData->language); if (sData->cardType == CARD_TYPE_FRLG) - AddTextPrinterParameterized3(1, 1, 20, 28, gUnknown_0856FB0C, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, 1, 20, 28, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); else - AddTextPrinterParameterized3(1, 1, 16, 33, gUnknown_0856FB0C, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, 1, 16, 33, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); } static void PrintIdOnCard(void) @@ -997,7 +997,7 @@ static void PrintIdOnCard(void) top = 9; } - AddTextPrinterParameterized3(1, 1, xPos, top, gUnknown_0856FB0C, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, 1, xPos, top, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); } static void PrintMoneyOnCard(void) @@ -1006,9 +1006,9 @@ static void PrintMoneyOnCard(void) u8 top; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 20, 56, gUnknown_0856FB0C, TEXT_SPEED_FF, gText_TrainerCardMoney); + AddTextPrinterParameterized3(1, 1, 20, 56, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); else - AddTextPrinterParameterized3(1, 1, 16, 57, gUnknown_0856FB0C, TEXT_SPEED_FF, gText_TrainerCardMoney); + AddTextPrinterParameterized3(1, 1, 16, 57, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); ConvertIntToDecimalStringN(gStringVar1, sData->trainerCard.money, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); @@ -1022,7 +1022,7 @@ static void PrintMoneyOnCard(void) xOffset = GetStringRightAlignXOffset(1, gStringVar4, 128); top = 57; } - AddTextPrinterParameterized3(1, 1, xOffset, top, gUnknown_0856FB0C, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, 1, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); } static u16 GetCaughtMonsCount(void) @@ -1040,9 +1040,9 @@ static void PrintPokedexOnCard(void) if (FlagGet(FLAG_SYS_POKEDEX_GET)) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 20, 72, gUnknown_0856FB0C, TEXT_SPEED_FF, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(1, 1, 20, 72, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); else - AddTextPrinterParameterized3(1, 1, 16, 73, gUnknown_0856FB0C, TEXT_SPEED_FF, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(1, 1, 16, 73, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); StringCopy(ConvertIntToDecimalStringN(gStringVar4, sData->trainerCard.caughtMonsCount, STR_CONV_MODE_LEFT_ALIGN, 3), gText_EmptyString6); if (!sData->isHoenn) { @@ -1054,11 +1054,11 @@ static void PrintPokedexOnCard(void) xOffset = GetStringRightAlignXOffset(1, gStringVar4, 128); top = 73; } - AddTextPrinterParameterized3(1, 1, xOffset, top, gUnknown_0856FB0C, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, 1, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); } } -static const u8 *const gUnknown_0856FB40[] = {gUnknown_0856FB0C, gUnknown_0856FB12}; +static const u8 *const gUnknown_0856FB40[] = {sTrainerCardTextColors, gUnknown_0856FB12}; static void PrintTimeOnCard(void) { @@ -1068,9 +1068,9 @@ static void PrintTimeOnCard(void) u32 r7, r4, r10; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 20, 88, gUnknown_0856FB0C, TEXT_SPEED_FF, gText_TrainerCardTime); + AddTextPrinterParameterized3(1, 1, 20, 88, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); else - AddTextPrinterParameterized3(1, 1, 16, 89, gUnknown_0856FB0C, TEXT_SPEED_FF, gText_TrainerCardTime); + AddTextPrinterParameterized3(1, 1, 16, 89, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); if (sData->isLink) { @@ -1104,12 +1104,12 @@ static void PrintTimeOnCard(void) FillWindowPixelRect(1, PIXEL_FILL(0), r7, r4, r10, 15); ConvertIntToDecimalStringN(gStringVar4, hours, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized3(1, 1, r7, r4, gUnknown_0856FB0C, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, 1, r7, r4, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); r7 += 18; AddTextPrinterParameterized3(1, 1, r7, r4, gUnknown_0856FB40[sData->var_7], TEXT_SPEED_FF, gText_Colon2); r7 += width; ConvertIntToDecimalStringN(gStringVar4, minutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(1, 1, r7, r4, gUnknown_0856FB0C, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, 1, r7, r4, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); } static const u8 gUnknown_0856FB48[] = {0x71, 0x68}; @@ -1119,10 +1119,10 @@ static void PrintProfilePhraseOnCard(void) { if (sData->isLink) { - AddTextPrinterParameterized3(1, 1, 8, gUnknown_0856FB48[sData->isHoenn], gUnknown_0856FB0C, TEXT_SPEED_FF, sData->var_19[0]); - AddTextPrinterParameterized3(1, 1, GetStringWidth(1, sData->var_19[0], 0) + 14, gUnknown_0856FB48[sData->isHoenn], gUnknown_0856FB0C, TEXT_SPEED_FF, sData->var_19[1]); - AddTextPrinterParameterized3(1, 1, 8, gUnknown_0856FB4A[sData->isHoenn], gUnknown_0856FB0C, TEXT_SPEED_FF, sData->var_19[2]); - AddTextPrinterParameterized3(1, 1, GetStringWidth(1, sData->var_19[2], 0) + 14, gUnknown_0856FB4A[sData->isHoenn], gUnknown_0856FB0C, TEXT_SPEED_FF, sData->var_19[3]); + AddTextPrinterParameterized3(1, 1, 8, gUnknown_0856FB48[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->var_19[0]); + AddTextPrinterParameterized3(1, 1, GetStringWidth(1, sData->var_19[0], 0) + 14, gUnknown_0856FB48[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->var_19[1]); + AddTextPrinterParameterized3(1, 1, 8, gUnknown_0856FB4A[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->var_19[2]); + AddTextPrinterParameterized3(1, 1, GetStringWidth(1, sData->var_19[2], 0) + 14, gUnknown_0856FB4A[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->var_19[3]); } } @@ -1140,9 +1140,9 @@ static void PrintNameOnCard2(void) static void sub_80C3B50(void) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 136, 9, gUnknown_0856FB0C, TEXT_SPEED_FF, sData->var_4D); + AddTextPrinterParameterized3(1, 1, 136, 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->var_4D); else - AddTextPrinterParameterized3(1, 1, GetStringRightAlignXOffset(1, sData->var_4D, 216), 9, gUnknown_0856FB0C, TEXT_SPEED_FF, sData->var_4D); + AddTextPrinterParameterized3(1, 1, GetStringRightAlignXOffset(1, sData->var_4D, 216), 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->var_4D); } static const u8 gUnknown_0856FB4C[] = {0xfd, 0x02, 0xf0, 0xfd, 0x03, 0xf0, 0xfd, 0x04, 0xff}; @@ -1163,14 +1163,14 @@ static const u8 gUnknown_0856FB57[] = {0xd8, 0xd8}; static void PrintString(u8 top, const u8* str1, u8* str2, const u8* color) { - AddTextPrinterParameterized3(1, 1, gUnknown_0856FB55[sData->isHoenn], top * 16 + 33, gUnknown_0856FB0C, TEXT_SPEED_FF, str1); + AddTextPrinterParameterized3(1, 1, gUnknown_0856FB55[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SPEED_FF, str1); AddTextPrinterParameterized3(1, 1, GetStringRightAlignXOffset(1, str2, gUnknown_0856FB57[sData->isHoenn]), top * 16 + 33, color, TEXT_SPEED_FF, str2); } static void PrintHofDebutStringOnCard(void) { if (sData->hasHofResult) - PrintString(0, gText_HallOfFameDebut, sData->var_93, gUnknown_0856FB0F); + PrintString(0, gText_HallOfFameDebut, sData->var_93, sTrainerCardStatColors); } static const u8 *const gUnknown_0856FB5C[] = {gText_LinkBattles, gText_LinkCableBattles, gText_LinkBattles}; @@ -1192,7 +1192,7 @@ static void PrintWinsLossesStringOnCard(void) StringCopy(gStringVar1, sData->var_165); StringCopy(gStringVar2, sData->var_1AB); StringExpandPlaceholders(gStringVar4, gText_WinsLosses); - PrintString(1, sData->var_D9, gStringVar4, gUnknown_0856FB0C); + PrintString(1, sData->var_D9, gStringVar4, sTrainerCardTextColors); } } @@ -1205,7 +1205,7 @@ static void PrintTradesNumOnCard(void) static void PrintTradesStringOnCard(void) { if (sData->hasTrades) - PrintString(2, gText_PokemonTrades, sData->var_237, gUnknown_0856FB0F); + PrintString(2, gText_PokemonTrades, sData->var_237, sTrainerCardStatColors); } static void PrintBerryCrushNumOnCard(void) @@ -1217,7 +1217,7 @@ static void PrintBerryCrushNumOnCard(void) static void PrintBerryCrushStringOnCard(void) { if (sData->cardType == CARD_TYPE_FRLG && sData->trainerCard.berryCrushPoints) - PrintString(4, gText_BerryCrush, sData->var_2C3, gUnknown_0856FB0F); + PrintString(4, gText_BerryCrush, sData->var_2C3, sTrainerCardStatColors); } static void PrintUnionNumOnCard(void) @@ -1229,7 +1229,7 @@ static void PrintUnionNumOnCard(void) static void PrintUnionStringOnCard(void) { if (sData->cardType == CARD_TYPE_FRLG && sData->trainerCard.unionRoomNum) - PrintString(3, gText_UnionTradesAndBattles, sData->var_34F, gUnknown_0856FB0F); + PrintString(3, gText_UnionTradesAndBattles, sData->var_34F, sTrainerCardStatColors); } static void PrintPokeblocksNumOnCard(void) @@ -1244,7 +1244,7 @@ static void PrintPokeblocksNumOnCard(void) static void PrintPokeblockStringOnCard(void) { if (sData->cardType != CARD_TYPE_FRLG && sData->trainerCard.pokeblocksWithFriends) - PrintString(3, gText_PokeblocksWithFriends, sData->var_395, gUnknown_0856FB0F); + PrintString(3, gText_PokeblocksWithFriends, sData->var_395, sTrainerCardStatColors); } static void PrintContestNumOnCard(void) @@ -1256,7 +1256,7 @@ static void PrintContestNumOnCard(void) static void PrintContestStringOnCard(void) { if (sData->cardType != CARD_TYPE_FRLG && sData->trainerCard.contestsWithFriends) - PrintString(4, gText_WonContestsWFriends, sData->var_3DB, gUnknown_0856FB0F); + PrintString(4, gText_WonContestsWFriends, sData->var_3DB, sTrainerCardStatColors); } static void PrintBattleFacilityNumsOnCard(void) @@ -1289,11 +1289,11 @@ static void PrintBattleFacilityStringOnCard(void) { case CARD_TYPE_RS: if (sData->hasBattleTowerWins) - PrintString(5, gText_BattleTower, sData->var_421, gUnknown_0856FB0C); + PrintString(5, gText_BattleTower, sData->var_421, sTrainerCardTextColors); break; case CARD_TYPE_EMERALD: if (sData->trainerCard.frontierBP) - PrintString(5, gText_BattlePtsWon, sData->var_421, gUnknown_0856FB0F); + PrintString(5, gText_BattlePtsWon, sData->var_421, sTrainerCardStatColors); break; case CARD_TYPE_FRLG: break; diff --git a/src/union_room.c b/src/union_room.c index d6b712558..735778ebb 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -158,19 +158,19 @@ void sub_80124EC(u8 windowId, u8 arg1, u8 stringId) switch (arg1 << 8) { case 0x200: - sub_80173E0(windowId, 1, gUnknown_082EDB60[0][stringId - 1], 0, 1, 0); + sub_80173E0(windowId, 1, sPlayersNeededOrModeTexts[0][stringId - 1], 0, 1, 0); break; case 0x400: - sub_80173E0(windowId, 1, gUnknown_082EDB60[1][stringId - 1], 0, 1, 0); + sub_80173E0(windowId, 1, sPlayersNeededOrModeTexts[1][stringId - 1], 0, 1, 0); break; case 0x2500: - sub_80173E0(windowId, 1, gUnknown_082EDB60[2][stringId - 1], 0, 1, 0); + sub_80173E0(windowId, 1, sPlayersNeededOrModeTexts[2][stringId - 1], 0, 1, 0); break; case 0x3500: - sub_80173E0(windowId, 1, gUnknown_082EDB60[3][stringId - 1], 0, 1, 0); + sub_80173E0(windowId, 1, sPlayersNeededOrModeTexts[3][stringId - 1], 0, 1, 0); break; case 0x2400: - sub_80173E0(windowId, 1, gUnknown_082EDB60[4][stringId - 1], 0, 1, 0); + sub_80173E0(windowId, 1, sPlayersNeededOrModeTexts[4][stringId - 1], 0, 1, 0); break; } @@ -183,7 +183,7 @@ void sub_80125BC(u8 windowId) u8 *txtPtr; sub_80173E0(windowId, 1, gSaveBlock2Ptr->playerName, 0, 1, 0); - txtPtr = StringCopy(text, gText_UnkCtrlCodeF907); + txtPtr = StringCopy(text, sText_ID); ConvertIntToDecimalStringN(txtPtr, ReadAsU16(gSaveBlock2Ptr->playerTrainerId), STR_CONV_MODE_LEADING_ZEROS, 5); sub_80173E0(windowId, 1, text, 0, 0x11, 0); } @@ -197,7 +197,7 @@ void sub_801262C(u8 *dst, u8 caseId) case 14 ... 16: case 21 ... 28: // UB: argument *dst isn't used, instead it always prints to gStringVar4 - StringExpandPlaceholders(gStringVar4, gText_AwaitingCommunication); + StringExpandPlaceholders(gStringVar4, sText_AwaitingCommunication); break; } } @@ -274,7 +274,7 @@ void sub_8012780(u8 taskId) data->field_11 = AddWindow(&gUnknown_082F012C); FillWindowPixelBuffer(data->field_10, PIXEL_FILL(2)); - sub_80173E0(data->field_10, 0, gUnknown_082EDBC4, 8, 1, 4); + sub_80173E0(data->field_10, 0, sText_BButtonCancel, 8, 1, 4); PutWindowTilemap(data->field_10); CopyWindowToVram(data->field_10, 2); @@ -292,13 +292,13 @@ void sub_8012780(u8 taskId) data->state = 4; break; case 4: - StringCopy(gStringVar1, gUnknown_082F0048[gUnknown_02022C2C]); + StringCopy(gStringVar1, sLinkGroupActivityTexts[gUnknown_02022C2C]); if ((gUnknown_02022C2D >> 4) != 0) { if (data->field_13 > (gUnknown_02022C2D >> 4) - 1 && (gUnknown_02022C2D & 0xF) != 0) - StringExpandPlaceholders(gStringVar4, gText_AwaitingLink); + StringExpandPlaceholders(gStringVar4, sText_AwaitingLinkPressStart); else - StringExpandPlaceholders(gStringVar4, gText_AwaitingCommunication); + StringExpandPlaceholders(gStringVar4, sText_AwaitingCommunication); } else { @@ -346,7 +346,7 @@ void sub_8012780(u8 taskId) break; case 10: id = ((gUnknown_02022C2C & 0xF) == 2) ? 1 : 0; - if (PrintOnTextbox(&data->textState, gUnknown_082EDDC4[id])) + if (PrintOnTextbox(&data->textState, sPlayerUnavailableTexts[id])) { data->field_13 = sub_8013398(data->field_0); RedrawListMenu(data->listTaskId); @@ -355,7 +355,7 @@ void sub_8012780(u8 taskId) break; case 29: id = ((gUnknown_02022C2D & 0xF) == 2) ? 0 : 1; - if (PrintOnTextbox(&data->textState, gUnknown_082EDDC4[id])) + if (PrintOnTextbox(&data->textState, sPlayerUnavailableTexts[id])) { data->state = 21; } @@ -405,7 +405,7 @@ void sub_8012780(u8 taskId) else { sub_8018404(gStringVar1, &data->field_0->arr[data->field_13 - 1]); - StringExpandPlaceholders(gStringVar4, gUnknown_082EDC9C); + StringExpandPlaceholders(gStringVar4, sText_AnOKWasSentToPlayer); data->state = 13; } @@ -443,7 +443,7 @@ void sub_8012780(u8 taskId) data->state = 17; break; case 15: - if (PrintOnTextbox(&data->textState, gUnknown_082EDC5C)) + if (PrintOnTextbox(&data->textState, sText_AreTheseMembersOK)) data->state = 16; break; case 16: @@ -462,7 +462,7 @@ void sub_8012780(u8 taskId) } break; case 19: - if (PrintOnTextbox(&data->textState, gUnknown_082EDC78)) + if (PrintOnTextbox(&data->textState, sText_CancelModeWithTheseMembers)) data->state = 20; break; case 20: @@ -509,7 +509,7 @@ void sub_8012780(u8 taskId) } break; case 30: - if (PrintOnTextbox(&data->textState, gUnknown_082EDD58)) + if (PrintOnTextbox(&data->textState, sText_ModeWithTheseMembersWillBeCanceled)) data->state = 23; break; case 21: @@ -577,11 +577,11 @@ void sub_8012FC4(u8 *dst, u8 caseId) case 4: case 14: case 28: - StringExpandPlaceholders(dst, gUnknown_082EDBE8); + StringExpandPlaceholders(dst, sText_PlayerContactedYouForXAccept); break; case 21: case 22: - StringExpandPlaceholders(dst, gUnknown_082EDC0C); + StringExpandPlaceholders(dst, sText_PlayerContactedYouShareX); break; case 3: case 9: @@ -594,7 +594,7 @@ void sub_8012FC4(u8 *dst, u8 caseId) case 25: case 26: case 27: - StringExpandPlaceholders(dst, gUnknown_082EDC34); + StringExpandPlaceholders(dst, sText_PlayerContactedYouAddToMembers); break; } } @@ -625,7 +625,7 @@ void sub_80130B4(u8 *dst, u8 caseId) case 21: case 22: case 28: - StringExpandPlaceholders(dst, gUnknown_082EFC3C); + StringExpandPlaceholders(dst, sText_AwaitingPlayersResponse); break; case 3: case 9: @@ -638,7 +638,7 @@ void sub_80130B4(u8 *dst, u8 caseId) case 25: case 26: case 27: - StringExpandPlaceholders(dst, gUnknown_082EFC54); + StringExpandPlaceholders(dst, sText_PlayerHasBeenAskedToRegisterYouPleaseWait); break; } } @@ -654,7 +654,7 @@ void sub_8013160(u8 *dst, u8 caseId) case 21: case 22: case 28: - StringExpandPlaceholders(dst, gUnknown_082EDDF4); + StringExpandPlaceholders(dst, sText_PlayerSentBackOK); break; case 3: case 9: @@ -667,7 +667,7 @@ void sub_8013160(u8 *dst, u8 caseId) case 25: case 26: case 27: - StringExpandPlaceholders(dst, gUnknown_082EDE0C); + StringExpandPlaceholders(dst, sText_PlayerOKdRegistration); break; } } @@ -888,7 +888,7 @@ void sub_80134E8(u8 taskId) } else { - StringCopy(gStringVar4, gUnknown_082EDD50[var - 1]); + StringCopy(gStringVar4, sCantTransmitToTrainerTexts[var - 1]); data->state = 18; PlaySE(SE_PN_ON); } @@ -953,8 +953,8 @@ void sub_80134E8(u8 taskId) else { sub_8011A64(7, 0); - StringCopy(gStringVar1, gUnknown_082F0048[gUnknown_02022C2C]); - StringExpandPlaceholders(gStringVar4, gUnknown_082EDE48); + StringCopy(gStringVar1, sLinkGroupActivityTexts[gUnknown_02022C2C]); + StringExpandPlaceholders(gStringVar4, sText_AwaitingOtherMembers); } } break; @@ -989,7 +989,7 @@ void sub_80134E8(u8 taskId) data->state = 7; break; case 7: - if (PrintOnTextbox(&data->textState, gUnknown_082EDE64)) + if (PrintOnTextbox(&data->textState, sText_QuitBeingMember)) data->state = 8; break; case 8: @@ -1036,7 +1036,7 @@ void sub_80134E8(u8 taskId) break; case 13: DestroyWirelessStatusIndicatorSprite(); - if (PrintOnTextbox(&data->textState, gUnknown_082EDE9C[sub_8011A74()])) + if (PrintOnTextbox(&data->textState, sPlayerDisconnectedTexts[sub_8011A74()])) { gSpecialVar_Result = 6; data->state = 23; @@ -1049,7 +1049,7 @@ void sub_80134E8(u8 taskId) break; case 15: DestroyWirelessStatusIndicatorSprite(); - if (PrintOnTextbox(&data->textState, gUnknown_082EDE9C[sub_8011A74()])) + if (PrintOnTextbox(&data->textState, sPlayerDisconnectedTexts[sub_8011A74()])) { gSpecialVar_Result = 8; data->state = 23; @@ -1717,7 +1717,7 @@ void sub_8014A40(u8 taskId) data->state = 2; break; case 2: - StringCopy(gStringVar1, gUnknown_082F0048[gUnknown_02022C2C]); + StringCopy(gStringVar1, sLinkGroupActivityTexts[gUnknown_02022C2C]); sub_801262C(gStringVar4, gUnknown_02022C2C); data->state = 3; break; @@ -1734,7 +1734,7 @@ void sub_8014A40(u8 taskId) } break; case 6: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EDF40)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_LinkWithFriendDropped)) { data->field_13 = sub_8013398(data->field_0); RedrawListMenu(data->listTaskId); @@ -1774,7 +1774,7 @@ void sub_8014A40(u8 taskId) RedrawListMenu(data->listTaskId); data->field_13++; sub_8018404(gStringVar1, &data->field_0->arr[data->field_13 - 1]); - StringExpandPlaceholders(gStringVar4, gUnknown_082EDC9C); + StringExpandPlaceholders(gStringVar4, sText_AnOKWasSentToPlayer); data->state = 9; sub_800EF38(); } @@ -1831,7 +1831,7 @@ void sub_8014A40(u8 taskId) data->state++; break; case 14: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_PleaseStartOver)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_PleaseStartOver)) { DestroyTask(taskId); gSpecialVar_Result = 5; @@ -1972,7 +1972,7 @@ void sub_8014F48(u8 taskId) } break; case 4: - AddTextPrinterToWindow1(gUnknown_082EFC3C); + AddTextPrinterToWindow1(sText_AwaitingPlayersResponse); sub_8018404(gStringVar1, &data->field_0->arr[data->field_F]); data->state = 5; break; @@ -1991,7 +1991,7 @@ void sub_8014F48(u8 taskId) data->state = 8; break; case 5: - AddTextPrinterToWindow1(gUnknown_082EDDF4); + AddTextPrinterToWindow1(sText_PlayerSentBackOK); sub_8011A64(0, 0); break; } @@ -2009,7 +2009,7 @@ void sub_8014F48(u8 taskId) data->state++; break; case 9: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EDF80[sub_8011A74()])) + if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sLinkDroppedTexts[sub_8011A74()])) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); @@ -2019,7 +2019,7 @@ void sub_8014F48(u8 taskId) break; case 7: DestroyWirelessStatusIndicatorSprite(); - AddTextPrinterToWindow1(gText_PleaseStartOver); + AddTextPrinterToWindow1(sText_PleaseStartOver); DestroyTask(taskId); sub_800EDD4(); gSpecialVar_Result = 5; @@ -2068,7 +2068,7 @@ void sub_80152F4(u8 taskId) data->state = 1; break; case 1: - AddTextPrinterToWindow1(gUnknown_082EFBC8); + AddTextPrinterToWindow1(sText_SearchingForWirelessSystemWait); data->state = 2; break; case 2: @@ -2137,7 +2137,7 @@ void sub_80152F4(u8 taskId) } break; case 4: - AddTextPrinterToWindow1(gUnknown_082EFC90); + AddTextPrinterToWindow1(sText_AwaitingResponseFromWirelessSystem); sub_8018404(gStringVar1, &data->field_0->arr[data->field_F]); data->state = 5; break; @@ -2156,7 +2156,7 @@ void sub_80152F4(u8 taskId) data->state = 8; break; case 5: - AddTextPrinterToWindow1(gUnknown_082EDEC4); + AddTextPrinterToWindow1(sText_WirelessLinkEstablished); sub_8011A64(0, 0); break; } @@ -2177,7 +2177,7 @@ void sub_80152F4(u8 taskId) data->state++; break; case 9: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EDF04)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_WirelessLinkDropped)) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); @@ -2186,7 +2186,7 @@ void sub_80152F4(u8 taskId) } break; case 7: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_WirelessSearchCanceled)) + if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_WirelessSearchCanceled)) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); @@ -2195,7 +2195,7 @@ void sub_80152F4(u8 taskId) } break; case 11: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gUnknown_082EFD58[data->field_12])) + if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sNoWonderSharedTexts[data->field_12])) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); @@ -2478,7 +2478,7 @@ void sub_80156E0(u8 taskId) if (!FuncIsActiveTask(sub_80140E0)) { if (gUnknown_02022C2C == 0x44) - sub_8015664(31, gUnknown_082EE004); + sub_8015664(31, sText_AwaitingPlayersResponseAboutTrade); else data->state = 5; } @@ -2494,7 +2494,7 @@ void sub_80156E0(u8 taskId) case 5: id = sub_80179AC(&data->field_0->arr[taskData[1]]); playerGender = sub_8017CF8(taskData[1], data->field_0); - sub_8015664(6, gUnknown_082EE24C[id][playerGender]); + sub_8015664(6, sHiDoSomethingTexts[id][playerGender]); break; case 6: var5 = sub_8017178(&data->textState, &data->field_1B, &data->field_1C, &gUnknown_082F021C, &gUnknown_082F0244); @@ -2512,7 +2512,7 @@ void sub_80156E0(u8 taskId) { data->field_4C[0] = 0x40; sub_800FE50(data->field_4C); - StringCopy(gStringVar4, gUnknown_082EEB80[gLinkPlayers[0].gender]); + StringCopy(gStringVar4, sIfYouWantToDoSomethingTexts[gLinkPlayers[0].gender]); data->state = 32; } else @@ -2541,7 +2541,7 @@ void sub_80156E0(u8 taskId) sub_8017FD8(data); playerGender = sub_8017CF8(taskData[1], data->field_0); id = sub_8017984(data->field_4C[0] & 0x3F); - if (PrintOnTextbox(&data->textState, gUnknown_082EE82C[playerGender][id])) + if (PrintOnTextbox(&data->textState, sText_WaitOrShowCardTexts[playerGender][id])) { taskData[3] = 0; data->state = 29; @@ -2591,7 +2591,7 @@ void sub_80156E0(u8 taskId) case 7: id = sub_80179AC(&data->field_0->arr[taskData[1]]); playerGender = sub_8017CF8(taskData[1], data->field_0); - sub_8015664(6, gUnknown_082EE24C[id][playerGender]); + sub_8015664(6, sHiDoSomethingTexts[id][playerGender]); break; case 40: if (PrintOnTextbox(&data->textState, gStringVar4)) @@ -2609,7 +2609,7 @@ void sub_80156E0(u8 taskId) { StringCopy(gStringVar1, gLinkPlayers[GetMultiplayerId() ^ 1].name); id = sub_800E540(gLinkPlayers[1].trainerId, gLinkPlayers[1].name); - StringExpandPlaceholders(gStringVar4, sUnionRoomTexts_AwaitingResponse[id]); + StringExpandPlaceholders(gStringVar4, sAwaitingResponseTexts[id]); data->state = 33; } else @@ -2633,7 +2633,7 @@ void sub_80156E0(u8 taskId) case 1: case -1: playerGender = sub_8017CF8(taskData[1], data->field_0); - sub_801568C(sUnionRoomTexts_DeclineBattle[playerGender]); + sub_801568C(sDeclineBattleTexts[playerGender]); break; } break; @@ -2656,9 +2656,9 @@ void sub_80156E0(u8 taskId) playerGender = sub_8017CF8(taskData[1], data->field_0); sub_8011090(0x54, 0, 1); if (sub_8011B90() == TRUE) - sub_801568C(gUnknown_082EED3C[playerGender]); + sub_801568C(sChatDeclinedTexts[playerGender]); else - sub_8015664(30, gUnknown_082EED3C[playerGender]); + sub_8015664(30, sChatDeclinedTexts[playerGender]); break; case 3: data->state = 22; @@ -2672,9 +2672,9 @@ void sub_80156E0(u8 taskId) playerGender = sub_8017CF8(taskData[1], data->field_0); sub_8011090(0x54, 0, 1); if (sub_8011B90() == TRUE) - sub_801568C(gUnknown_082EED3C[playerGender]); + sub_801568C(sChatDeclinedTexts[playerGender]); else - sub_8015664(30, gUnknown_082EED3C[playerGender]); + sub_8015664(30, sChatDeclinedTexts[playerGender]); } if (gReceivedRemoteLinkPlayers != 0) data->state = 16; @@ -2705,7 +2705,7 @@ void sub_80156E0(u8 taskId) data->state = 33; StringCopy(gStringVar1, gLinkPlayers[1].name); id = sub_800E540(gLinkPlayers[1].trainerId, gLinkPlayers[1].name); - StringExpandPlaceholders(gStringVar4, gUnknown_082EE324[id]); + StringExpandPlaceholders(gStringVar4, sPlayerContactedYouTexts[id]); } break; case 33: @@ -3002,7 +3002,7 @@ void sub_80156E0(u8 taskId) gUnknown_02022C2C = 0x44; sub_8012188(data->field_0->arr[taskData[1]].unk.playerName, &data->field_0->arr[taskData[1]].unk.field_0, 0x44); sub_8018404(gStringVar1, &data->field_0->arr[taskData[1]]); - sub_8017020(gUnknown_082EE17C[2]); + sub_8017020(sCommunicatingWaitTexts[2]); data->state = 25; break; case 26: @@ -3454,7 +3454,7 @@ u8 sub_8017118(const struct WindowTemplate * template) u8 windowId = AddWindow(template); DrawStdWindowFrame(windowId, FALSE); FillWindowPixelBuffer(windowId, 0xFF); - sub_80173E0(windowId, 1, gUnknown_082EFD94, 8, 1, 6); + sub_80173E0(windowId, 1, sText_NameWantedOfferLv, 8, 1, 6); CopyWindowToVram(windowId, 2); PutWindowTilemap(windowId); return windowId; @@ -3780,7 +3780,7 @@ void sub_80177B8(u8 arg0, u8 arg1, u8 arg2, struct UnkStruct_x20 *arg3, u8 arg4, u8 sp0[6]; ConvertIntToDecimalStringN(gStringVar4, id + 1, STR_CONV_MODE_LEADING_ZEROS, 2); - StringAppend(gStringVar4, gText_Colon); + StringAppend(gStringVar4, sText_Colon); sub_80173E0(arg0, 1, gStringVar4, arg1, arg2, 0); arg1 += 18; r2 = arg3->unk.field_0.unk_0a_0; @@ -3789,7 +3789,7 @@ void sub_80177B8(u8 arg0, u8 arg1, u8 arg2, struct UnkStruct_x20 *arg3, u8 arg4, sub_8018404(gStringVar4, arg3); sub_80173E0(arg0, 1, gStringVar4, arg1, arg2, arg4); ConvertIntToDecimalStringN(sp0, arg3->unk.field_0.unk_00.playerTrainerId[0] | (arg3->unk.field_0.unk_00.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); - StringCopy(gStringVar4, gText_UnkCtrlCodeF907); + StringCopy(gStringVar4, sText_ID); StringAppend(gStringVar4, sp0); sub_80173E0(arg0, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x88), arg2, arg4); } @@ -3804,7 +3804,7 @@ void sub_80178A0(u8 arg0, u8 arg1, u8 arg2, struct UnkStruct_x20 *arg3, u8 arg4, sub_8018404(gStringVar4, arg3); sub_80173E0(arg0, 1, gStringVar4, arg1, arg2, arg4); ConvertIntToDecimalStringN(sp0, arg3->unk.field_0.unk_00.playerTrainerId[0] | (arg3->unk.field_0.unk_00.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); - StringCopy(gStringVar4, gText_UnkCtrlCodeF907); + StringCopy(gStringVar4, sText_ID); StringAppend(gStringVar4, sp0); sub_80173E0(arg0, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x68), arg2, arg4); } @@ -3865,12 +3865,12 @@ s32 sub_80179D4(struct UnkStruct_Main0 *arg0, u8 arg1, u8 arg2, u32 playerGender r2 = sub_800E540(ReadAsU16(r5->unk.field_0.unk_00.playerTrainerId), gStringVar1); if (r5->unk.field_0.unk_0a_0 == 0x45) { - StringExpandPlaceholders(gStringVar4, sUnionRoomTexts_JoinChat[r2][playerGender]); + StringExpandPlaceholders(gStringVar4, sJoinChatTexts[r2][playerGender]); return 2; } else { - sub_8017020(gUnknown_082EE17C[r2]); + sub_8017020(sCommunicatingWaitTexts[r2]); return 1; } } @@ -3884,16 +3884,16 @@ s32 sub_80179D4(struct UnkStruct_Main0 *arg0, u8 arg1, u8 arg2, u32 playerGender switch (r5->unk.field_0.unk_0a_0 & 0x3F) { case 1: - StringExpandPlaceholders(gStringVar4, gUnknown_082EEEAC[playerGender][Random() % 4]); + StringExpandPlaceholders(gStringVar4, sBattleReactionTexts[playerGender][Random() % 4]); break; case 4: - StringExpandPlaceholders(gStringVar4, sUnionRoomTexts_Traded[playerGender][Random() % 2]); + StringExpandPlaceholders(gStringVar4, sTradeReactionTexts[playerGender][Random() % 2]); break; case 5: - StringExpandPlaceholders(gStringVar4, gUnknown_082EF010[playerGender][Random() % 4]); + StringExpandPlaceholders(gStringVar4, sChatReactionTexts[playerGender][Random() % 4]); break; case 8: - StringExpandPlaceholders(gStringVar4, gUnknown_082EF100[playerGender][Random() % 2]); + StringExpandPlaceholders(gStringVar4, sTrainerCardReactionTexts[playerGender][Random() % 2]); break; default: StringExpandPlaceholders(gStringVar4, sText_TrainerAppearsBusy); @@ -4023,16 +4023,16 @@ void sub_8017D9C(u8 *dst, s32 arg1, u32 playerGender) switch (arg1) { case 0x41: - StringExpandPlaceholders(dst, gUnknown_082EEA68[playerGender]); + StringExpandPlaceholders(dst, sBattleDeclinedTexts[playerGender]); break; case 0x45: - StringExpandPlaceholders(dst, gUnknown_082EED3C[playerGender]); + StringExpandPlaceholders(dst, sChatDeclinedTexts[playerGender]); break; case 0x44: StringExpandPlaceholders(dst, sText_TradeOfferRejected); break; case 0x48: - StringExpandPlaceholders(dst, gUnknown_082EEB08[playerGender]); + StringExpandPlaceholders(dst, sShowTrainerCardDeclinedTexts[playerGender]); break; } } @@ -4045,13 +4045,13 @@ void sub_8017E00(u8 *dst, u8 arg1) switch (arg1) { case 0x41: - StringCopy(dst, gUnknown_082EE984[mpId][gender][0]); + StringCopy(dst, sStartActivityTexts[mpId][gender][0]); break; case 0x44: - StringCopy(dst, gUnknown_082EE984[mpId][gender][2]); + StringCopy(dst, sStartActivityTexts[mpId][gender][2]); break; case 0x45: - StringCopy(dst, gUnknown_082EE984[mpId][gender][1]); + StringCopy(dst, sStartActivityTexts[mpId][gender][1]); break; } } @@ -4294,7 +4294,7 @@ void sub_8018220(u8 *unused, struct UnkStruct_URoom *arg1, bool8 arg2) DynamicPlaceholderTextUtil_SetPlaceholderPtr(4, arg1->field_C0[3]); DynamicPlaceholderTextUtil_SetPlaceholderPtr(5, arg1->field_C0[4]); - DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, gUnknown_082EFF64); + DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, sText_TrainerCardInfoPage1); StringCopy(gStringVar4, arg1->field_1A4); n = trainerCard->linkBattleWins; @@ -4322,17 +4322,17 @@ void sub_8018220(u8 *unused, struct UnkStruct_URoom *arg1, bool8 arg2) DynamicPlaceholderTextUtil_SetPlaceholderPtr(i + 4, arg1->field_C0[i + 3]); } - DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, gUnknown_082EFFA4); + DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, sText_TrainerCardInfoPage2); StringAppend(gStringVar4, arg1->field_1A4); if (arg2 == TRUE) { - DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, gUnknown_082F0020); + DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, sText_FinishedCheckingPlayersTrainerCard); StringAppend(gStringVar4, arg1->field_1A4); } else if (arg2 == FALSE) { - DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, gUnknown_082F0018[trainerCard->gender]); + DynamicPlaceholderTextUtil_ExpandPlaceholders(arg1->field_1A4, sGladToMeetYouTexts[trainerCard->gender]); StringAppend(gStringVar4, arg1->field_1A4); } } diff --git a/src/union_room_chat.c b/src/union_room_chat.c index be2269522..f212c69a7 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -1705,7 +1705,7 @@ void copy_strings_to_sav1(void) StringCopy(gSaveBlock1Ptr->unk3C88[4], gText_Lets); StringCopy(gSaveBlock1Ptr->unk3C88[5], gText_Ok); StringCopy(gSaveBlock1Ptr->unk3C88[6], gText_Sorry); - StringCopy(gSaveBlock1Ptr->unk3C88[7], gText_YayUnkF9F9); + StringCopy(gSaveBlock1Ptr->unk3C88[7], gText_YaySmileEmoji); StringCopy(gSaveBlock1Ptr->unk3C88[8], gText_ThankYou); StringCopy(gSaveBlock1Ptr->unk3C88[9], gText_ByeBye); } @@ -2583,9 +2583,9 @@ static void sub_80201A4(void) FillWindowPixelBuffer(2, PIXEL_FILL(15)); page = GetCurrentKeyboardPage(); - sp[0] = 0; - sp[1] = 14; - sp[2] = 13; + sp[0] = TEXT_COLOR_TRANSPARENT; + sp[1] = TEXT_DYNAMIC_COLOR_5; + sp[2] = TEXT_DYNAMIC_COLOR_4; if (page != UNION_ROOM_KB_PAGE_COUNT) { str = &sp[4]; @@ -2688,7 +2688,7 @@ static void sub_802040C(void) static void sub_8020420(u16 row, u8 *str, u8 arg2) { u8 color[3]; - color[0] = 1; + color[0] = TEXT_COLOR_WHITE; color[1] = arg2 * 2 + 2; color[2] = arg2 * 2 + 3; FillWindowPixelRect(0, PIXEL_FILL(1), 0, row * 15, 168, 15); diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index bd3abe0e4..a0c8d8e2d 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -178,11 +178,11 @@ const u8 gUnknown_085DFCC4[] = 1 // Sour/Tough }; -const u8 gUnknown_085DFCC9[] = +static const u8 sNatureTextColors[] = { - 0, - 8, - 1 + TEXT_COLOR_TRANSPARENT, + TEXT_COLOR_BLUE, + TEXT_COLOR_WHITE }; const struct BgTemplate gUnknown_085DFCCC[4] = @@ -1398,7 +1398,7 @@ void sub_8167BA0(u16 arg0, u8 copyToVramMode) nature = GetNature(&gPlayerParty[partyIndex]); str = StringCopy(gUnknown_0203BCAC->info.field_7A, gText_NatureSlash); str = StringCopy(str, gNatureNamePointers[nature]); - AddTextPrinterParameterized3(1, 1, 2, 1, gUnknown_085DFCC9, 0, gUnknown_0203BCAC->info.field_7A); + AddTextPrinterParameterized3(1, 1, 2, 1, sNatureTextColors, 0, gUnknown_0203BCAC->info.field_7A); } if (copyToVramMode) From b7ab9cbf4c36f0cf066be655432c57ec6e12e7e5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 10 Dec 2019 19:31:12 -0500 Subject: [PATCH 10/35] Update JP translation and fix typo --- include/strings.h | 2 +- src/data/union_room.h | 2 +- src/pokedex.c | 2 +- src/strings.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/strings.h b/include/strings.h index ec1ca401d..0e2646ada 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1078,7 +1078,7 @@ extern const u8 gTrickHouse_Mechadoll_Seven2[]; extern const u8 gTrickHouse_Mechadoll_Eight2[]; // Pokedex strings -extern const u8 gText_SeachForPkmnBasedOnParameters[]; +extern const u8 gText_SearchForPkmnBasedOnParameters[]; extern const u8 gText_SwitchPokedexListings[]; extern const u8 gText_ReturnToPokedex[]; extern const u8 gText_SelectPokedexMode[]; diff --git a/src/data/union_room.h b/src/data/union_room.h index 5e9cb297e..8cb0bc8aa 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -79,7 +79,7 @@ static const u8 *const sPlayersNeededOrModeTexts[][5] = { }; ALIGNED(4) const u8 sText_BButtonCancel[] = _("{B_BUTTON}CANCEL"); -ALIGNED(4) const u8 sJPText_InvitationSentToPlayer[] = _("ため\nさんかしゃ ぼしゅうちゅう です!"); // Unused +ALIGNED(4) const u8 sJPText_SearchingForParticipants[] = _("ため\nさんかしゃ ぼしゅうちゅう です!"); // Unused, may have been cut off ALIGNED(4) const u8 sText_PlayerContactedYouForXAccept[] = _("{STR_VAR_2} contacted you for\n{STR_VAR_1}. Accept?"); ALIGNED(4) const u8 sText_PlayerContactedYouShareX[] = _("{STR_VAR_2} contacted you.\nWill you share {STR_VAR_1}?"); ALIGNED(4) const u8 sText_PlayerContactedYouAddToMembers[] = _("{STR_VAR_2} contacted you.\nAdd to the members?"); diff --git a/src/pokedex.c b/src/pokedex.c index b5ac066db..91db54906 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -934,7 +934,7 @@ static const u8 gUnknown_0856ED08[][4] = static const struct UnknownStruct3 gUnknown_0856ED30[] = { { - .text = gText_SeachForPkmnBasedOnParameters, + .text = gText_SearchForPkmnBasedOnParameters, .unk4 = 0, .unk5 = 0, .unk6 = 5, diff --git a/src/strings.c b/src/strings.c index 711e183d8..8190ffc45 100644 --- a/src/strings.c +++ b/src/strings.c @@ -112,7 +112,7 @@ const u8 gText_WTWeight[] = _("WT"); const u8 gText_SearchingPleaseWait[] = _("Searching…\nPlease wait."); const u8 gText_SearchCompleted[] = _("Search completed."); const u8 gText_NoMatchingPkmnWereFound[] = _("No matching POKéMON were found."); -const u8 gText_SeachForPkmnBasedOnParameters[] = _("Search for POKéMON based on\nselected parameters."); +const u8 gText_SearchForPkmnBasedOnParameters[] = _("Search for POKéMON based on\nselected parameters."); const u8 gText_SwitchPokedexListings[] = _("Switch POKéDEX listings."); const u8 gText_ReturnToPokedex[] = _("Return to the POKéDEX."); const u8 gText_SelectPokedexMode[] = _("Select the POKéDEX mode."); From 49f1a90534180445d293761e2bdac165b49319a2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 9 Dec 2019 02:10:42 -0500 Subject: [PATCH 11/35] Document Battle Pike scripts --- asm/macros/battle_frontier/battle_pike.inc | 44 +- .../scripts.inc | 28 +- .../BattleFrontier_BattlePikeLobby/map.json | 12 +- .../scripts.inc | 258 ++++----- .../scripts.inc | 8 +- .../map.json | 16 +- .../scripts.inc | 498 +++++++++--------- .../map.json | 14 +- .../scripts.inc | 30 +- .../map.json | 14 +- .../scripts.inc | 94 ++-- data/scripts/battle_pike.inc | 66 +-- include/constants/battle_pike.h | 6 +- src/battle_pike.c | 42 +- 14 files changed, 569 insertions(+), 561 deletions(-) diff --git a/asm/macros/battle_frontier/battle_pike.inc b/asm/macros/battle_frontier/battle_pike.inc index d40cb0bac..30f5c88d8 100644 --- a/asm/macros/battle_frontier/battle_pike.inc +++ b/asm/macros/battle_frontier/battle_pike.inc @@ -1,6 +1,4 @@ -@ TODO: Add explanatory comments to macros - - @ + @ Set sRoomType to the next PIKE_ROOM_* id .macro pike_setnextroom setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_TYPE special CallBattlePikeFunction @@ -25,19 +23,19 @@ special CallBattlePikeFunction .endm - @ + @ TRUE if the next room is the last (15th) room, FALSE otherwise .macro pike_isfinalroom setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_FINAL_ROOM special CallBattlePikeFunction .endm - @ + @ Set the object event gfx for the room being entered .macro pike_setroomobjects setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_OBJECTS special CallBattlePikeFunction .endm - @ + @ Get the current room type (sRoomType) .macro pike_getroomtype setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE special CallBattlePikeFunction @@ -62,33 +60,33 @@ special CallBattlePikeFunction .endm - @ + @ Returns the PIKE_STATUS_* to be afflicted for the status room .macro pike_getstatus setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS special CallBattlePikeFunction .endm - @ + @ Returns the PIKE_STATUSMON_* that attacks the player for the status room .macro pike_getstatusmon setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON special CallBattlePikeFunction .endm - @ + @ Randomly heals either one or two party mons and returns the number of mons healed .macro pike_healonetwomons setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS special CallBattlePikeFunction .endm - @ + @ Buffers a message for the lone NPC in the NPC room to gStringVar4 .macro pike_getnpcmsg setvar VAR_0x8004, BATTLE_PIKE_FUNC_BUFFER_NPC_MSG special CallBattlePikeFunction .endm - @ - .macro pike_fadescreen - setvar VAR_0x8004, BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE + @ Flashes the screen 3 times for when the Dusclops/Kirlia attacks the player + .macro pike_flashscreen + setvar VAR_0x8004, BATTLE_PIKE_FUNC_STATUS_SCREEN_FLASH special CallBattlePikeFunction .endm @@ -98,31 +96,31 @@ special CallBattlePikeFunction .endm - @ TRUE if its the Pike Queens room + @ Set which room to give a hint about. TRUE if its the Pike Queens room next .macro pike_sethintroom setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HINT_ROOM special CallBattlePikeFunction .endm - @ + @ Get PIKE_ROOM_(LEFT/CENTER/RIGHT) for which room to give a hint about .macro pike_gethintroomid setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID special CallBattlePikeFunction .endm - @ + @ Get the PIKE_HINT_* to give about the next room .macro pike_gethint setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE_HINT special CallBattlePikeFunction .endm - @ + @ Reset the frontier trainer ids for the start of the challenge .macro pike_cleartrainerids setvar VAR_0x8004, BATTLE_PIKE_FUNC_CLEAR_TRAINER_IDS special CallBattlePikeFunction .endm - @ + @ Buffer the opponents battle intro speech to gStringVar4. \trainer 0 for Trainer A, 1 for Trainer B .macro pike_gettrainerintro trainer:req setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_TRAINER_INTRO setvar VAR_0x8005, \trainer @@ -135,32 +133,32 @@ special CallBattlePikeFunction .endm - @ + @ Heal 0-2 party mons depending on which room was chosen for the Pike Queen battle. Return the number healed .macro pike_prequeenheal setvar VAR_0x8004, BATTLE_PIKE_FUNC_HEAL_MONS_BEFORE_QUEEN special CallBattlePikeFunction .endm - @ + @ When \set is TRUE, prevent healing rooms from appearing (for 1st room or when party is full health). \set FALSE to re-enable healing rooms .macro pike_nohealing set:req setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HEAL_ROOMS_DISABLED setvar VAR_0x8005, \set special CallBattlePikeFunction .endm - @ + @ TRUE if the party is full health (full HP, PP, and no status), FALSE otherwise .macro pike_ispartyfullhealth setvar VAR_0x8004, BATTLE_PIKE_FUNC_IS_PARTY_FULL_HEALTH special CallBattlePikeFunction .endm - @ + @ Save the party held items in pikeHeldItemsBackup .macro pike_savehelditems setvar VAR_0x8004, BATTLE_PIKE_FUNC_SAVE_HELD_ITEMS special CallBattlePikeFunction .endm - @ + @ Restore the party held items from pikeHeldItemsBackup .macro pike_resethelditems setvar VAR_0x8004, BATTLE_PIKE_FUNC_RESET_HELD_ITEMS special CallBattlePikeFunction diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc index 06f0e0516..cb164c4bb 100644 --- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc @@ -1,25 +1,25 @@ BattleFrontier_BattlePikeCorridor_MapScripts:: @ 825C771 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeCorridor_MapScript2_25C77C - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeCorridor_MapScript2_25C7F7 + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeCorridor_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeCorridor_OnWarp .byte 0 -BattleFrontier_BattlePikeCorridor_MapScript2_25C77C: @ 825C77C - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeCorridor_EventScript_25C786 +BattleFrontier_BattlePikeCorridor_OnFrame: @ 825C77C + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeCorridor_EventScript_EnterCorridor .2byte 0 -BattleFrontier_BattlePikeCorridor_EventScript_25C786:: @ 825C786 +BattleFrontier_BattlePikeCorridor_EventScript_EnterCorridor:: @ 825C786 delay 16 frontier_set FRONTIER_DATA_BATTLE_NUM, 1 pike_cleartrainerids pike_nohealing TRUE - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_25C80B - applymovement 1, BattleFrontier_BattlePikeCorridor_Movement_25C812 + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_PlayerEnterCorridor + applymovement 1, BattleFrontier_BattlePikeCorridor_Movement_AttendantEnterCorridor waitmovement 0 lockall msgbox BattleFrontier_BattlePikeCorridor_Text_YourChallengeHasBegun, MSGBOX_DEFAULT closemessage releaseall - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_25C80E + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_PlayerExitCorridor waitmovement 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 99 call BattleFrontier_BattlePike_EventScript_CloseCurtain @@ -27,27 +27,27 @@ BattleFrontier_BattlePikeCorridor_EventScript_25C786:: @ 825C786 waitstate end -BattleFrontier_BattlePikeCorridor_MapScript2_25C7F7: @ 825C7F7 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePikeCorridor_EventScript_25C801 +BattleFrontier_BattlePikeCorridor_OnWarp: @ 825C7F7 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePikeCorridor_EventScript_TurnPlayerNorth .2byte 0 -BattleFrontier_BattlePikeCorridor_EventScript_25C801:: @ 825C801 +BattleFrontier_BattlePikeCorridor_EventScript_TurnPlayerNorth:: @ 825C801 setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePikeCorridor_Movement_25C80B: @ 825C80B +BattleFrontier_BattlePikeCorridor_Movement_PlayerEnterCorridor: @ 825C80B walk_up walk_up step_end -BattleFrontier_BattlePikeCorridor_Movement_25C80E: @ 825C80E +BattleFrontier_BattlePikeCorridor_Movement_PlayerExitCorridor: @ 825C80E walk_up walk_up set_invisible step_end -BattleFrontier_BattlePikeCorridor_Movement_25C812: @ 825C812 +BattleFrontier_BattlePikeCorridor_Movement_AttendantEnterCorridor: @ 825C812 walk_up walk_up walk_left diff --git a/data/maps/BattleFrontier_BattlePikeLobby/map.json b/data/maps/BattleFrontier_BattlePikeLobby/map.json index 5854c6bf7..598c49444 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/map.json +++ b/data/maps/BattleFrontier_BattlePikeLobby/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePikeLobby_EventScript_25B868", + "script": "BattleFrontier_BattlePikeLobby_EventScript_Attendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePikeLobby_EventScript_25BAAB", + "script": "BattleFrontier_BattlePikeLobby_EventScript_Hiker", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePikeLobby_EventScript_25BAB4", + "script": "BattleFrontier_BattlePikeLobby_EventScript_Twin", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePikeLobby_EventScript_25BABD", + "script": "BattleFrontier_BattlePikeLobby_EventScript_Beauty", "flag": "0" } ], @@ -98,7 +98,7 @@ "y": 3, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "BattleFrontier_BattlePikeLobby_EventScript_25BA80" + "script": "BattleFrontier_BattlePikeLobby_EventScript_ShowResults" }, { "type": "sign", @@ -106,7 +106,7 @@ "y": 3, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "BattleFrontier_BattlePikeLobby_EventScript_25BAC6" + "script": "BattleFrontier_BattlePikeLobby_EventScript_RulesBoard" } ] } \ No newline at end of file diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index 69b8d3b13..f0c7b941b 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -1,33 +1,33 @@ BattleFrontier_BattlePikeLobby_MapScripts:: @ 825B6C6 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeLobby_MapScript2_25B6D1 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeLobby_MapScript2_25B6F3 + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeLobby_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeLobby_OnWarp .byte 0 -BattleFrontier_BattlePikeLobby_MapScript2_25B6D1: @ 825B6D1 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeLobby_EventScript_25B707 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeLobby_EventScript_25B710 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePikeLobby_EventScript_25B762 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePikeLobby_EventScript_25B806 +BattleFrontier_BattlePikeLobby_OnFrame: @ 825B6D1 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeLobby_EventScript_GetChallengeStatus + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePikeLobby_EventScript_WonChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePikeLobby_EventScript_LostChallenge .2byte 0 -BattleFrontier_BattlePikeLobby_MapScript2_25B6F3: @ 825B6F3 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePikeLobby_EventScript_25B6FD +BattleFrontier_BattlePikeLobby_OnWarp: @ 825B6F3 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePikeLobby_EventScript_TurnPlayerNorth .2byte 0 -BattleFrontier_BattlePikeLobby_EventScript_25B6FD:: @ 825B6FD +BattleFrontier_BattlePikeLobby_EventScript_TurnPlayerNorth:: @ 825B6FD setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePikeLobby_EventScript_25B707:: @ 825B707 +BattleFrontier_BattlePikeLobby_EventScript_GetChallengeStatus:: @ 825B707 frontier_getstatus end -BattleFrontier_BattlePikeLobby_EventScript_25B710:: @ 825B710 +BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving:: @ 825B710 special HealPlayerParty pike_resethelditems lockall - msgbox BattleFrontier_BattlePikeLobby_Text_25C2E0, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeLobby_Text_FailedToSaveBeforeQuitting, MSGBOX_DEFAULT closemessage pike_set PIKE_DATA_WIN_STREAK 0 pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE @@ -36,21 +36,20 @@ BattleFrontier_BattlePikeLobby_EventScript_25B710:: @ 825B710 releaseall end -BattleFrontier_BattlePikeLobby_EventScript_25B762:: @ 825B762 +BattleFrontier_BattlePikeLobby_EventScript_WonChallenge:: @ 825B762 lockall frontier_isbrain compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_25B784 - msgbox BattleFrontier_BattlePikeLobby_Text_25C18A, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen + msgbox BattleFrontier_BattlePikeLobby_Text_PossessLuckInAbundance, MSGBOX_DEFAULT waitmessage - goto BattleFrontier_BattlePikeLobby_EventScript_25B78D + goto BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints -BattleFrontier_BattlePikeLobby_EventScript_25B784:: @ 825B784 - msgbox BattleFrontier_BattlePikeLobby_Text_25C383, MSGBOX_DEFAULT +BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen:: @ 825B784 + msgbox BattleFrontier_BattlePikeLobby_Text_SnatchedVictoryFromQueen, MSGBOX_DEFAULT waitmessage - -BattleFrontier_BattlePikeLobby_EventScript_25B78D:: @ 825B78D - msgbox BattleFrontier_BattlePikeLobby_Text_25C3D9, MSGBOX_DEFAULT +BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints:: @ 825B78D + msgbox BattleFrontier_BattlePikeLobby_Text_AwardYouTheseBattlePoints, MSGBOX_DEFAULT frontier_givepoints msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS frontier_checkairshow @@ -60,20 +59,20 @@ BattleFrontier_BattlePikeLobby_EventScript_25B78D:: @ 825B78D special LoadPlayerParty special HealPlayerParty pike_resethelditems - message BattleFrontier_BattlePikeLobby_Text_25C1DF + message BattleFrontier_BattlePikeLobby_Text_ShallRecordResults waitmessage pike_save 0 playse SE_SAVE waitse - msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -BattleFrontier_BattlePikeLobby_EventScript_25B806:: @ 825B806 +BattleFrontier_BattlePikeLobby_EventScript_LostChallenge:: @ 825B806 lockall - message BattleFrontier_BattlePikeLobby_Text_25C146 + message BattleFrontier_BattlePikeLobby_Text_ChallengeEndedRecordResults waitmessage frontier_checkairshow frontier_set FRONTIER_DATA_BATTLE_NUM, 0 @@ -84,42 +83,41 @@ BattleFrontier_BattlePikeLobby_EventScript_25B806:: @ 825B806 pike_save 0 playse SE_SAVE waitse - msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -BattleFrontier_BattlePikeLobby_EventScript_25B868:: @ 825B868 +BattleFrontier_BattlePikeLobby_EventScript_Attendant:: @ 825B868 lock faceplayer setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_PIKE setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES special SavePlayerParty - msgbox BattleFrontier_BattlePikeLobby_Text_25BB52, MSGBOX_DEFAULT - -BattleFrontier_BattlePikeLobby_EventScript_25B87F:: @ 825B87F - message BattleFrontier_BattlePikeLobby_Text_25BBC1 + msgbox BattleFrontier_BattlePikeLobby_Text_WelcomeToBattlePike, MSGBOX_DEFAULT +BattleFrontier_BattlePikeLobby_EventScript_AskTakeChallenge:: @ 825B87F + message BattleFrontier_BattlePikeLobby_Text_TakeChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePikeLobby_EventScript_25B8BB - case 1, BattleFrontier_BattlePikeLobby_EventScript_25BA1A - case 2, BattleFrontier_BattlePikeLobby_EventScript_25BA76 - case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BA76 + case 0, BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge + case 1, BattleFrontier_BattlePikeLobby_EventScript_ExplainChallenge + case 2, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge -BattleFrontier_BattlePikeLobby_EventScript_25B8BB:: @ 825B8BB - message BattleFrontier_BattlePikeLobby_Text_25BE35 +BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge:: @ 825B8BB + message BattleFrontier_BattlePikeLobby_Text_WhichChallengeMode waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case FRONTIER_LVL_TENT, BattleFrontier_BattlePikeLobby_EventScript_25BA76 - case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BA76 + case FRONTIER_LVL_TENT, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge frontier_checkineligible compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_25BA27 + goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT - msgbox BattleFrontier_BattlePikeLobby_Text_25C094, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT fadescreen 1 call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT @@ -127,14 +125,14 @@ BattleFrontier_BattlePikeLobby_EventScript_25B8BB:: @ 825B8BB special ChoosePartyForBattleFrontier waitstate compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_25BA73 - msgbox BattleFrontier_BattlePikeLobby_Text_25C0D8, MSGBOX_YESNO + goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge + msgbox BattleFrontier_BattlePikeLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattlePikeLobby_EventScript_25BA73 - case YES, BattleFrontier_BattlePikeLobby_EventScript_25B95C - case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BA73 + case NO, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge + case YES, BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge -BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C +BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge:: @ 825B95C setvar VAR_TEMP_0, 0 setvar VAR_TEMP_1, 0 frontier_set FRONTIER_DATA_SELECTED_MON_ORDER @@ -150,13 +148,13 @@ BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C setvar VAR_TEMP_0, 255 pike_savehelditems compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_25BA5C + goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE - msgbox BattleFrontier_BattlePikeLobby_Text_25C130, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeLobby_Text_StepThisWay, MSGBOX_DEFAULT closemessage frontier_settrainers - call BattleFrontier_BattlePikeLobby_EventScript_25BA94 + call BattleFrontier_BattlePikeLobby_EventScript_WalkToCorridor special HealPlayerParty call BattleFrontier_BattlePike_EventScript_CloseCurtain warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 255, 6, 7 @@ -164,36 +162,36 @@ BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C waitstate end -BattleFrontier_BattlePikeLobby_EventScript_25BA1A:: @ 825BA1A - msgbox BattleFrontier_BattlePikeLobby_Text_25BBF5, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeLobby_EventScript_25B87F +BattleFrontier_BattlePikeLobby_EventScript_ExplainChallenge:: @ 825BA1A + msgbox BattleFrontier_BattlePikeLobby_Text_ExplainBattlePike, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeLobby_EventScript_AskTakeChallenge -BattleFrontier_BattlePikeLobby_EventScript_25BA27:: @ 825BA27 +BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons:: @ 825BA27 switch VAR_RESULT - case FRONTIER_LVL_50, BattleFrontier_BattlePikeLobby_EventScript_25BA42 - case FRONTIER_LVL_OPEN, BattleFrontier_BattlePikeLobby_EventScript_25BA4F + case FRONTIER_LVL_50, BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMonsLv50 + case FRONTIER_LVL_OPEN, BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMonsLvOpen -BattleFrontier_BattlePikeLobby_EventScript_25BA42:: @ 825BA42 - msgbox BattleFrontier_BattlePikeLobby_Text_25BE8C, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeLobby_EventScript_25BA7E +BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMonsLv50:: @ 825BA42 + msgbox BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge -BattleFrontier_BattlePikeLobby_EventScript_25BA4F:: @ 825BA4F - msgbox BattleFrontier_BattlePikeLobby_Text_25BF9A, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeLobby_EventScript_25BA7E +BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMonsLvOpen:: @ 825BA4F + msgbox BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge -BattleFrontier_BattlePikeLobby_EventScript_25BA5C:: @ 825BA5C +BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed:: @ 825BA5C frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - goto BattleFrontier_BattlePikeLobby_EventScript_25BA76 + goto BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge -BattleFrontier_BattlePikeLobby_EventScript_25BA73:: @ 825BA73 +BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge:: @ 825BA73 special LoadPlayerParty -BattleFrontier_BattlePikeLobby_EventScript_25BA76:: @ 825BA76 - msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, MSGBOX_DEFAULT -BattleFrontier_BattlePikeLobby_EventScript_25BA7E:: @ 825BA7E +BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge:: @ 825BA76 + msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT +BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge:: @ 825BA7E release end -BattleFrontier_BattlePikeLobby_EventScript_25BA80:: @ 825BA80 +BattleFrontier_BattlePikeLobby_EventScript_ShowResults:: @ 825BA80 lockall frontier_results FRONTIER_FACILITY_PIKE waitbuttonpress @@ -201,67 +199,66 @@ BattleFrontier_BattlePikeLobby_EventScript_25BA80:: @ 825BA80 releaseall end -BattleFrontier_BattlePikeLobby_EventScript_25BA94:: @ 825BA94 - applymovement 1, BattleFrontier_BattlePikeLobby_Movement_25BAA7 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeLobby_Movement_25BAA6 +BattleFrontier_BattlePikeLobby_EventScript_WalkToCorridor:: @ 825BA94 + applymovement 1, BattleFrontier_BattlePikeLobby_Movement_AttendantWalkToCorridor + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeLobby_Movement_PlayerWalkToCorridor waitmovement 0 return -BattleFrontier_BattlePikeLobby_Movement_25BAA6: @ 825BAA6 +BattleFrontier_BattlePikeLobby_Movement_PlayerWalkToCorridor: @ 825BAA6 walk_up - -BattleFrontier_BattlePikeLobby_Movement_25BAA7: @ 825BAA7 +BattleFrontier_BattlePikeLobby_Movement_AttendantWalkToCorridor: @ 825BAA7 walk_up walk_up set_invisible step_end -BattleFrontier_BattlePikeLobby_EventScript_25BAAB:: @ 825BAAB - msgbox BattleFrontier_BattlePikeLobby_Text_25C422, MSGBOX_NPC +BattleFrontier_BattlePikeLobby_EventScript_Hiker:: @ 825BAAB + msgbox BattleFrontier_BattlePikeLobby_Text_OneRoomAwayFromGoal, MSGBOX_NPC end -BattleFrontier_BattlePikeLobby_EventScript_25BAB4:: @ 825BAB4 - msgbox BattleFrontier_BattlePikeLobby_Text_25C4A5, MSGBOX_NPC +BattleFrontier_BattlePikeLobby_EventScript_Twin:: @ 825BAB4 + msgbox BattleFrontier_BattlePikeLobby_Text_NeverHadToBattleTrainer, MSGBOX_NPC end -BattleFrontier_BattlePikeLobby_EventScript_25BABD:: @ 825BABD - msgbox BattleFrontier_BattlePikeLobby_Text_25C4FD, MSGBOX_NPC +BattleFrontier_BattlePikeLobby_EventScript_Beauty:: @ 825BABD + msgbox BattleFrontier_BattlePikeLobby_Text_ThinkAbilitiesUsefulHere, MSGBOX_NPC end -BattleFrontier_BattlePikeLobby_EventScript_25BAC6:: @ 825BAC6 +BattleFrontier_BattlePikeLobby_EventScript_RulesBoard:: @ 825BAC6 lockall - msgbox BattleFrontier_BattlePikeLobby_Text_25C5FB, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeLobby_EventScript_25BAD5 + msgbox BattleFrontier_BattlePikeLobby_Text_RulesAreListed, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePikeLobby_EventScript_25BAD5:: @ 825BAD5 - message BattleFrontier_BattlePikeLobby_Text_25C621 +BattleFrontier_BattlePikeLobby_EventScript_ReadRulesBoard:: @ 825BAD5 + message BattleFrontier_BattlePikeLobby_Text_ReadWhichHeading waitmessage multichoice 16, 4, MULTI_BATTLE_PIKE_RULES, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePikeLobby_EventScript_25BB1D - case 1, BattleFrontier_BattlePikeLobby_EventScript_25BB2B - case 2, BattleFrontier_BattlePikeLobby_EventScript_25BB39 - case 3, BattleFrontier_BattlePikeLobby_EventScript_25BB47 - case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_25BB47 + case 0, BattleFrontier_BattlePikeLobby_EventScript_RulesPokenavBag + case 1, BattleFrontier_BattlePikeLobby_EventScript_RulesHeldItems + case 2, BattleFrontier_BattlePikeLobby_EventScript_RulesMonOrder + case 3, BattleFrontier_BattlePikeLobby_EventScript_ExitRules + case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_ExitRules end -BattleFrontier_BattlePikeLobby_EventScript_25BB1D:: @ 825BB1D - msgbox BattleFrontier_BattlePikeLobby_Text_25C644, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeLobby_EventScript_25BAD5 +BattleFrontier_BattlePikeLobby_EventScript_RulesPokenavBag:: @ 825BB1D + msgbox BattleFrontier_BattlePikeLobby_Text_ExplainPokenavBagRules, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePikeLobby_EventScript_25BB2B:: @ 825BB2B - msgbox BattleFrontier_BattlePikeLobby_Text_25C68A, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeLobby_EventScript_25BAD5 +BattleFrontier_BattlePikeLobby_EventScript_RulesHeldItems:: @ 825BB2B + msgbox BattleFrontier_BattlePikeLobby_Text_ExplainHeldItemRules, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePikeLobby_EventScript_25BB39:: @ 825BB39 - msgbox BattleFrontier_BattlePikeLobby_Text_25C6EB, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeLobby_EventScript_25BAD5 +BattleFrontier_BattlePikeLobby_EventScript_RulesMonOrder:: @ 825BB39 + msgbox BattleFrontier_BattlePikeLobby_Text_ExplainMonOrderRules, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePikeLobby_EventScript_25BB47:: @ 825BB47 +BattleFrontier_BattlePikeLobby_EventScript_ExitRules:: @ 825BB47 releaseall end @@ -272,17 +269,17 @@ BattleFrontier_BattlePike_EventScript_CloseCurtain:: @ 825BB49 waitse return -BattleFrontier_BattlePikeLobby_Text_25BB52: @ 825BB52 +BattleFrontier_BattlePikeLobby_Text_WelcomeToBattlePike: @ 825BB52 .string "Where the luck of TRAINERS\n" .string "is put to the test…\p" .string "Welcome to the BATTLE PIKE…\p" .string "I am your guide to the BATTLE PIKE…$" -BattleFrontier_BattlePikeLobby_Text_25BBC1: @ 825BBC1 +BattleFrontier_BattlePikeLobby_Text_TakeChallenge: @ 825BBC1 .string "Would you like to take the Battle\n" .string "Choice challenge?$" -BattleFrontier_BattlePikeLobby_Text_25BBF5: @ 825BBF5 +BattleFrontier_BattlePikeLobby_Text_ExplainBattlePike: @ 825BBF5 .string "Here we conduct an event we call\n" .string "the Battle Choice.\p" .string "The Battle Choice rules are very\n" @@ -301,16 +298,16 @@ BattleFrontier_BattlePikeLobby_Text_25BBF5: @ 825BBF5 .string "If you don't save before interrupting,\n" .string "you will be disqualified.$" -BattleFrontier_BattlePikeLobby_Text_25BE02: @ 825BE02 +BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou: @ 825BE02 .string "We look forward to seeing you\n" .string "on another occasion…$" -BattleFrontier_BattlePikeLobby_Text_25BE35: @ 825BE35 +BattleFrontier_BattlePikeLobby_Text_WhichChallengeMode: @ 825BE35 .string "You have the choice of two courses,\n" .string "Level 50 and Open Level.\l" .string "Which will you challenge?$" -BattleFrontier_BattlePikeLobby_Text_25BE8C: @ 825BE8C +BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLv50: @ 825BE8C .string "I beg your pardon, but…\p" .string "You do not have three eligible\n" .string "POKéMON for the Battle Choice event.\p" @@ -322,7 +319,7 @@ BattleFrontier_BattlePikeLobby_Text_25BE8C: @ 825BE8C .string "Please come see me when\n" .string "you are ready…$" -BattleFrontier_BattlePikeLobby_Text_25BF9A: @ 825BF9A +BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLvOpen: @ 825BF9A .string "I beg your pardon, but…\p" .string "You do not have three eligible\n" .string "POKéMON for the Battle Choice event.\p" @@ -334,98 +331,101 @@ BattleFrontier_BattlePikeLobby_Text_25BF9A: @ 825BF9A .string "Please come see me when\n" .string "you are ready…$" -BattleFrontier_BattlePikeLobby_Text_25C094: @ 825C094 +BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons: @ 825C094 .string "Please choose the three POKéMON\n" .string "you wish to enter in the challenge…$" -BattleFrontier_BattlePikeLobby_Text_25C0D8: @ 825C0D8 +BattleFrontier_BattlePikeLobby_Text_SaveBeforeChallenge: @ 825C0D8 .string "Before starting your Battle Choice\n" .string "challenge, I must save the game.\l" .string "Is that acceptable?$" -BattleFrontier_BattlePikeLobby_Text_25C130: @ 825C130 +BattleFrontier_BattlePikeLobby_Text_StepThisWay: @ 825C130 .string "Please step this way…$" -BattleFrontier_BattlePikeLobby_Text_25C146: @ 825C146 +BattleFrontier_BattlePikeLobby_Text_ChallengeEndedRecordResults: @ 825C146 .string "Your challenge has ended…\p" .string "I shall record your results.\n" .string "Please wait…$" -BattleFrontier_BattlePikeLobby_Text_25C18A: @ 825C18A +BattleFrontier_BattlePikeLobby_Text_PossessLuckInAbundance: @ 825C18A .string "You have completed the challenge…\p" .string "I must say… You seem to possess luck\n" .string "in abundance…$" -BattleFrontier_BattlePikeLobby_Text_25C1DF: @ 825C1DF +BattleFrontier_BattlePikeLobby_Text_ShallRecordResults: @ 825C1DF .string "I shall record your results.\n" .string "Please wait…$" -BattleFrontier_BattlePikeLobby_Text_25C209: @ 825C209 +@ Unused +BattleFrontier_BattlePikeLobby_Text_AwardYouTheseBattlePoints2: @ 825C209 .string "To commemorate your completion of\n" .string "the Battle Choice challenge, we award\l" .string "you these Battle Point(s)…$" -BattleFrontier_BattlePikeLobby_Text_25C26C: @ 825C26C +@ Unused +BattleFrontier_BattlePikeLobby_Text_ReachedBattlePointLimit: @ 825C26C .string "You appear to have reached the limit\n" .string "for Battle Points…\pPlease exchange some Battle Points\n" .string "for prizes, then return…$" -BattleFrontier_BattlePikeLobby_Text_25C2E0: @ 825C2E0 +BattleFrontier_BattlePikeLobby_Text_FailedToSaveBeforeQuitting: @ 825C2E0 .string "I beg your pardon, but…\p" .string "You failed to save before you quit\n" .string "your challenge the last time.\p" .string "Because of that, your challenge so far\n" .string "has been disqualified. I am sorry…$" -BattleFrontier_BattlePikeLobby_Text_25C383: @ 825C383 +BattleFrontier_BattlePikeLobby_Text_SnatchedVictoryFromQueen: @ 825C383 .string "Congratulations…\p" .string "You have snatched victory from the\n" .string "PIKE QUEEN and cleared the event…$" -BattleFrontier_BattlePikeLobby_Text_25C3D9: @ 825C3D9 +BattleFrontier_BattlePikeLobby_Text_AwardYouTheseBattlePoints: @ 825C3D9 .string "In recognition of your amazing luck,\n" .string "we award you these Battle Point(s)…$" -BattleFrontier_BattlePikeLobby_Text_25C422: @ 825C422 +BattleFrontier_BattlePikeLobby_Text_OneRoomAwayFromGoal: @ 825C422 .string "Arrgh! I blew my chance!\n" .string "I was one room away from the goal!\p" .string "In this place, you'd better watch out\n" .string "for poison, freezing, and so on.$" -BattleFrontier_BattlePikeLobby_Text_25C4A5: @ 825C4A5 +BattleFrontier_BattlePikeLobby_Text_NeverHadToBattleTrainer: @ 825C4A5 .string "I've completed the challenge 10 times\n" .string "now, but I've never had to battle\l" .string "a TRAINER once.$" -BattleFrontier_BattlePikeLobby_Text_25C4FD: @ 825C4FD +BattleFrontier_BattlePikeLobby_Text_ThinkAbilitiesUsefulHere: @ 825C4FD .string "Listen! Listen!\p" .string "Don't you think that the special\n" .string "abilities of POKéMON will be useful\l" .string "here?$" -BattleFrontier_BattlePikeLobby_Text_25C558: @ 825C558 +@ Unused +BattleFrontier_BattlePikeLobby_Text_TrainersWhicheverPathIChoose: @ 825C558 .string "What is this weird place?\n" .string "I can't figure it out at all!\p" .string "I've taken the challenge a bunch\n" .string "of times, but all I ever do is run into\l" .string "TRAINERS whichever path I choose.$" -BattleFrontier_BattlePikeLobby_Text_25C5FB: @ 825C5FB +BattleFrontier_BattlePikeLobby_Text_RulesAreListed: @ 825C5FB .string "The Battle Choice's rules are listed.$" -BattleFrontier_BattlePikeLobby_Text_25C621: @ 825C621 +BattleFrontier_BattlePikeLobby_Text_ReadWhichHeading: @ 825C621 .string "Which heading do you want to read?$" -BattleFrontier_BattlePikeLobby_Text_25C644: @ 825C644 +BattleFrontier_BattlePikeLobby_Text_ExplainPokenavBagRules: @ 825C644 .string "The BAG and POKéNAV may not be used\n" .string "during a Battle Choice challenge.$" -BattleFrontier_BattlePikeLobby_Text_25C68A: @ 825C68A +BattleFrontier_BattlePikeLobby_Text_ExplainHeldItemRules: @ 825C68A .string "During a Battle Choice challenge,\n" .string "any BERRY or HERB held by POKéMON\l" .string "will be effective only once.$" -BattleFrontier_BattlePikeLobby_Text_25C6EB: @ 825C6EB +BattleFrontier_BattlePikeLobby_Text_ExplainMonOrderRules: @ 825C6EB .string "During a Battle Choice challenge,\n" .string "the sequence of POKéMON cannot be\l" .string "changed.\p" diff --git a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc index 2eaaa20b4..d547a200f 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc @@ -4,12 +4,12 @@ BattleFrontier_BattlePikeRoomFinal_MapScripts:: @ 825E392 .byte 0 BattleFrontier_BattlePikeRoomFinal_OnFrame: @ 825E39D - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeRoomFinal_EventScript_25E3A7 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeRoomFinal_EventScript_EnterRoom .2byte 0 -BattleFrontier_BattlePikeRoomFinal_EventScript_25E3A7:: @ 825E3A7 +BattleFrontier_BattlePikeRoomFinal_EventScript_EnterRoom:: @ 825E3A7 delay 16 - applymovement 1, BattleFrontier_BattlePikeRoomFinal_Movement_25E3DB + applymovement 1, BattleFrontier_BattlePikeRoomFinal_Movement_AttendantApproachPlayer waitmovement 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON lockall @@ -20,7 +20,7 @@ BattleFrontier_BattlePikeRoomFinal_EventScript_25E3A7:: @ 825E3A7 waitstate end -BattleFrontier_BattlePikeRoomFinal_Movement_25E3DB: @ 825E3DB +BattleFrontier_BattlePikeRoomFinal_Movement_AttendantApproachPlayer: @ 825E3DB walk_down walk_down step_end diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json b/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json index 6eef87962..4413e35f3 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_25D7ED", + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_NPC", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_25D88D", + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_StatusMon", "flag": "0" } ], @@ -59,7 +59,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_2C4082" + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -68,7 +68,7 @@ "elevation": 3, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_2C408D" + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack" }, { "type": "trigger", @@ -77,7 +77,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_2C4082" + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -86,7 +86,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_2C4082" + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -95,7 +95,7 @@ "elevation": 3, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_2C408D" + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack" }, { "type": "trigger", @@ -104,7 +104,7 @@ "elevation": 3, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_2C408D" + "script": "BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack" } ], "bg_events": [] diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 5419eb081..184bf9324 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -6,25 +6,25 @@ BattleFrontier_BattlePikeRoomNormal_MapScripts:: @ 825D152 .byte 0 BattleFrontier_BattlePikeRoomNormal_OnFrame: @ 825D167 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_25D171 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom .2byte 0 -BattleFrontier_BattlePikeRoomNormal_EventScript_25D171:: @ 825D171 +BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom:: @ 825D171 setvar VAR_TEMP_0, 1 pike_getroomtype switch VAR_RESULT - case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_25D1C6 - case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_25D50E - case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_25D605 - case PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_25D231 - case PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_25D53E - case PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_25D2BF + case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterSingleBattleRoom + case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterFullHealRoom + case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterStatusRoom + case PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterHardBattleRoom + case PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterDoubleBattleRoom + case PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterBrainRoom end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D1C6:: @ 825D1C6 +BattleFrontier_BattlePikeRoomNormal_EventScript_EnterSingleBattleRoom:: @ 825D1C6 lockall delay 16 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D795 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer waitmovement 0 pike_gettrainerintro 0 msgbox gStringVar4, MSGBOX_DEFAULT @@ -36,25 +36,25 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D1C6:: @ 825D1C6 special DoSpecialTrainerBattle waitstate switch VAR_RESULT - case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D226 -BattleFrontier_BattlePikeRoomNormal_EventScript_25D20A:: @ 825D20A + case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WonSingleBattle +BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost:: @ 825D20A frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 waitstate end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D226:: @ 825D226 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D798 +BattleFrontier_BattlePikeRoomNormal_EventScript_WonSingleBattle:: @ 825D226 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D231:: @ 825D231 +BattleFrontier_BattlePikeRoomNormal_EventScript_EnterHardBattleRoom:: @ 825D231 lockall delay 16 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DDFE, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_BattleSomewhatToughTrainer, MSGBOX_DEFAULT waitmessage closemessage - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D795 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer waitmovement 0 pike_gettrainerintro 0 msgbox gStringVar4, MSGBOX_DEFAULT @@ -66,131 +66,131 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D231:: @ 825D231 special DoSpecialTrainerBattle waitstate switch VAR_RESULT - case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D285 - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D20A + case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WonHardBattle + goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D285:: @ 825D285 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D798 +BattleFrontier_BattlePikeRoomNormal_EventScript_WonHardBattle:: @ 825D285 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7B6 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCApproachPlayer waitmovement 0 lock faceplayer - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DE3F, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_RestoreToFullHealth, MSGBOX_DEFAULT playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DE94, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_EnjoyRestOfChallenge2, MSGBOX_DEFAULT closemessage release - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D798 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D2BF:: @ 825D2BF +BattleFrontier_BattlePikeRoomNormal_EventScript_EnterBrainRoom:: @ 825D2BF delay 22 lockall - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7DF + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_PreQueenHealNPCApproachPlayer waitmovement 0 pike_prequeenheal switch VAR_RESULT - case 0, BattleFrontier_BattlePikeRoomNormal_EventScript_25D4DC - case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D4EA - case 2, BattleFrontier_BattlePikeRoomNormal_EventScript_25D4FC + case 0, BattleFrontier_BattlePikeRoomNormal_EventScript_PreQueenNoHeal + case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_PreQueenHealOneMon + case 2, BattleFrontier_BattlePikeRoomNormal_EventScript_PreQueenHealTwoMons -BattleFrontier_BattlePikeRoomNormal_EventScript_25D2FB:: @ 825D2FB - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E311, MSGBOX_DEFAULT +BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter:: @ 825D2FB + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ShallFetchOurMaster, MSGBOX_DEFAULT closemessage special SpawnCameraObject - applymovement EVENT_OBJ_ID_CAMERA, BattleFrontier_BattlePikeRoomNormal_Movement_25D9B0 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7E2 + applymovement EVENT_OBJ_ID_CAMERA, BattleFrontier_BattlePikeRoomNormal_Movement_CameraPanUp + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExitForLucy waitmovement 0 playse SE_CURTAIN - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8E7 + call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed delay 4 - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4 + call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesMostlyClosed delay 4 - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D96D + call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesClosed delay 4 waitse delay 60 playse SE_CURTAIN1 delay 65 - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4 + call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesMostlyClosed showobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL delay 4 - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D8E7 + call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed delay 4 - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D92A + call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesOpen waitse - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7E7 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_LucyEnter waitmovement 0 pike_getbrainstatus switch VAR_RESULT - case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePikeRoomNormal_EventScript_25D416 - case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePikeRoomNormal_EventScript_25D3BD - case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePikeRoomNormal_EventScript_25D443 + case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePikeRoomNormal_EventScript_IntroLucyGold + case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver + case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_25D3BD - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DED2, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ImThePikeQueen, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH -BattleFrontier_BattlePikeRoomNormal_EventScript_25D3BD:: @ 825D3BD - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DF71, MSGBOX_DEFAULT - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D77B +BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver:: @ 825D3BD + msgbox BattleFrontier_BattlePikeRoomNormal_Text_HopeYouDidntUseUpLuck, MSGBOX_DEFAULT + call BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D3DA - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D20A + goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver + goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost -BattleFrontier_BattlePikeRoomNormal_EventScript_25D3DA:: @ 825D3DA +BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver:: @ 825D3DA frontier_getsymbols compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_25D49D - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DFA2, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy + msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyShowMeFrontierPass, MSGBOX_DEFAULT waitmessage playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattlePikeRoomNormal_Text_25DFD0 + message BattleFrontier_BattlePikeRoomNormal_Text_ReceivedLuckSymbol waitmessage waitfanfare frontier_givesymbol - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E003, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_AllThereIsDisappear, MSGBOX_DEFAULT closemessage - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D49D + goto BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy -BattleFrontier_BattlePikeRoomNormal_EventScript_25D416:: @ 825D416 +BattleFrontier_BattlePikeRoomNormal_EventScript_IntroLucyGold:: @ 825D416 frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_25D443 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E02C, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold + msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyYouAgain, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH -BattleFrontier_BattlePikeRoomNormal_EventScript_25D443:: @ 825D443 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E0E8, MSGBOX_DEFAULT - call BattleFrontier_BattlePikeRoomNormal_EventScript_25D77B +BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold:: @ 825D443 + msgbox BattleFrontier_BattlePikeRoomNormal_Text_NowComeOn, MSGBOX_DEFAULT + call BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D460 - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D20A + goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold + goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost -BattleFrontier_BattlePikeRoomNormal_EventScript_25D460:: @ 825D460 +BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold:: @ 825D460 frontier_getsymbols compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D49D - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E0F6, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy + msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyFrontierPass, MSGBOX_DEFAULT waitmessage playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattlePikeRoomNormal_Text_25E118 + message BattleFrontier_BattlePikeRoomNormal_Text_LuckSymbolTookGoldenShine waitmessage waitfanfare frontier_givesymbol - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E140, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_IWontForget, MSGBOX_DEFAULT closemessage - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D49D + goto BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D49D:: @ 825D49D - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7EA +BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy:: @ 825D49D + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_LucyMoveAside waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7DC + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerWalkUp2 waitmovement 0 pike_get PIKE_DATA_WIN_STREAK addvar VAR_RESULT, 1 @@ -199,61 +199,61 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D49D:: @ 825D49D waitstate end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D4DC:: @ 825D4DC - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E15D, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D2FB +BattleFrontier_BattlePikeRoomNormal_EventScript_PreQueenNoHeal:: @ 825D4DC + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ChoseRoomNoHeal, MSGBOX_DEFAULT + goto BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D4EA:: @ 825D4EA - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E1DD, MSGBOX_DEFAULT +BattleFrontier_BattlePikeRoomNormal_EventScript_PreQueenHealOneMon:: @ 825D4EA + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ChoseRoomHealOne, MSGBOX_DEFAULT playfanfare MUS_ME_ASA waitfanfare - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D2FB + goto BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D4FC:: @ 825D4FC - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E238, MSGBOX_DEFAULT +BattleFrontier_BattlePikeRoomNormal_EventScript_PreQueenHealTwoMons:: @ 825D4FC + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ChoseRoomHealTwo, MSGBOX_DEFAULT playfanfare MUS_ME_ASA waitfanfare - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D2FB + goto BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D50E:: @ 825D50E +BattleFrontier_BattlePikeRoomNormal_EventScript_EnterFullHealRoom:: @ 825D50E lockall delay 16 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D795 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer waitmovement 0 - message BattleFrontier_BattlePikeRoomNormal_Text_25D9B6 + message BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreToFullHealth waitmessage playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DA13, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_EnjoyRestOfChallenge, MSGBOX_DEFAULT closemessage - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D798 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 releaseall end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D53E:: @ 825D53E +BattleFrontier_BattlePikeRoomNormal_EventScript_EnterDoubleBattleRoom:: @ 825D53E lockall delay 16 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7C1 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7C3 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1WalkRight + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2WalkLeft waitmovement 0 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7C5 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7C5 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_DoubleTrainersWalkDown + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_DoubleTrainersWalkDown waitmovement 0 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7C8 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7CA + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1FacePlayer + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2FacePlayer waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BB + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer1 waitmovement 0 pike_gettrainerintro 0 msgbox gStringVar4, MSGBOX_DEFAULT closemessage delay 16 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BD + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer2 waitmovement 0 pike_gettrainerintro 1 msgbox gStringVar4, MSGBOX_DEFAULT @@ -263,136 +263,136 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D53E:: @ 825D53E special DoSpecialTrainerBattle waitstate switch VAR_RESULT - case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_25D5DC - goto BattleFrontier_BattlePikeRoomNormal_EventScript_25D20A + case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WonDoubleBattle + goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D5DC:: @ 825D5DC - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BD +BattleFrontier_BattlePikeRoomNormal_EventScript_WonDoubleBattle:: @ 825D5DC + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer2 waitmovement 0 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7CC + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1Exit waitmovement 0 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7D4 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2Exit waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7BF + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceUp waitmovement 0 end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D605:: @ 825D605 +BattleFrontier_BattlePikeRoomNormal_EventScript_EnterStatusRoom:: @ 825D605 lockall - message BattleFrontier_BattlePikeRoomNormal_Text_25DBD1 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7AA + message BattleFrontier_BattlePikeRoomNormal_Text_WatchOut + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_MonApproachPlayer waitmovement 0 pike_getstatusmon copyvar VAR_0x8004, VAR_RESULT - compare VAR_0x8004, PIKE_STATUS_KIRLIA - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D643 - compare VAR_0x8004, PIKE_STATUS_DUSCLOPS - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D6D5 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DD3F, MSGBOX_DEFAULT + compare VAR_0x8004, PIKE_STATUSMON_KIRLIA + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack + compare VAR_0x8004, PIKE_STATUSMON_DUSCLOPS + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack + msgbox BattleFrontier_BattlePikeRoomNormal_Text_AttacksWhenStartled, MSGBOX_DEFAULT closemessage releaseall end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D643:: @ 825D643 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DBE4, MSGBOX_DEFAULT +BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack:: @ 825D643 + msgbox BattleFrontier_BattlePikeRoomNormal_Text_KirliaStop, MSGBOX_DEFAULT closemessage waitse playmoncry SPECIES_KIRLIA, 0 waitmoncry pike_getstatus compare VAR_RESULT, PIKE_STATUS_TOXIC - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D751 + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedToxic compare VAR_RESULT, PIKE_STATUS_BURN - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D758 + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedWillOWisp compare VAR_RESULT, PIKE_STATUS_PARALYSIS - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D75F + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedThunderWave compare VAR_RESULT, PIKE_STATUS_SLEEP - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D766 - pike_fadescreen + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedHypnosis + pike_flashscreen waitstate - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A2 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon waitmovement 0 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7B1 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC waitmovement 0 waitse playmoncry SPECIES_KIRLIA, 0 waitmoncry - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DCAF, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ThatsEnough, MSGBOX_DEFAULT waitse playmoncry SPECIES_KIRLIA, 0 waitmoncry closemessage - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7B3 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A4 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_StatusNPCApproachPlayer waitmovement 0 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DCCF, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ApologizeForKirlia, MSGBOX_DEFAULT return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D6D5:: @ 825D6D5 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DC01, MSGBOX_DEFAULT +BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack:: @ 825D6D5 + msgbox BattleFrontier_BattlePikeRoomNormal_Text_DusclopsStop, MSGBOX_DEFAULT closemessage waitse playmoncry SPECIES_DUSCLOPS, 0 waitmoncry pike_getstatus compare VAR_RESULT, PIKE_STATUS_FREEZE - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D76D + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedIceBeam compare VAR_RESULT, PIKE_STATUS_BURN - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D774 - pike_fadescreen + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp + pike_flashscreen waitstate - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A2 + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon waitmovement 0 - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7B1 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC waitmovement 0 waitse playmoncry SPECIES_DUSCLOPS, 0 waitmoncry - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DCAF, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ThatsEnough, MSGBOX_DEFAULT waitse playmoncry SPECIES_DUSCLOPS, 0 waitmoncry closemessage - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7B3 - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D7A4 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_StatusNPCApproachPlayer waitmovement 0 - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DD06, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ApologizeForDusclops, MSGBOX_DEFAULT return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D751:: @ 825D751 - message BattleFrontier_BattlePikeRoomNormal_Text_25DC20 +BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedToxic:: @ 825D751 + message BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedToxic waitmessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D758:: @ 825D758 - message BattleFrontier_BattlePikeRoomNormal_Text_25DC63 +BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedWillOWisp:: @ 825D758 + message BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedWillOWisp waitmessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D75F:: @ 825D75F - message BattleFrontier_BattlePikeRoomNormal_Text_25DC49 +BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedThunderWave:: @ 825D75F + message BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedThunderWave waitmessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D766:: @ 825D766 - message BattleFrontier_BattlePikeRoomNormal_Text_25DC33 +BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedHypnosis:: @ 825D766 + message BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedHypnosis waitmessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D76D:: @ 825D76D - message BattleFrontier_BattlePikeRoomNormal_Text_25DC97 +BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedIceBeam:: @ 825D76D + message BattleFrontier_BattlePikeRoomNormal_Text_DusclopsUsedIceBeam waitmessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D774:: @ 825D774 - message BattleFrontier_BattlePikeRoomNormal_Text_25DC7C +BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp:: @ 825D774 + message BattleFrontier_BattlePikeRoomNormal_Text_DusclopsUsedWillOWisp waitmessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D77B:: @ 825D77B +BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle:: @ 825D77B closemessage - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_25D7DC + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerWalkUp2 waitmovement 0 setvar VAR_0x8004, SPECIAL_BATTLE_PIKE_SINGLE setvar VAR_0x8005, 0 @@ -400,12 +400,12 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D77B:: @ 825D77B waitstate return -BattleFrontier_BattlePikeRoomNormal_Movement_25D795: @ 825D795 +BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer: @ 825D795 walk_down walk_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D798: @ 825D798 +BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit: @ 825D798 walk_up walk_up walk_up @@ -413,17 +413,17 @@ BattleFrontier_BattlePikeRoomNormal_Movement_25D798: @ 825D798 walk_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D79E: @ 825D79E +BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExit: @ 825D79E walk_up set_invisible walk_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7A2: @ 825D7A2 +BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon: @ 825D7A2 walk_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7A4: @ 825D7A4 +BattleFrontier_BattlePikeRoomNormal_Movement_StatusNPCApproachPlayer: @ 825D7A4 walk_down face_left delay_16 @@ -431,7 +431,7 @@ BattleFrontier_BattlePikeRoomNormal_Movement_25D7A4: @ 825D7A4 face_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7AA: @ 825D7AA +BattleFrontier_BattlePikeRoomNormal_Movement_MonApproachPlayer: @ 825D7AA walk_fast_down walk_fast_right walk_fast_right @@ -440,58 +440,57 @@ BattleFrontier_BattlePikeRoomNormal_Movement_25D7AA: @ 825D7AA face_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7B1: @ 825D7B1 +BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC: @ 825D7B1 face_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7B3: @ 825D7B3 +BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside: @ 825D7B3 walk_left - -BattleFrontier_BattlePikeRoomNormal_Movement_25D7B4: @ 825D7B4 +BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceRight: @ 825D7B4 face_right step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7B6: @ 825D7B6 +BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCApproachPlayer: @ 825D7B6 walk_down walk_down walk_right face_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7BB: @ 825D7BB +BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer1: @ 825D7BB face_left step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7BD: @ 825D7BD +BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer2: @ 825D7BD face_right step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7BF: @ 825D7BF +BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceUp: @ 825D7BF face_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7C1: @ 825D7C1 +BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1WalkRight: @ 825D7C1 walk_right step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7C3: @ 825D7C3 +BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2WalkLeft: @ 825D7C3 walk_left step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7C5: @ 825D7C5 +BattleFrontier_BattlePikeRoomNormal_Movement_DoubleTrainersWalkDown: @ 825D7C5 walk_down walk_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7C8: @ 825D7C8 +BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1FacePlayer: @ 825D7C8 face_right step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7CA: @ 825D7CA +BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2FacePlayer: @ 825D7CA face_left step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7CC: @ 825D7CC +BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1Exit: @ 825D7CC walk_up walk_up walk_up @@ -501,7 +500,7 @@ BattleFrontier_BattlePikeRoomNormal_Movement_25D7CC: @ 825D7CC walk_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7D4: @ 825D7D4 +BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2Exit: @ 825D7D4 walk_up walk_up walk_up @@ -511,40 +510,41 @@ BattleFrontier_BattlePikeRoomNormal_Movement_25D7D4: @ 825D7D4 walk_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7DC: @ 825D7DC +@ For approaching Lucy and exiting room after defeating Lucy +BattleFrontier_BattlePikeRoomNormal_Movement_PlayerWalkUp2: @ 825D7DC walk_up walk_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7DF: @ 825D7DF +BattleFrontier_BattlePikeRoomNormal_Movement_PreQueenHealNPCApproachPlayer: @ 825D7DF walk_down walk_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7E2: @ 825D7E2 +BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExitForLucy: @ 825D7E2 walk_up walk_up walk_up set_invisible step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7E7: @ 825D7E7 +BattleFrontier_BattlePikeRoomNormal_Movement_LucyEnter: @ 825D7E7 set_visible walk_down step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D7EA: @ 825D7EA +BattleFrontier_BattlePikeRoomNormal_Movement_LucyMoveAside: @ 825D7EA walk_left face_right step_end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D7ED:: @ 825D7ED +BattleFrontier_BattlePikeRoomNormal_EventScript_NPC:: @ 825D7ED pike_getroomtype switch VAR_RESULT - case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_25D81B - case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_25D831 - case PIKE_ROOM_HEAL_PART, BattleFrontier_BattlePikeRoomNormal_EventScript_25D83E -BattleFrontier_BattlePikeRoomNormal_EventScript_25D81B:: @ 825D81B + case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_NormalNPC + case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_StatusNPC + case PIKE_ROOM_HEAL_PART, BattleFrontier_BattlePikeRoomNormal_EventScript_HealNPC +BattleFrontier_BattlePikeRoomNormal_EventScript_NormalNPC:: @ 825D81B lock faceplayer pike_getnpcmsg @@ -554,54 +554,55 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D81B:: @ 825D81B release end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D831:: @ 825D831 +BattleFrontier_BattlePikeRoomNormal_EventScript_StatusNPC:: @ 825D831 lock faceplayer - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DDA3, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_ApologizeHopeMonsAreFine, MSGBOX_DEFAULT closemessage release end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D83E:: @ 825D83E +BattleFrontier_BattlePikeRoomNormal_EventScript_HealNPC:: @ 825D83E pike_healonetwomons compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D881 + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreTwoMons compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_25D875 + call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreOneMon playfanfare MUS_ME_ASA waitfanfare - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DABE, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_BestOfLuckFarewell, MSGBOX_DEFAULT closemessage release - applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_25D79E + applymovement 1, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExit waitmovement 0 end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D875:: @ 825D875 +BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreOneMon:: @ 825D875 lock faceplayer - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DA51, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreOneMon, MSGBOX_DEFAULT closemessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D881:: @ 825D881 +BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreTwoMons:: @ 825D881 lock faceplayer - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25E32E, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreTwoMons, MSGBOX_DEFAULT closemessage return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D88D:: @ 825D88D +@ Dusclops or Kirlia +BattleFrontier_BattlePikeRoomNormal_EventScript_StatusMon:: @ 825D88D lock faceplayer - msgbox BattleFrontier_BattlePikeRoomNormal_Text_25DDE6, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePikeRoomNormal_Text_Silence, MSGBOX_DEFAULT closemessage release - applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_25D7B4 + applymovement 2, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceRight waitmovement 0 end -BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4:: @ 825D8A4 +BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesMostlyClosed:: @ 825D8A4 setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, 1 setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, 1 setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, 1 @@ -612,7 +613,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D8A4:: @ 825D8A4 special DrawWholeMapView return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D8E7:: @ 825D8E7 +BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed:: @ 825D8E7 setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, 1 setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, 1 setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, 1 @@ -623,7 +624,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D8E7:: @ 825D8E7 special DrawWholeMapView return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D92A:: @ 825D92A +BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesOpen:: @ 825D92A setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, 1 setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, 1 setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, 1 @@ -634,7 +635,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D92A:: @ 825D92A special DrawWholeMapView return -BattleFrontier_BattlePikeRoomNormal_EventScript_25D96D:: @ 825D96D +BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesClosed:: @ 825D96D setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, 1 setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, 1 setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, 1 @@ -645,128 +646,136 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_25D96D:: @ 825D96D special DrawWholeMapView return -BattleFrontier_BattlePikeRoomNormal_Movement_25D9B0: @ 825D9B0 +BattleFrontier_BattlePikeRoomNormal_Movement_CameraPanUp: @ 825D9B0 walk_up walk_up step_end -BattleFrontier_BattlePikeRoomNormal_Movement_25D9B3: @ 825D9B3 +@ Unused +BattleFrontier_BattlePikeRoomNormal_Movement_CameraPanDown: @ 825D9B3 walk_down walk_down step_end -BattleFrontier_BattlePikeRoomNormal_Text_25D9B6: @ 825D9B6 +BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreToFullHealth: @ 825D9B6 .string "Welcome…\n" .string "You must be commended for your luck…\p" .string "Your POKéMON shall be restored\n" .string "to full health…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DA13: @ 825DA13 +BattleFrontier_BattlePikeRoomNormal_Text_EnjoyRestOfChallenge: @ 825DA13 .string "I urge you to enjoy the rest of your\n" .string "Battle Choice challenge…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DA51: @ 825DA51 +BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreOneMon: @ 825DA51 .string "Ah, you're a lucky one.\n" .string "I'm in somewhat-good spirits now.\p" .string "I will restore one of your POKéMON\n" .string "to full health.$" -BattleFrontier_BattlePikeRoomNormal_Text_25DABE: @ 825DABE +BattleFrontier_BattlePikeRoomNormal_Text_BestOfLuckFarewell: @ 825DABE .string "The best of luck to you.\n" .string "Farewell.$" -BattleFrontier_BattlePikeRoomNormal_Text_25DAE1: @ 825DAE1 +@ Seems there was a planned room type where the player could choose to battle and would be healed if they won +@ Possibly replaced/superseded by the hard battle room, which is the same but the battle isnt optional +@ Unused +BattleFrontier_BattlePikeRoomNormal_Text_CareForBattleWillRestoreMons: @ 825DAE1 .string "Excuse me…\p" .string "Would you care for a battle?\n" .string "I'll restore your POKéMON if you win.$" -BattleFrontier_BattlePikeRoomNormal_Text_25DB2F: @ 825DB2F +@ Unused +BattleFrontier_BattlePikeRoomNormal_Text_NowShallWe: @ 825DB2F .string "Very well…\n" .string "Now, shall we?$" -BattleFrontier_BattlePikeRoomNormal_Text_25DB49: @ 825DB49 +@ Unused +BattleFrontier_BattlePikeRoomNormal_Text_HowUnsportingOfYou: @ 825DB49 .string "I see…\n" .string "How unsporting of you…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DB67: @ 825DB67 +@ Unused +BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreMonsAsPromised: @ 825DB67 .string "Magnificent…\p" .string "As promised, I shall restore your\n" .string "POKéMON to full health.$" -BattleFrontier_BattlePikeRoomNormal_Text_25DBAE: @ 825DBAE +@ Unused +BattleFrontier_BattlePikeRoomNormal_Text_BestOfLuckFarewell2: @ 825DBAE .string "The best of luck to you.\n" .string "Farewell.$" -BattleFrontier_BattlePikeRoomNormal_Text_25DBD1: @ 825DBD1 +BattleFrontier_BattlePikeRoomNormal_Text_WatchOut: @ 825DBD1 .string "Oh, my!\p" .string "Watch out!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DBE4: @ 825DBE4 +BattleFrontier_BattlePikeRoomNormal_Text_KirliaStop: @ 825DBE4 .string "Now, now!\n" .string "KIRLIA, stop that!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DC01: @ 825DC01 +BattleFrontier_BattlePikeRoomNormal_Text_DusclopsStop: @ 825DC01 .string "Now, now!\n" .string "DUSCLOPS, stop that!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DC20: @ 825DC20 +BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedToxic: @ 825DC20 .string "KIRLIA used TOXIC!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DC33: @ 825DC33 +BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedHypnosis: @ 825DC33 .string "KIRLIA used HYPNOSIS!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DC49: @ 825DC49 +BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedThunderWave: @ 825DC49 .string "KIRLIA used THUNDER WAVE!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DC63: @ 825DC63 +BattleFrontier_BattlePikeRoomNormal_Text_KirliaUsedWillOWisp: @ 825DC63 .string "KIRLIA used WILL-O-WISP!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DC7C: @ 825DC7C +BattleFrontier_BattlePikeRoomNormal_Text_DusclopsUsedWillOWisp: @ 825DC7C .string "DUSCLOPS used WILL-O-WISP!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DC97: @ 825DC97 +BattleFrontier_BattlePikeRoomNormal_Text_DusclopsUsedIceBeam: @ 825DC97 .string "DUSCLOPS used ICE BEAM!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DCAF: @ 825DCAF +BattleFrontier_BattlePikeRoomNormal_Text_ThatsEnough: @ 825DCAF .string "Look here!\n" .string "That's quite enough!$" -BattleFrontier_BattlePikeRoomNormal_Text_25DCCF: @ 825DCCF +BattleFrontier_BattlePikeRoomNormal_Text_ApologizeForKirlia: @ 825DCCF .string "I must apologize to you…\p" .string "My KIRLIA has a TIMID nature…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DD06: @ 825DD06 +BattleFrontier_BattlePikeRoomNormal_Text_ApologizeForDusclops: @ 825DD06 .string "I must apologize to you…\p" .string "My DUSCLOPS has a TIMID nature…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DD3F: @ 825DD3F +BattleFrontier_BattlePikeRoomNormal_Text_AttacksWhenStartled: @ 825DD3F .string "It attacks without warning if it is\n" .string "startled by another person…\p" .string "Are you and your POKéMON all right?$" -BattleFrontier_BattlePikeRoomNormal_Text_25DDA3: @ 825DDA3 +BattleFrontier_BattlePikeRoomNormal_Text_ApologizeHopeMonsAreFine: @ 825DDA3 .string "I do apologize for what happened…\n" .string "I do hope your POKéMON are fine.$" -BattleFrontier_BattlePikeRoomNormal_Text_25DDE6: @ 825DDE6 +BattleFrontier_BattlePikeRoomNormal_Text_Silence: @ 825DDE6 .string "… … … … … …\n" .string "… … … … … …$" -BattleFrontier_BattlePikeRoomNormal_Text_25DDFE: @ 825DDFE +BattleFrontier_BattlePikeRoomNormal_Text_BattleSomewhatToughTrainer: @ 825DDFE .string "Welcome…\p" .string "Here, we will have you battle\n" .string "a somewhat-tough TRAINER…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DE3F: @ 825DE3F +BattleFrontier_BattlePikeRoomNormal_Text_RestoreToFullHealth: @ 825DE3F .string "How wonderful…\p" .string "To honor your victory, your POKéMON\n" .string "shall be restored to full health…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DE94: @ 825DE94 +BattleFrontier_BattlePikeRoomNormal_Text_EnjoyRestOfChallenge2: @ 825DE94 .string "I urge you to enjoy the rest of your\n" .string "Battle Choice challenge…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DED2: @ 825DED2 +BattleFrontier_BattlePikeRoomNormal_Text_ImThePikeQueen: @ 825DED2 .string "I am LUCY…\n" .string "I am the law here…\l" .string "For I am the PIKE QUEEN…\p" @@ -775,23 +784,23 @@ BattleFrontier_BattlePikeRoomNormal_Text_25DED2: @ 825DED2 .string "…I'm not one for idle chatter.\n" .string "Hurry. Come on…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DF71: @ 825DF71 +BattleFrontier_BattlePikeRoomNormal_Text_HopeYouDidntUseUpLuck: @ 825DF71 .string "Your luck…\n" .string "I hope you didn't use it all up here…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DFA2: @ 825DFA2 +BattleFrontier_BattlePikeRoomNormal_Text_LucyShowMeFrontierPass: @ 825DFA2 .string "LUCY: … … … … … …\n" .string "Show me your FRONTIER PASS…$" -BattleFrontier_BattlePikeRoomNormal_Text_25DFD0: @ 825DFD0 +BattleFrontier_BattlePikeRoomNormal_Text_ReceivedLuckSymbol: @ 825DFD0 .string "The Luck Symbol was embossed on\n" .string "the FRONTIER PASS!$" -BattleFrontier_BattlePikeRoomNormal_Text_25E003: @ 825E003 +BattleFrontier_BattlePikeRoomNormal_Text_AllThereIsDisappear: @ 825E003 .string "…That's all there is…\n" .string "Disappear already…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E02C: @ 825E02C +BattleFrontier_BattlePikeRoomNormal_Text_LucyYouAgain: @ 825E02C .string "LUCY: …You again…\p" .string "… … … … … …\p" .string "…I've trampled flowers and braved\n" @@ -801,50 +810,51 @@ BattleFrontier_BattlePikeRoomNormal_Text_25E02C: @ 825E02C .string "… … … … … …\n" .string "Fine… I'll do it…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E0E8: @ 825E0E8 +BattleFrontier_BattlePikeRoomNormal_Text_NowComeOn: @ 825E0E8 .string "Now!\n" .string "Come on!$" -BattleFrontier_BattlePikeRoomNormal_Text_25E0F6: @ 825E0F6 +BattleFrontier_BattlePikeRoomNormal_Text_LucyFrontierPass: @ 825E0F6 .string "LUCY: … … … … … …\p" .string "…FRONTIER PASS…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E118: @ 825E118 +BattleFrontier_BattlePikeRoomNormal_Text_LuckSymbolTookGoldenShine: @ 825E118 .string "The Luck Symbol took on\n" .string "a golden shine!$" -BattleFrontier_BattlePikeRoomNormal_Text_25E140: @ 825E140 +BattleFrontier_BattlePikeRoomNormal_Text_IWontForget: @ 825E140 .string "…You, I won't forget…\n" .string "…Ever…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E15D: @ 825E15D +BattleFrontier_BattlePikeRoomNormal_Text_ChoseRoomNoHeal: @ 825E15D .string "I welcome you…\p" .string "Giggle…\n" .string "You seem to be bereft of luck…\p" .string "If only you hadn't chosen this room,\n" .string "your POKéMON could have been healed…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E1DD: @ 825E1DD +BattleFrontier_BattlePikeRoomNormal_Text_ChoseRoomHealOne: @ 825E1DD .string "I welcome you…\p" .string "Since you have chosen this room, I will\n" .string "restore one POKéMON to full health…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E238: @ 825E238 +BattleFrontier_BattlePikeRoomNormal_Text_ChoseRoomHealTwo: @ 825E238 .string "I welcome you…\p" .string "Since you have chosen this room, I will\n" .string "restore two POKéMON to full health…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E293: @ 825E293 +@ Unused +BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreAllMons: @ 825E293 .string "I welcome you…\p" .string "Giggle…\n" .string "You should thank your lucky stars…\p" .string "Since you have chosen this room,\n" .string "all your POKéMON will be restored…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E311: @ 825E311 +BattleFrontier_BattlePikeRoomNormal_Text_ShallFetchOurMaster: @ 825E311 .string "I shall go fetch our master…$" -BattleFrontier_BattlePikeRoomNormal_Text_25E32E: @ 825E32E +BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreTwoMons: @ 825E32E .string "Ah, you're a lucky one!\n" .string "I'm in good spirits now.\p" .string "I will restore two of your POKéMON\n" diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/map.json b/data/maps/BattleFrontier_BattlePikeRoomWildMons/map.json index 3a8362b7f..6dd45dc34 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/map.json +++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/map.json @@ -23,7 +23,7 @@ "elevation": 3, "var": "VAR_TEMP_1", "var_value": "0", - "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4174" + "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit" }, { "type": "trigger", @@ -32,7 +32,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4202" + "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -41,7 +41,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4202" + "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -50,7 +50,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4202" + "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -59,7 +59,7 @@ "elevation": 3, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_2C420D" + "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack" }, { "type": "trigger", @@ -68,7 +68,7 @@ "elevation": 3, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_2C420D" + "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack" }, { "type": "trigger", @@ -77,7 +77,7 @@ "elevation": 3, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_2C420D" + "script": "BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack" } ], "bg_events": [] diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc index 356e88366..418a9e764 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc @@ -1,44 +1,44 @@ BattleFrontier_BattlePikeRoomWildMons_MapScripts:: @ 825E41A - map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePikeRoomWildMons_MapScript1_25E47A - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeRoomWildMons_MapScript2_25E42A - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoomWildMons_MapScript2_25E466 + map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePikeRoomWildMons_OnResume + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeRoomWildMons_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoomWildMons_OnWarp .byte 0 -BattleFrontier_BattlePikeRoomWildMons_MapScript2_25E42A: @ 825E42A - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeRoomWildMons_EventScript_25E43C - map_script_2 VAR_TEMP_1, 1, BattleFrontier_BattlePikeRoomWildMons_EventScript_25E44A +BattleFrontier_BattlePikeRoomWildMons_OnFrame: @ 825E42A + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeRoomWildMons_EventScript_SetInWildMonRoom + map_script_2 VAR_TEMP_1, 1, BattleFrontier_BattlePikeRoomWildMons_EventScript_WarpToLobbyLost .2byte 0 -BattleFrontier_BattlePikeRoomWildMons_EventScript_25E43C:: @ 825E43C +BattleFrontier_BattlePikeRoomWildMons_EventScript_SetInWildMonRoom:: @ 825E43C setvar VAR_TEMP_0, 1 pike_inwildmonroom end -BattleFrontier_BattlePikeRoomWildMons_EventScript_25E44A:: @ 825E44A +BattleFrontier_BattlePikeRoomWildMons_EventScript_WarpToLobbyLost:: @ 825E44A frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 waitstate end -BattleFrontier_BattlePikeRoomWildMons_MapScript2_25E466: @ 825E466 - map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeRoomWildMons_EventScript_25E470 +BattleFrontier_BattlePikeRoomWildMons_OnWarp: @ 825E466 + map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeRoomWildMons_EventScript_TurnPlayerNorth .2byte 0 -BattleFrontier_BattlePikeRoomWildMons_EventScript_25E470:: @ 825E470 +BattleFrontier_BattlePikeRoomWildMons_EventScript_TurnPlayerNorth:: @ 825E470 setvar VAR_TEMP_4, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePikeRoomWildMons_MapScript1_25E47A: @ 825E47A +BattleFrontier_BattlePikeRoomWildMons_OnResume: @ 825E47A call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves frontier_get FRONTIER_DATA_BATTLE_OUTCOME compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_25E4A3 + goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_25E4A3 + goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost end -BattleFrontier_BattlePikeRoomWildMons_EventScript_25E4A3:: @ 825E4A3 +BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost:: @ 825E4A3 setvar VAR_TEMP_1, 1 end diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json b/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json index aa512a0a7..4f6bd9a7c 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json @@ -24,7 +24,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_25C908", + "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_Attendant", "flag": "0" }, { @@ -77,7 +77,7 @@ "elevation": 0, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_2C406D" + "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack" }, { "type": "trigger", @@ -86,7 +86,7 @@ "elevation": 0, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_2C406D" + "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack" }, { "type": "trigger", @@ -95,7 +95,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4062" + "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -104,7 +104,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4062" + "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -113,7 +113,7 @@ "elevation": 3, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4062" + "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_SetEnteredRoom" }, { "type": "trigger", @@ -122,7 +122,7 @@ "elevation": 0, "var": "VAR_TEMP_3", "var_value": "1", - "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_2C406D" + "script": "BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack" } ], "bg_events": [] diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index a0bf811a5..a0c7ece1d 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -5,23 +5,23 @@ BattleFrontier_BattlePikeThreePathRoom_MapScripts:: @ 825C843 .byte 0 BattleFrontier_BattlePikeThreePathRoom_OnFrame: @ 825C853 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_CheckChallengeStatus + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpToLobby - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C8A4 - map_script_2 VAR_TEMP_5, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA78 - map_script_2 VAR_TEMP_5, 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA97 + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_ResumeChallenge + map_script_2 VAR_TEMP_5, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_SetHintRoom + map_script_2 VAR_TEMP_5, 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_GivePikeQueenHint .2byte 0 BattleFrontier_BattlePikeThreePathRoom_OnWarp: @ 825C87D - map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C887 + map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_TurnPlayerNorth .2byte 0 -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C887:: @ 825C887 +BattleFrontier_BattlePikeThreePathRoom_EventScript_TurnPlayerNorth:: @ 825C887 setvar VAR_TEMP_4, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePikeThreePathRoom_EventScript_CheckChallengeStatus:: @ 825C891 +BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus:: @ 825C891 frontier_getstatus end @@ -30,7 +30,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpToLobby:: @ 825C89A waitstate end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C8A4:: @ 825C8A4 +BattleFrontier_BattlePikeThreePathRoom_EventScript_ResumeChallenge:: @ 825C8A4 lockall message BattleFrontier_BattlePikeThreePathRoom_Text_AwaitingReturnSaveBeforeResume waitmessage @@ -48,76 +48,76 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C8A4:: @ 825C8A4 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 99 end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C908:: @ 825C908 +BattleFrontier_BattlePikeThreePathRoom_EventScript_Attendant:: @ 825C908 frontier_get FRONTIER_DATA_BATTLE_NUM @ Room number switch VAR_RESULT - case 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C968 - case 3, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C978 - case 5, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C988 - case 7, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C998 - case 9, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9A8 - case 11, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9B8 - case 13, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9C8 + case 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom1 + case 3, BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom3 + case 5, BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom5 + case 7, BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom7 + case 9, BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom9 + case 11, BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom11 + case 13, BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom13 end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C968:: @ 825C968 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom1:: @ 825C968 lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_CurrentlyInRoom1, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8 + goto BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C978:: @ 825C978 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom3:: @ 825C978 lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_CurrentlyInRoom3, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8 + goto BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C988:: @ 825C988 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom5:: @ 825C988 lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_CurrentlyInRoom5, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8 + goto BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C998:: @ 825C998 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom7:: @ 825C998 lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_CurrentlyInRoom7, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8 + goto BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9A8:: @ 825C9A8 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom9:: @ 825C9A8 lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_CurrentlyInRoom9, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8 + goto BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9B8:: @ 825C9B8 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom11:: @ 825C9B8 lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_CurrentlyInRoom11, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8 + goto BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9C8:: @ 825C9C8 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AttendantRoom13:: @ 825C9C8 lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_CurrentlyInRoom13, MSGBOX_DEFAULT - goto BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8 + goto BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9D8:: @ 825C9D8 +BattleFrontier_BattlePikeThreePathRoom_EventScript_AskContinueChallenge:: @ 825C9D8 msgbox BattleFrontier_BattlePikeThreePathRoom_Text_ContinueWithChallenge, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A - case MULTI_B_PRESSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A + case NO, BattleFrontier_BattlePikeThreePathRoom_EventScript_AskSaveChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_AskSaveChallenge release end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD:: @ 825C9FD +BattleFrontier_BattlePikeThreePathRoom_EventScript_PauseChallenge:: @ 825C9FD frontier_saveparty message BattleFrontier_BattlePikeThreePathRoom_Text_SavingYourData waitmessage @@ -129,16 +129,16 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD:: @ 825C9FD frontier_reset end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA2A:: @ 825CA2A +BattleFrontier_BattlePikeThreePathRoom_EventScript_AskSaveChallenge:: @ 825CA2A msgbox BattleFrontier_BattlePikeThreePathRoom_Text_SaveChallengeAndQuit, MSGBOX_YESNO switch VAR_RESULT - case YES, BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD - case NO, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A - case MULTI_B_PRESSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A + case YES, BattleFrontier_BattlePikeThreePathRoom_EventScript_PauseChallenge + case NO, BattleFrontier_BattlePikeThreePathRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_AskRetireChallenge release end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A:: @ 825CA5A +BattleFrontier_BattlePikeThreePathRoom_EventScript_AskRetireChallenge:: @ 825CA5A message BattleFrontier_BattlePikeThreePathRoom_Text_RetireFromChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 @@ -147,24 +147,24 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA5A:: @ 825CA5A release end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA78:: @ 825CA78 +BattleFrontier_BattlePikeThreePathRoom_EventScript_SetHintRoom:: @ 825CA78 pike_sethintroom compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA91 + goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_SetPikeQueenHint setvar VAR_TEMP_5, 255 end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA91:: @ 825CA91 +BattleFrontier_BattlePikeThreePathRoom_EventScript_SetPikeQueenHint:: @ 825CA91 setvar VAR_TEMP_5, 1 end -BattleFrontier_BattlePikeThreePathRoom_EventScript_25CA97:: @ 825CA97 - applymovement 2, BattleFrontier_BattlePikeThreePathRoom_Movement_25CBCE +BattleFrontier_BattlePikeThreePathRoom_EventScript_GivePikeQueenHint:: @ 825CA97 + applymovement 2, BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverApproachPlayer waitmovement 0 lockall msgbox BattleFrontier_BattlePikeThreePathRoom_Text_TerrifyingEvent, MSGBOX_DEFAULT releaseall - applymovement 2, BattleFrontier_BattlePikeThreePathRoom_Movement_25CBD5 + applymovement 2, BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverReturnToPos waitmovement 0 setvar VAR_TEMP_5, 255 end @@ -244,7 +244,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveBrainHint:: @ 825CBC2 release end -BattleFrontier_BattlePikeThreePathRoom_Movement_25CBCE: @ 825CBCE +BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverApproachPlayer: @ 825CBCE walk_left walk_left walk_down @@ -253,7 +253,7 @@ BattleFrontier_BattlePikeThreePathRoom_Movement_25CBCE: @ 825CBCE walk_down step_end -BattleFrontier_BattlePikeThreePathRoom_Movement_25CBD5: @ 825CBD5 +BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverReturnToPos: @ 825CBD5 walk_up walk_up walk_up diff --git a/data/scripts/battle_pike.inc b/data/scripts/battle_pike.inc index a0f0f6618..dd730a644 100644 --- a/data/scripts/battle_pike.inc +++ b/data/scripts/battle_pike.inc @@ -6,71 +6,71 @@ BattleFrontier_BattlePikeRoom_OnTransition: @ 82C3E25 pike_setroomobjects pike_getroomtype switch VAR_RESULT - case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1 - case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1 - case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EC0 - case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EA2 - case PIKE_ROOM_HEAL_PART, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1 - case PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3E93 - case PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EA2 - case PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3ECF + case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos + case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos + case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_SetNPCRoomObjPos + case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos + case PIKE_ROOM_HEAL_PART, BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos + case PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_SetDoubleBattleObjPos + case PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos + case PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_SetBrainRoomObjPos end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C3E93:: @ 82C3E93 +BattleFrontier_BattlePikeRoomNormal_EventScript_SetDoubleBattleObjPos:: @ 82C3E93 setobjectxyperm 1, 2, 5 setobjectxyperm 2, 6, 5 end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EA2:: @ 82C3EA2 +BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos:: @ 82C3EA2 setobjectxyperm 1, 4, 4 setobjectxyperm 2, 3, 4 end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1:: @ 82C3EB1 +BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos:: @ 82C3EB1 setobjectxyperm 1, 4, 4 setobjectxyperm 2, 0, 0 end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EC0:: @ 82C3EC0 +BattleFrontier_BattlePikeRoomNormal_EventScript_SetNPCRoomObjPos:: @ 82C3EC0 setobjectxyperm 1, 5, 5 setobjectxyperm 2, 0, 0 end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C3ECF:: @ 82C3ECF +BattleFrontier_BattlePikeRoomNormal_EventScript_SetBrainRoomObjPos:: @ 82C3ECF setobjectxyperm 1, 4, 3 setobjectxyperm 2, 4, 4 end BattleFrontier_BattlePikeRoom_OnWarp: @ 82C3EDE - map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom + map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects .2byte 0 -BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom:: @ 82C3EE8 +BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects:: @ 82C3EE8 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LINK_RECEPTIONIST setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_LINK_RECEPTIONIST pike_getroomtype compare VAR_RESULT, PIKE_ROOM_STATUS - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35 + goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom compare VAR_RESULT, PIKE_ROOM_HARD_BATTLE - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35 + goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom compare VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35 + goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom compare VAR_RESULT, PIKE_ROOM_BRAIN - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F3F + goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL setvar VAR_TEMP_4, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35:: @ 82C3F35 +BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom:: @ 82C3F35 setvar VAR_TEMP_4, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F3F:: @ 82C3F3F +BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects:: @ 82C3F3F setvar VAR_TEMP_4, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH - hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL + hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL @ Pike Queen hidden initially end BattleFrontier_BattlePikeThreePathRoom_EventScript_LeftRoomWarp:: @ 82C3F4E @@ -125,12 +125,12 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpWildMonRoom:: @ 82C4049 waitstate end -BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4062:: @ 82C4062 +BattleFrontier_BattlePikeThreePathRoom_EventScript_SetEnteredRoom:: @ 82C4062 setvar VAR_TEMP_3, 1 setvar VAR_TEMP_2, 1 end -BattleFrontier_BattlePikeThreePathRoom_EventScript_2C406D:: @ 82C406D +BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack:: @ 82C406D setvar VAR_TEMP_3, 0 setvar VAR_TEMP_2, 0 lockall @@ -138,12 +138,12 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_2C406D:: @ 82C406D closemessage end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C4082:: @ 82C4082 +BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom:: @ 82C4082 setvar VAR_TEMP_3, 1 setvar VAR_TEMP_2, 1 end -BattleFrontier_BattlePikeRoomNormal_EventScript_2C408D:: @ 82C408D +BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack:: @ 82C408D setvar VAR_TEMP_3, 0 setvar VAR_TEMP_2, 0 lockall @@ -193,7 +193,7 @@ BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: @ 82C415C warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10 return -BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4174:: @ 82C4174 +BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit:: @ 82C4174 pike_exitwildmonroom pike_ispartyfullhealth compare VAR_RESULT, TRUE @@ -214,12 +214,12 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4174:: @ 82C4174 waitstate end -BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4202:: @ 82C4202 +BattleFrontier_BattlePikeRoomWildMons_EventScript_SetEnteredRoom:: @ 82C4202 setvar VAR_TEMP_3, 1 setvar VAR_TEMP_2, 1 end -BattleFrontier_BattlePikeRoomWildMons_EventScript_2C420D:: @ 82C420D +BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack:: @ 82C420D setvar VAR_TEMP_3, 0 setvar VAR_TEMP_2, 0 lockall @@ -234,14 +234,14 @@ BattleFrontier_BattlePike_EventScript_Retire:: @ 82C4222 end BattleFrontier_BattlePikeRoom_OnResume: @ 82C423E - setorcopyvar VAR_0x8006, VAR_RESULT + setorcopyvar VAR_0x8006, VAR_RESULT @ Save VAR_RESULT from being overwritten frontier_get FRONTIER_DATA_CHALLENGE_STATUS compare VAR_RESULT, CHALLENGE_STATUS_PAUSED - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B + goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume compare VAR_RESULT, CHALLENGE_STATUS_SAVING - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B + goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves -BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B:: @ 82C426B +BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume:: @ 82C426B setorcopyvar VAR_RESULT, VAR_0x8006 end diff --git a/include/constants/battle_pike.h b/include/constants/battle_pike.h index c25f76aaa..9187ae28c 100644 --- a/include/constants/battle_pike.h +++ b/include/constants/battle_pike.h @@ -23,8 +23,8 @@ #define PIKE_HINT_BRAIN 4 // For the room with a status effect. -#define PIKE_STATUS_KIRLIA 0 -#define PIKE_STATUS_DUSCLOPS 1 +#define PIKE_STATUSMON_KIRLIA 0 +#define PIKE_STATUSMON_DUSCLOPS 1 #define PIKE_STATUS_FREEZE 0 #define PIKE_STATUS_BURN 1 @@ -48,7 +48,7 @@ #define BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON 12 #define BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS 13 #define BATTLE_PIKE_FUNC_BUFFER_NPC_MSG 14 -#define BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE 15 +#define BATTLE_PIKE_FUNC_STATUS_SCREEN_FLASH 15 #define BATTLE_PIKE_FUNC_IS_IN 16 #define BATTLE_PIKE_FUNC_SET_HINT_ROOM 17 #define BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID 18 diff --git a/src/battle_pike.c b/src/battle_pike.c index f9c6c84a4..e7da8d038 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -64,7 +64,7 @@ static void GetRoomInflictedStatus(void); static void GetRoomInflictedStatusMon(void); static void HealOneOrTwoMons(void); static void BufferNPCMessage(void); -static void StatusInflictionScreenFade(void); +static void StatusInflictionScreenFlash(void); static void GetInBattlePike(void); static void SetHintedRoom(void); static void GetHintedRoomIndex(void); @@ -83,7 +83,7 @@ static void PrepareOneTrainer(bool8 difficult); static u16 GetNPCRoomGraphicsId(void); static void PrepareTwoTrainers(void); static void TryHealMons(u8 healCount); -static void Task_DoStatusInflictionScreenFade(u8 taskId); +static void Task_DoStatusInflictionScreenFlash(u8 taskId); static bool8 AtLeastTwoAliveMons(void); static u8 SpeciesToPikeMonId(u16 species); static bool8 CanEncounterWildMon(u8 monLevel); @@ -495,7 +495,7 @@ static void (* const sBattlePikeFunctions[])(void) = [BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON] = GetRoomInflictedStatusMon, [BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS] = HealOneOrTwoMons, [BATTLE_PIKE_FUNC_BUFFER_NPC_MSG] = BufferNPCMessage, - [BATTLE_PIKE_FUNC_STATUS_SCREEN_FADE] = StatusInflictionScreenFade, + [BATTLE_PIKE_FUNC_STATUS_SCREEN_FLASH] = StatusInflictionScreenFlash, [BATTLE_PIKE_FUNC_IS_IN] = GetInBattlePike, [BATTLE_PIKE_FUNC_SET_HINT_ROOM] = SetHintedRoom, [BATTLE_PIKE_FUNC_GET_HINT_ROOM_ID] = GetHintedRoomIndex, @@ -533,7 +533,7 @@ static const u8 sNumMonsToHealBeforePikeQueen[][3] = {0, 1, 2}, }; -static bool8 (* const sStatusInflictionScreenFadeFuncs[])(struct Task *) = +static bool8 (* const sStatusInflictionScreenFlashFuncs[])(struct Task *) = { StatusInflictionFadeOut, StatusInflictionFadeIn }; @@ -579,7 +579,7 @@ static void SetupRoomEventObjects(void) break; case PIKE_ROOM_STATUS: objGfx1 = EVENT_OBJ_GFX_GENTLEMAN; - if (sStatusMon == PIKE_STATUS_DUSCLOPS) + if (sStatusMon == PIKE_STATUSMON_DUSCLOPS) objGfx2 = EVENT_OBJ_GFX_DUSCLOPS; else objGfx2 = EVENT_OBJ_GFX_KIRLIA; @@ -774,9 +774,9 @@ static void BufferNPCMessage(void) FrontierSpeechToString(sNPCSpeeches[speechId]); } -static void StatusInflictionScreenFade(void) +static void StatusInflictionScreenFlash(void) { - CreateTask(Task_DoStatusInflictionScreenFade, 2); + CreateTask(Task_DoStatusInflictionScreenFlash, 2); } static void HealMon(struct Pokemon *mon) @@ -946,19 +946,19 @@ static bool8 TryInflictRandomStatus(void) switch (sStatusFlags) { case STATUS1_FREEZE: - sStatusMon = PIKE_STATUS_DUSCLOPS; + sStatusMon = PIKE_STATUSMON_DUSCLOPS; break; case STATUS1_BURN: if (Random() % 2 != 0) - sStatusMon = PIKE_STATUS_DUSCLOPS; + sStatusMon = PIKE_STATUSMON_DUSCLOPS; else - sStatusMon = PIKE_STATUS_KIRLIA; + sStatusMon = PIKE_STATUSMON_KIRLIA; break; case STATUS1_PARALYSIS: case STATUS1_SLEEP: case STATUS1_TOXIC_POISON: default: - sStatusMon = PIKE_STATUS_KIRLIA; + sStatusMon = PIKE_STATUSMON_KIRLIA; break; } @@ -1172,9 +1172,9 @@ u8 GetBattlePikeWildMonHeaderId(void) return headerId; } -static void DoStatusInflictionScreenFade(u8 taskId) +static void DoStatusInflictionScreenFlash(u8 taskId) { - while (sStatusInflictionScreenFadeFuncs[gTasks[taskId].data[0]](&gTasks[taskId])); + while (sStatusInflictionScreenFlashFuncs[gTasks[taskId].data[0]](&gTasks[taskId])); } static bool8 StatusInflictionFadeOut(struct Task *task) @@ -1211,7 +1211,7 @@ static bool8 StatusInflictionFadeIn(struct Task *task) { if (--task->data[3] == 0) { - DestroyTask(FindTaskIdByFunc(DoStatusInflictionScreenFade)); + DestroyTask(FindTaskIdByFunc(DoStatusInflictionScreenFlash)); } else { @@ -1222,9 +1222,9 @@ static bool8 StatusInflictionFadeIn(struct Task *task) return FALSE; } -static void StartStatusInflictionScreenFade(s16 fadeOutDelay, s16 fadeInDelay, s16 numFades, s16 fadeOutSpeed, s16 fadeInSpped) +static void StartStatusInflictionScreenFlash(s16 fadeOutDelay, s16 fadeInDelay, s16 numFades, s16 fadeOutSpeed, s16 fadeInSpped) { - u8 taskId = CreateTask(DoStatusInflictionScreenFade, 3); + u8 taskId = CreateTask(DoStatusInflictionScreenFlash, 3); gTasks[taskId].data[1] = fadeOutDelay; gTasks[taskId].data[2] = fadeInDelay; @@ -1234,24 +1234,24 @@ static void StartStatusInflictionScreenFade(s16 fadeOutDelay, s16 fadeInDelay, s gTasks[taskId].data[6] = fadeOutDelay; } -static bool8 IsStatusInflictionScreenFadeTaskFinished(void) +static bool8 IsStatusInflictionScreenFlashTaskFinished(void) { - if (FindTaskIdByFunc(DoStatusInflictionScreenFade) == 0xFF) + if (FindTaskIdByFunc(DoStatusInflictionScreenFlash) == 0xFF) return TRUE; else return FALSE; } -static void Task_DoStatusInflictionScreenFade(u8 taskId) +static void Task_DoStatusInflictionScreenFlash(u8 taskId) { if (gTasks[taskId].data[0] == 0) { gTasks[taskId].data[0]++; - StartStatusInflictionScreenFade(0, 0, 3, 2, 2); + StartStatusInflictionScreenFlash(0, 0, 3, 2, 2); } else { - if (IsStatusInflictionScreenFadeTaskFinished()) + if (IsStatusInflictionScreenFlashTaskFinished()) { EnableBothScriptContexts(); DestroyTask(taskId); From 1a672dac8dd534aa9b5e08bc34481cabd8ca0ae9 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 8 Dec 2019 13:10:12 -0500 Subject: [PATCH 12/35] Use constant for daily flag offset --- include/constants/flags.h | 1 + src/event_data.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/constants/flags.h b/include/constants/flags.h index 1eb8a0673..095284aa8 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -1566,6 +1566,7 @@ #define FLAG_UNUSED_0x91F (SYSTEM_FLAGS + 0xBF) // Unused Flag // Daily Flags +#define DAILY_FLAGS_START FLAG_DAILY_0x920 #define FLAG_DAILY_0x920 (SYSTEM_FLAGS + 0xC0) #define FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY (SYSTEM_FLAGS + 0xC1) #define FLAG_DAILY_SECRET_BASE (SYSTEM_FLAGS + 0xC2) diff --git a/src/event_data.c b/src/event_data.c index 50628f984..3d3cea175 100644 --- a/src/event_data.c +++ b/src/event_data.c @@ -48,7 +48,7 @@ void ClearTempFieldEventData(void) void ClearDailyFlags(void) { - memset(gSaveBlock1Ptr->flags + 0x124, 0, DAILY_FLAGS_SIZE); + memset(gSaveBlock1Ptr->flags + (DAILY_FLAGS_START / 8), 0, DAILY_FLAGS_SIZE); } void DisableNationalPokedex(void) From 09840efc647b31d43b957bec2664e8c74dff5760 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 8 Dec 2019 13:19:52 -0500 Subject: [PATCH 13/35] Name last event_data funcs --- include/event_data.h | 4 ++-- src/event_data.c | 4 ++-- src/mevent2.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/event_data.h b/include/event_data.h index 11289c1ab..36d52561f 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -16,8 +16,8 @@ bool32 IsMysteryEventEnabled(void); void DisableMysteryGift(void); void EnableMysteryGift(void); bool32 IsMysteryGiftEnabled(void); -void sub_809D4D8(void); -void sub_809D570(void); +void ClearMysteryEventFlags(void); +void ClearMysteryEventVars(void); void DisableResetRTC(void); void EnableResetRTC(void); bool32 CanResetRTC(void); diff --git a/src/event_data.c b/src/event_data.c index 3d3cea175..9ef3e16ea 100644 --- a/src/event_data.c +++ b/src/event_data.c @@ -108,7 +108,7 @@ bool32 IsMysteryGiftEnabled(void) return FlagGet(FLAG_SYS_MYSTERY_GIFT_ENABLE); } -void sub_809D4D8(void) +void ClearMysteryEventFlags(void) { FlagClear(FLAG_MYSTERY_EVENT_DONE); FlagClear(FLAG_MYSTERY_EVENT_1); @@ -128,7 +128,7 @@ void sub_809D4D8(void) FlagClear(FLAG_MYSTERY_EVENT_15); } -void sub_809D570(void) +void ClearMysteryEventVars(void) { VarSet(VAR_EVENT_PICHU_SLOT, 0); VarSet(VAR_NEVER_READ_0x40DE, 0); diff --git a/src/mevent2.c b/src/mevent2.c index aedc7b366..0bbaf6db8 100755 --- a/src/mevent2.c +++ b/src/mevent2.c @@ -132,8 +132,8 @@ void DestroyWonderCard(void) sub_801B368(); sub_801B9F8(); ClearRamScript(); - sub_809D4D8(); - sub_809D570(); + ClearMysteryEventFlags(); + ClearMysteryEventVars(); ClearEReaderTrainer(&gSaveBlock2Ptr->frontier.ereaderTrainer); } From ea9a2c848a228d602a86ad8a64e57f56feb37357 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 11 Dec 2019 00:36:39 -0500 Subject: [PATCH 14/35] Define start and ends for temp vars and daily/temp/special flags --- include/constants/flags.h | 210 ++++++++++++++++++++------------------ include/constants/vars.h | 34 +++--- src/event_data.c | 18 ++-- 3 files changed, 138 insertions(+), 124 deletions(-) diff --git a/include/constants/flags.h b/include/constants/flags.h index 095284aa8..96546d7ab 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -5,37 +5,39 @@ // These temporary flags are are cleared every time a map is loaded. They are used // for things like shortening an NPCs introduction text if the player already spoke // to them once. -#define FLAG_TEMP_1 0x1 -#define FLAG_TEMP_2 0x2 -#define FLAG_TEMP_3 0x3 -#define FLAG_TEMP_4 0x4 -#define FLAG_TEMP_5 0x5 // Unused Flag -#define FLAG_TEMP_6 0x6 // Unused Flag -#define FLAG_TEMP_7 0x7 // Unused Flag -#define FLAG_TEMP_8 0x8 // Unused Flag -#define FLAG_TEMP_9 0x9 // Unused Flag -#define FLAG_TEMP_A 0xA // Unused Flag -#define FLAG_TEMP_B 0xB // Unused Flag -#define FLAG_TEMP_C 0xC // Unused Flag -#define FLAG_TEMP_D 0xD // Unused Flag -#define FLAG_TEMP_E 0xE // Unused Flag -#define FLAG_TEMP_F 0xF // Unused Flag -#define FLAG_TEMP_10 0x10 // Unused Flag -#define FLAG_TEMP_11 0x11 -#define FLAG_TEMP_12 0x12 -#define FLAG_TEMP_13 0x13 -#define FLAG_TEMP_14 0x14 -#define FLAG_TEMP_15 0x15 -#define FLAG_TEMP_16 0x16 -#define FLAG_TEMP_17 0x17 -#define FLAG_TEMP_18 0x18 -#define FLAG_TEMP_19 0x19 -#define FLAG_TEMP_1A 0x1A -#define FLAG_TEMP_1B 0x1B -#define FLAG_TEMP_1C 0x1C -#define FLAG_TEMP_1D 0x1D -#define FLAG_TEMP_1E 0x1E -#define FLAG_TEMP_1F 0x1F +#define TEMP_FLAGS_START 0x0 +#define FLAG_TEMP_1 (TEMP_FLAGS_START + 0x1) +#define FLAG_TEMP_2 (TEMP_FLAGS_START + 0x2) +#define FLAG_TEMP_3 (TEMP_FLAGS_START + 0x3) +#define FLAG_TEMP_4 (TEMP_FLAGS_START + 0x4) +#define FLAG_TEMP_5 (TEMP_FLAGS_START + 0x5) // Unused Flag +#define FLAG_TEMP_6 (TEMP_FLAGS_START + 0x6) // Unused Flag +#define FLAG_TEMP_7 (TEMP_FLAGS_START + 0x7) // Unused Flag +#define FLAG_TEMP_8 (TEMP_FLAGS_START + 0x8) // Unused Flag +#define FLAG_TEMP_9 (TEMP_FLAGS_START + 0x9) // Unused Flag +#define FLAG_TEMP_A (TEMP_FLAGS_START + 0xA) // Unused Flag +#define FLAG_TEMP_B (TEMP_FLAGS_START + 0xB) // Unused Flag +#define FLAG_TEMP_C (TEMP_FLAGS_START + 0xC) // Unused Flag +#define FLAG_TEMP_D (TEMP_FLAGS_START + 0xD) // Unused Flag +#define FLAG_TEMP_E (TEMP_FLAGS_START + 0xE) // Unused Flag +#define FLAG_TEMP_F (TEMP_FLAGS_START + 0xF) // Unused Flag +#define FLAG_TEMP_10 (TEMP_FLAGS_START + 0x10) // Unused Flag +#define FLAG_TEMP_11 (TEMP_FLAGS_START + 0x11) +#define FLAG_TEMP_12 (TEMP_FLAGS_START + 0x12) +#define FLAG_TEMP_13 (TEMP_FLAGS_START + 0x13) +#define FLAG_TEMP_14 (TEMP_FLAGS_START + 0x14) +#define FLAG_TEMP_15 (TEMP_FLAGS_START + 0x15) +#define FLAG_TEMP_16 (TEMP_FLAGS_START + 0x16) +#define FLAG_TEMP_17 (TEMP_FLAGS_START + 0x17) +#define FLAG_TEMP_18 (TEMP_FLAGS_START + 0x18) +#define FLAG_TEMP_19 (TEMP_FLAGS_START + 0x19) +#define FLAG_TEMP_1A (TEMP_FLAGS_START + 0x1A) +#define FLAG_TEMP_1B (TEMP_FLAGS_START + 0x1B) +#define FLAG_TEMP_1C (TEMP_FLAGS_START + 0x1C) +#define FLAG_TEMP_1D (TEMP_FLAGS_START + 0x1D) +#define FLAG_TEMP_1E (TEMP_FLAGS_START + 0x1E) +#define FLAG_TEMP_1F (TEMP_FLAGS_START + 0x1F) +#define TEMP_FLAGS_END FLAG_TEMP_1F #define FLAG_UNUSED_0x020 0x20 // Unused Flag #define FLAG_UNUSED_0x021 0x21 // Unused Flag @@ -1566,78 +1568,82 @@ #define FLAG_UNUSED_0x91F (SYSTEM_FLAGS + 0xBF) // Unused Flag // Daily Flags -#define DAILY_FLAGS_START FLAG_DAILY_0x920 -#define FLAG_DAILY_0x920 (SYSTEM_FLAGS + 0xC0) -#define FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY (SYSTEM_FLAGS + 0xC1) -#define FLAG_DAILY_SECRET_BASE (SYSTEM_FLAGS + 0xC2) -#define FLAG_DAILY_0x923 (SYSTEM_FLAGS + 0xC3) -#define FLAG_DAILY_0x924 (SYSTEM_FLAGS + 0xC4) -#define FLAG_DAILY_0x925 (SYSTEM_FLAGS + 0xC5) -#define FLAG_DAILY_0x926 (SYSTEM_FLAGS + 0xC6) -#define FLAG_DAILY_0x927 (SYSTEM_FLAGS + 0xC7) -#define FLAG_DAILY_0x928 (SYSTEM_FLAGS + 0xC8) -#define FLAG_DAILY_0x929 (SYSTEM_FLAGS + 0xC9) -#define FLAG_DAILY_PICKED_LOTO_TICKET (SYSTEM_FLAGS + 0xCA) -#define FLAG_DAILY_ROUTE_114_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCB) -#define FLAG_DAILY_ROUTE_111_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCC) -#define FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCD) -#define FLAG_DAILY_ROUTE_120_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCE) -#define FLAG_DAILY_LILYCOVE_RECEIVED_BERRY (SYSTEM_FLAGS + 0xCF) -#define FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY (SYSTEM_FLAGS + 0xD0) -#define FLAG_DAILY_BERRY_MASTERS_WIFE (SYSTEM_FLAGS + 0xD1) -#define FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY (SYSTEM_FLAGS + 0xD2) -#define FLAG_DAILY_0x933 (SYSTEM_FLAGS + 0xD3) -#define FLAG_DAILY_APPRENTICE_LEAVES (SYSTEM_FLAGS + 0xD4) -#define FLAG_0x935 (SYSTEM_FLAGS + 0xD5) -#define FLAG_0x936 (SYSTEM_FLAGS + 0xD6) -#define FLAG_0x937 (SYSTEM_FLAGS + 0xD7) -#define FLAG_0x938 (SYSTEM_FLAGS + 0xD8) -#define FLAG_0x939 (SYSTEM_FLAGS + 0xD9) -#define FLAG_0x93A (SYSTEM_FLAGS + 0xDA) -#define FLAG_0x93B (SYSTEM_FLAGS + 0xDB) -#define FLAG_0x93C (SYSTEM_FLAGS + 0xDC) -#define FLAG_0x93D (SYSTEM_FLAGS + 0xDD) -#define FLAG_0x93E (SYSTEM_FLAGS + 0xDE) -#define FLAG_0x93F (SYSTEM_FLAGS + 0xDF) -#define FLAG_0x940 (SYSTEM_FLAGS + 0xE0) -#define FLAG_0x941 (SYSTEM_FLAGS + 0xE1) -#define FLAG_0x942 (SYSTEM_FLAGS + 0xE2) -#define FLAG_0x943 (SYSTEM_FLAGS + 0xE3) -#define FLAG_0x944 (SYSTEM_FLAGS + 0xE4) -#define FLAG_0x945 (SYSTEM_FLAGS + 0xE5) -#define FLAG_0x946 (SYSTEM_FLAGS + 0xE6) -#define FLAG_0x947 (SYSTEM_FLAGS + 0xE7) -#define FLAG_0x948 (SYSTEM_FLAGS + 0xE8) -#define FLAG_0x949 (SYSTEM_FLAGS + 0xE9) -#define FLAG_0x94A (SYSTEM_FLAGS + 0xEA) -#define FLAG_0x94B (SYSTEM_FLAGS + 0xEB) -#define FLAG_0x94C (SYSTEM_FLAGS + 0xEC) -#define FLAG_0x94D (SYSTEM_FLAGS + 0xED) -#define FLAG_0x94E (SYSTEM_FLAGS + 0xEE) -#define FLAG_0x94F (SYSTEM_FLAGS + 0xEF) -#define FLAG_0x950 (SYSTEM_FLAGS + 0xF0) -#define FLAG_0x951 (SYSTEM_FLAGS + 0xF1) -#define FLAG_0x952 (SYSTEM_FLAGS + 0xF2) -#define FLAG_0x953 (SYSTEM_FLAGS + 0xF3) -#define FLAG_0x954 (SYSTEM_FLAGS + 0xF4) -#define FLAG_0x955 (SYSTEM_FLAGS + 0xF5) -#define FLAG_0x956 (SYSTEM_FLAGS + 0xF6) -#define FLAG_0x957 (SYSTEM_FLAGS + 0xF7) -#define FLAG_0x958 (SYSTEM_FLAGS + 0xF8) -#define FLAG_0x959 (SYSTEM_FLAGS + 0xF9) -#define FLAG_0x95A (SYSTEM_FLAGS + 0xFA) -#define FLAG_0x95B (SYSTEM_FLAGS + 0xFB) -#define FLAG_0x95C (SYSTEM_FLAGS + 0xFC) -#define FLAG_0x95D (SYSTEM_FLAGS + 0xFD) -#define FLAG_0x95E (SYSTEM_FLAGS + 0xFE) -#define FLAG_0x95F (SYSTEM_FLAGS + 0xFF) +#define DAILY_FLAGS_START 0x920 +#define FLAG_UNUSED_0x920 (DAILY_FLAGS_START + 0x0) // Unused Flag +#define FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY (DAILY_FLAGS_START + 0x1) +#define FLAG_DAILY_SECRET_BASE (DAILY_FLAGS_START + 0x2) +#define FLAG_UNUSED_0x923 (DAILY_FLAGS_START + 0x3) // Unused Flag +#define FLAG_UNUSED_0x924 (DAILY_FLAGS_START + 0x4) // Unused Flag +#define FLAG_UNUSED_0x925 (DAILY_FLAGS_START + 0x5) // Unused Flag +#define FLAG_UNUSED_0x926 (DAILY_FLAGS_START + 0x6) // Unused Flag +#define FLAG_UNUSED_0x927 (DAILY_FLAGS_START + 0x7) // Unused Flag +#define FLAG_UNUSED_0x928 (DAILY_FLAGS_START + 0x8) // Unused Flag +#define FLAG_UNUSED_0x929 (DAILY_FLAGS_START + 0x9) // Unused Flag +#define FLAG_DAILY_PICKED_LOTO_TICKET (DAILY_FLAGS_START + 0xA) +#define FLAG_DAILY_ROUTE_114_RECEIVED_BERRY (DAILY_FLAGS_START + 0xB) +#define FLAG_DAILY_ROUTE_111_RECEIVED_BERRY (DAILY_FLAGS_START + 0xC) +#define FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY (DAILY_FLAGS_START + 0xD) +#define FLAG_DAILY_ROUTE_120_RECEIVED_BERRY (DAILY_FLAGS_START + 0xE) +#define FLAG_DAILY_LILYCOVE_RECEIVED_BERRY (DAILY_FLAGS_START + 0xF) +#define FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY (DAILY_FLAGS_START + 0x10) +#define FLAG_DAILY_BERRY_MASTERS_WIFE (DAILY_FLAGS_START + 0x11) +#define FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY (DAILY_FLAGS_START + 0x12) +#define FLAG_UNUSED_0x933 (DAILY_FLAGS_START + 0x13) // Unused Flag +#define FLAG_DAILY_APPRENTICE_LEAVES (DAILY_FLAGS_START + 0x14) -// Special Flags (Unknown) +#define FLAG_UNUSED_0x935 (DAILY_FLAGS_START + 0x15) // Unused Flag +#define FLAG_UNUSED_0x936 (DAILY_FLAGS_START + 0x16) // Unused Flag +#define FLAG_UNUSED_0x937 (DAILY_FLAGS_START + 0x17) // Unused Flag +#define FLAG_UNUSED_0x938 (DAILY_FLAGS_START + 0x18) // Unused Flag +#define FLAG_UNUSED_0x939 (DAILY_FLAGS_START + 0x19) // Unused Flag +#define FLAG_UNUSED_0x93A (DAILY_FLAGS_START + 0x1A) // Unused Flag +#define FLAG_UNUSED_0x93B (DAILY_FLAGS_START + 0x1B) // Unused Flag +#define FLAG_UNUSED_0x93C (DAILY_FLAGS_START + 0x1C) // Unused Flag +#define FLAG_UNUSED_0x93D (DAILY_FLAGS_START + 0x1D) // Unused Flag +#define FLAG_UNUSED_0x93E (DAILY_FLAGS_START + 0x1E) // Unused Flag +#define FLAG_UNUSED_0x93F (DAILY_FLAGS_START + 0x1F) // Unused Flag +#define FLAG_UNUSED_0x940 (DAILY_FLAGS_START + 0x20) // Unused Flag +#define FLAG_UNUSED_0x941 (DAILY_FLAGS_START + 0x21) // Unused Flag +#define FLAG_UNUSED_0x942 (DAILY_FLAGS_START + 0x22) // Unused Flag +#define FLAG_UNUSED_0x943 (DAILY_FLAGS_START + 0x23) // Unused Flag +#define FLAG_UNUSED_0x944 (DAILY_FLAGS_START + 0x24) // Unused Flag +#define FLAG_UNUSED_0x945 (DAILY_FLAGS_START + 0x25) // Unused Flag +#define FLAG_UNUSED_0x946 (DAILY_FLAGS_START + 0x26) // Unused Flag +#define FLAG_UNUSED_0x947 (DAILY_FLAGS_START + 0x27) // Unused Flag +#define FLAG_UNUSED_0x948 (DAILY_FLAGS_START + 0x28) // Unused Flag +#define FLAG_UNUSED_0x949 (DAILY_FLAGS_START + 0x29) // Unused Flag +#define FLAG_UNUSED_0x94A (DAILY_FLAGS_START + 0x2A) // Unused Flag +#define FLAG_UNUSED_0x94B (DAILY_FLAGS_START + 0x2B) // Unused Flag +#define FLAG_UNUSED_0x94C (DAILY_FLAGS_START + 0x2C) // Unused Flag +#define FLAG_UNUSED_0x94D (DAILY_FLAGS_START + 0x2D) // Unused Flag +#define FLAG_UNUSED_0x94E (DAILY_FLAGS_START + 0x2E) // Unused Flag +#define FLAG_UNUSED_0x94F (DAILY_FLAGS_START + 0x2F) // Unused Flag +#define FLAG_UNUSED_0x950 (DAILY_FLAGS_START + 0x30) // Unused Flag +#define FLAG_UNUSED_0x951 (DAILY_FLAGS_START + 0x31) // Unused Flag +#define FLAG_UNUSED_0x952 (DAILY_FLAGS_START + 0x32) // Unused Flag +#define FLAG_UNUSED_0x953 (DAILY_FLAGS_START + 0x33) // Unused Flag +#define FLAG_UNUSED_0x954 (DAILY_FLAGS_START + 0x34) // Unused Flag +#define FLAG_UNUSED_0x955 (DAILY_FLAGS_START + 0x35) // Unused Flag +#define FLAG_UNUSED_0x956 (DAILY_FLAGS_START + 0x36) // Unused Flag +#define FLAG_UNUSED_0x957 (DAILY_FLAGS_START + 0x37) // Unused Flag +#define FLAG_UNUSED_0x958 (DAILY_FLAGS_START + 0x38) // Unused Flag +#define FLAG_UNUSED_0x959 (DAILY_FLAGS_START + 0x39) // Unused Flag +#define FLAG_UNUSED_0x95A (DAILY_FLAGS_START + 0x3A) // Unused Flag +#define FLAG_UNUSED_0x95B (DAILY_FLAGS_START + 0x3B) // Unused Flag +#define FLAG_UNUSED_0x95C (DAILY_FLAGS_START + 0x3C) // Unused Flag +#define FLAG_UNUSED_0x95D (DAILY_FLAGS_START + 0x3D) // Unused Flag +#define FLAG_UNUSED_0x95E (DAILY_FLAGS_START + 0x3E) // Unused Flag +#define FLAG_UNUSED_0x95F (DAILY_FLAGS_START + 0x3F) // Unused Flag +#define DAILY_FLAGS_END FLAG_UNUSED_0x95F + +// Special Flags (Stored in EWRAM (gSpecialFlags), not in the SaveBlock) #define SPECIAL_FLAGS_START 0x4000 -#define FLAG_HIDE_MAP_NAME_POPUP 0x4000 -#define FLAG_DONT_TRANSITION_MUSIC 0x4001 -#define FLAG_SPECIAL_FLAG_0x4002 0x4002 -#define FLAG_SPECIAL_FLAG_0x4003 0x4003 -#define FLAG_STORING_ITEMS_IN_PYRAMID_BAG 0x4004 +#define FLAG_HIDE_MAP_NAME_POPUP (SPECIAL_FLAGS_START + 0x0) +#define FLAG_DONT_TRANSITION_MUSIC (SPECIAL_FLAGS_START + 0x1) +#define FLAG_SPECIAL_FLAG_0x4002 (SPECIAL_FLAGS_START + 0x2) +#define FLAG_SPECIAL_FLAG_UNUSED_0x4003 (SPECIAL_FLAGS_START + 0x3) // Unused Flag +#define FLAG_STORING_ITEMS_IN_PYRAMID_BAG (SPECIAL_FLAGS_START + 0x4) +// FLAG_SPECIAL_FLAG_0x4005 - 0x407F also exist and are unused +#define SPECIAL_FLAGS_END (SPECIAL_FLAGS_START + 0x7F) #endif // GUARD_CONSTANTS_FLAGS_H diff --git a/include/constants/vars.h b/include/constants/vars.h index d078cf841..d2782116f 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -5,22 +5,24 @@ // temporary vars // The first 0x10 vars are are temporary--they are cleared every time a map is loaded. -#define VAR_TEMP_0 0x4000 -#define VAR_TEMP_1 0x4001 -#define VAR_TEMP_2 0x4002 -#define VAR_TEMP_3 0x4003 -#define VAR_TEMP_4 0x4004 -#define VAR_TEMP_5 0x4005 -#define VAR_TEMP_6 0x4006 -#define VAR_TEMP_7 0x4007 -#define VAR_TEMP_8 0x4008 -#define VAR_TEMP_9 0x4009 -#define VAR_TEMP_A 0x400A -#define VAR_TEMP_B 0x400B -#define VAR_TEMP_C 0x400C -#define VAR_TEMP_D 0x400D -#define VAR_TEMP_E 0x400E -#define VAR_TEMP_F 0x400F +#define TEMP_VARS_START 0x4000 +#define VAR_TEMP_0 (TEMP_VARS_START + 0x0) +#define VAR_TEMP_1 (TEMP_VARS_START + 0x1) +#define VAR_TEMP_2 (TEMP_VARS_START + 0x2) +#define VAR_TEMP_3 (TEMP_VARS_START + 0x3) +#define VAR_TEMP_4 (TEMP_VARS_START + 0x4) +#define VAR_TEMP_5 (TEMP_VARS_START + 0x5) +#define VAR_TEMP_6 (TEMP_VARS_START + 0x6) +#define VAR_TEMP_7 (TEMP_VARS_START + 0x7) +#define VAR_TEMP_8 (TEMP_VARS_START + 0x8) +#define VAR_TEMP_9 (TEMP_VARS_START + 0x9) +#define VAR_TEMP_A (TEMP_VARS_START + 0xA) +#define VAR_TEMP_B (TEMP_VARS_START + 0xB) +#define VAR_TEMP_C (TEMP_VARS_START + 0xC) +#define VAR_TEMP_D (TEMP_VARS_START + 0xD) +#define VAR_TEMP_E (TEMP_VARS_START + 0xE) +#define VAR_TEMP_F (TEMP_VARS_START + 0xF) +#define TEMP_VARS_END VAR_TEMP_F // object gfx id vars // These 0x10 vars are used to dynamically control a map object's sprite. diff --git a/src/event_data.c b/src/event_data.c index 9ef3e16ea..15ca47f7c 100644 --- a/src/event_data.c +++ b/src/event_data.c @@ -2,9 +2,15 @@ #include "event_data.h" #include "pokedex.h" -#define TEMP_FLAGS_SIZE 0x4 -#define DAILY_FLAGS_SIZE 0x8 -#define TEMP_VARS_SIZE 0x20 +#define NUM_SPECIAL_FLAGS (SPECIAL_FLAGS_END - SPECIAL_FLAGS_START + 1) +#define NUM_TEMP_FLAGS (TEMP_FLAGS_END - TEMP_FLAGS_START + 1) +#define NUM_DAILY_FLAGS (DAILY_FLAGS_END - DAILY_FLAGS_START + 1) +#define NUM_TEMP_VARS (TEMP_VARS_END - TEMP_VARS_START + 1) + +#define SPECIAL_FLAGS_SIZE (NUM_SPECIAL_FLAGS / 8) // 8 flags per byte +#define TEMP_FLAGS_SIZE (NUM_TEMP_FLAGS / 8) +#define DAILY_FLAGS_SIZE (NUM_DAILY_FLAGS / 8) +#define TEMP_VARS_SIZE (NUM_TEMP_VARS * 2) // 1/2 var per byte EWRAM_DATA u16 gSpecialVar_0x8000 = 0; EWRAM_DATA u16 gSpecialVar_0x8001 = 0; @@ -24,7 +30,7 @@ EWRAM_DATA u16 gSpecialVar_Facing = 0; EWRAM_DATA u16 gSpecialVar_MonBoxId = 0; EWRAM_DATA u16 gSpecialVar_MonBoxPos = 0; EWRAM_DATA u16 gSpecialVar_Unused_0x8014 = 0; -EWRAM_DATA static u8 gSpecialFlags[16] = {0}; +EWRAM_DATA static u8 gSpecialFlags[SPECIAL_FLAGS_SIZE] = {0}; extern u16 *const gSpecialVars[]; @@ -37,8 +43,8 @@ void InitEventData(void) void ClearTempFieldEventData(void) { - memset(gSaveBlock1Ptr->flags, 0, TEMP_FLAGS_SIZE); - memset(gSaveBlock1Ptr->vars, 0, TEMP_VARS_SIZE); + memset(gSaveBlock1Ptr->flags + (TEMP_FLAGS_START / 8), 0, TEMP_FLAGS_SIZE); + memset(gSaveBlock1Ptr->vars + ((TEMP_VARS_START - VARS_START) * 2), 0, TEMP_VARS_SIZE); FlagClear(FLAG_SYS_ENC_UP_ITEM); FlagClear(FLAG_SYS_ENC_DOWN_ITEM); FlagClear(FLAG_SYS_USE_STRENGTH); From aa72c0ada32632f3dfa7641375a84fa8dc8e7e08 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 9 Dec 2019 14:00:13 -0500 Subject: [PATCH 15/35] Document Battle Factory scripts --- asm/macros/battle_frontier/battle_factory.inc | 24 +- .../scripts.inc | 212 ++++--- .../map.json | 18 +- .../scripts.inc | 346 ++++++------ .../scripts.inc | 530 +++++++++--------- .../scripts.inc | 20 +- .../SlateportCity_BattleTentLobby/scripts.inc | 4 +- 7 files changed, 570 insertions(+), 584 deletions(-) diff --git a/asm/macros/battle_frontier/battle_factory.inc b/asm/macros/battle_frontier/battle_factory.inc index 5a1eb33b7..684eeb98d 100644 --- a/asm/macros/battle_frontier/battle_factory.inc +++ b/asm/macros/battle_frontier/battle_factory.inc @@ -1,5 +1,3 @@ -@ TODO: Add explanatory comments to macros - @ Initialize the Battle Factory challenge .macro factory_init setvar VAR_0x8004, BATTLE_FACTORY_FUNC_INIT @@ -34,68 +32,68 @@ special CallBattleFactoryFunction .endm - @ + @ Select the initial rental mons for the challenge .macro factory_rentmons setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SELECT_RENT_MONS special CallBattleFactoryFunction .endm - @ + @ Select a mon to swap for from the previously defeated team .macro factory_swapmons setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SWAP_RENT_MONS special CallBattleFactoryFunction .endm - @ + @ Allows FACTORY_DATA_WIN_STREAK_SWAPS to be incremented once .macro factory_setswapped setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_SWAPPED special CallBattleFactoryFunction .endm - @ + @ Update gEnemyParty with the next set of rental mons .macro factory_setopponentmons setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS special CallBattleFactoryFunction .endm - @ + @ Populate gPlayerParty and gEnemyParty with the rental mons. Only needed when resuming a challenge, otherwise only factory_setopponentmons and factory_rentmons/factory_swapmons are needed .macro factory_setparties arg:req setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_PARTIES setvar VAR_0x8005, \arg special CallBattleFactoryFunction .endm - @ + @ Set the object event gfx for the opponent trainer .macro factory_setopponentgfx setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX special CallBattleFactoryFunction .endm - @ + @ Generate the mons for the opponents team .macro factory_generateopponentmons setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS special CallBattleFactoryFunction .endm - @ + @ Generate the random 6 mons to choose from for the initial rental .macro factory_generaterentalmons setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS special CallBattleFactoryFunction .endm - @ + @ Return the pokemon type most common in the opponents team, or NUMBER_OF_MON_TYPES if there is no standout type .macro factory_getopponentmontype setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE special CallBattleFactoryFunction .endm - @ + @ Return the FACTORY_STYLE_* dependent on what types of moves the opponents team has, or FACTORY_NUM_STYLES if multiple styles tie for the same amount of moves .macro factory_getopponentstyle setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE special CallBattleFactoryFunction .endm - @ + @ Restore the held items for the players party to what they were pre-battle .macro factory_resethelditems setvar VAR_0x8004, BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS special CallBattleFactoryFunction diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index f1b3e3b91..9a1d15292 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -1,81 +1,82 @@ BattleFrontier_BattleFactoryBattleRoom_MapScripts:: @ 825ADAB - map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleFactoryBattleRoom_MapScript1_25ADBB - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE00 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE31 + map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleFactoryBattleRoom_OnTransition + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryBattleRoom_OnWarp + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryBattleRoom_OnFrame .byte 0 -BattleFrontier_BattleFactoryBattleRoom_MapScript1_25ADBB: @ 825ADBB + @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden + @ The player is represented instead by object event 8, which has the gfx id VAR_OBJ_GFX_ID_F + +BattleFrontier_BattleFactoryBattleRoom_OnTransition: @ 825ADBB frontier_settrainers checkplayergender compare VAR_RESULT, MALE - call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE25 + call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale compare VAR_RESULT, FEMALE - call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE2B + call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25ADF3 + goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj end -BattleFrontier_BattleFactoryBattleRoom_EventScript_25ADF3:: @ 825ADF3 +BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj:: @ 825ADF3 call BattleFrontier_EventScript_SetBrainObjectGfx setobjectxyperm 2, 7, 9 end -BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE00: @ 825AE00 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE0A +BattleFrontier_BattleFactoryBattleRoom_OnWarp: @ 825AE00 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects .2byte 0 -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE0A:: @ 825AE0A +BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects:: @ 825AE0A setvar VAR_TEMP_1, 1 hideobjectat EVENT_OBJ_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM - compare VAR_TEMP_F, 0 - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE24 + compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY + goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM - -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE24:: @ 825AE24 +BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects:: @ 825AE24 end -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE25:: @ 825AE25 +BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale:: @ 825AE25 setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE2B:: @ 825AE2B +BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale:: @ 825AE2B setvar VAR_OBJ_GFX_ID_F, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return -BattleFrontier_BattleFactoryBattleRoom_MapScript2_25AE31: @ 825AE31 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE67 +BattleFrontier_BattleFactoryBattleRoom_OnFrame: @ 825AE31 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom .2byte 0 -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE3B:: @ 825AE3B - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B1E2, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle:: @ 825AE3B + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_GetAMoveOn, MSGBOX_DEFAULT closemessage - applymovement 2, BattleFrontier_BattleFactoryBattleRoom_Movement_25B18B - applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B + applymovement 2, BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle + applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 - call BattleFrontier_BattleFactoryBattleRoom_EventScript_25B1B4 - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEA7 + call BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent end -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE67:: @ 825AE67 - compare VAR_TEMP_F, 0 - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25AE3B - applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B +BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom:: @ 825AE67 + compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY + goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle + applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 - call BattleFrontier_BattleFactoryBattleRoom_EventScript_25B1B4 + call BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle factory_setopponentgfx removeobject 2 setobjectxyperm 2, 7, 1 addobject 2 - applymovement 2, BattleFrontier_BattleFactoryBattleRoom_Movement_25B184 + applymovement 2, BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter waitmovement 0 - -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEA7:: @ 825AEA7 - compare VAR_TEMP_F, 0 - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF9C +BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent:: @ 825AEA7 + compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY + goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland palace_getopponentintro lockall msgbox gStringVar4, MSGBOX_DEFAULT @@ -88,98 +89,96 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEA7:: @ 825AEA7 special DoSpecialTrainerBattle waitstate switch VAR_RESULT - case 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF0F -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEF8:: @ 825AEF8 -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25AEF8:: @ 825AEF8 + case 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedOpponent +BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost:: @ 825AEF8 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25B190 -@ goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B190 + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF0F:: @ 825AF0F +BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedOpponent:: @ 825AF0F factory_get FACTORY_DATA_WIN_STREAK_SWAPS compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E + goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E:: @ 825AF3E +BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak:: @ 825AF3E call BattleFrontier_EventScript_IncrementWinStreak -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF43:: @ 825AF43 +BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum:: @ 825AF43 frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT - case 7, BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF85 + case 7, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon setvar VAR_0x8006, 1 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 8 waitstate -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF85:: @ 825AF85 +BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon:: @ 825AF85 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25B190 + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF9C:: @ 825AF9C +BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland:: @ 825AF9C switch VAR_TEMP_F - case FRONTIER_BRAIN_GOLD, BattleFrontier_BattleFactoryBattleRoom_EventScript_25B051 - case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_25AFEF - case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleFactoryBattleRoom_EventScript_25B07E + case FRONTIER_BRAIN_GOLD, BattleFrontier_BattleFactoryBattleRoom_EventScript_IntroNolandGold + case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver + case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25AFEF - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B1FB, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandImFactoryHead, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH -BattleFrontier_BattleFactoryBattleRoom_EventScript_25AFEF:: @ 825AFEF - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B3F1, MSGBOX_DEFAULT - call BattleFrontier_BattleFactoryBattleRoom_EventScript_25B0E0 +BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver:: @ 825AFEF + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_ShakeOutKnowledgeBringItOn, MSGBOX_DEFAULT + call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25B00C - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEF8 + goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B00C:: @ 825B00C +BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver:: @ 825B00C frontier_getsymbols compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25B105 - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B42D, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass, MSGBOX_DEFAULT closemessage - applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_25B182 + applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland waitmovement 0 playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattleFactoryBattleRoom_Text_25B460 + message BattleFrontier_BattleFactoryBattleRoom_Text_ReceivedKnowledgeSymbol waitmessage waitfanfare frontier_givesymbol - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B498, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25B105 + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NextTimeNoHoldsBarred, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B051:: @ 825B051 +BattleFrontier_BattleFactoryBattleRoom_EventScript_IntroNolandGold:: @ 825B051 frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_25B07E - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B517, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_HarderLookThanLastTime, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B07E:: @ 825B07E - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B5CF, MSGBOX_DEFAULT - call BattleFrontier_BattleFactoryBattleRoom_EventScript_25B0E0 +BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold:: @ 825B07E + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_AllRightBringItOn, MSGBOX_DEFAULT + call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25B09B - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25AEF8 + goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B09B:: @ 825B09B +BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold:: @ 825B09B frontier_getsymbols compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25B105 - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B5E7, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass, MSGBOX_DEFAULT waitmessage - applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_25B182 + applymovement 8, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland waitmovement 0 playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattleFactoryBattleRoom_Text_25B640 + message BattleFrontier_BattleFactoryBattleRoom_Text_KnowledgeSymbolTookGoldenShine waitmessage waitfanfare frontier_givesymbol - msgbox BattleFrontier_BattleFactoryBattleRoom_Text_25B66D, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25B105 + msgbox BattleFrontier_BattleFactoryBattleRoom_Text_LastTimeILoseToYou, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B0E0:: @ 825B0E0 +BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle:: @ 825B0E0 closemessage frontier_set FRONTIER_DATA_6, 0 special HealPlayerParty @@ -189,24 +188,24 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_25B0E0:: @ 825B0E0 waitstate return -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B105:: @ 825B105 +BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland:: @ 825B105 factory_get FACTORY_DATA_WIN_STREAK_SWAPS compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF3E + goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above factory_get FACTORY_DATA_WIN_STREAK compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF43 + goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum addvar VAR_RESULT, 1 factory_set FACTORY_DATA_WIN_STREAK, VAR_RESULT frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 - goto BattleFrontier_BattleFactoryBattleRoom_EventScript_25AF85 + goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon end -BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B: @ 825B17B +BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom: @ 825B17B walk_up walk_up walk_up @@ -215,11 +214,11 @@ BattleFrontier_BattleFactoryBattleRoom_Movement_25B17B: @ 825B17B face_right step_end -BattleFrontier_BattleFactoryBattleRoom_Movement_25B182: @ 825B182 +BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland: @ 825B182 walk_right step_end -BattleFrontier_BattleFactoryBattleRoom_Movement_25B184: @ 825B184 +BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter: @ 825B184 walk_down walk_down walk_down @@ -228,28 +227,27 @@ BattleFrontier_BattleFactoryBattleRoom_Movement_25B184: @ 825B184 face_left step_end -BattleFrontier_BattleFactoryBattleRoom_Movement_25B18B: @ 825B18B +BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle: @ 825B18B walk_up walk_up walk_up face_left step_end -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B190:: @ 825B190 -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B190:: @ 825B190 +BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby:: @ 825B190 copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B1AA + goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 4, 8 waitstate end -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25B1AA:: @ 825B1AA +BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles:: @ 825B1AA warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 14, 8 waitstate end -BattleFrontier_BattleFactoryBattleRoom_EventScript_25B1B4:: @ 825B1B4 +BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle:: @ 825B1B4 applymovement 1, Common_Movement_WalkInPlaceFastestRight applymovement 3, Common_Movement_WalkInPlaceFastestRight applymovement 4, Common_Movement_WalkInPlaceFastestRight @@ -259,11 +257,11 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_25B1B4:: @ 825B1B4 waitmovement 0 return -BattleFrontier_BattleFactoryBattleRoom_Text_25B1E2: @ 825B1E2 +BattleFrontier_BattleFactoryBattleRoom_Text_GetAMoveOn: @ 825B1E2 .string "Hey, hey!\n" .string "Get a move on!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B1FB: @ 825B1FB +BattleFrontier_BattleFactoryBattleRoom_Text_NolandImFactoryHead: @ 825B1FB .string "Hey, my name's NOLAND!\n" .string "I'm basically in charge of this place,\l" .string "which is why I'm the FACTORY HEAD!\p" @@ -280,26 +278,26 @@ BattleFrontier_BattleFactoryBattleRoom_Text_25B1FB: @ 825B1FB .string "conditions as you.\p" .string "I'll be using rental POKéMON, too!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B3F1: @ 825B3F1 +BattleFrontier_BattleFactoryBattleRoom_Text_ShakeOutKnowledgeBringItOn: @ 825B3F1 .string "Shake out every last bit of your\n" .string "knowledge and bring it on!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B42D: @ 825B42D +BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass: @ 825B42D .string "NOLAND: Smart going!\n" .string "Let's see your FRONTIER PASS.$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B460: @ 825B460 +BattleFrontier_BattleFactoryBattleRoom_Text_ReceivedKnowledgeSymbol: @ 825B460 .string "The Knowledge Symbol was embossed\n" .string "on the FRONTIER PASS!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B498: @ 825B498 +BattleFrontier_BattleFactoryBattleRoom_Text_NextTimeNoHoldsBarred: @ 825B498 .string "Heh…\n" .string "You're a pretty bright spark…\p" .string "Next time, I'll come after you hard.\n" .string "No holds barred, understand?\p" .string "You keep up your studies!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B517: @ 825B517 +BattleFrontier_BattleFactoryBattleRoom_Text_HarderLookThanLastTime: @ 825B517 .string "NOLAND: Hey, hey! How's it going?\n" .string "You keeping up with your studies?\p" .string "…Oh?\p" @@ -308,21 +306,21 @@ BattleFrontier_BattleFactoryBattleRoom_Text_25B517: @ 825B517 .string "Now, this should be fun!\n" .string "I'm getting excited, hey!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B5CF: @ 825B5CF +BattleFrontier_BattleFactoryBattleRoom_Text_AllRightBringItOn: @ 825B5CF .string "All right!\n" .string "Bring it on!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B5E7: @ 825B5E7 +BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass: @ 825B5E7 .string "NOLAND: What the…\n" .string "You're getting out of my league!\p" .string "Sheesh!\n" .string "Let's see that FRONTIER PASS!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B640: @ 825B640 +BattleFrontier_BattleFactoryBattleRoom_Text_KnowledgeSymbolTookGoldenShine: @ 825B640 .string "The Knowledge Symbol took on\n" .string "a golden shine!$" -BattleFrontier_BattleFactoryBattleRoom_Text_25B66D: @ 825B66D +BattleFrontier_BattleFactoryBattleRoom_Text_LastTimeILoseToYou: @ 825B66D .string "Pfft, man!\p" .string "That's absolutely the last time\n" .string "I lose to you!\p" diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/map.json b/data/maps/BattleFrontier_BattleFactoryLobby/map.json index 8ed837413..ade32b054 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/map.json +++ b/data/maps/BattleFrontier_BattleFactoryLobby/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_2585CB", + "script": "BattleFrontier_BattleFactoryLobby_EventScript_SinglesAttendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_258813", + "script": "BattleFrontier_BattleFactoryLobby_EventScript_Woman", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 0, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_25881C", + "script": "BattleFrontier_BattleFactoryLobby_EventScript_Camper", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_258825", + "script": "BattleFrontier_BattleFactoryLobby_EventScript_Picnicker", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_258830", + "script": "BattleFrontier_BattleFactoryLobby_EventScript_FatMan", "flag": "0" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_2585DD", + "script": "BattleFrontier_BattleFactoryLobby_EventScript_DoublesAttendant", "flag": "0" } ], @@ -117,7 +117,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_2587E1" + "script": "BattleFrontier_BattleFactoryLobby_EventScript_ShowSinglesResults" }, { "type": "sign", @@ -125,7 +125,7 @@ "y": 7, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_2587FA" + "script": "BattleFrontier_BattleFactoryLobby_EventScript_ShowDoublesResults" }, { "type": "sign", @@ -133,7 +133,7 @@ "y": 4, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "BattleFrontier_BattleFactoryLobby_EventScript_258839" + "script": "BattleFrontier_BattleFactoryLobby_EventScript_RulesBoard" } ] } \ No newline at end of file diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index fec051025..370bc237b 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -1,32 +1,32 @@ BattleFrontier_BattleFactoryLobby_MapScripts:: @ 82583E8 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryLobby_MapScript2_258407 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryLobby_MapScript2_2583F3 + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryLobby_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryLobby_OnWarp .byte 0 -BattleFrontier_BattleFactoryLobby_MapScript2_2583F3: @ 82583F3 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleFactoryLobby_EventScript_2583FD +BattleFrontier_BattleFactoryLobby_OnWarp: @ 82583F3 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleFactoryLobby_EventScript_TurnPlayerNorth .2byte 0 -BattleFrontier_BattleFactoryLobby_EventScript_2583FD:: @ 82583FD +BattleFrontier_BattleFactoryLobby_EventScript_TurnPlayerNorth:: @ 82583FD setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattleFactoryLobby_MapScript2_258407: @ 8258407 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryLobby_EventScript_258431 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleFactoryLobby_EventScript_25843A - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleFactoryLobby_EventScript_258592 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattleFactoryLobby_EventScript_25849B - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattleFactoryLobby_EventScript_258506 +BattleFrontier_BattleFactoryLobby_OnFrame: @ 8258407 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryLobby_EventScript_GetChallengeStatus + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleFactoryLobby_EventScript_QuitWithoutSaving + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleFactoryLobby_EventScript_ResumeChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattleFactoryLobby_EventScript_WonChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge .2byte 0 -BattleFrontier_BattleFactoryLobby_EventScript_258431:: @ 8258431 +BattleFrontier_BattleFactoryLobby_EventScript_GetChallengeStatus:: @ 8258431 frontier_getstatus end -BattleFrontier_BattleFactoryLobby_EventScript_25843A:: @ 825843A +BattleFrontier_BattleFactoryLobby_EventScript_QuitWithoutSaving:: @ 825843A lockall - msgbox BattleFrontier_BattleFactoryLobby_Text_258ECA, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryLobby_Text_DidntSaveBeforeQuitting, MSGBOX_DEFAULT closemessage factory_setswapped factory_set FACTORY_DATA_WIN_STREAK_SWAPS, 0 @@ -37,36 +37,35 @@ BattleFrontier_BattleFactoryLobby_EventScript_25843A:: @ 825843A releaseall end -BattleFrontier_BattleFactoryLobby_EventScript_25849B:: @ 825849B +BattleFrontier_BattleFactoryLobby_EventScript_WonChallenge:: @ 825849B lockall frontier_isbrain compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2584BD - msgbox BattleFrontier_BattleFactoryLobby_Text_258D93, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_DefeatedFactoryHead + msgbox BattleFrontier_BattleFactoryLobby_Text_CongratsSevenWins, MSGBOX_DEFAULT waitmessage - goto BattleFrontier_BattleFactoryLobby_EventScript_2584C6 + goto BattleFrontier_BattleFactoryLobby_EventScript_GiveBattlePoints -BattleFrontier_BattleFactoryLobby_EventScript_2584BD:: @ 82584BD - msgbox BattleFrontier_BattleFactoryLobby_Text_25926A, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_DefeatedFactoryHead:: @ 82584BD + msgbox BattleFrontier_BattleFactoryLobby_Text_CongratsForDefeatingHead, MSGBOX_DEFAULT waitmessage - -BattleFrontier_BattleFactoryLobby_EventScript_2584C6:: @ 82584C6 - msgbox BattleFrontier_BattleFactoryLobby_Text_2592BD, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_GiveBattlePoints:: @ 82584C6 + msgbox BattleFrontier_BattleFactoryLobby_Text_AwardBattlePoints, MSGBOX_DEFAULT frontier_givepoints msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS - message BattleFrontier_BattleFactoryLobby_Text_259323 + message BattleFrontier_BattleFactoryLobby_Text_ExchangeMonsAndSave waitmessage frontier_checkairshow special LoadPlayerParty factory_save 0 playse SE_SAVE waitse - goto BattleFrontier_BattleFactoryLobby_EventScript_25853B + goto BattleFrontier_BattleFactoryLobby_EventScript_AskRecordBattle end -BattleFrontier_BattleFactoryLobby_EventScript_258506:: @ 8258506 +BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge:: @ 8258506 lockall - message BattleFrontier_BattleFactoryLobby_Text_258CC7 + message BattleFrontier_BattleFactoryLobby_Text_ReturnMonsSaveResults waitmessage frontier_checkairshow special LoadPlayerParty @@ -75,30 +74,30 @@ BattleFrontier_BattleFactoryLobby_EventScript_258506:: @ 8258506 playse SE_SAVE waitse -BattleFrontier_BattleFactoryLobby_EventScript_25853B:: @ 825853B +BattleFrontier_BattleFactoryLobby_EventScript_AskRecordBattle:: @ 825853B call BattleFrontier_BattleFactoryLobby_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_258582 - message BattleFrontier_BattleFactoryLobby_Text_259388 + goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle + message BattleFrontier_BattleFactoryLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, BattleFrontier_BattleFactoryLobby_EventScript_258582 - case 0, BattleFrontier_BattleFactoryLobby_EventScript_25857D - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_258582 + case 1, BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle + case 0, BattleFrontier_BattleFactoryLobby_EventScript_RecordBattle + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle -BattleFrontier_BattleFactoryLobby_EventScript_25857D:: @ 825857D +BattleFrontier_BattleFactoryLobby_EventScript_RecordBattle:: @ 825857D call BattleFrontier_EventScript_SaveBattle -BattleFrontier_BattleFactoryLobby_EventScript_258582:: @ 8258582 - msgbox BattleFrontier_BattleFactoryLobby_Text_258BC5, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle:: @ 8258582 + msgbox BattleFrontier_BattleFactoryLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -BattleFrontier_BattleFactoryLobby_EventScript_258592:: @ 8258592 +BattleFrontier_BattleFactoryLobby_EventScript_ResumeChallenge:: @ 8258592 lockall - message BattleFrontier_BattleFactoryLobby_Text_258E77 + message BattleFrontier_BattleFactoryLobby_Text_WaitingForYouToResume waitmessage factory_save CHALLENGE_STATUS_SAVING playse SE_SAVE @@ -106,57 +105,56 @@ BattleFrontier_BattleFactoryLobby_EventScript_258592:: @ 8258592 frontier_set FRONTIER_DATA_PAUSED, FALSE setvar VAR_TEMP_0, 255 setvar VAR_0x8006, 2 - goto BattleFrontier_BattleFactoryLobby_EventScript_25871A + goto BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge -BattleFrontier_BattleFactoryLobby_EventScript_2585CB:: @ 82585CB +BattleFrontier_BattleFactoryLobby_EventScript_SinglesAttendant:: @ 82585CB lock faceplayer setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_FACTORY setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - goto BattleFrontier_BattleFactoryLobby_EventScript_2585ED + goto BattleFrontier_BattleFactoryLobby_EventScript_Attendant end -BattleFrontier_BattleFactoryLobby_EventScript_2585DD:: @ 82585DD +BattleFrontier_BattleFactoryLobby_EventScript_DoublesAttendant:: @ 82585DD setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_FACTORY setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - goto BattleFrontier_BattleFactoryLobby_EventScript_2585ED + goto BattleFrontier_BattleFactoryLobby_EventScript_Attendant end -BattleFrontier_BattleFactoryLobby_EventScript_2585ED:: @ 82585ED +BattleFrontier_BattleFactoryLobby_EventScript_Attendant:: @ 82585ED special SavePlayerParty compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2587B1 + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForSingleBattle compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2587BA - -BattleFrontier_BattleFactoryLobby_EventScript_258606:: @ 8258606 + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForDoubleBattle +BattleFrontier_BattleFactoryLobby_EventScript_AskTakeChallenge:: @ 8258606 compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2587C3 + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TakeSinglesChallenge compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2587C9 + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TakeDoublesChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, 0 switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryLobby_EventScript_258653 - case 1, BattleFrontier_BattleFactoryLobby_EventScript_258768 - case 2, BattleFrontier_BattleFactoryLobby_EventScript_25879D - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_25879D + case 0, BattleFrontier_BattleFactoryLobby_EventScript_TryEnterChallenge + case 1, BattleFrontier_BattleFactoryLobby_EventScript_ExplainChallenge + case 2, BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge -BattleFrontier_BattleFactoryLobby_EventScript_258653:: @ 8258653 - message BattleFrontier_BattleFactoryLobby_Text_258BE9 +BattleFrontier_BattleFactoryLobby_EventScript_TryEnterChallenge:: @ 8258653 + message BattleFrontier_BattleFactoryLobby_Text_WhichLevelMode waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case FRONTIER_LVL_TENT, BattleFrontier_BattleFactoryLobby_EventScript_25879D - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_25879D + case FRONTIER_LVL_TENT, BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT - msgbox BattleFrontier_BattleFactoryLobby_Text_258C27, MSGBOX_YESNO + msgbox BattleFrontier_BattleFactoryLobby_Text_OkayToSaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattleFactoryLobby_EventScript_25879A - case YES, BattleFrontier_BattleFactoryLobby_EventScript_2586B9 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_25879A + case NO, BattleFrontier_BattleFactoryLobby_EventScript_LoadPartyAndCancelChallenge + case YES, BattleFrontier_BattleFactoryLobby_EventScript_SaveBeforeChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_LoadPartyAndCancelChallenge -BattleFrontier_BattleFactoryLobby_EventScript_2586B9:: @ 82586B9 +BattleFrontier_BattleFactoryLobby_EventScript_SaveBeforeChallenge:: @ 82586B9 setvar VAR_TEMP_0, 0 factory_init frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING @@ -167,90 +165,89 @@ BattleFrontier_BattleFactoryLobby_EventScript_2586B9:: @ 82586B9 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_258783 + goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed setvar VAR_0x8006, 0 - -BattleFrontier_BattleFactoryLobby_EventScript_25871A:: @ 825871A +BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge:: @ 825871A special SavePlayerParty - msgbox BattleFrontier_BattleFactoryLobby_Text_258CB1, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryLobby_Text_StepThisWay, MSGBOX_DEFAULT closemessage compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_25875C + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_258762 - applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_2587A7 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_2587AC + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant + applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_AttendantEnterDoor + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor waitmovement 0 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 13 setvar VAR_TEMP_0, 0 waitstate end -BattleFrontier_BattleFactoryLobby_EventScript_25875C:: @ 825875C +BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant:: @ 825875C setvar VAR_LAST_TALKED, 1 return -BattleFrontier_BattleFactoryLobby_EventScript_258762:: @ 8258762 +BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant:: @ 8258762 setvar VAR_LAST_TALKED, 6 return -BattleFrontier_BattleFactoryLobby_EventScript_258768:: @ 8258768 +BattleFrontier_BattleFactoryLobby_EventScript_ExplainChallenge:: @ 8258768 compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2587CF + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_ExplainSinglesChallenge compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_2587D8 - goto BattleFrontier_BattleFactoryLobby_EventScript_258606 + call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_ExplainDoublesChallenge + goto BattleFrontier_BattleFactoryLobby_EventScript_AskTakeChallenge -BattleFrontier_BattleFactoryLobby_EventScript_258783:: @ 8258783 +BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed:: @ 8258783 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - goto BattleFrontier_BattleFactoryLobby_EventScript_25879D + goto BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge -BattleFrontier_BattleFactoryLobby_EventScript_25879A:: @ 825879A +BattleFrontier_BattleFactoryLobby_EventScript_LoadPartyAndCancelChallenge:: @ 825879A special LoadPlayerParty -BattleFrontier_BattleFactoryLobby_EventScript_25879D:: @ 825879D - msgbox BattleFrontier_BattleFactoryLobby_Text_258BC5, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge:: @ 825879D + msgbox BattleFrontier_BattleFactoryLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT release end -BattleFrontier_BattleFactoryLobby_Movement_2587A7: @ 82587A7 +BattleFrontier_BattleFactoryLobby_Movement_AttendantEnterDoor: @ 82587A7 walk_up walk_up walk_up set_invisible step_end -BattleFrontier_BattleFactoryLobby_Movement_2587AC: @ 82587AC +BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor: @ 82587AC walk_up walk_up walk_up walk_up step_end -BattleFrontier_BattleFactoryLobby_EventScript_2587B1:: @ 82587B1 - msgbox BattleFrontier_BattleFactoryLobby_Text_2588EE, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForSingleBattle:: @ 82587B1 + msgbox BattleFrontier_BattleFactoryLobby_Text_WelcomeForSingleBattle, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryLobby_EventScript_2587BA:: @ 82587BA - msgbox BattleFrontier_BattleFactoryLobby_Text_258F93, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForDoubleBattle:: @ 82587BA + msgbox BattleFrontier_BattleFactoryLobby_Text_WelcomeForDoubleBattle, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryLobby_EventScript_2587C3:: @ 82587C3 - message BattleFrontier_BattleFactoryLobby_Text_25897A +BattleFrontier_BattleFactoryLobby_EventScript_TakeSinglesChallenge:: @ 82587C3 + message BattleFrontier_BattleFactoryLobby_Text_TakeSinglesChallenge return -BattleFrontier_BattleFactoryLobby_EventScript_2587C9:: @ 82587C9 - message BattleFrontier_BattleFactoryLobby_Text_25901F +BattleFrontier_BattleFactoryLobby_EventScript_TakeDoublesChallenge:: @ 82587C9 + message BattleFrontier_BattleFactoryLobby_Text_TakeDoublesChallenge return -BattleFrontier_BattleFactoryLobby_EventScript_2587CF:: @ 82587CF - msgbox BattleFrontier_BattleFactoryLobby_Text_2589B3, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_ExplainSinglesChallenge:: @ 82587CF + msgbox BattleFrontier_BattleFactoryLobby_Text_ExplainSinglesChallenge, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryLobby_EventScript_2587D8:: @ 82587D8 - msgbox BattleFrontier_BattleFactoryLobby_Text_259058, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryLobby_EventScript_ExplainDoublesChallenge:: @ 82587D8 + msgbox BattleFrontier_BattleFactoryLobby_Text_ExplainDoublesChallenge, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryLobby_EventScript_2587E1:: @ 82587E1 +BattleFrontier_BattleFactoryLobby_EventScript_ShowSinglesResults:: @ 82587E1 lockall frontier_results FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_SINGLES waitbuttonpress @@ -258,7 +255,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2587E1:: @ 82587E1 releaseall end -BattleFrontier_BattleFactoryLobby_EventScript_2587FA:: @ 82587FA +BattleFrontier_BattleFactoryLobby_EventScript_ShowDoublesResults:: @ 82587FA lockall frontier_results FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_DOUBLES waitbuttonpress @@ -266,85 +263,85 @@ BattleFrontier_BattleFactoryLobby_EventScript_2587FA:: @ 82587FA releaseall end -BattleFrontier_BattleFactoryLobby_EventScript_258813:: @ 8258813 - msgbox BattleFrontier_BattleFactoryLobby_Text_2593D7, MSGBOX_NPC +BattleFrontier_BattleFactoryLobby_EventScript_Woman:: @ 8258813 + msgbox BattleFrontier_BattleFactoryLobby_Text_NeedKnowledgeOfMonsMoves, MSGBOX_NPC end -BattleFrontier_BattleFactoryLobby_EventScript_25881C:: @ 825881C - msgbox BattleFrontier_BattleFactoryLobby_Text_2594E5, MSGBOX_NPC +BattleFrontier_BattleFactoryLobby_EventScript_Camper:: @ 825881C + msgbox BattleFrontier_BattleFactoryLobby_Text_SwappedForWeakMon, MSGBOX_NPC end -BattleFrontier_BattleFactoryLobby_EventScript_258825:: @ 8258825 +BattleFrontier_BattleFactoryLobby_EventScript_Picnicker:: @ 8258825 lock - msgbox BattleFrontier_BattleFactoryLobby_Text_259547, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryLobby_Text_NeedToCheckOpponentsMons, MSGBOX_DEFAULT release end -BattleFrontier_BattleFactoryLobby_EventScript_258830:: @ 8258830 - msgbox BattleFrontier_BattleFactoryLobby_Text_2595C4, MSGBOX_NPC +BattleFrontier_BattleFactoryLobby_EventScript_FatMan:: @ 8258830 + msgbox BattleFrontier_BattleFactoryLobby_Text_CantFigureOutStaffHints, MSGBOX_NPC end -BattleFrontier_BattleFactoryLobby_EventScript_258839:: @ 8258839 +BattleFrontier_BattleFactoryLobby_EventScript_RulesBoard:: @ 8258839 lockall - msgbox BattleFrontier_BattleFactoryLobby_Text_259721, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryLobby_EventScript_258848 + msgbox BattleFrontier_BattleFactoryLobby_Text_RulesAreListed, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattleFactoryLobby_EventScript_258848:: @ 8258848 - message BattleFrontier_BattleFactoryLobby_Text_259743 +BattleFrontier_BattleFactoryLobby_EventScript_ReadRulesBoard:: @ 8258848 + message BattleFrontier_BattleFactoryLobby_Text_ReadWhichHeading waitmessage multichoice 17, 0, MULTI_BATTLE_FACTORY_RULES, 0 switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryLobby_EventScript_2588A6 - case 1, BattleFrontier_BattleFactoryLobby_EventScript_2588B4 - case 2, BattleFrontier_BattleFactoryLobby_EventScript_2588C2 - case 3, BattleFrontier_BattleFactoryLobby_EventScript_2588D0 - case 4, BattleFrontier_BattleFactoryLobby_EventScript_2588DE - case 5, BattleFrontier_BattleFactoryLobby_EventScript_2588EC - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_2588EC + case 0, BattleFrontier_BattleFactoryLobby_EventScript_RulesBasics + case 1, BattleFrontier_BattleFactoryLobby_EventScript_RulesSwapPartner + case 2, BattleFrontier_BattleFactoryLobby_EventScript_RulesSwapNumber + case 3, BattleFrontier_BattleFactoryLobby_EventScript_RulesSwapNotes + case 4, BattleFrontier_BattleFactoryLobby_EventScript_RulesOpenLv + case 5, BattleFrontier_BattleFactoryLobby_EventScript_ExitRules + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_ExitRules end -BattleFrontier_BattleFactoryLobby_EventScript_2588A6:: @ 82588A6 - msgbox BattleFrontier_BattleFactoryLobby_Text_259766, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryLobby_EventScript_258848 +BattleFrontier_BattleFactoryLobby_EventScript_RulesBasics:: @ 82588A6 + msgbox BattleFrontier_BattleFactoryLobby_Text_ExplainBasicRules, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattleFactoryLobby_EventScript_2588B4:: @ 82588B4 - msgbox BattleFrontier_BattleFactoryLobby_Text_2597FB, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryLobby_EventScript_258848 +BattleFrontier_BattleFactoryLobby_EventScript_RulesSwapPartner:: @ 82588B4 + msgbox BattleFrontier_BattleFactoryLobby_Text_ExplainSwapPartnerRules, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattleFactoryLobby_EventScript_2588C2:: @ 82588C2 - msgbox BattleFrontier_BattleFactoryLobby_Text_25987E, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryLobby_EventScript_258848 +BattleFrontier_BattleFactoryLobby_EventScript_RulesSwapNumber:: @ 82588C2 + msgbox BattleFrontier_BattleFactoryLobby_Text_ExplainSwapNumberRules, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattleFactoryLobby_EventScript_2588D0:: @ 82588D0 - msgbox BattleFrontier_BattleFactoryLobby_Text_259920, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryLobby_EventScript_258848 +BattleFrontier_BattleFactoryLobby_EventScript_RulesSwapNotes:: @ 82588D0 + msgbox BattleFrontier_BattleFactoryLobby_Text_ExplainSwapNotesRules, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattleFactoryLobby_EventScript_2588DE:: @ 82588DE - msgbox BattleFrontier_BattleFactoryLobby_Text_259A5E, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryLobby_EventScript_258848 +BattleFrontier_BattleFactoryLobby_EventScript_RulesOpenLv:: @ 82588DE + msgbox BattleFrontier_BattleFactoryLobby_Text_ExplainOpenLvRules, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattleFactoryLobby_EventScript_2588EC:: @ 82588EC +BattleFrontier_BattleFactoryLobby_EventScript_ExitRules:: @ 82588EC releaseall end -BattleFrontier_BattleFactoryLobby_Text_2588EE: @ 82588EE +BattleFrontier_BattleFactoryLobby_Text_WelcomeForSingleBattle: @ 82588EE .string "Where the intelligence of TRAINERS\n" .string "is put to the test!\p" .string "Welcome to the BATTLE FACTORY!\p" .string "I am your guide to the Battle Swap\n" .string "Single Tournament.$" -BattleFrontier_BattleFactoryLobby_Text_25897A: @ 825897A +BattleFrontier_BattleFactoryLobby_Text_TakeSinglesChallenge: @ 825897A .string "Would you like to take the Battle\n" .string "Swap Single challenge?$" -BattleFrontier_BattleFactoryLobby_Text_2589B3: @ 82589B3 +BattleFrontier_BattleFactoryLobby_Text_ExplainSinglesChallenge: @ 82589B3 .string "The Battle Swap Single Tournament\n" .string "is a SINGLE BATTLE competition using\l" .string "only rental POKéMON.\p" @@ -362,79 +359,85 @@ BattleFrontier_BattleFactoryLobby_Text_2589B3: @ 82589B3 .string "If you don't save, you will be\n" .string "disqualified from your challenge.$" -BattleFrontier_BattleFactoryLobby_Text_258BC5: @ 8258BC5 +BattleFrontier_BattleFactoryLobby_Text_LookForwardToNextVisit: @ 8258BC5 .string "We look forward to your next visit.$" -BattleFrontier_BattleFactoryLobby_Text_258BE9: @ 8258BE9 +BattleFrontier_BattleFactoryLobby_Text_WhichLevelMode: @ 8258BE9 .string "Which level do you wish to challenge?\n" .string "Level 50 or Open Level?$" -BattleFrontier_BattleFactoryLobby_Text_258C27: @ 8258C27 +BattleFrontier_BattleFactoryLobby_Text_OkayToSaveBeforeChallenge: @ 8258C27 .string "Before you begin your challenge,\n" .string "I need to save the game. Is that okay?$" -BattleFrontier_BattleFactoryLobby_Text_258C6F: @ 8258C6F +@ Unused +BattleFrontier_BattleFactoryLobby_Text_WillHoldMonsForSafekeeping: @ 8258C6F .string "Okay, I will hold your POKéMON for\n" .string "safekeeping while you compete.$" -BattleFrontier_BattleFactoryLobby_Text_258CB1: @ 8258CB1 +BattleFrontier_BattleFactoryLobby_Text_StepThisWay: @ 8258CB1 .string "Please step this way.$" -BattleFrontier_BattleFactoryLobby_Text_258CC7: @ 8258CC7 +BattleFrontier_BattleFactoryLobby_Text_ReturnMonsSaveResults: @ 8258CC7 .string "Thank you for participating!\p" .string "I will return your POKéMON in exchange\n" .string "for our rental POKéMON.\p" .string "I must also save the event results.\n" .string "Please wait.$" -BattleFrontier_BattleFactoryLobby_Text_258D54: @ 8258D54 +@ Unused +BattleFrontier_BattleFactoryLobby_Text_ReturnMons: @ 8258D54 .string "I will return your POKéMON in exchange\n" .string "for our rental POKéMON.$" -BattleFrontier_BattleFactoryLobby_Text_258D93: @ 8258D93 +BattleFrontier_BattleFactoryLobby_Text_CongratsSevenWins: @ 8258D93 .string "Congratulations! You've won seven\n" .string "straight Battle Swap matches!$" -BattleFrontier_BattleFactoryLobby_Text_258DD3: @ 8258DD3 +@ Unused +BattleFrontier_BattleFactoryLobby_Text_AwardBattlePointsForStreak: @ 8258DD3 .string "In recognition of your 7-win streak,\n" .string "we award you these Battle Point(s).$" -BattleFrontier_BattleFactoryLobby_Text_258E1C: @ 8258E1C +@ Unused +BattleFrontier_BattleFactoryLobby_Text_MaxBattlePoints: @ 8258E1C .string "Oh, oh, oh!\p" .string "Your Battle Points are maxed.\p" .string "Please come back after using\n" .string "some Battle Points.$" -BattleFrontier_BattleFactoryLobby_Text_258E77: @ 8258E77 +BattleFrontier_BattleFactoryLobby_Text_WaitingForYouToResume: @ 8258E77 .string "We've been waiting for you!\p" .string "Before we resume your challenge,\n" .string "I must save the game.$" -BattleFrontier_BattleFactoryLobby_Text_258ECA: @ 8258ECA +BattleFrontier_BattleFactoryLobby_Text_DidntSaveBeforeQuitting: @ 8258ECA .string "I'm sorry to say this, but you didn't\n" .string "save before you quit playing last time.\p" .string "As a result, you have been disqualified\n" .string "from your challenge.$" -BattleFrontier_BattleFactoryLobby_Text_258F55: @ 8258F55 +@ Unused +BattleFrontier_BattleFactoryLobby_Text_WellReturnMons: @ 8258F55 .string "We'll return your personal POKéMON.$" -BattleFrontier_BattleFactoryLobby_Text_258F79: @ 8258F79 +@ Unused +BattleFrontier_BattleFactoryLobby_Text_ReceivedPrizeItem: @ 8258F79 .string "{PLAYER} received the prize\n" .string "{STR_VAR_1}.$" -BattleFrontier_BattleFactoryLobby_Text_258F93: @ 8258F93 +BattleFrontier_BattleFactoryLobby_Text_WelcomeForDoubleBattle: @ 8258F93 .string "Where the intelligence of TRAINERS\n" .string "is put to the test!\p" .string "Welcome to the BATTLE FACTORY!\p" .string "I am your guide to the Battle Swap\n" .string "Double Tournament.$" -BattleFrontier_BattleFactoryLobby_Text_25901F: @ 825901F +BattleFrontier_BattleFactoryLobby_Text_TakeDoublesChallenge: @ 825901F .string "Would you like to take the Battle\n" .string "Swap Double challenge?$" -BattleFrontier_BattleFactoryLobby_Text_259058: @ 8259058 +BattleFrontier_BattleFactoryLobby_Text_ExplainDoublesChallenge: @ 8259058 .string "The Battle Swap Double Tournament\n" .string "is a DOUBLE BATTLE competition using\l" .string "only rental POKéMON.\p" @@ -452,28 +455,28 @@ BattleFrontier_BattleFactoryLobby_Text_259058: @ 8259058 .string "If you don't save before interrupting,\n" .string "you will be disqualified.$" -BattleFrontier_BattleFactoryLobby_Text_25926A: @ 825926A +BattleFrontier_BattleFactoryLobby_Text_CongratsForDefeatingHead: @ 825926A .string "Congratulations for defeating\n" .string "the FACTORY HEAD and winning\l" .string "seven matches in a row!$" -BattleFrontier_BattleFactoryLobby_Text_2592BD: @ 82592BD +BattleFrontier_BattleFactoryLobby_Text_AwardBattlePoints: @ 82592BD .string "In recognition of your wealth of\n" .string "knowledge and keen intelligence,\l" .string "we award you these Battle Point(s).$" -BattleFrontier_BattleFactoryLobby_Text_259323: @ 8259323 +BattleFrontier_BattleFactoryLobby_Text_ExchangeMonsAndSave: @ 8259323 .string "Let me exchange your POKéMON\n" .string "for our rental POKéMON.\p" .string "I need to save the battle data,\n" .string "so please wait.$" -BattleFrontier_BattleFactoryLobby_Text_259388: @ 8259388 +BattleFrontier_BattleFactoryLobby_Text_RecordLastMatch: @ 8259388 .string "Would you like to record your last\n" .string "BATTLE FACTORY match on your\l" .string "FRONTIER PASS?$" -BattleFrontier_BattleFactoryLobby_Text_2593D7: @ 82593D7 +BattleFrontier_BattleFactoryLobby_Text_NeedKnowledgeOfMonsMoves: @ 82593D7 .string "Hi!\n" .string "You, there!\p" .string "Are you thinking that the events here\n" @@ -485,25 +488,26 @@ BattleFrontier_BattleFactoryLobby_Text_2593D7: @ 82593D7 .string "about POKéMON and their moves,\l" .string "it will be tough to keep winning.$" -BattleFrontier_BattleFactoryLobby_Text_2594E5: @ 82594E5 +BattleFrontier_BattleFactoryLobby_Text_SwappedForWeakMon: @ 82594E5 .string "I swapped for a weak POKéMON…\n" .string "I thought it was a good kind to have…\p" .string "They wiped the floor with us…$" -BattleFrontier_BattleFactoryLobby_Text_259547: @ 8259547 +BattleFrontier_BattleFactoryLobby_Text_NeedToCheckOpponentsMons: @ 8259547 .string "Things haven't been going my way\n" .string "at all.\p" .string "You need to check your opponent's\n" .string "POKéMON during battle to see if\l" .string "they're any good.$" -BattleFrontier_BattleFactoryLobby_Text_2595C4: @ 82595C4 +BattleFrontier_BattleFactoryLobby_Text_CantFigureOutStaffHints: @ 82595C4 .string "You know how the staff here give you\n" .string "a few hints about your next opponent?\p" .string "Well, I'm a full-grown man, but I have\n" .string "trouble figuring out their hints.$" -BattleFrontier_BattleFactoryLobby_Text_259658: @ 8259658 +@ Unused +BattleFrontier_BattleFactoryLobby_Text_RentalMonsAreVaried: @ 8259658 .string "Like, I'm really tough, but I get bored\n" .string "really easily, so I just kept swapping\l" .string "and battling over and over.\p" @@ -511,35 +515,33 @@ BattleFrontier_BattleFactoryLobby_Text_259658: @ 8259658 .string "Battle Swap events, I noticed they\l" .string "varied the rental POKéMON.$" -BattleFrontier_BattleFactoryLobby_Text_259721: @ 8259721 -SlateportCity_BattleTentLobby_Text_259721: @ 8259721 +BattleFrontier_BattleFactoryLobby_Text_RulesAreListed: @ 8259721 .string "The Battle Swap rules are listed.$" -BattleFrontier_BattleFactoryLobby_Text_259743: @ 8259743 -SlateportCity_BattleTentLobby_Text_259743: @ 8259743 +BattleFrontier_BattleFactoryLobby_Text_ReadWhichHeading: @ 8259743 .string "Which heading do you want to read?$" -BattleFrontier_BattleFactoryLobby_Text_259766: @ 8259766 +BattleFrontier_BattleFactoryLobby_Text_ExplainBasicRules: @ 8259766 .string "In a Battle Swap event, you may use\n" .string "only three POKéMON.\p" .string "Whether you are renting or swapping,\n" .string "your team may not have two or more\l" .string "of the same POKéMON.$" -BattleFrontier_BattleFactoryLobby_Text_2597FB: @ 82597FB +BattleFrontier_BattleFactoryLobby_Text_ExplainSwapPartnerRules: @ 82597FB .string "You may swap POKéMON only with\n" .string "the TRAINER you have just defeated.\p" .string "You may swap for only those POKéMON\n" .string "used by the beaten TRAINER.$" -BattleFrontier_BattleFactoryLobby_Text_25987E: @ 825987E +BattleFrontier_BattleFactoryLobby_Text_ExplainSwapNumberRules: @ 825987E .string "After every battle you win, you may\n" .string "swap for one of your defeated\l" .string "opponent's POKéMON.\p" .string "You will not be able to swap POKéMON\n" .string "with the seventh TRAINER in the event.$" -BattleFrontier_BattleFactoryLobby_Text_259920: @ 8259920 +BattleFrontier_BattleFactoryLobby_Text_ExplainSwapNotesRules: @ 8259920 .string "There are two key points to be aware\n" .string "of when swapping POKéMON.\p" .string "First, when swapping, you can't check\n" @@ -551,7 +553,7 @@ BattleFrontier_BattleFactoryLobby_Text_259920: @ 8259920 .string "This sequence remains unchanged\n" .string "even when swaps are made.$" -BattleFrontier_BattleFactoryLobby_Text_259A5E: @ 8259A5E +BattleFrontier_BattleFactoryLobby_Text_ExplainOpenLvRules: @ 8259A5E .string "In the Open Level, the rental POKéMON\n" .string "and the opposing TRAINERS' POKéMON\l" .string "are all Level 100.$" diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index 98589b97b..11c731f24 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -1,211 +1,209 @@ BattleFrontier_BattleFactoryPreBattleRoom_MapScripts:: @ 8259ABA - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AEF - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AC5 + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_OnWarp .byte 0 -BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AC5: @ 8259AC5 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259ACF +BattleFrontier_BattleFactoryPreBattleRoom_OnWarp: @ 8259AC5 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SetUpObjects .2byte 0 -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259ACF:: @ 8259ACF +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SetUpObjects:: @ 8259ACF setvar VAR_TEMP_1, 1 compare VAR_0x8006, 1 - goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AEA + goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth setobjectxy 1, 8, 7 turnobject 1, DIR_SOUTH - -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AEA:: @ 8259AEA +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth:: @ 8259AEA turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattleFactoryPreBattleRoom_MapScript2_259AEF: @ 8259AEF - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AF9 +BattleFrontier_BattleFactoryPreBattleRoom_OnFrame: @ 8259AEF + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterRoom .2byte 0 -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259AF9:: @ 8259AF9 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterRoom:: @ 8259AF9 compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259BA5 + goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 - applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1AC - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A19A + applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantEnterRoom + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerEnterRoom waitmovement 0 compare VAR_0x8006, 2 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E69 + goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge factory_generaterentalmons factory_generateopponentmons factory_getopponentmontype setorcopyvar VAR_0x8005, VAR_RESULT factory_getopponentstyle setorcopyvar VAR_0x8006, VAR_RESULT - call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93 - call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A1C8, MSGBOX_DEFAULT + call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentType + call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentStyle + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT fadescreen 1 factory_setswapped factory_rentmons waitstate -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74:: @ 8259B74 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB96, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom:: @ 8259B74 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage call BattleFrontier_EventScript_GetLvlMode compare VAR_RESULT, FRONTIER_LVL_50 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A17C + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLv50 compare VAR_RESULT, FRONTIER_LVL_OPEN - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A18B + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen waitmovement 0 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 255, 6, 11 waitstate end -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259BA5:: @ 8259BA5 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle:: @ 8259BA5 factory_setopponentmons factory_resethelditems - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A22D, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_LetUsRestoreMons, MSGBOX_DEFAULT playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty frontier_getbrainstatus compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C26 + goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent playse SE_TOREEYE waitse - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AC15, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_WaitFewMoments, MSGBOX_DEFAULT closemessage - applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1BF + applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantMoveToReceiveCall waitmovement 0 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AC58, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_UnderstoodSirWillDo, MSGBOX_DEFAULT closemessage - applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1C3 + applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantReturnToPlayer waitmovement 0 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AC89, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_MessageFromHeadComeRightNow, MSGBOX_DEFAULT closemessage delay 16 - goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9 + goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead end -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13:: @ 8259C13 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent:: @ 8259C13 frontier_getbrainstatus compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9 - -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C26:: @ 8259C26 + goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent:: @ 8259C26 frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E1D + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor2ndOpponent compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E24 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor3rdOpponent compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E2B + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor4thOpponent compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E32 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor5thOpponent compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E39 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor6thOpponent compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E40 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CC6 + goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98 - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CFC - case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38 - case 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapMon + case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRecordBattle + case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskPauseChallenge + case 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CC6:: @ 8259CC6 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponentNoRecord:: @ 8259CC6 multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98 - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38 - case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapMon + case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskPauseChallenge + case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CFC:: @ 8259CFC - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25ABD2 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRecordBattle:: @ 8259CFC + message BattleFrontier_BattleFactoryPreBattleRoom_Text_RecordLatestBattle waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D2E - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent + case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_RecordBattle + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D2E:: @ 8259D2E +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_RecordBattle:: @ 8259D2E call BattleFrontier_EventScript_SaveBattle - goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38:: @ 8259D38 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A350, MSGBOX_YESNO +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskPauseChallenge:: @ 8259D38 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_SaveAndQuitGame, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 - case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent + case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_PauseChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66:: @ 8259D66 - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A37A +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRetireChallenge:: @ 8259D66 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_RetireFromChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25AEF8 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent + case 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D98:: @ 8259D98 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapMon:: @ 8259D98 factory_generateopponentmons factory_getopponentmontype setorcopyvar VAR_0x8005, VAR_RESULT factory_getopponentstyle setorcopyvar VAR_0x8006, VAR_RESULT - call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93 - call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB2E, MSGBOX_YESNO + call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentType + call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentStyle + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_LikeToSwapMon, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 - case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom + case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2:: @ 8259DF2 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons:: @ 8259DF2 fadescreen 1 factory_swapmons waitstate compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom factory_setswapped - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB6C, MSGBOX_DEFAULT - goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT + goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E1D:: @ 8259E1D - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A263 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor2ndOpponent:: @ 8259E1D + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor2ndOpponent waitmessage return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E24:: @ 8259E24 - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A289 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor3rdOpponent:: @ 8259E24 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor3rdOpponent waitmessage return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E2B:: @ 8259E2B - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A2AF +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor4thOpponent:: @ 8259E2B + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor4thOpponent waitmessage return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E32:: @ 8259E32 - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A2D5 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor5thOpponent:: @ 8259E32 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor5thOpponent waitmessage return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E39:: @ 8259E39 - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A2FB +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor6thOpponent:: @ 8259E39 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor6thOpponent waitmessage return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E40:: @ 8259E40 - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25A321 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor7thOpponent:: @ 8259E40 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor7thOpponent waitmessage return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47:: @ 8259E47 - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25ABAE +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_PauseChallenge:: @ 8259E47 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_SavingDataPleaseWait waitmessage factory_save CHALLENGE_STATUS_PAUSED playse SE_SAVE @@ -214,223 +212,223 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47:: @ 8259E47 frontier_reset end -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E69:: @ 8259E69 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge:: @ 8259E69 special SavePlayerParty factory_setparties 0 frontier_set FRONTIER_DATA_6, 1 special CalculatePlayerPartyCount - goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259C13 + goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E93:: @ 8259E93 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A3B4, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentType:: @ 8259E93 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_InvestigatedUpcomingOpponent, MSGBOX_DEFAULT compare VAR_0x8005, TYPE_NORMAL - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F62 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal compare VAR_0x8005, TYPE_FIGHTING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F6B + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFighting compare VAR_0x8005, TYPE_FLYING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F74 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFlying compare VAR_0x8005, TYPE_POISON - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F7D + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPoison compare VAR_0x8005, TYPE_GROUND - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F86 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGround compare VAR_0x8005, TYPE_ROCK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F8F + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesRock compare VAR_0x8005, TYPE_BUG - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F98 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesBug compare VAR_0x8005, TYPE_GHOST - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FA1 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGhost compare VAR_0x8005, TYPE_STEEL - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FAA + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesSteel compare VAR_0x8005, TYPE_FIRE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FB3 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFire compare VAR_0x8005, TYPE_WATER - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FBC + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesWater compare VAR_0x8005, TYPE_GRASS - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FC5 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGrass compare VAR_0x8005, TYPE_ELECTRIC - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FCE + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesElectric compare VAR_0x8005, TYPE_PSYCHIC - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FD7 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPsychic compare VAR_0x8005, TYPE_ICE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE0 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesIce compare VAR_0x8005, TYPE_DRAGON - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE9 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDragon compare VAR_0x8005, TYPE_DARK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FF2 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark compare VAR_0x8005, NUMBER_OF_MON_TYPES - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FFB + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F62:: @ 8259F62 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A3F8, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal:: @ 8259F62 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInNormalType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F6B:: @ 8259F6B - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A597, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFighting:: @ 8259F6B + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFightingType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F74:: @ 8259F74 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A66B, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFlying:: @ 8259F74 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFlyingType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F7D:: @ 8259F7D - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A5DF, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPoison:: @ 8259F7D + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInPoisonType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F86:: @ 8259F86 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A625, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGround:: @ 8259F86 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInGroundType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F8F:: @ 8259F8F - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A73B, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesRock:: @ 8259F8F + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInRockType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259F98:: @ 8259F98 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A6F8, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesBug:: @ 8259F98 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInBugType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FA1:: @ 8259FA1 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A77F, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGhost:: @ 8259FA1 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInGhostType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FAA:: @ 8259FAA - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A84E, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesSteel:: @ 8259FAA + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInSteelType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FB3:: @ 8259FB3 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A43E, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFire:: @ 8259FB3 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFireType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FBC:: @ 8259FBC - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A482, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesWater:: @ 8259FBC + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInWaterType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FC5:: @ 8259FC5 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A50F, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGrass:: @ 8259FC5 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInGrassType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FCE:: @ 8259FCE - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A4C7, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesElectric:: @ 8259FCE + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInElectricType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FD7:: @ 8259FD7 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A6B1, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPsychic:: @ 8259FD7 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInPsychicType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE0:: @ 8259FE0 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A554, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesIce:: @ 8259FE0 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInIceType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FE9:: @ 8259FE9 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A7C4, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDragon:: @ 8259FE9 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInDragonType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FF2:: @ 8259FF2 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A80A, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark:: @ 8259FF2 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInDarkType, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259FFB:: @ 8259FFB - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25A893, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType:: @ 8259FFB + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerHasNoClearFavorite, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A004:: @ 825A004 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentStyle:: @ 825A004 compare VAR_0x8006, FACTORY_STYLE_NONE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A068 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained compare VAR_0x8006, FACTORY_STYLE_PREPARATION - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A071 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleTotalPreparation compare VAR_0x8006, FACTORY_STYLE_SLOW_STEADY - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A07A + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleSlowAndSteady compare VAR_0x8006, FACTORY_STYLE_ENDURANCE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A083 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleEndurance compare VAR_0x8006, FACTORY_STYLE_HIGH_RISK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A08C + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleHighRisk compare VAR_0x8006, FACTORY_STYLE_WEAKENING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A095 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleWeakenFoe compare VAR_0x8006, FACTORY_STYLE_UNPREDICTABLE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A09E + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleImpossibleToPredict compare VAR_0x8006, FACTORY_STYLE_WEATHER - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0A7 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleDependsOnFlow compare VAR_0x8006, FACTORY_NUM_STYLES - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B0 + call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleFlexible return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A068:: @ 825A068 - msgbox Text_StyleUnrestrained, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained:: @ 825A068 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleUnrestrained, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A071:: @ 825A071 - msgbox Text_StyleTotalPreparation, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleTotalPreparation:: @ 825A071 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleTotalPreparation, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A07A:: @ 825A07A - msgbox Text_StyleSlowAndSteady, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleSlowAndSteady:: @ 825A07A + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleSlowAndSteady, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A083:: @ 825A083 - msgbox Text_StyleEndurance, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleEndurance:: @ 825A083 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleEndurance, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A08C:: @ 825A08C - msgbox Text_StyleHighRisk, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleHighRisk:: @ 825A08C + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleHighRisk, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A095:: @ 825A095 - msgbox Text_StyleWeakenFoe, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleWeakenFoe:: @ 825A095 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleWeakenFoe, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A09E:: @ 825A09E - msgbox Text_StyleImpossibleToPredict, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleImpossibleToPredict:: @ 825A09E + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleImpossibleToPredict, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0A7:: @ 825A0A7 - msgbox Text_StyleDependsOnFlow, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleDependsOnFlow:: @ 825A0A7 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleDependsOnFlow, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B0:: @ 825A0B0 - msgbox Text_StyleFlexible, MSGBOX_DEFAULT +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleFlexible:: @ 825A0B0 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleFlexible, MSGBOX_DEFAULT return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9:: @ 825A0B9 - message BattleFrontier_BattleFactoryPreBattleRoom_Text_25AD20 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead:: @ 825A0B9 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_PreparedToFaceHead waitmessage call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_23E8E0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A110 + goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHeadNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A146 - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259CFC - case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38 - case 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9 + case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapBeforeHead + case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRecordBattle + case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskPauseChallenge + case 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A110:: @ 825A110 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHeadNoRecord:: @ 825A110 multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT - case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A146 - case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D38 - case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259D66 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A0B9 + case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapBeforeHead + case 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskPauseChallenge + case 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskRetireChallenge + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A146:: @ 825A146 - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AD61, MSGBOX_DEFAULT - msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB2E, MSGBOX_YESNO +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapBeforeHead:: @ 825A146 + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_CantTellAnythingAboutHead, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_LikeToSwapMon, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 - case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259DF2 - case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259B74 + case NO, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom + case YES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons + case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A17C:: @ 825A17C - applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1B3 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1A0 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLv50:: @ 825A17C + applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLv50 + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLv50 return -BattleFrontier_BattleFactoryPreBattleRoom_EventScript_25A18B:: @ 825A18B - applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1B9 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1A6 +BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen:: @ 825A18B + applymovement 1, BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLvOpen + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLvOpen return -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A19A: @ 825A19A +BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerEnterRoom: @ 825A19A walk_up walk_up walk_up @@ -438,7 +436,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A19A: @ 825A19A walk_up step_end -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1A0: @ 825A1A0 +BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLv50: @ 825A1A0 walk_up walk_left walk_left @@ -446,7 +444,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1A0: @ 825A1A0 walk_up step_end -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1A6: @ 825A1A6 +BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLvOpen: @ 825A1A6 walk_up walk_right walk_right @@ -454,7 +452,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1A6: @ 825A1A6 walk_up step_end -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1AC: @ 825A1AC +BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantEnterRoom: @ 825A1AC walk_up walk_up walk_up @@ -463,7 +461,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1AC: @ 825A1AC face_down step_end -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1B3: @ 825A1B3 +BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLv50: @ 825A1B3 walk_left walk_left walk_up @@ -471,7 +469,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1B3: @ 825A1B3 set_invisible step_end -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1B9: @ 825A1B9 +BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLvOpen: @ 825A1B9 walk_right walk_right walk_up @@ -479,211 +477,201 @@ BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1B9: @ 825A1B9 set_invisible step_end -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1BF: @ 825A1BF +BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantMoveToReceiveCall: @ 825A1BF walk_left walk_left walk_left step_end -BattleFrontier_BattleFactoryPreBattleRoom_Movement_25A1C3: @ 825A1C3 +BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantReturnToPlayer: @ 825A1C3 walk_right walk_right walk_right face_down step_end -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A1C8: @ 825A1C8 -SlateportCity_BattleTentCorridor_Text_25A1C8: @ 825A1C8 +BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection: @ 825A1C8 .string "First, we will hold your POKéMON for\n" .string "safekeeping.\p" .string "You may then choose from our\n" .string "selection of POKéMON.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A22D: @ 825A22D -SlateportCity_BattleTentCorridor_Text_25A22D: @ 825A22D +BattleFrontier_BattleFactoryPreBattleRoom_Text_LetUsRestoreMons: @ 825A22D .string "Thank you for competing!\n" .string "Let us restore your POKéMON!$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A263: @ 825A263 -SlateportCity_BattleTentCorridor_Text_25A263: @ 825A263 +BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor2ndOpponent: @ 825A263 .string "The 2nd match is next!\n" .string "Are you ready?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A289: @ 825A289 -SlateportCity_BattleTentCorridor_Text_25A289: @ 825A289 +BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor3rdOpponent: @ 825A289 .string "The 3rd match is next!\n" .string "Are you ready?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A2AF: @ 825A2AF +BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor4thOpponent: @ 825A2AF .string "The 4th match is next!\n" .string "Are you ready?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A2D5: @ 825A2D5 +BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor5thOpponent: @ 825A2D5 .string "The 5th match is next!\n" .string "Are you ready?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A2FB: @ 825A2FB +BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor6thOpponent: @ 825A2FB .string "The 6th match is next!\n" .string "Are you ready?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A321: @ 825A321 +BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor7thOpponent: @ 825A321 .string "Finally, the 7th match is next!\n" .string "Are you ready?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A350: @ 825A350 -SlateportCity_BattleTentCorridor_Text_25A350: @ 825A350 +BattleFrontier_BattleFactoryPreBattleRoom_Text_SaveAndQuitGame: @ 825A350 .string "Would you like to save and quit\n" .string "the game?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A37A: @ 825A37A -SlateportCity_BattleTentCorridor_Text_25A37A: @ 825A37A +BattleFrontier_BattleFactoryPreBattleRoom_Text_RetireFromChallenge: @ 825A37A .string "Would you like to retire from your\n" .string "Battle Swap challenge?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A3B4: @ 825A3B4 +BattleFrontier_BattleFactoryPreBattleRoom_Text_InvestigatedUpcomingOpponent: @ 825A3B4 .string "I've conducted a little investigation\n" .string "about your upcoming opponent.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A3F8: @ 825A3F8 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInNormalType: @ 825A3F8 .string "The TRAINER is apparently skilled\n" .string "in the handling of the NORMAL type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A43E: @ 825A43E +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFireType: @ 825A43E .string "The TRAINER is apparently skilled\n" .string "in the handling of the FIRE type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A482: @ 825A482 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInWaterType: @ 825A482 .string "The TRAINER is apparently skilled\n" .string "in the handling of the WATER type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A4C7: @ 825A4C7 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInElectricType: @ 825A4C7 .string "The TRAINER is apparently skilled\n" .string "in the handling of the ELECTRIC type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A50F: @ 825A50F +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInGrassType: @ 825A50F .string "The TRAINER is apparently skilled\n" .string "in the handling of the GRASS type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A554: @ 825A554 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInIceType: @ 825A554 .string "The TRAINER is apparently skilled\n" .string "in the handling of the ICE type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A597: @ 825A597 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFightingType: @ 825A597 .string "The TRAINER is apparently skilled\n" .string "in the handling of the FIGHTING type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A5DF: @ 825A5DF +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInPoisonType: @ 825A5DF .string "The TRAINER is apparently skilled\n" .string "in the handling of the POISON type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A625: @ 825A625 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInGroundType: @ 825A625 .string "The TRAINER is apparently skilled\n" .string "in the handling of the GROUND type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A66B: @ 825A66B +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInFlyingType: @ 825A66B .string "The TRAINER is apparently skilled\n" .string "in the handling of the FLYING type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A6B1: @ 825A6B1 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInPsychicType: @ 825A6B1 .string "The TRAINER is apparently skilled\n" .string "in the handling of the PSYCHIC type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A6F8: @ 825A6F8 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInBugType: @ 825A6F8 .string "The TRAINER is apparently skilled\n" .string "in the handling of the BUG type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A73B: @ 825A73B +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInRockType: @ 825A73B .string "The TRAINER is apparently skilled\n" .string "in the handling of the ROCK type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A77F: @ 825A77F +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInGhostType: @ 825A77F .string "The TRAINER is apparently skilled\n" .string "in the handling of the GHOST type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A7C4: @ 825A7C4 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInDragonType: @ 825A7C4 .string "The TRAINER is apparently skilled\n" .string "in the handling of the DRAGON type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A80A: @ 825A80A +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInDarkType: @ 825A80A .string "The TRAINER is apparently skilled\n" .string "in the handling of the DARK type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A84E: @ 825A84E +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerSkilledInSteelType: @ 825A84E .string "The TRAINER is apparently skilled\n" .string "in the handling of the STEEL type.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25A893: @ 825A893 +BattleFrontier_BattleFactoryPreBattleRoom_Text_TrainerHasNoClearFavorite: @ 825A893 .string "The TRAINER appears to have no clear\n" .string "favorites when it comes to type.$" -Text_StyleSlowAndSteady: @ 825A8D9 +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleSlowAndSteady: @ 825A8D9 .string "The favorite battle style appears to\n" .string "be slow and steady.$" -Text_StyleEndurance: @ 825A912 +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleEndurance: @ 825A912 .string "The favorite battle style appears to\n" .string "be one of endurance.$" -Text_StyleHighRisk: @ 825A94C +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleHighRisk: @ 825A94C .string "The favorite battle style appears to\n" .string "be high risk, high return.$" -Text_StyleDependsOnFlow: @ 825A98C +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleDependsOnFlow: @ 825A98C .string "The favorite battle style appears to\n" .string "depend on the battle's flow.$" -Text_StyleTotalPreparation: @ 825A9CE +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleTotalPreparation: @ 825A9CE .string "The favorite battle style appears to\n" .string "be one based on total preparation.$" -Text_StyleWeakenFoe: @ 825AA16 +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleWeakenFoe: @ 825AA16 .string "The favorite battle style appears\n" .string "to be weakening the foe to start.$" -Text_StyleFlexible: @ 825AA5A +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleFlexible: @ 825AA5A .string "The favorite battle style appears to\n" .string "be flexibly adaptable to the situation.$" -Text_StyleImpossibleToPredict: @ 825AAA7 +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleImpossibleToPredict: @ 825AAA7 .string "The favorite battle style appears to\n" .string "be impossible to predict.$" -Text_StyleUnrestrained: @ 825AAE6 +BattleFrontier_BattleFactoryPreBattleRoom_Text_StyleUnrestrained: @ 825AAE6 .string "The favorite battle style appears to\n" .string "be free-spirited and unrestrained.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB2E: @ 825AB2E -SlateportCity_BattleTentCorridor_Text_25AB2E: @ 825AB2E +BattleFrontier_BattleFactoryPreBattleRoom_Text_LikeToSwapMon: @ 825AB2E .string "Before starting the battle, would you\n" .string "like to swap a POKéMON?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB6C: @ 825AB6C -SlateportCity_BattleTentCorridor_Text_25AB6C: @ 825AB6C +BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete: @ 825AB6C .string "Thank you!\n" .string "Your POKéMON swap is complete.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AB96: @ 825AB96 -SlateportCity_BattleTentCorridor_Text_25AB96: @ 825AB96 +BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay: @ 825AB96 .string "Right this way, please!$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25ABAE: @ 825ABAE -SlateportCity_BattleTentCorridor_Text_25ABAE: @ 825ABAE +BattleFrontier_BattleFactoryPreBattleRoom_Text_SavingDataPleaseWait: @ 825ABAE .string "I am saving your data.\n" .string "Please wait.$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25ABD2: @ 825ABD2 +BattleFrontier_BattleFactoryPreBattleRoom_Text_RecordLatestBattle: @ 825ABD2 .string "Would you like to record your latest\n" .string "battle on your FRONTIER PASS?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AC15: @ 825AC15 +BattleFrontier_BattleFactoryPreBattleRoom_Text_WaitFewMoments: @ 825AC15 .string "Excuse me! Excuse me, please!\n" .string "May I get you to wait a few moments?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AC58: @ 825AC58 +BattleFrontier_BattleFactoryPreBattleRoom_Text_UnderstoodSirWillDo: @ 825AC58 .string "…Uh-huh? What?! …Whoa!\n" .string "Understood, sir! Will do!$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AC89: @ 825AC89 +BattleFrontier_BattleFactoryPreBattleRoom_Text_MessageFromHeadComeRightNow: @ 825AC89 .string "Oh, my…\n" .string "Sorry to keep you waiting!\p" .string "I have a message from this facility's\n" @@ -691,10 +679,10 @@ BattleFrontier_BattleFactoryPreBattleRoom_Text_25AC89: @ 825AC89 .string "He says, “We're going to do it!\n" .string "Come here right now!”$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AD20: @ 825AD20 +BattleFrontier_BattleFactoryPreBattleRoom_Text_PreparedToFaceHead: @ 825AD20 .string "The FACTORY HEAD is demanding you.\n" .string "Are you prepared to face him?$" -BattleFrontier_BattleFactoryPreBattleRoom_Text_25AD61: @ 825AD61 +BattleFrontier_BattleFactoryPreBattleRoom_Text_CantTellAnythingAboutHead: @ 825AD61 .string "I'm terribly sorry, but I can't tell you\n" .string "anything about the FACTORY HEAD.$" diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 493fd3f69..8e9b5f1b4 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -33,12 +33,12 @@ SlateportCity_BattleTentCorridor_EventScript_208E65:: @ 8208E65 goto_if_eq SlateportCity_BattleTentCorridor_EventScript_209044 slateporttent_generaterentalmons slateporttent_generateopponentmons - msgbox SlateportCity_BattleTentCorridor_Text_25A1C8, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT fadescreen 1 slateporttent_rentmons waitstate SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4 - msgbox SlateportCity_BattleTentCorridor_Text_25AB96, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage applymovement 1, Common_Movement_WalkInPlaceFastestUp waitmovement 0 @@ -56,7 +56,7 @@ SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4 SlateportCity_BattleTentCorridor_EventScript_208EEE:: @ 8208EEE factory_setopponentmons factory_resethelditems - msgbox SlateportCity_BattleTentCorridor_Text_25A22D, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_LetUsRestoreMons, MSGBOX_DEFAULT playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty @@ -73,14 +73,14 @@ SlateportCity_BattleTentCorridor_EventScript_208F0D:: @ 8208F0D case 2, SlateportCity_BattleTentCorridor_EventScript_208F89 SlateportCity_BattleTentCorridor_EventScript_208F5B:: @ 8208F5B - msgbox SlateportCity_BattleTentCorridor_Text_25A350, MSGBOX_YESNO + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_SaveAndQuitGame, MSGBOX_YESNO switch VAR_RESULT case NO, SlateportCity_BattleTentCorridor_EventScript_208F0D case YES, SlateportCity_BattleTentCorridor_EventScript_209022 case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208F0D SlateportCity_BattleTentCorridor_EventScript_208F89:: @ 8208F89 - message SlateportCity_BattleTentCorridor_Text_25A37A + message BattleFrontier_BattleFactoryPreBattleRoom_Text_RetireFromChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT @@ -90,7 +90,7 @@ SlateportCity_BattleTentCorridor_EventScript_208F89:: @ 8208F89 SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB slateporttent_generateopponentmons - msgbox SlateportCity_BattleTentCorridor_Text_25AB2E, MSGBOX_YESNO + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_LikeToSwapMon, MSGBOX_YESNO switch VAR_RESULT case NO, SlateportCity_BattleTentCorridor_EventScript_208EB4 case YES, SlateportCity_BattleTentCorridor_EventScript_208FF1 @@ -102,21 +102,21 @@ SlateportCity_BattleTentCorridor_EventScript_208FF1:: @ 8208FF1 waitstate compare VAR_RESULT, 1 goto_if_eq SlateportCity_BattleTentCorridor_EventScript_208EB4 - msgbox SlateportCity_BattleTentCorridor_Text_25AB6C, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT goto SlateportCity_BattleTentCorridor_EventScript_208EB4 SlateportCity_BattleTentCorridor_EventScript_209014:: @ 8209014 - message SlateportCity_BattleTentCorridor_Text_25A263 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor2ndOpponent waitmessage return SlateportCity_BattleTentCorridor_EventScript_20901B:: @ 820901B - message SlateportCity_BattleTentCorridor_Text_25A289 + message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor3rdOpponent waitmessage return SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022 - message SlateportCity_BattleTentCorridor_Text_25ABAE + message BattleFrontier_BattleFactoryPreBattleRoom_Text_SavingDataPleaseWait waitmessage slateporttent_save CHALLENGE_STATUS_PAUSED playse SE_SAVE diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 1a9801dd1..793e96c10 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -228,12 +228,12 @@ SlateportCity_BattleTentLobby_EventScript_208A90:: @ 8208A90 SlateportCity_BattleTentLobby_EventScript_208A99:: @ 8208A99 lockall - msgbox SlateportCity_BattleTentLobby_Text_259721, MSGBOX_DEFAULT + msgbox BattleFrontier_BattleFactoryLobby_Text_RulesAreListed, MSGBOX_DEFAULT goto SlateportCity_BattleTentLobby_EventScript_208AA8 end SlateportCity_BattleTentLobby_EventScript_208AA8:: @ 8208AA8 - message SlateportCity_BattleTentLobby_Text_259743 + message BattleFrontier_BattleFactoryLobby_Text_ReadWhichHeading waitmessage multichoice 17, 0, MULTI_SLATEPORT_TENT_RULES, 0 switch VAR_RESULT From 75b0c9d7a9edabc742bc42f19d078fa2ae64870c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 11 Dec 2019 03:28:55 -0500 Subject: [PATCH 16/35] Document Battle Pyramid scripts --- asm/macros/battle_frontier/battle_pyramid.inc | 39 +- data/event_scripts.s | 2 +- .../border.bin | Bin .../map.bin | 0 data/layouts/layouts.json | 8 +- .../scripts.inc | 5 +- .../map.json | 6 +- .../scripts.inc | 336 +++++----- .../map.json | 12 +- .../scripts.inc | 600 +++++++++--------- .../BattleFrontier_BattlePyramidTop/map.json | 4 +- .../scripts.inc | 214 +++---- .../scripts.inc | 8 +- .../scripts.inc | 2 +- data/maps/map_groups.json | 2 +- data/scripts/field_poison.inc | 4 +- data/specials.inc | 2 +- include/battle_pyramid.h | 2 +- include/battle_pyramid_bag.h | 2 +- include/constants/battle_pyramid.h | 4 +- include/constants/layouts.h | 2 +- include/constants/map_groups.h | 2 +- include/event_scripts.h | 6 +- include/start_menu.h | 4 +- include/strings.h | 252 ++++---- src/battle_pyramid.c | 310 ++++----- src/battle_pyramid_bag.c | 8 +- src/field_control_avatar.c | 2 +- src/field_screen_effect.c | 2 +- src/frontier_pass.c | 2 +- src/overworld.c | 8 +- src/start_menu.c | 25 +- src/union_room.c | 2 +- src/wild_encounter.c | 6 +- 34 files changed, 946 insertions(+), 937 deletions(-) rename data/layouts/{BattleFrontier_BattlePyramidEmptySquare => BattleFrontier_BattlePyramidFloor}/border.bin (100%) rename data/layouts/{BattleFrontier_BattlePyramidEmptySquare => BattleFrontier_BattlePyramidFloor}/map.bin (100%) rename data/maps/{BattleFrontier_BattlePyramidEmptySquare => BattleFrontier_BattlePyramidFloor}/map.json (97%) rename data/maps/{BattleFrontier_BattlePyramidEmptySquare => BattleFrontier_BattlePyramidFloor}/scripts.inc (64%) diff --git a/asm/macros/battle_frontier/battle_pyramid.inc b/asm/macros/battle_frontier/battle_pyramid.inc index 0468e5956..f8141e2dd 100644 --- a/asm/macros/battle_frontier/battle_pyramid.inc +++ b/asm/macros/battle_frontier/battle_pyramid.inc @@ -1,5 +1,3 @@ -@ TODO: Add explanatory comments to macros - @ Initialize the Battle Pyramid challenge .macro pyramid_init setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT @@ -28,37 +26,43 @@ special CallBattlePyramidFunction .endm - @ + @ Set the prize item to give from one of two lists of possible prizes, depending on streak. .macro pyramid_setprize setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_PRIZE special CallBattlePyramidFunction .endm - @ + @ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise + .macro pyramid_giveprize + setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GIVE_PRIZE + special CallBattlePyramidFunction + .endm + + @ Set the random values for the floor (used to determine object positions, e.g.), and clear trainer flags .macro pyramid_seedfloor setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR special CallBattlePyramidFunction .endm - @ + @ Set the item to pick up depending on the random seed and quantity (always 1) to the arguments for STD_FIND_ITEM .macro pyramid_setitem setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_ITEM special CallBattlePyramidFunction .endm - @ + @ Hide the picked-up item (technically it moves the item far offscreen) .macro pyramid_hideitem setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_HIDE_ITEM special CallBattlePyramidFunction .endm - @ - .macro pyramid_inittrainers - setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS + @ Set the facility trainers to gBattleFrontierTrainers + .macro pyramid_settrainers + setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_TRAINERS special CallBattlePyramidFunction .endm - @ + @ Show the post-battle hint text .macro pyramid_showhint setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT special CallBattlePyramidFunction @@ -70,28 +74,31 @@ special CallBattlePyramidFunction .endm - @ - .macro pyramid_updatelight radius:req, mode:req + @ Update the light around the player. 2 different modes, for setting or incrementing light. See PYRAMID_LIGHT_* + .macro pyramid_updatelight radius:req, mode:req, sound=0xFFFF setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT setvar VAR_0x8005, \radius setvar VAR_0x8006, \mode + .if \sound != 0xFFFF + setvar VAR_0x8007, \sound + .endif special CallBattlePyramidFunction .endm - @ + @ Reset the held items to what they were at the start of the challenge .macro pyramid_clearhelditems setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS special CallBattlePyramidFunction .endm - @ + @ Set the palette depending on current floor number .macro pyramid_setfloorpal setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE special CallBattlePyramidFunction .endm - @ - .macro pyramid_healparty + @ Reset sketched moves and update the party order in the saveblock + .macro pyramid_resetparty setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY special CallBattlePyramidFunction .endm diff --git a/data/event_scripts.s b/data/event_scripts.s index 605cf23ac..c7e21e77c 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -483,7 +483,7 @@ gStdScripts_End:: @ 81DC2CC .include "data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc" .include "data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc" .include "data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc" - .include "data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc" + .include "data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc" .include "data/maps/BattleFrontier_BattlePyramidTop/scripts.inc" .include "data/maps/BattleFrontier_BattleArenaLobby/scripts.inc" .include "data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc" diff --git a/data/layouts/BattleFrontier_BattlePyramidEmptySquare/border.bin b/data/layouts/BattleFrontier_BattlePyramidFloor/border.bin similarity index 100% rename from data/layouts/BattleFrontier_BattlePyramidEmptySquare/border.bin rename to data/layouts/BattleFrontier_BattlePyramidFloor/border.bin diff --git a/data/layouts/BattleFrontier_BattlePyramidEmptySquare/map.bin b/data/layouts/BattleFrontier_BattlePyramidFloor/map.bin similarity index 100% rename from data/layouts/BattleFrontier_BattlePyramidEmptySquare/map.bin rename to data/layouts/BattleFrontier_BattlePyramidFloor/map.bin diff --git a/data/layouts/layouts.json b/data/layouts/layouts.json index ffa394fa1..201cd7bdf 100644 --- a/data/layouts/layouts.json +++ b/data/layouts/layouts.json @@ -3602,14 +3602,14 @@ "blockdata_filepath": "data/layouts/BattleFrontier_BattlePyramidLobby/map.bin" }, { - "id": "LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE", - "name": "BattleFrontier_BattlePyramidEmptySquare_Layout", + "id": "LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR", + "name": "BattleFrontier_BattlePyramidFloor_Layout", "width": 8, "height": 8, "primary_tileset": "gTileset_Building", "secondary_tileset": "gTileset_BattlePyramid", - "border_filepath": "data/layouts/BattleFrontier_BattlePyramidEmptySquare/border.bin", - "blockdata_filepath": "data/layouts/BattleFrontier_BattlePyramidEmptySquare/map.bin" + "border_filepath": "data/layouts/BattleFrontier_BattlePyramidFloor/border.bin", + "blockdata_filepath": "data/layouts/BattleFrontier_BattlePyramidFloor/map.bin" }, { "id": "LAYOUT_BATTLE_PYRAMID_SQUARE01", diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index 8d594695c..a96063caa 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -1,15 +1,14 @@ BattleFrontier_BattleDomeLobby_MapScripts:: @ 82497E2 map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleDomeLobby_MapScript1_2497F2 map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeLobby_MapScript2_24980F - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomeLobby_MapScript2_2497FB + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomeLobby_OnWarp .byte 0 BattleFrontier_BattleDomeLobby_MapScript1_2497F2: @ 82497F2 dome_21 end -BattleFrontier_BattleDomeLobby_MapScript2_2497FB: @ 82497FB -BattleFrontier_BattlePyramidLobby_MapScript2_2497FB: @ 82497FB +BattleFrontier_BattleDomeLobby_OnWarp: @ 82497FB map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattleDomeLobby_EventScript_249805 .2byte 0 diff --git a/data/maps/BattleFrontier_BattlePyramidEmptySquare/map.json b/data/maps/BattleFrontier_BattlePyramidFloor/map.json similarity index 97% rename from data/maps/BattleFrontier_BattlePyramidEmptySquare/map.json rename to data/maps/BattleFrontier_BattlePyramidFloor/map.json index 3f4739b26..2b3baf425 100644 --- a/data/maps/BattleFrontier_BattlePyramidEmptySquare/map.json +++ b/data/maps/BattleFrontier_BattlePyramidFloor/map.json @@ -1,7 +1,7 @@ { - "id": "MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE", - "name": "BattleFrontier_BattlePyramidEmptySquare", - "layout": "LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE", + "id": "MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR", + "name": "BattleFrontier_BattlePyramidFloor", + "layout": "LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR", "music": "MUS_NONE", "region_map_section": "MAPSEC_BATTLE_FRONTIER", "requires_flash": false, diff --git a/data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc similarity index 64% rename from data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc rename to data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc index e73b9d917..f590ff890 100644 --- a/data/maps/BattleFrontier_BattlePyramidEmptySquare/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc @@ -1,73 +1,72 @@ -BattleFrontier_BattlePyramidEmptySquare_MapScripts:: @ 8252A33 - map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidEmptySquare_MapScript2_252A43 - map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePyramidEmptySquare_MapScript1_252BCA +BattleFrontier_BattlePyramidFloor_MapScripts:: @ 8252A33 + map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidFloor_OnResume + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidFloor_OnFrame + map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePyramidFloor_OnTransition .byte 0 -BattleFrontier_BattlePyramidEmptySquare_MapScript2_252A43: @ 8252A43 - map_script_2 VAR_TEMP_D, 1, BattleFrontier_BattlePyramidEmptySquare_EventScript_252A5D - map_script_2 VAR_TEMP_E, 0, BattleFrontier_BattlePyramidEmptySquare_EventScript_252A98 - map_script_2 VAR_TEMP_F, 1, BattleFrontier_BattlePyramidEmptySquare_EventScript_252A8F +BattleFrontier_BattlePyramidFloor_OnFrame: @ 8252A43 + map_script_2 VAR_TEMP_D, 1, BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight + map_script_2 VAR_TEMP_E, 0, BattleFrontier_BattlePyramidFloor_EventScript_PlayPyramidMusic + map_script_2 VAR_TEMP_F, 1, BattleFrontier_BattlePyramidFloor_EventScript_ShowMapName .2byte 0 -BattleFrontier_BattlePyramidEmptySquare_EventScript_252A5D:: @ 8252A5D +BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight:: @ 8252A5D lockall + @ pyramid_updatelight, cant use macro because it straddles the loop setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT setvar VAR_0x8005, 4 setvar VAR_0x8006, PYRAMID_LIGHT_INCR_RADIUS setvar VAR_0x8007, SE_SAVE setvar VAR_RESULT, 0 -BattleFrontier_BattlePyramidEmptySquare_EventScript_252A77:: @ 8252A77 +BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop:: @ 8252A77 special CallBattlePyramidFunction delay 2 compare VAR_RESULT, 2 - goto_if_ne BattleFrontier_BattlePyramidEmptySquare_EventScript_252A77 + goto_if_ne BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop setvar VAR_TEMP_D, 0 releaseall end -BattleFrontier_BattlePyramidEmptySquare_EventScript_252A8F:: @ 8252A8F +BattleFrontier_BattlePyramidFloor_EventScript_ShowMapName:: @ 8252A8F special ShowMapNamePopup setvar VAR_TEMP_F, 0 end -BattleFrontier_BattlePyramidEmptySquare_EventScript_252A98:: @ 8252A98 +BattleFrontier_BattlePyramidFloor_EventScript_PlayPyramidMusic:: @ 8252A98 playbgm MUS_PYRAMID, 0 setvar VAR_TEMP_E, 1 end -BattleFrontier_BattlePyramidEmptySquare_MapScript1_252AA2: @ 8252AA2 +BattleFrontier_BattlePyramidFloor_OnResume: @ 8252AA2 pyramid_setfloorpal frontier_getstatus switch VAR_TEMP_0 - case 0, BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D - case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramidEmptySquare_EventScript_252B66 - case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D + case 0, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge + case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby + case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge frontier_get FRONTIER_DATA_BATTLE_OUTCOME compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252B39 + goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252B39 + goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252B39 + goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost frontier_isbattletype BATTLE_TYPE_TRAINER @ VAR_RESULT seems to be ignored here setvar VAR_TEMP_D, 1 -BattleFrontier_BattlePyramidEmptySquare_EventScript_252B39:: @ 8252B39 - pyramid_healparty +BattleFrontier_BattlePyramidFloor_EventScript_ResetParty:: @ 8252B39 + pyramid_resetparty end -BattleFrontier_BattlePyramidEmptySquare_EventScript_252B42:: @ 8252B42 -BattleFrontier_BattlePyramidTop_EventScript_252B42:: @ 8252B42 +BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost:: @ 8252B42 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST pyramid_set PYRAMID_DATA_TRAINER_FLAGS, 255 -BattleFrontier_BattlePyramidEmptySquare_EventScript_252B66:: @ 8252B66 -BattleFrontier_BattlePyramidTop_EventScript_252B66:: @ 8252B66 +BattleFrontier_BattlePyramid_EventScript_WarpToLobby:: @ 8252B66 pyramid_updatelight 0, PYRAMID_LIGHT_SET_RADIUS pyramid_clearhelditems special HealPlayerParty @@ -75,39 +74,39 @@ BattleFrontier_BattlePyramidTop_EventScript_252B66:: @ 8252B66 waitstate end -BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D:: @ 8252B8D +BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge:: @ 8252B8D pyramid_save CHALLENGE_STATUS_SAVING special SavePlayerParty frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - pyramid_inittrainers + pyramid_settrainers frontier_setpartyorder FRONTIER_PARTY_SIZE setvar VAR_TEMP_F, 1 end -BattleFrontier_BattlePyramidEmptySquare_MapScript1_252BCA: @ 8252BCA - call BattleFrontier_BattlePyramidEmptySquare_EventScript_252BD5 +BattleFrontier_BattlePyramidFloor_OnTransition: @ 8252BCA + call BattleFrontier_BattlePyramidFloor_EventScript_SetLightRadius setvar VAR_TEMP_F, 1 end -BattleFrontier_BattlePyramidEmptySquare_EventScript_252BD5:: @ 8252BD5 +BattleFrontier_BattlePyramidFloor_EventScript_SetLightRadius:: @ 8252BD5 pyramid_updatelight 32, PYRAMID_LIGHT_SET_RADIUS return -BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8:: @ 8252BE8 +BattlePyramid_WarpToNextFloor:: @ 8252BE8 call BattleFrontier_EventScript_IncrementWinStreak frontier_get FRONTIER_DATA_BATTLE_NUM @ Floor number addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT compare VAR_RESULT, 7 - goto_if_eq BattleFrontier_BattlePyramidEmptySquare_EventScript_252C45 + goto_if_eq BattlePyramid_WarpToTop pyramid_seedfloor frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_RESULT, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE, 255, 1, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1 waitstate end -BattleFrontier_BattlePyramidEmptySquare_EventScript_252C45:: @ 8252C45 +BattlePyramid_WarpToTop:: @ 8252C45 warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 255, 17, 17 waitstate end @@ -126,14 +125,15 @@ BattlePyramid_FindItemBall:: @ 8252C6A pyramid_setitem callstd STD_FIND_ITEM compare VAR_0x8007, 0 - goto_if_eq BattlePyramid_FindItemBall_End + goto_if_eq BattlePyramid_FindItemBallEnd pyramid_hideitem -BattlePyramid_FindItemBall_End:: @ 8252C87 +BattlePyramid_FindItemBallEnd:: @ 8252C87 end -BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88:: @ 8252C88 - goto BattleFrontier_BattlePyramidTop_EventScript_252B42 +BattlePyramid_Retire:: @ 8252C88 + goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost +@ Also used by Trainer Hill BattleFacility_TrainerBattle_PlaceholderText: @ 8252C8D .string "This is a sample message.$" @@ -146,595 +146,595 @@ gText_BattlePyramidConfirmRetire:: @ 8252CFB .string "Are you sure you want to quit your\n" .string "PYRAMID quest?$" -BattlePyramid_ExitHintUp_Text1:: @ 8252D2D +BattlePyramid_Text_ExitHintUp1:: @ 8252D2D .string "This floor's exit is in\n" .string "that direction: {UP_ARROW}$" -BattlePyramid_ExitHintLeft_Text1:: @ 8252D57 +BattlePyramid_Text_ExitHintLeft1:: @ 8252D57 .string "This floor's exit is in\n" .string "that direction: {LEFT_ARROW}$" -BattlePyramid_ExitHintRight_Text1:: @ 8252D81 +BattlePyramid_Text_ExitHintRight1:: @ 8252D81 .string "This floor's exit is in\n" .string "that direction: {RIGHT_ARROW}$" -BattlePyramid_ExitHintDown_Text1:: @ 8252DAB +BattlePyramid_Text_ExitHintDown1:: @ 8252DAB .string "This floor's exit is in\n" .string "that direction: {DOWN_ARROW}$" -BattlePyramid_ExitHintUp_Text2:: @ 8252DD5 +BattlePyramid_Text_ExitHintUp2:: @ 8252DD5 .string "The exit on this floor is in\n" .string "the {UP_ARROW} direction.$" -BattlePyramid_ExitHintLeft_Text2:: @ 8252E03 +BattlePyramid_Text_ExitHintLeft2:: @ 8252E03 .string "The exit on this floor is in\n" .string "the {LEFT_ARROW} direction.$" -BattlePyramid_ExitHintRight_Text2:: @ 8252E31 +BattlePyramid_Text_ExitHintRight2:: @ 8252E31 .string "The exit on this floor is in\n" .string "the {RIGHT_ARROW} direction.$" -BattlePyramid_ExitHintDown_Text2:: @ 8252E5F +BattlePyramid_Text_ExitHintDown2:: @ 8252E5F .string "The exit on this floor is in\n" .string "the {DOWN_ARROW} direction.$" -BattlePyramid_ExitHintUp_Text3:: @ 8252E8D +BattlePyramid_Text_ExitHintUp3:: @ 8252E8D .string "The exit is over\n" .string "that {UP_ARROW} way.$" -BattlePyramid_ExitHintLeft_Text3:: @ 8252EAA +BattlePyramid_Text_ExitHintLeft3:: @ 8252EAA .string "The exit is over\n" .string "that {LEFT_ARROW} way.$" -BattlePyramid_ExitHintRight_Text3:: @ 8252EC7 +BattlePyramid_Text_ExitHintRight3:: @ 8252EC7 .string "The exit is over\n" .string "that {RIGHT_ARROW} way.$" -BattlePyramid_ExitHintDown_Text3:: @ 8252EE4 +BattlePyramid_Text_ExitHintDown3:: @ 8252EE4 .string "The exit is over\n" .string "that {DOWN_ARROW} way.$" -BattlePyramid_ExitHintUp_Text4:: @ 8252F01 +BattlePyramid_Text_ExitHintUp4:: @ 8252F01 .string "On this floor, the exit is somewhere\n" .string "in the {UP_ARROW} direction.$" -BattlePyramid_ExitHintLeft_Text4:: @ 8252F3A +BattlePyramid_Text_ExitHintLeft4:: @ 8252F3A .string "On this floor, the exit is somewhere\n" .string "in the {LEFT_ARROW} direction.$" -BattlePyramid_ExitHintRight_Text4:: @ 8252F73 +BattlePyramid_Text_ExitHintRight4:: @ 8252F73 .string "On this floor, the exit is somewhere\n" .string "in the {RIGHT_ARROW} direction.$" -BattlePyramid_ExitHintDown_Text4:: @ 8252FAC +BattlePyramid_Text_ExitHintDown4:: @ 8252FAC .string "On this floor, the exit is somewhere\n" .string "in the {DOWN_ARROW} direction.$" -BattlePyramid_ExitHintUp_Text5:: @ 8252FE5 +BattlePyramid_Text_ExitHintUp5:: @ 8252FE5 .string "The exit?\n" .string "It's that {UP_ARROW} way.$" -BattlePyramid_ExitHintLeft_Text5:: @ 8253000 +BattlePyramid_Text_ExitHintLeft5:: @ 8253000 .string "The exit?\n" .string "It's that {LEFT_ARROW} way.$" -BattlePyramid_ExitHintRight_Text5:: @ 825301B +BattlePyramid_Text_ExitHintRight5:: @ 825301B .string "The exit?\n" .string "It's that {RIGHT_ARROW} way.$" -BattlePyramid_ExitHintDown_Text5:: @ 8253036 +BattlePyramid_Text_ExitHintDown5:: @ 8253036 .string "The exit?\n" .string "It's that {DOWN_ARROW} way.$" -BattlePyramid_ExitHintUp_Text6:: @ 8253051 +BattlePyramid_Text_ExitHintUp6:: @ 8253051 .string "The exit happens to be in\n" .string "the {UP_ARROW} direction.$" -BattlePyramid_ExitHintLeft_Text6:: @ 825307C +BattlePyramid_Text_ExitHintLeft6:: @ 825307C .string "The exit happens to be in\n" .string "the {LEFT_ARROW} direction.$" -BattlePyramid_ExitHintRight_Text6:: @ 82530A7 +BattlePyramid_Text_ExitHintRight6:: @ 82530A7 .string "The exit happens to be in\n" .string "the {RIGHT_ARROW} direction.$" -BattlePyramid_ExitHintDown_Text6:: @ 82530D2 +BattlePyramid_Text_ExitHintDown6:: @ 82530D2 .string "The exit happens to be in\n" .string "the {DOWN_ARROW} direction.$" -BattlePyramid_EightItemsRemaining_Text1:: @ 82530FD +BattlePyramid_Text_EightItemsRemaining1:: @ 82530FD .string "Are you looking for items?\p" .string "There are eight items left to\n" .string "be found.$" -BattlePyramid_SevenItemsRemaining_Text1:: @ 8253140 +BattlePyramid_Text_SevenItemsRemaining1:: @ 8253140 .string "Are you looking for items?\p" .string "There are seven items left to\n" .string "be found.$" -BattlePyramid_SixItemsRemaining_Text1:: @ 8253183 +BattlePyramid_Text_SixItemsRemaining1:: @ 8253183 .string "Are you looking for items?\p" .string "There are six items left to\n" .string "be found.$" -BattlePyramid_FiveItemsRemaining_Text1:: @ 82531C4 +BattlePyramid_Text_FiveItemsRemaining1:: @ 82531C4 .string "Are you looking for items?\p" .string "There are five items left to\n" .string "be found.$" -BattlePyramid_FourItemsRemaining_Text1:: @ 8253206 +BattlePyramid_Text_FourItemsRemaining1:: @ 8253206 .string "Are you looking for items?\p" .string "There are four items left to\n" .string "be found.$" -BattlePyramid_ThreeItemsRemaining_Text1:: @ 8253248 +BattlePyramid_Text_ThreeItemsRemaining1:: @ 8253248 .string "Are you looking for items?\p" .string "There are three items left to\n" .string "be found.$" -BattlePyramid_TwoItemsRemaining_Text1:: @ 825328B +BattlePyramid_Text_TwoItemsRemaining1:: @ 825328B .string "Are you looking for items?\p" .string "There are two items left to\n" .string "be found.$" -BattlePyramid_OneItemRemaining_Text1:: @ 82532CC +BattlePyramid_Text_OneItemRemaining1:: @ 82532CC .string "Are you looking for items?\p" .string "There is one item left to\n" .string "be found.$" -BattlePyramid_ZeroItemsRemaining_Text1:: @ 825330B +BattlePyramid_Text_ZeroItemsRemaining1:: @ 825330B .string "Are you looking for items?\p" .string "There isn't anything left to\n" .string "be found!$" -BattlePyramid_EightItemsRemaining_Text2:: @ 825334D +BattlePyramid_Text_EightItemsRemaining2:: @ 825334D .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There are eight items\n" .string "lying around here.$" -BattlePyramid_SevenItemsRemaining_Text2:: @ 82533A6 +BattlePyramid_Text_SevenItemsRemaining2:: @ 82533A6 .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There are seven items left\n" .string "lying around here.$" -BattlePyramid_SixItemsRemaining_Text2:: @ 8253404 +BattlePyramid_Text_SixItemsRemaining2:: @ 8253404 .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There are six items left\n" .string "lying around here.$" -BattlePyramid_FiveItemsRemaining_Text2:: @ 8253460 +BattlePyramid_Text_FiveItemsRemaining2:: @ 8253460 .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There are five items left\n" .string "lying around here.$" -BattlePyramid_FourItemsRemaining_Text2:: @ 82534BD +BattlePyramid_Text_FourItemsRemaining2:: @ 82534BD .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There are four items left\n" .string "lying around here.$" -BattlePyramid_ThreeItemsRemaining_Text2:: @ 825351A +BattlePyramid_Text_ThreeItemsRemaining2:: @ 825351A .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There are three items left\n" .string "lying around here.$" -BattlePyramid_TwoItemsRemaining_Text2:: @ 8253578 +BattlePyramid_Text_TwoItemsRemaining2:: @ 8253578 .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There are two items left\n" .string "lying around here.$" -BattlePyramid_OneItemRemaining_Text2:: @ 82535D4 +BattlePyramid_Text_OneItemRemaining2:: @ 82535D4 .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There is just one item\n" .string "lying around here.$" -BattlePyramid_ZeroItemsRemaining_Text2:: @ 825362E +BattlePyramid_Text_ZeroItemsRemaining2:: @ 825362E .string "Because you won, I'll tell you\n" .string "a little secret!\p" .string "There isn't anything left\n" .string "lying around here.$" -BattlePyramid_EightItemsRemaining_Text3:: @ 825368B +BattlePyramid_Text_EightItemsRemaining3:: @ 825368B .string "How's your stock of items holding up?\p" .string "I reckon there are eight items left\n" .string "waiting to be found on this floor.$" -BattlePyramid_SevenItemsRemaining_Text3:: @ 82536F8 +BattlePyramid_Text_SevenItemsRemaining3:: @ 82536F8 .string "How's your stock of items holding up?\p" .string "I reckon there are seven items left\n" .string "waiting to be found on this floor.$" -BattlePyramid_SixItemsRemaining_Text3:: @ 8253765 +BattlePyramid_Text_SixItemsRemaining3:: @ 8253765 .string "How's your stock of items holding up?\p" .string "I reckon there are six items left\n" .string "waiting to be found on this floor.$" -BattlePyramid_FiveItemsRemaining_Text3:: @ 82537D0 +BattlePyramid_Text_FiveItemsRemaining3:: @ 82537D0 .string "How's your stock of items holding up?\p" .string "I reckon there are five items left\n" .string "waiting to be found on this floor.$" -BattlePyramid_FourItemsRemaining_Text3:: @ 825383C +BattlePyramid_Text_FourItemsRemaining3:: @ 825383C .string "How's your stock of items holding up?\p" .string "I reckon there are four items left\n" .string "waiting to be found on this floor.$" -BattlePyramid_ThreeItemsRemaining_Text3:: @ 82538A8 +BattlePyramid_Text_ThreeItemsRemaining3:: @ 82538A8 .string "How's your stock of items holding up?\p" .string "I reckon there are three items left\n" .string "waiting to be found on this floor.$" -BattlePyramid_TwoItemsRemaining_Text3:: @ 8253915 +BattlePyramid_Text_TwoItemsRemaining3:: @ 8253915 .string "How's your stock of items holding up?\p" .string "I reckon there are two items left\n" .string "waiting to be found on this floor.$" -BattlePyramid_OneItemRemaining_Text3:: @ 8253980 +BattlePyramid_Text_OneItemRemaining3:: @ 8253980 .string "How's your stock of items holding up?\p" .string "I reckon there's but one item left\n" .string "waiting to be found on this floor.$" -BattlePyramid_ZeroItemsRemaining_Text3:: @ 82539EC +BattlePyramid_Text_ZeroItemsRemaining3:: @ 82539EC .string "How's your stock of items holding up?\p" .string "I reckon there are no more items\n" .string "waiting to be found on this floor.\l" .string "You take care now!$" -BattlePyramid_EightItemsRemaining_Text4:: @ 8253A69 +BattlePyramid_Text_EightItemsRemaining4:: @ 8253A69 .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be eight more\n" .string "items on the ground.$" -BattlePyramid_SevenItemsRemaining_Text4:: @ 8253AC4 +BattlePyramid_Text_SevenItemsRemaining4:: @ 8253AC4 .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be seven more\n" .string "items on the ground.$" -BattlePyramid_SixItemsRemaining_Text4:: @ 8253B1F +BattlePyramid_Text_SixItemsRemaining4:: @ 8253B1F .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be six more\n" .string "items on the ground.$" -BattlePyramid_FiveItemsRemaining_Text4:: @ 8253B78 +BattlePyramid_Text_FiveItemsRemaining4:: @ 8253B78 .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be five more\n" .string "items on the ground.$" -BattlePyramid_FourItemsRemaining_Text4:: @ 8253BD2 +BattlePyramid_Text_FourItemsRemaining4:: @ 8253BD2 .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be four more\n" .string "items on the ground.$" -BattlePyramid_ThreeItemsRemaining_Text4:: @ 8253C2C +BattlePyramid_Text_ThreeItemsRemaining4:: @ 8253C2C .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be three more\n" .string "items on the ground.$" -BattlePyramid_TwoItemsRemaining_Text4:: @ 8253C87 +BattlePyramid_Text_TwoItemsRemaining4:: @ 8253C87 .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be two more\n" .string "items on the ground.$" -BattlePyramid_OneItemRemaining_Text4:: @ 8253CE0 +BattlePyramid_Text_OneItemRemaining4:: @ 8253CE0 .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appears to be only one more\n" .string "item on the ground.$" -BattlePyramid_ZeroItemsRemaining_Text4:: @ 8253D3E +BattlePyramid_Text_ZeroItemsRemaining4:: @ 8253D3E .string "You're strong, so you've earned\n" .string "a hint!\p" .string "There appear to be no more\n" .string "items on the ground.$" -BattlePyramid_EightItemsRemaining_Text5:: @ 8253D96 +BattlePyramid_Text_EightItemsRemaining5:: @ 8253D96 .string "On this floor of the PYRAMID,\n" .string "I hear there are eight items…$" -BattlePyramid_SevenItemsRemaining_Text5:: @ 8253DD2 +BattlePyramid_Text_SevenItemsRemaining5:: @ 8253DD2 .string "On this floor of the PYRAMID,\n" .string "I hear there are seven items…$" -BattlePyramid_SixItemsRemaining_Text5:: @ 8253E0E +BattlePyramid_Text_SixItemsRemaining5:: @ 8253E0E .string "On this floor of the PYRAMID,\n" .string "I hear there are six items…$" -BattlePyramid_FiveItemsRemaining_Text5:: @ 8253E48 +BattlePyramid_Text_FiveItemsRemaining5:: @ 8253E48 .string "On this floor of the PYRAMID,\n" .string "I hear there are five items…$" -BattlePyramid_FourItemsRemaining_Text5:: @ 8253E83 +BattlePyramid_Text_FourItemsRemaining5:: @ 8253E83 .string "On this floor of the PYRAMID,\n" .string "I hear there are four items…$" -BattlePyramid_ThreeItemsRemaining_Text5:: @ 8253EBE +BattlePyramid_Text_ThreeItemsRemaining5:: @ 8253EBE .string "On this floor of the PYRAMID,\n" .string "I hear there are three items…$" -BattlePyramid_TwoItemsRemaining_Text5:: @ 8253EFA +BattlePyramid_Text_TwoItemsRemaining5:: @ 8253EFA .string "On this floor of the PYRAMID,\n" .string "I hear there are two items…$" -BattlePyramid_OneItemRemaining_Text5:: @ 8253F34 +BattlePyramid_Text_OneItemRemaining5:: @ 8253F34 .string "On this floor of the PYRAMID,\n" .string "I hear there is one item…$" -BattlePyramid_ZeroItemsRemaining_Text5:: @ 8253F6C +BattlePyramid_Text_ZeroItemsRemaining5:: @ 8253F6C .string "On this floor of the PYRAMID,\n" .string "I hear there are no items…$" -BattlePyramid_EightItemsRemaining_Text6:: @ 8253FA5 +BattlePyramid_Text_EightItemsRemaining6:: @ 8253FA5 .string "Have you collected any items?\p" .string "I believe there are eight more\n" .string "items on this floor.$" -BattlePyramid_SevenItemsRemaining_Text6:: @ 8253FF7 +BattlePyramid_Text_SevenItemsRemaining6:: @ 8253FF7 .string "Have you collected any items?\p" .string "I believe there are seven more\n" .string "items on this floor.$" -BattlePyramid_SixItemsRemaining_Text6:: @ 8254049 +BattlePyramid_Text_SixItemsRemaining6:: @ 8254049 .string "Have you collected any items?\p" .string "I believe there are six more\n" .string "items on this floor.$" -BattlePyramid_FiveItemsRemaining_Text6:: @ 8254099 +BattlePyramid_Text_FiveItemsRemaining6:: @ 8254099 .string "Have you collected any items?\p" .string "I believe there are five more\n" .string "items on this floor.$" -BattlePyramid_FourItemsRemaining_Text6:: @ 82540EA +BattlePyramid_Text_FourItemsRemaining6:: @ 82540EA .string "Have you collected any items?\p" .string "I believe there are four more\n" .string "items on this floor.$" -BattlePyramid_ThreeItemsRemaining_Text6:: @ 825413B +BattlePyramid_Text_ThreeItemsRemaining6:: @ 825413B .string "Have you collected any items?\p" .string "I believe there are three more\n" .string "items on this floor.$" -BattlePyramid_TwoItemsRemaining_Text6:: @ 825418D +BattlePyramid_Text_TwoItemsRemaining6:: @ 825418D .string "Have you collected any items?\p" .string "I believe there are two more\n" .string "items on this floor.$" -BattlePyramid_OneItemRemaining_Text6:: @ 82541DD +BattlePyramid_Text_OneItemRemaining6:: @ 82541DD .string "Have you collected any items?\p" .string "I believe there is one more\n" .string "item on this floor.$" -BattlePyramid_ZeroItemsRemaining_Text6:: @ 825422B +BattlePyramid_Text_ZeroItemsRemaining6:: @ 825422B .string "Have you collected any items?\p" .string "I believe there are no more\n" .string "items on this floor.$" -BattlePyramid_SevenTrainersRemaining_Text1:: @ 825427A +BattlePyramid_Text_SevenTrainersRemaining1:: @ 825427A .string "You were really awesome!\p" .string "But there are still seven tough\n" .string "TRAINERS other than me!$" -BattlePyramid_SixTrainersRemaining_Text1:: @ 82542CB +BattlePyramid_Text_SixTrainersRemaining1:: @ 82542CB .string "You were really awesome!\p" .string "But there are still six tough\n" .string "TRAINERS other than me!$" -BattlePyramid_FiveTrainersRemaining_Text1:: @ 825431A +BattlePyramid_Text_FiveTrainersRemaining1:: @ 825431A .string "You were really awesome!\p" .string "But there are still five tough\n" .string "TRAINERS other than me!$" -BattlePyramid_FourTrainersRemaining_Text1:: @ 825436A +BattlePyramid_Text_FourTrainersRemaining1:: @ 825436A .string "You were really awesome!\p" .string "But there are still four tough\n" .string "TRAINERS other than me!$" -BattlePyramid_ThreeTrainersRemaining_Text1:: @ 82543BA +BattlePyramid_Text_ThreeTrainersRemaining1:: @ 82543BA .string "You were really awesome!\p" .string "But there are still three tough\n" .string "TRAINERS other than me!$" -BattlePyramid_TwoTrainersRemaining_Text1:: @ 825440B +BattlePyramid_Text_TwoTrainersRemaining1:: @ 825440B .string "You were really awesome!\p" .string "But there are still two tough\n" .string "TRAINERS other than me!$" -BattlePyramid_OneTrainersRemaining_Text1:: @ 825445A +BattlePyramid_Text_OneTrainersRemaining1:: @ 825445A .string "You were really awesome!\p" .string "But there's still one tough\n" .string "TRAINER other than me!$" -BattlePyramid_ZeroTrainersRemaining_Text1:: @ 82544A6 +BattlePyramid_Text_ZeroTrainersRemaining1:: @ 82544A6 .string "You were really awesome!\p" .string "There's no one left that\n" .string "can beat you!$" -BattlePyramid_SevenTrainersRemaining_Text2:: @ 82544E6 +BattlePyramid_Text_SevenTrainersRemaining2:: @ 82544E6 .string "This is so upsetting!\p" .string "But there are seven TRAINERS left!\n" .string "Someone will humble you!$" -BattlePyramid_SixTrainersRemaining_Text2:: @ 8254538 +BattlePyramid_Text_SixTrainersRemaining2:: @ 8254538 .string "This is so upsetting!\p" .string "But there are six TRAINERS left!\n" .string "Someone will humble you!$" -BattlePyramid_FiveTrainersRemaining_Text2:: @ 8254588 +BattlePyramid_Text_FiveTrainersRemaining2:: @ 8254588 .string "This is so upsetting!\p" .string "But there are five TRAINERS left!\n" .string "Someone will humble you!$" -BattlePyramid_FourTrainersRemaining_Text2:: @ 82545D9 +BattlePyramid_Text_FourTrainersRemaining2:: @ 82545D9 .string "This is so upsetting!\p" .string "But there are four TRAINERS left!\n" .string "Someone will humble you!$" -BattlePyramid_ThreeTrainersRemaining_Text2:: @ 825462A +BattlePyramid_Text_ThreeTrainersRemaining2:: @ 825462A .string "This is so upsetting!\p" .string "But there are three TRAINERS left!\n" .string "Someone will humble you!$" -BattlePyramid_TwoTrainersRemaining_Text2:: @ 825467C +BattlePyramid_Text_TwoTrainersRemaining2:: @ 825467C .string "This is so upsetting!\p" .string "But there are two TRAINERS left!\n" .string "Someone will humble you!$" -BattlePyramid_OneTrainersRemaining_Text2:: @ 82546CC +BattlePyramid_Text_OneTrainersRemaining2:: @ 82546CC .string "This is so upsetting!\p" .string "But there's one TRAINER left!\n" .string "I'm sure you will be humbled!$" -BattlePyramid_ZeroTrainersRemaining_Text2:: @ 825471E +BattlePyramid_Text_ZeroTrainersRemaining2:: @ 825471E .string "This is so upsetting!\p" .string "But there are no more TRAINERS\n" .string "who can engage you!$" -BattlePyramid_SevenTrainersRemaining_Text3:: @ 8254767 +BattlePyramid_Text_SevenTrainersRemaining3:: @ 8254767 .string "That's pretty impressive!\p" .string "But there are seven more TRAINERS\n" .string "on this floor. Can you beat them all?$" -BattlePyramid_SixTrainersRemaining_Text3:: @ 82547C9 +BattlePyramid_Text_SixTrainersRemaining3:: @ 82547C9 .string "That's pretty impressive!\p" .string "But there are six more TRAINERS\n" .string "on this floor. Can you beat them all?$" -BattlePyramid_FiveTrainersRemaining_Text3:: @ 8254829 +BattlePyramid_Text_FiveTrainersRemaining3:: @ 8254829 .string "That's pretty impressive!\p" .string "But there are five more TRAINERS\n" .string "on this floor. Can you beat them all?$" -BattlePyramid_FourTrainersRemaining_Text3:: @ 825488A +BattlePyramid_Text_FourTrainersRemaining3:: @ 825488A .string "That's pretty impressive!\p" .string "But there are four more TRAINERS\n" .string "on this floor. Can you beat them all?$" -BattlePyramid_ThreeTrainersRemaining_Text3:: @ 82548EB +BattlePyramid_Text_ThreeTrainersRemaining3:: @ 82548EB .string "That's pretty impressive!\p" .string "But there are three more TRAINERS\n" .string "on this floor. Can you beat them all?$" -BattlePyramid_TwoTrainersRemaining_Text3:: @ 825494D +BattlePyramid_Text_TwoTrainersRemaining3:: @ 825494D .string "That's pretty impressive!\p" .string "But there are two more TRAINERS\n" .string "on this floor. Can you beat them both?$" -BattlePyramid_OneTrainersRemaining_Text3:: @ 82549AE +BattlePyramid_Text_OneTrainersRemaining3:: @ 82549AE .string "That's pretty impressive!\p" .string "But there's still one more TRAINER\n" .string "on this floor. Can you prevail?$" -BattlePyramid_ZeroTrainersRemaining_Text3:: @ 8254A0B +BattlePyramid_Text_ZeroTrainersRemaining3:: @ 8254A0B .string "That's pretty impressive!\p" .string "You've gone through all the TRAINERS\n" .string "on this floor.$" -BattlePyramid_SevenTrainersRemaining_Text4:: @ 8254A59 +BattlePyramid_Text_SevenTrainersRemaining4:: @ 8254A59 .string "Maybe you could sweep through\n" .string "the seven TRAINERS left on this floor.$" -BattlePyramid_SixTrainersRemaining_Text4:: @ 8254A9E +BattlePyramid_Text_SixTrainersRemaining4:: @ 8254A9E .string "Maybe you could sweep through\n" .string "the six TRAINERS left on this floor.$" -BattlePyramid_FiveTrainersRemaining_Text4:: @ 8254AE1 +BattlePyramid_Text_FiveTrainersRemaining4:: @ 8254AE1 .string "Maybe you could sweep through\n" .string "the five TRAINERS left on this floor.$" -BattlePyramid_FourTrainersRemaining_Text4:: @ 8254B25 +BattlePyramid_Text_FourTrainersRemaining4:: @ 8254B25 .string "Maybe you could sweep through\n" .string "the four TRAINERS left on this floor.$" -BattlePyramid_ThreeTrainersRemaining_Text4:: @ 8254B69 +BattlePyramid_Text_ThreeTrainersRemaining4:: @ 8254B69 .string "Maybe you could sweep through\n" .string "the three TRAINERS left on this floor.$" -BattlePyramid_TwoTrainersRemaining_Text4:: @ 8254BAE +BattlePyramid_Text_TwoTrainersRemaining4:: @ 8254BAE .string "Maybe you could sweep through\n" .string "the two TRAINERS left on this floor.$" -BattlePyramid_OneTrainersRemaining_Text4:: @ 8254BF1 +BattlePyramid_Text_OneTrainersRemaining4:: @ 8254BF1 .string "Maybe you could complete your sweep\n" .string "with the one TRAINER left on this floor.$" -BattlePyramid_ZeroTrainersRemaining_Text4:: @ 8254C3E +BattlePyramid_Text_ZeroTrainersRemaining4:: @ 8254C3E .string "There isn't a single person left who\n" .string "can defeat you now…$" -BattlePyramid_SevenTrainersRemaining_Text5:: @ 8254C77 +BattlePyramid_Text_SevenTrainersRemaining5:: @ 8254C77 .string "You may have what it takes to beat\n" .string "the seven expert TRAINERS who remain.$" -BattlePyramid_SixTrainersRemaining_Text5:: @ 8254CC0 +BattlePyramid_Text_SixTrainersRemaining5:: @ 8254CC0 .string "You may have what it takes to beat\n" .string "the six expert TRAINERS who remain.$" -BattlePyramid_FiveTrainersRemaining_Text5:: @ 8254D07 +BattlePyramid_Text_FiveTrainersRemaining5:: @ 8254D07 .string "You may have what it takes to beat\n" .string "the five expert TRAINERS who remain.$" -BattlePyramid_FourTrainersRemaining_Text5:: @ 8254D4F +BattlePyramid_Text_FourTrainersRemaining5:: @ 8254D4F .string "You may have what it takes to beat\n" .string "the four expert TRAINERS who remain.$" -BattlePyramid_ThreeTrainersRemaining_Text5:: @ 8254D97 +BattlePyramid_Text_ThreeTrainersRemaining5:: @ 8254D97 .string "You may have what it takes to beat\n" .string "the three expert TRAINERS who remain.$" -BattlePyramid_TwoTrainersRemaining_Text5:: @ 8254DE0 +BattlePyramid_Text_TwoTrainersRemaining5:: @ 8254DE0 .string "You may have what it takes to beat\n" .string "the two expert TRAINERS who remain.$" -BattlePyramid_OneTrainersRemaining_Text5:: @ 8254E27 +BattlePyramid_Text_OneTrainersRemaining5:: @ 8254E27 .string "You may have what it takes to beat\n" .string "the one expert TRAINER who remains.$" -BattlePyramid_ZeroTrainersRemaining_Text5:: @ 8254E6E +BattlePyramid_Text_ZeroTrainersRemaining5:: @ 8254E6E .string "Your skills are beyond reproach.\p" .string "There are no more TRAINERS here\n" .string "who have any chance of beating you.$" -BattlePyramid_SevenTrainersRemaining_Text6:: @ 8254ED3 +BattlePyramid_Text_SevenTrainersRemaining6:: @ 8254ED3 .string "Can you keep winning against\n" .string "the seven remaining TRAINERS?$" -BattlePyramid_SixTrainersRemaining_Text6:: @ 8254F0E +BattlePyramid_Text_SixTrainersRemaining6:: @ 8254F0E .string "Can you keep winning against\n" .string "the six remaining TRAINERS?$" -BattlePyramid_FiveTrainersRemaining_Text6:: @ 8254F47 +BattlePyramid_Text_FiveTrainersRemaining6:: @ 8254F47 .string "Can you keep winning against\n" .string "the five remaining TRAINERS?$" -BattlePyramid_FourTrainersRemaining_Text6:: @ 8254F81 +BattlePyramid_Text_FourTrainersRemaining6:: @ 8254F81 .string "Can you keep winning against\n" .string "the four remaining TRAINERS?$" -BattlePyramid_ThreeTrainersRemaining_Text6:: @ 8254FBB +BattlePyramid_Text_ThreeTrainersRemaining6:: @ 8254FBB .string "Can you keep winning against\n" .string "the three remaining TRAINERS?$" -BattlePyramid_TwoTrainersRemaining_Text6:: @ 8254FF6 +BattlePyramid_Text_TwoTrainersRemaining6:: @ 8254FF6 .string "Can you keep winning against\n" .string "the two remaining TRAINERS?$" -BattlePyramid_OneTrainersRemaining_Text6:: @ 825502F +BattlePyramid_Text_OneTrainersRemaining6:: @ 825502F .string "Can you keep winning against\n" .string "the last remaining TRAINER?$" -BattlePyramid_ZeroTrainersRemaining_Text6:: @ 8255068 +BattlePyramid_Text_ZeroTrainersRemaining6:: @ 8255068 .string "There aren't any TRAINERS left that\n" .string "can take you on now…$" diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/map.json b/data/maps/BattleFrontier_BattlePyramidLobby/map.json index 4f99b9488..0b0d1d1a1 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/map.json +++ b/data/maps/BattleFrontier_BattlePyramidLobby/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePyramidLobby_EventScript_2508B1", + "script": "BattleFrontier_BattlePyramidLobby_EventScript_Attendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePyramidLobby_EventScript_250ACE", + "script": "BattleFrontier_BattlePyramidLobby_EventScript_HintGiver", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePyramidLobby_EventScript_250E83", + "script": "BattleFrontier_BattlePyramidLobby_EventScript_Woman", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "BattleFrontier_BattlePyramidLobby_EventScript_250E8C", + "script": "BattleFrontier_BattlePyramidLobby_EventScript_FatMan", "flag": "0" } ], @@ -84,7 +84,7 @@ "y": 12, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_NORTH", - "script": "BattleFrontier_BattlePyramidLobby_EventScript_250D42" + "script": "BattleFrontier_BattlePyramidLobby_EventScript_ShowResults" }, { "type": "sign", @@ -92,7 +92,7 @@ "y": 12, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "BattleFrontier_BattlePyramidLobby_EventScript_250E95" + "script": "BattleFrontier_BattlePyramidLobby_EventScript_RulesBoard" } ] } \ No newline at end of file diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index e7db4a459..7d3ddb2f1 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -1,32 +1,33 @@ BattleFrontier_BattlePyramidLobby_MapScripts:: @ 8250716 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidLobby_MapScript2_250735 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePyramidLobby_MapScript2_2497FB + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidLobby_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomeLobby_OnWarp .byte 0 -BattleFrontier_BattlePyramidLobby_MapScript2_250721: @ 8250721 - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePyramidLobby_EventScript_25072B +@ Unused. Pyramid uses Dome's OnWarp (presumably by mistake). Their effects are identical +BattleFrontier_BattlePyramidLobby_OnWarp: @ 8250721 + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePyramidLobby_EventScript_TurnPlayerNorth .2byte 0 -BattleFrontier_BattlePyramidLobby_EventScript_25072B: @ 825072B +BattleFrontier_BattlePyramidLobby_EventScript_TurnPlayerNorth: @ 825072B setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -BattleFrontier_BattlePyramidLobby_MapScript2_250735: @ 8250735 - map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePyramidLobby_EventScript_25075F - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramidLobby_EventScript_250768 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidLobby_EventScript_2508AC - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePyramidLobby_EventScript_2507B1 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePyramidLobby_EventScript_250852 +BattleFrontier_BattlePyramidLobby_OnFrame: @ 8250735 + map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePyramidLobby_EventScript_GetChallengeStatus + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramidLobby_EventScript_QuitWithoutSaving + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidLobby_EventScript_ResumeChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePyramidLobby_EventScript_WonChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePyramidLobby_EventScript_LostChallenge .2byte 0 -BattleFrontier_BattlePyramidLobby_EventScript_25075F:: @ 825075F +BattleFrontier_BattlePyramidLobby_EventScript_GetChallengeStatus:: @ 825075F frontier_getstatus end -BattleFrontier_BattlePyramidLobby_EventScript_250768:: @ 8250768 +BattleFrontier_BattlePyramidLobby_EventScript_QuitWithoutSaving:: @ 8250768 lockall - message BattleFrontier_BattlePyramidLobby_Text_2516D6 + message BattleFrontier_BattlePyramidLobby_Text_DidntSaveBeforeQuittingTakeBag waitmessage playse SE_EXPMAX waitse @@ -38,99 +39,98 @@ BattleFrontier_BattlePyramidLobby_EventScript_250768:: @ 8250768 releaseall end -BattleFrontier_BattlePyramidLobby_EventScript_2507B1:: @ 82507B1 +BattleFrontier_BattlePyramidLobby_EventScript_WonChallenge:: @ 82507B1 lockall frontier_isbrain compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_2507D2 - msgbox BattleFrontier_BattlePyramidLobby_Text_2517B5, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_2507DA + goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing + msgbox BattleFrontier_BattlePyramidLobby_Text_YouveConqueredPyramid, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints -BattleFrontier_BattlePyramidLobby_EventScript_2507D2:: @ 82507D2 - msgbox BattleFrontier_BattlePyramidLobby_Text_2525F4, MSGBOX_DEFAULT -BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA +BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing:: @ 82507D2 + msgbox BattleFrontier_BattlePyramidLobby_Text_YouveDefeatedPyramidKing, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints:: @ 82507DA special DoBattlePyramidMonsHaveHeldItem compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250DDB + call_if_eq BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag clearflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG frontier_checkairshow special LoadPlayerParty pyramid_clearhelditems special HealPlayerParty - message BattleFrontier_BattlePyramidLobby_Text_2519F8 + message BattleFrontier_BattlePyramidLobby_Text_UsedBattleBagWillBeKept waitmessage playse SE_EXPMAX waitse - msgbox BattleFrontier_BattlePyramidLobby_Text_252662, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_GiveYouTheseBattlePoints, MSGBOX_DEFAULT frontier_givepoints msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS - message BattleFrontier_BattlePyramidLobby_Text_251A77 + message BattleFrontier_BattlePyramidLobby_Text_RecordResultsWait waitmessage pyramid_setprize pyramid_save 0 playse SE_SAVE waitse - msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_LookForwardToNextChallenge, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -BattleFrontier_BattlePyramidLobby_EventScript_250852:: @ 8250852 +BattleFrontier_BattlePyramidLobby_EventScript_LostChallenge:: @ 8250852 frontier_checkairshow special LoadPlayerParty pyramid_clearhelditems special HealPlayerParty lockall - message BattleFrontier_BattlePyramidLobby_Text_251B5A + message BattleFrontier_BattlePyramidLobby_Text_DisappointingHereIsBag waitmessage playse SE_EXPMAX waitse - message BattleFrontier_BattlePyramidLobby_Text_251A77 + message BattleFrontier_BattlePyramidLobby_Text_RecordResultsWait waitmessage pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, FALSE pyramid_save 0 playse SE_SAVE waitse - msgbox BattleFrontier_BattlePyramidLobby_Text_251BB6, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_LookForwardToNextChallenge, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -BattleFrontier_BattlePyramidLobby_EventScript_2508AC:: @ 82508AC - goto BattleFrontier_BattlePyramidLobby_EventScript_250A21 +BattleFrontier_BattlePyramidLobby_EventScript_ResumeChallenge:: @ 82508AC + goto BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge -BattleFrontier_BattlePyramidLobby_EventScript_2508B1:: @ 82508B1 +BattleFrontier_BattlePyramidLobby_EventScript_Attendant:: @ 82508B1 lock faceplayer setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_PYRAMID setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES special SavePlayerParty - msgbox BattleFrontier_BattlePyramidLobby_Text_250F31, MSGBOX_DEFAULT - -BattleFrontier_BattlePyramidLobby_EventScript_2508C8:: @ 82508C8 - message BattleFrontier_BattlePyramidLobby_Text_250FA7 + msgbox BattleFrontier_BattlePyramidLobby_Text_WelcomeToBattlePyramid, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_AskTakeChallenge:: @ 82508C8 + message BattleFrontier_BattlePyramidLobby_Text_EmbarkOnChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePyramidLobby_EventScript_250904 - case 1, BattleFrontier_BattlePyramidLobby_EventScript_250A68 - case 2, BattleFrontier_BattlePyramidLobby_EventScript_250AC4 - case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250AC4 + case 0, BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge + case 1, BattleFrontier_BattlePyramidLobby_EventScript_ExplainChallenge + case 2, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge -BattleFrontier_BattlePyramidLobby_EventScript_250904:: @ 8250904 - message BattleFrontier_BattlePyramidLobby_Text_251248 +BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge:: @ 8250904 + message BattleFrontier_BattlePyramidLobby_Text_WhichLevelMode waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case 2, BattleFrontier_BattlePyramidLobby_EventScript_250AC4 - case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250AC4 + case FRONTIER_LVL_TENT, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge frontier_checkineligible compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250A75 + goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT - msgbox BattleFrontier_BattlePyramidLobby_Text_251297, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen 1 call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT @@ -138,14 +138,14 @@ BattleFrontier_BattlePyramidLobby_EventScript_250904:: @ 8250904 special ChoosePartyForBattleFrontier waitstate compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250AC1 - msgbox BattleFrontier_BattlePyramidLobby_Text_2514E6, MSGBOX_YESNO + goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge + msgbox BattleFrontier_BattlePyramidLobby_Text_OkayToSaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT - case NO, BattleFrontier_BattlePyramidLobby_EventScript_250AC1 - case YES, BattleFrontier_BattlePyramidLobby_EventScript_2509A5 - case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250AC1 + case NO, BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge + case YES, BattleFrontier_BattlePyramidLobby_EventScript_SaveBeforeChallenge + case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge -BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5 +BattleFrontier_BattlePyramidLobby_EventScript_SaveBeforeChallenge:: @ 82509A5 setvar VAR_TEMP_0, 0 frontier_set FRONTIER_DATA_SELECTED_MON_ORDER pyramid_init @@ -153,215 +153,215 @@ BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING frontier_set FRONTIER_DATA_PAUSED, FALSE pyramid_seedfloor - pyramid_inittrainers + pyramid_settrainers special LoadPlayerParty closemessage delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250AAA - -BattleFrontier_BattlePyramidLobby_EventScript_250A21:: @ 8250A21 + goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed +BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge:: @ 8250A21 special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE - msgbox BattleFrontier_BattlePyramidLobby_Text_251531, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_ShowYouIntoPyramid, MSGBOX_DEFAULT closemessage - call BattleFrontier_BattlePyramidLobby_EventScript_250D56 + call BattleFrontier_BattlePyramidLobby_EventScript_WalkToPanelAndReceiveBag frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_RESULT, 0 special HealPlayerParty - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE, 255, 1, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1 setvar VAR_TEMP_0, 0 waitstate end -BattleFrontier_BattlePyramidLobby_EventScript_250A68:: @ 8250A68 - msgbox BattleFrontier_BattlePyramidLobby_Text_25100C, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_2508C8 +BattleFrontier_BattlePyramidLobby_EventScript_ExplainChallenge:: @ 8250A68 + msgbox BattleFrontier_BattlePyramidLobby_Text_ExplainBattlePyramid, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_AskTakeChallenge -BattleFrontier_BattlePyramidLobby_EventScript_250A75:: @ 8250A75 +BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons:: @ 8250A75 switch VAR_RESULT - case FRONTIER_LVL_50, BattleFrontier_BattlePyramidLobby_EventScript_250A90 - case FRONTIER_LVL_OPEN, BattleFrontier_BattlePyramidLobby_EventScript_250A9D + case FRONTIER_LVL_50, BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMonsLv50 + case FRONTIER_LVL_OPEN, BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMonsLvOpen -BattleFrontier_BattlePyramidLobby_EventScript_250A90:: @ 8250A90 - msgbox BattleFrontier_BattlePyramidLobby_Text_2513C1, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250ACC +BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMonsLv50:: @ 8250A90 + msgbox BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge -BattleFrontier_BattlePyramidLobby_EventScript_250A9D:: @ 8250A9D - msgbox BattleFrontier_BattlePyramidLobby_Text_2512E2, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250ACC +BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMonsLvOpen:: @ 8250A9D + msgbox BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge -BattleFrontier_BattlePyramidLobby_EventScript_250AAA:: @ 8250AAA +BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed:: @ 8250AAA frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - goto BattleFrontier_BattlePyramidLobby_EventScript_250AC4 + goto BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge -BattleFrontier_BattlePyramidLobby_EventScript_250AC1:: @ 8250AC1 +BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge:: @ 8250AC1 special LoadPlayerParty -BattleFrontier_BattlePyramidLobby_EventScript_250AC4:: @ 8250AC4 - msgbox BattleFrontier_BattlePyramidLobby_Text_250FE5, MSGBOX_DEFAULT -BattleFrontier_BattlePyramidLobby_EventScript_250ACC:: @ 8250ACC +BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge:: @ 8250AC4 + msgbox BattleFrontier_BattlePyramidLobby_Text_AwaitFutureChallenge, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge:: @ 8250ACC release end -BattleFrontier_BattlePyramidLobby_EventScript_250ACE:: @ 8250ACE +BattleFrontier_BattlePyramidLobby_EventScript_HintGiver:: @ 8250ACE lockall applymovement 2, Common_Movement_FacePlayer waitmovement 0 - msgbox BattleFrontier_BattlePyramidLobby_Text_251C3B, MSGBOX_DEFAULT - call BattleFrontier_BattlePyramidLobby_EventScript_250AF0 - msgbox BattleFrontier_BattlePyramidLobby_Text_252461, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_TellYouWhatMisfortunesAwait, MSGBOX_DEFAULT + call BattleFrontier_BattlePyramidLobby_EventScript_GiveHint + msgbox BattleFrontier_BattlePyramidLobby_Text_BelieveMyFortunesOrNot, MSGBOX_DEFAULT releaseall end -BattleFrontier_BattlePyramidLobby_EventScript_250AF0:: @ 8250AF0 +BattleFrontier_BattlePyramidLobby_EventScript_GiveHint:: @ 8250AF0 multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePyramidLobby_EventScript_250B28 - case 1, BattleFrontier_BattlePyramidLobby_EventScript_250B66 - case 2, BattleFrontier_BattlePyramidLobby_EventScript_250B27 - case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250B27 + case FRONTIER_LVL_50, BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLv50 + case FRONTIER_LVL_OPEN, BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLvOpen + case FRONTIER_LVL_TENT, BattleFrontier_BattlePyramidLobby_EventScript_NoHint + case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_NoHint return -BattleFrontier_BattlePyramidLobby_EventScript_250B27:: @ 8250B27 +@ Shouldnt occur +BattleFrontier_BattlePyramidLobby_EventScript_NoHint:: @ 8250B27 return -BattleFrontier_BattlePyramidLobby_EventScript_250B28:: @ 8250B28 - msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLv50:: @ 8250B28 + msgbox BattleFrontier_BattlePyramidLobby_Text_Aah, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_50 compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B53 + goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak setvar VAR_RESULT, 0 - goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 + goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return -BattleFrontier_BattlePyramidLobby_EventScript_250B53:: @ 8250B53 +BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak:: @ 8250B53 pyramid_get PYRAMID_DATA_WIN_STREAK_50 - goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 + goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return -BattleFrontier_BattlePyramidLobby_EventScript_250B66:: @ 8250B66 - msgbox BattleFrontier_BattlePyramidLobby_Text_251C8A, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLvOpen:: @ 8250B66 + msgbox BattleFrontier_BattlePyramidLobby_Text_Aah, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_250B91 + goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLvOpenStreak setvar VAR_RESULT, 0 - goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 + goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return -BattleFrontier_BattlePyramidLobby_EventScript_250B91:: @ 8250B91 +BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLvOpenStreak:: @ 8250B91 pyramid_get PYRAMID_DATA_WIN_STREAK_OPEN - goto BattleFrontier_BattlePyramidLobby_EventScript_250BA4 + goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return -BattleFrontier_BattlePyramidLobby_EventScript_250BA4:: @ 8250BA4 +BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment:: @ 8250BA4 copyvar VAR_0x8004, VAR_RESULT special GetBattlePyramidHint switch VAR_RESULT - case 0, BattleFrontier_BattlePyramidLobby_EventScript_250C8E - case 1, BattleFrontier_BattlePyramidLobby_EventScript_250C97 - case 2, BattleFrontier_BattlePyramidLobby_EventScript_250CA0 - case 3, BattleFrontier_BattlePyramidLobby_EventScript_250CA9 - case 4, BattleFrontier_BattlePyramidLobby_EventScript_250CB2 - case 5, BattleFrontier_BattlePyramidLobby_EventScript_250CBB - case 6, BattleFrontier_BattlePyramidLobby_EventScript_250CC4 - case 7, BattleFrontier_BattlePyramidLobby_EventScript_250CCD - case 8, BattleFrontier_BattlePyramidLobby_EventScript_250CD6 - case 9, BattleFrontier_BattlePyramidLobby_EventScript_250CDF - case 10, BattleFrontier_BattlePyramidLobby_EventScript_250CE8 - case 11, BattleFrontier_BattlePyramidLobby_EventScript_250CF1 - case 12, BattleFrontier_BattlePyramidLobby_EventScript_250CFA - case 13, BattleFrontier_BattlePyramidLobby_EventScript_250D03 - case 14, BattleFrontier_BattlePyramidLobby_EventScript_250D0C - case 15, BattleFrontier_BattlePyramidLobby_EventScript_250D15 - case 16, BattleFrontier_BattlePyramidLobby_EventScript_250D1E - case 17, BattleFrontier_BattlePyramidLobby_EventScript_250D27 - case 18, BattleFrontier_BattlePyramidLobby_EventScript_250D30 - case 19, BattleFrontier_BattlePyramidLobby_EventScript_250D39 + case 0, BattleFrontier_BattlePyramidLobby_EventScript_HintParalysis + case 1, BattleFrontier_BattlePyramidLobby_EventScript_HintPoison + case 2, BattleFrontier_BattlePyramidLobby_EventScript_HintBurn + case 3, BattleFrontier_BattlePyramidLobby_EventScript_HintPPWaste + case 4, BattleFrontier_BattlePyramidLobby_EventScript_HintLevitate + case 5, BattleFrontier_BattlePyramidLobby_EventScript_HintTrapAbility + case 6, BattleFrontier_BattlePyramidLobby_EventScript_HintIce + case 7, BattleFrontier_BattlePyramidLobby_EventScript_HintExplosion + case 8, BattleFrontier_BattlePyramidLobby_EventScript_HintPsychic + case 9, BattleFrontier_BattlePyramidLobby_EventScript_HintRock + case 10, BattleFrontier_BattlePyramidLobby_EventScript_HintFighting + case 11, BattleFrontier_BattlePyramidLobby_EventScript_HintWeather + case 12, BattleFrontier_BattlePyramidLobby_EventScript_HintBug + case 13, BattleFrontier_BattlePyramidLobby_EventScript_HintDark + case 14, BattleFrontier_BattlePyramidLobby_EventScript_HintWater + case 15, BattleFrontier_BattlePyramidLobby_EventScript_HintGhost + case 16, BattleFrontier_BattlePyramidLobby_EventScript_HintSteel + case 17, BattleFrontier_BattlePyramidLobby_EventScript_HintFlyingDragon + case 18, BattleFrontier_BattlePyramidLobby_EventScript_HintStoneEvolve + case 19, BattleFrontier_BattlePyramidLobby_EventScript_HintNormal return -BattleFrontier_BattlePyramidLobby_EventScript_250C8E:: @ 8250C8E - msgbox BattleFrontier_BattlePyramidLobby_Text_251CB3, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintParalysis:: @ 8250C8E + msgbox BattleFrontier_BattlePyramidLobby_Text_HintParalysis, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250C97:: @ 8250C97 - msgbox BattleFrontier_BattlePyramidLobby_Text_251D07, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintPoison:: @ 8250C97 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintPoison, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CA0:: @ 8250CA0 - msgbox BattleFrontier_BattlePyramidLobby_Text_251D54, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintBurn:: @ 8250CA0 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintBurn, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CA9:: @ 8250CA9 - msgbox BattleFrontier_BattlePyramidLobby_Text_251D9C, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintPPWaste:: @ 8250CA9 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintPPWaste, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CB2:: @ 8250CB2 - msgbox BattleFrontier_BattlePyramidLobby_Text_251E3D, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintLevitate:: @ 8250CB2 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintLevitate, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CBB:: @ 8250CBB - msgbox BattleFrontier_BattlePyramidLobby_Text_251EA1, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintTrapAbility:: @ 8250CBB + msgbox BattleFrontier_BattlePyramidLobby_Text_HintTrapAbility, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CC4:: @ 8250CC4 - msgbox BattleFrontier_BattlePyramidLobby_Text_251F17, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintIce:: @ 8250CC4 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintIce, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CCD:: @ 8250CCD - msgbox BattleFrontier_BattlePyramidLobby_Text_251F6E, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintExplosion:: @ 8250CCD + msgbox BattleFrontier_BattlePyramidLobby_Text_HintExplosion, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CD6:: @ 8250CD6 - msgbox BattleFrontier_BattlePyramidLobby_Text_251FC7, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintPsychic:: @ 8250CD6 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintPsychic, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CDF:: @ 8250CDF - msgbox BattleFrontier_BattlePyramidLobby_Text_25201B, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintRock:: @ 8250CDF + msgbox BattleFrontier_BattlePyramidLobby_Text_HintRock, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CE8:: @ 8250CE8 - msgbox BattleFrontier_BattlePyramidLobby_Text_252068, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintFighting:: @ 8250CE8 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintFighting, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CF1:: @ 8250CF1 - msgbox BattleFrontier_BattlePyramidLobby_Text_2520BA, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintWeather:: @ 8250CF1 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintWeather, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250CFA:: @ 8250CFA - msgbox BattleFrontier_BattlePyramidLobby_Text_252158, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintBug:: @ 8250CFA + msgbox BattleFrontier_BattlePyramidLobby_Text_HintBug, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D03:: @ 8250D03 - msgbox BattleFrontier_BattlePyramidLobby_Text_2521B4, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintDark:: @ 8250D03 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintDark, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D0C:: @ 8250D0C - msgbox BattleFrontier_BattlePyramidLobby_Text_252206, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintWater:: @ 8250D0C + msgbox BattleFrontier_BattlePyramidLobby_Text_HintWater, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D15:: @ 8250D15 - msgbox BattleFrontier_BattlePyramidLobby_Text_25225A, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintGhost:: @ 8250D15 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintGhost, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D1E:: @ 8250D1E - msgbox BattleFrontier_BattlePyramidLobby_Text_2522AE, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintSteel:: @ 8250D1E + msgbox BattleFrontier_BattlePyramidLobby_Text_HintSteel, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D27:: @ 8250D27 - msgbox BattleFrontier_BattlePyramidLobby_Text_25230B, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintFlyingDragon:: @ 8250D27 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintFlyingDragon, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D30:: @ 8250D30 - msgbox BattleFrontier_BattlePyramidLobby_Text_252364, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintStoneEvolve:: @ 8250D30 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintStoneEvolve, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D39:: @ 8250D39 - msgbox BattleFrontier_BattlePyramidLobby_Text_252403, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HintNormal:: @ 8250D39 + msgbox BattleFrontier_BattlePyramidLobby_Text_HintNormal, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250D42:: @ 8250D42 +BattleFrontier_BattlePyramidLobby_EventScript_ShowResults:: @ 8250D42 lockall frontier_results FRONTIER_FACILITY_PYRAMID waitbuttonpress @@ -369,33 +369,33 @@ BattleFrontier_BattlePyramidLobby_EventScript_250D42:: @ 8250D42 releaseall end -BattleFrontier_BattlePyramidLobby_EventScript_250D56:: @ 8250D56 - applymovement 1, BattleFrontier_BattlePyramidLobby_Movement_250DC4 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_250DCD +BattleFrontier_BattlePyramidLobby_EventScript_WalkToPanelAndReceiveBag:: @ 8250D56 + applymovement 1, BattleFrontier_BattlePyramidLobby_Movement_AttendantWalkToPanel + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_PlayerWalkToPanel waitmovement 0 - msgbox BattleFrontier_BattlePyramidLobby_Text_251569, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_WeWillHoldBagForSafekeeping, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250D94 - msgbox BattleFrontier_BattlePyramidLobby_Text_2515AD, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250D9C + goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_ReceiveNewBattleBag + msgbox BattleFrontier_BattlePyramidLobby_Text_PleaseTakePreviousBattleBag, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_ReceiveBattleBag -BattleFrontier_BattlePyramidLobby_EventScript_250D94:: @ 8250D94 - msgbox BattleFrontier_BattlePyramidLobby_Text_2515F4, MSGBOX_DEFAULT -BattleFrontier_BattlePyramidLobby_EventScript_250D9C:: @ 8250D9C - message BattleFrontier_BattlePyramidLobby_Text_25161E +BattleFrontier_BattlePyramidLobby_EventScript_ReceiveNewBattleBag:: @ 8250D94 + msgbox BattleFrontier_BattlePyramidLobby_Text_PleaseTakeThisBattleBag, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_ReceiveBattleBag:: @ 8250D9C + message BattleFrontier_BattlePyramidLobby_Text_ExchangedBagForBattleBag waitmessage playse SE_EXPMAX waitse - msgbox BattleFrontier_BattlePyramidLobby_Text_251647, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidLobby_Text_StepOnFloorPanel, MSGBOX_DEFAULT closemessage - applymovement 1, BattleFrontier_BattlePyramidLobby_Movement_250DD5 + applymovement 1, BattleFrontier_BattlePyramidLobby_Movement_AttendantMoveAside waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_250DD8 + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_PlayerStepOnPanel waitmovement 0 return -BattleFrontier_BattlePyramidLobby_Movement_250DC4: @ 8250DC4 +BattleFrontier_BattlePyramidLobby_Movement_AttendantWalkToPanel: @ 8250DC4 walk_up walk_up walk_up @@ -406,7 +406,7 @@ BattleFrontier_BattlePyramidLobby_Movement_250DC4: @ 8250DC4 face_down step_end -BattleFrontier_BattlePyramidLobby_Movement_250DCD: @ 8250DCD +BattleFrontier_BattlePyramidLobby_Movement_PlayerWalkToPanel: @ 8250DCD walk_up walk_up walk_up @@ -416,135 +416,136 @@ BattleFrontier_BattlePyramidLobby_Movement_250DCD: @ 8250DCD walk_up step_end -BattleFrontier_BattlePyramidLobby_Movement_250DD5: @ 8250DD5 +BattleFrontier_BattlePyramidLobby_Movement_AttendantMoveAside: @ 8250DD5 walk_right face_left step_end -BattleFrontier_BattlePyramidLobby_Movement_250DD8: @ 8250DD8 +BattleFrontier_BattlePyramidLobby_Movement_PlayerStepOnPanel: @ 8250DD8 walk_up walk_up step_end -BattleFrontier_BattlePyramidLobby_EventScript_250DDB:: @ 8250DDB - msgbox BattleFrontier_BattlePyramidLobby_Text_2517FC, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag:: @ 8250DDB + msgbox BattleFrontier_BattlePyramidLobby_Text_MonHoldingItemCannotTake, MSGBOX_DEFAULT setflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG special TryStoreHeldItemsInPyramidBag compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250E00 - message BattleFrontier_BattlePyramidLobby_Text_2518C6 + goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_HeldItemsStoredInPyramidBag + message BattleFrontier_BattlePyramidLobby_Text_BagCannotHoldPickItemsToKeep waitmessage - goto BattleFrontier_BattlePyramidLobby_EventScript_250E09 + goto BattleFrontier_BattlePyramidLobby_EventScript_PickItemsToKeep end -BattleFrontier_BattlePyramidLobby_EventScript_250E00:: @ 8250E00 - msgbox BattleFrontier_BattlePyramidLobby_Text_251881, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidLobby_EventScript_HeldItemsStoredInPyramidBag:: @ 8250E00 + msgbox BattleFrontier_BattlePyramidLobby_Text_HeldItemsMovedToBag, MSGBOX_DEFAULT return -BattleFrontier_BattlePyramidLobby_EventScript_250E09:: @ 8250E09 +@ When exiting Battle Pyramid with a full pyramid bag and held items the player must select to keep/toss party held items and make room for any kept items by tossing from the pyramid bag +BattleFrontier_BattlePyramidLobby_EventScript_PickItemsToKeep:: @ 8250E09 multichoice 17, 6, MULTI_FRONTIER_ITEM_CHOOSE, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePyramidLobby_EventScript_250E40 - case 1, BattleFrontier_BattlePyramidLobby_EventScript_250E50 - case 2, BattleFrontier_BattlePyramidLobby_EventScript_250E60 - case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250E60 + case 0, BattleFrontier_BattlePyramidLobby_EventScript_PickItemsFromBag + case 1, BattleFrontier_BattlePyramidLobby_EventScript_PickItemsFromParty + case 2, BattleFrontier_BattlePyramidLobby_EventScript_ExitPickItems + case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_ExitPickItems end -BattleFrontier_BattlePyramidLobby_EventScript_250E40:: @ 8250E40 - special sub_81C4F24 +BattleFrontier_BattlePyramidLobby_EventScript_PickItemsFromBag:: @ 8250E40 + special ChooseItemsToTossFromPyramidBag waitstate - message BattleFrontier_BattlePyramidLobby_Text_25197E + message BattleFrontier_BattlePyramidLobby_Text_PickItemsToKeep waitmessage - goto BattleFrontier_BattlePyramidLobby_EventScript_250E09 + goto BattleFrontier_BattlePyramidLobby_EventScript_PickItemsToKeep end -BattleFrontier_BattlePyramidLobby_EventScript_250E50:: @ 8250E50 +BattleFrontier_BattlePyramidLobby_EventScript_PickItemsFromParty:: @ 8250E50 special BattlePyramidChooseMonHeldItems waitstate - message BattleFrontier_BattlePyramidLobby_Text_25197E + message BattleFrontier_BattlePyramidLobby_Text_PickItemsToKeep waitmessage - goto BattleFrontier_BattlePyramidLobby_EventScript_250E09 + goto BattleFrontier_BattlePyramidLobby_EventScript_PickItemsToKeep end -BattleFrontier_BattlePyramidLobby_EventScript_250E60:: @ 8250E60 +BattleFrontier_BattlePyramidLobby_EventScript_ExitPickItems:: @ 8250E60 special DoBattlePyramidMonsHaveHeldItem compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_250E6F + goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems return -BattleFrontier_BattlePyramidLobby_EventScript_250E6F:: @ 8250E6F - msgbox BattleFrontier_BattlePyramidLobby_Text_25194F, MSGBOX_DEFAULT - message BattleFrontier_BattlePyramidLobby_Text_25197E +BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems:: @ 8250E6F + msgbox BattleFrontier_BattlePyramidLobby_Text_LeastOneMonHoldingItem, MSGBOX_DEFAULT + message BattleFrontier_BattlePyramidLobby_Text_PickItemsToKeep waitmessage - goto BattleFrontier_BattlePyramidLobby_EventScript_250E09 + goto BattleFrontier_BattlePyramidLobby_EventScript_PickItemsToKeep end -BattleFrontier_BattlePyramidLobby_EventScript_250E83:: @ 8250E83 - msgbox BattleFrontier_BattlePyramidLobby_Text_2524DA, MSGBOX_NPC +BattleFrontier_BattlePyramidLobby_EventScript_Woman:: @ 8250E83 + msgbox BattleFrontier_BattlePyramidLobby_Text_TrainersNoticeRunning, MSGBOX_NPC end -BattleFrontier_BattlePyramidLobby_EventScript_250E8C:: @ 8250E8C - msgbox BattleFrontier_BattlePyramidLobby_Text_252595, MSGBOX_NPC +BattleFrontier_BattlePyramidLobby_EventScript_FatMan:: @ 8250E8C + msgbox BattleFrontier_BattlePyramidLobby_Text_LostLotOfItems, MSGBOX_NPC end -BattleFrontier_BattlePyramidLobby_EventScript_250E95:: @ 8250E95 +BattleFrontier_BattlePyramidLobby_EventScript_RulesBoard:: @ 8250E95 lockall - msgbox BattleFrontier_BattlePyramidLobby_Text_2526B6, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250EA4 + msgbox BattleFrontier_BattlePyramidLobby_Text_RulesAreListed, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePyramidLobby_EventScript_250EA4:: @ 8250EA4 - message BattleFrontier_BattlePyramidLobby_Text_2526D9 +BattleFrontier_BattlePyramidLobby_EventScript_ReadRulesBoard:: @ 8250EA4 + message BattleFrontier_BattlePyramidLobby_Text_ReadWhichHeading waitmessage multichoice 15, 2, MULTI_BATTLE_PYRAMID_RULES, 0 switch VAR_RESULT - case 0, BattleFrontier_BattlePyramidLobby_EventScript_250EF7 - case 1, BattleFrontier_BattlePyramidLobby_EventScript_250F05 - case 2, BattleFrontier_BattlePyramidLobby_EventScript_250F13 - case 3, BattleFrontier_BattlePyramidLobby_EventScript_250F21 - case 4, BattleFrontier_BattlePyramidLobby_EventScript_250F2F - case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_250F2F + case 0, BattleFrontier_BattlePyramidLobby_EventScript_RulesPokemon + case 1, BattleFrontier_BattlePyramidLobby_EventScript_RulesTrainers + case 2, BattleFrontier_BattlePyramidLobby_EventScript_RulesMaze + case 3, BattleFrontier_BattlePyramidLobby_EventScript_RulesBag + case 4, BattleFrontier_BattlePyramidLobby_EventScript_ExitRules + case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_ExitRules end -BattleFrontier_BattlePyramidLobby_EventScript_250EF7:: @ 8250EF7 - msgbox BattleFrontier_BattlePyramidLobby_Text_2526FC, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250EA4 +BattleFrontier_BattlePyramidLobby_EventScript_RulesPokemon:: @ 8250EF7 + msgbox BattleFrontier_BattlePyramidLobby_Text_ExplainMonRules, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePyramidLobby_EventScript_250F05:: @ 8250F05 - msgbox BattleFrontier_BattlePyramidLobby_Text_2527A9, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250EA4 +BattleFrontier_BattlePyramidLobby_EventScript_RulesTrainers:: @ 8250F05 + msgbox BattleFrontier_BattlePyramidLobby_Text_ExplainTrainerRules, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePyramidLobby_EventScript_250F13:: @ 8250F13 - msgbox BattleFrontier_BattlePyramidLobby_Text_25285A, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250EA4 +BattleFrontier_BattlePyramidLobby_EventScript_RulesMaze:: @ 8250F13 + msgbox BattleFrontier_BattlePyramidLobby_Text_ExplainMazeRules, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePyramidLobby_EventScript_250F21:: @ 8250F21 - msgbox BattleFrontier_BattlePyramidLobby_Text_252924, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidLobby_EventScript_250EA4 +BattleFrontier_BattlePyramidLobby_EventScript_RulesBag:: @ 8250F21 + msgbox BattleFrontier_BattlePyramidLobby_Text_ExplainBagRules, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidLobby_EventScript_ReadRulesBoard end -BattleFrontier_BattlePyramidLobby_EventScript_250F2F:: @ 8250F2F +BattleFrontier_BattlePyramidLobby_EventScript_ExitRules:: @ 8250F2F releaseall end -BattleFrontier_BattlePyramidLobby_Text_250F31: @ 8250F31 +BattleFrontier_BattlePyramidLobby_Text_WelcomeToBattlePyramid: @ 8250F31 .string "Where the courage of TRAINERS\n" .string "is put to the test!\p" .string "Welcome to the BATTLE PYRAMID!\p" .string "I am your guide to\n" .string "the Battle Quest.$" -BattleFrontier_BattlePyramidLobby_Text_250FA7: @ 8250FA7 +BattleFrontier_BattlePyramidLobby_Text_EmbarkOnChallenge: @ 8250FA7 .string "Have you the courage to embark on\n" .string "the Battle Quest challenge?$" -BattleFrontier_BattlePyramidLobby_Text_250FE5: @ 8250FE5 +BattleFrontier_BattlePyramidLobby_Text_AwaitFutureChallenge: @ 8250FE5 .string "We await your challenge in the future!$" -BattleFrontier_BattlePyramidLobby_Text_25100C: @ 825100C +BattleFrontier_BattlePyramidLobby_Text_ExplainBattlePyramid: @ 825100C .string "The Battle Quest is a battling\n" .string "event in which you must explore\l" .string "the PYRAMID and try to reach the top.\p" @@ -563,16 +564,16 @@ BattleFrontier_BattlePyramidLobby_Text_25100C: @ 825100C .string "If you don't save before interrupting,\n" .string "you will be disqualified.$" -BattleFrontier_BattlePyramidLobby_Text_251248: @ 8251248 +BattleFrontier_BattlePyramidLobby_Text_WhichLevelMode: @ 8251248 .string "The PYRAMID offers two courses,\n" .string "Level 50 and Open Level.\l" .string "Which will you enter?$" -BattleFrontier_BattlePyramidLobby_Text_251297: @ 8251297 +BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons: @ 8251297 .string "Very good. Now, please select the three\n" .string "POKéMON you wish to accompany you.$" -BattleFrontier_BattlePyramidLobby_Text_2512E2: @ 82512E2 +BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLvOpen: @ 82512E2 .string "A slight problem, adventurer!\p" .string "You seem to not have the three\n" .string "POKéMON qualified for the challenge.\p" @@ -582,7 +583,7 @@ BattleFrontier_BattlePyramidLobby_Text_2512E2: @ 82512E2 .string "When you are ready, please have\n" .string "a word with me.$" -BattleFrontier_BattlePyramidLobby_Text_2513C1: @ 82513C1 +BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLv50: @ 82513C1 .string "A slight problem, adventurer!\p" .string "You seem to not have the three\n" .string "POKéMON qualified for the challenge.\p" @@ -594,38 +595,38 @@ BattleFrontier_BattlePyramidLobby_Text_2513C1: @ 82513C1 .string "When you are ready, please have\n" .string "a word with me.$" -BattleFrontier_BattlePyramidLobby_Text_2514E6: @ 82514E6 +BattleFrontier_BattlePyramidLobby_Text_OkayToSaveBeforeChallenge: @ 82514E6 .string "Before you enter the BATTLE PYRAMID,\n" .string "the game must be saved. Is that okay?$" -BattleFrontier_BattlePyramidLobby_Text_251531: @ 8251531 +BattleFrontier_BattlePyramidLobby_Text_ShowYouIntoPyramid: @ 8251531 .string "Very good. I will now show you into\n" .string "the BATTLE PYRAMID.$" -BattleFrontier_BattlePyramidLobby_Text_251569: @ 8251569 +BattleFrontier_BattlePyramidLobby_Text_WeWillHoldBagForSafekeeping: @ 8251569 .string "We will hold your BAG for safekeeping,\n" .string "{PLAYER}, while you are exploring.$" -BattleFrontier_BattlePyramidLobby_Text_2515AD: @ 82515AD +BattleFrontier_BattlePyramidLobby_Text_PleaseTakePreviousBattleBag: @ 82515AD .string "In exchange, please take this BATTLE\n" .string "BAG, the one you used previously.$" -BattleFrontier_BattlePyramidLobby_Text_2515F4: @ 82515F4 +BattleFrontier_BattlePyramidLobby_Text_PleaseTakeThisBattleBag: @ 82515F4 .string "In exchange, please take this\n" .string "BATTLE BAG.$" -BattleFrontier_BattlePyramidLobby_Text_25161E: @ 825161E +BattleFrontier_BattlePyramidLobby_Text_ExchangedBagForBattleBag: @ 825161E .string "{PLAYER} exchanged the BAG for\n" .string "the BATTLE BAG.$" -BattleFrontier_BattlePyramidLobby_Text_251647: @ 8251647 +BattleFrontier_BattlePyramidLobby_Text_StepOnFloorPanel: @ 8251647 .string "When you step on this floor panel,\n" .string "you will be transported to a higher\l" .string "floor in the PYRAMID.\p" .string "I hope for your sake that your\n" .string "quest goes safely!$" -BattleFrontier_BattlePyramidLobby_Text_2516D6: @ 82516D6 +BattleFrontier_BattlePyramidLobby_Text_DidntSaveBeforeQuittingTakeBag: @ 82516D6 .string "A major problem, explorer!\p" .string "You did not save before ending\n" .string "your challenge the last time.\p" @@ -635,107 +636,112 @@ BattleFrontier_BattlePyramidLobby_Text_2516D6: @ 82516D6 .string "for you.\p" .string "{PLAYER} got the BAG back.$" -BattleFrontier_BattlePyramidLobby_Text_2517B5: @ 82517B5 +BattleFrontier_BattlePyramidLobby_Text_YouveConqueredPyramid: @ 82517B5 .string "Excellent to see you back!\p" .string "You've conquered the PYRAMID!\n" .string "How splendid!$" -BattleFrontier_BattlePyramidLobby_Text_2517FC: @ 82517FC +BattleFrontier_BattlePyramidLobby_Text_MonHoldingItemCannotTake: @ 82517FC .string "Ah, a slight problem.\p" .string "At least one POKéMON is holding\n" .string "an item.\p" .string "I'm sorry to say, items obtained in\n" .string "the PYRAMID cannot be taken away.$" -BattleFrontier_BattlePyramidLobby_Text_251881: @ 8251881 +BattleFrontier_BattlePyramidLobby_Text_HeldItemsMovedToBag: @ 8251881 .string "All items held by your POKéMON will be\n" .string "moved to your BATTLE BAG, {PLAYER}.$" -BattleFrontier_BattlePyramidLobby_Text_2518C6: @ 82518C6 +BattleFrontier_BattlePyramidLobby_Text_BagCannotHoldPickItemsToKeep: @ 82518C6 .string "The BATTLE BAG cannot hold all your\n" .string "items, I'm sorry to say.\p" .string "Please pick the items you'll keep in the\n" .string "BATTLE BAG, and with your POKéMON.$" -BattleFrontier_BattlePyramidLobby_Text_25194F: @ 825194F +BattleFrontier_BattlePyramidLobby_Text_LeastOneMonHoldingItem: @ 825194F .string "At least one POKéMON is still\n" .string "holding an item.$" -BattleFrontier_BattlePyramidLobby_Text_25197E: @ 825197E +BattleFrontier_BattlePyramidLobby_Text_PickItemsToKeep: @ 825197E .string "Please pick the items you'll keep in the\n" .string "BATTLE BAG, and with your POKéMON.$" -BattleFrontier_BattlePyramidLobby_Text_2519CA: @ 82519CA +@ Unused +BattleFrontier_BattlePyramidLobby_Text_ReturnedEverythingMonsHeld: @ 82519CA .string "{PLAYER} returned everything that\n" .string "the POKéMON held.$" -BattleFrontier_BattlePyramidLobby_Text_2519F8: @ 82519F8 +BattleFrontier_BattlePyramidLobby_Text_UsedBattleBagWillBeKept: @ 82519F8 .string "The BATTLE BAG you used will be kept\n" .string "in readiness for your next challenge.\p" .string "{PLAYER} turned the BATTLE BAG over\n" .string "for the BAG's return.$" -BattleFrontier_BattlePyramidLobby_Text_251A77: @ 8251A77 +BattleFrontier_BattlePyramidLobby_Text_RecordResultsWait: @ 8251A77 .string "I must record your results.\n" .string "Please wait.$" -BattleFrontier_BattlePyramidLobby_Text_251AA0: @ 8251AA0 +@ Unused +BattleFrontier_BattlePyramidLobby_Text_ForConqueringPyramidTakeThis: @ 8251AA0 .string "As a memento for conquering\n" .string "the BATTLE PYRAMID, please take this.$" -BattleFrontier_BattlePyramidLobby_Text_251AE2: @ 8251AE2 +@ Unused +BattleFrontier_BattlePyramidLobby_Text_ReceivedPrizeItem: @ 8251AE2 .string "{PLAYER} received the prize\n" .string "{STR_VAR_1}.$" -BattleFrontier_BattlePyramidLobby_Text_251AFC: @ 8251AFC +@ Unused +BattleFrontier_BattlePyramidLobby_Text_BagIsFull: @ 8251AFC .string "…Ah…\n" .string "Your BAG appears to be filled.\p" .string "Please return after you've organized\n" .string "your BAG's contents.$" -BattleFrontier_BattlePyramidLobby_Text_251B5A: @ 8251B5A +BattleFrontier_BattlePyramidLobby_Text_DisappointingHereIsBag: @ 8251B5A .string "How disappointing for you…\p" .string "Here is the BAG we've been holding\n" .string "for you.\p" .string "{PLAYER} got the BAG back.$" -BattleFrontier_BattlePyramidLobby_Text_251BB6: @ 8251BB6 +BattleFrontier_BattlePyramidLobby_Text_LookForwardToNextChallenge: @ 8251BB6 .string "We look forward to your\n" .string "next challenge!$" -BattleFrontier_BattlePyramidLobby_Text_251BDE: @ 8251BDE +@ Unused +BattleFrontier_BattlePyramidLobby_Text_HereIsPrize: @ 8251BDE .string "We have been looking forward to\n" .string "your arrival!\p" .string "Here is your prize for conquering\n" .string "the PYRAMID.$" -BattleFrontier_BattlePyramidLobby_Text_251C3B: @ 8251C3B +BattleFrontier_BattlePyramidLobby_Text_TellYouWhatMisfortunesAwait: @ 8251C3B .string "Welcome…\p" .string "I shall be pleased to tell you what\n" .string "misfortunes await in the PYRAMID…$" -BattleFrontier_BattlePyramidLobby_Text_251C8A: @ 8251C8A +BattleFrontier_BattlePyramidLobby_Text_Aah: @ 8251C8A .string "… … … … … …\n" .string "… … … … … …\p" .string "… … … … … …\n" .string "Aah!$" -BattleFrontier_BattlePyramidLobby_Text_251CB3: @ 8251CB3 +BattleFrontier_BattlePyramidLobby_Text_HintParalysis: @ 8251CB3 .string "I see a shower of sparks…\p" .string "…And in it, I see your POKéMON\n" .string "struggling with paralysis…$" -BattleFrontier_BattlePyramidLobby_Text_251D07: @ 8251D07 +BattleFrontier_BattlePyramidLobby_Text_HintPoison: @ 8251D07 .string "I see poison…\p" .string "…And, I see your POKéMON suffering\n" .string "from the effects of poison…$" -BattleFrontier_BattlePyramidLobby_Text_251D54: @ 8251D54 +BattleFrontier_BattlePyramidLobby_Text_HintBurn: @ 8251D54 .string "I see bright red flames…\p" .string "…And, I see your POKéMON suffering\n" .string "from burns…$" -BattleFrontier_BattlePyramidLobby_Text_251D9C: @ 8251D9C +BattleFrontier_BattlePyramidLobby_Text_HintPPWaste: @ 8251D9C .string "I sense the tremendous pressure of\n" .string "unrequited anger…\p" .string "It is a curse…\p" @@ -743,44 +749,44 @@ BattleFrontier_BattlePyramidLobby_Text_251D9C: @ 8251D9C .string "Power Points and having no recourse\l" .string "but to use STRUGGLE…$" -BattleFrontier_BattlePyramidLobby_Text_251E3D: @ 8251E3D +BattleFrontier_BattlePyramidLobby_Text_HintLevitate: @ 8251E3D .string "I see POKéMON loftily airborne…\p" .string "…And, I see your POKéMON frustrated\n" .string "by powerless GROUND-type moves…$" -BattleFrontier_BattlePyramidLobby_Text_251EA1: @ 8251EA1 +BattleFrontier_BattlePyramidLobby_Text_HintTrapAbility: @ 8251EA1 .string "I sense terrific energy rising from\n" .string "the ground below…\p" .string "…And, I see your POKéMON unable to\n" .string "escape the power's clutches…$" -BattleFrontier_BattlePyramidLobby_Text_251F17: @ 8251F17 +BattleFrontier_BattlePyramidLobby_Text_HintIce: @ 8251F17 .string "I see ICE-type POKéMON…\p" .string "…And, I see your POKéMON fighting\n" .string "the freezing effects of ice…$" -BattleFrontier_BattlePyramidLobby_Text_251F6E: @ 8251F6E +BattleFrontier_BattlePyramidLobby_Text_HintExplosion: @ 8251F6E .string "I see a flurry of moves that imperil\n" .string "the user…\p" .string "…And, I see your POKéMON falling\n" .string "to them…$" -BattleFrontier_BattlePyramidLobby_Text_251FC7: @ 8251FC7 +BattleFrontier_BattlePyramidLobby_Text_HintPsychic: @ 8251FC7 .string "I see PSYCHIC-type POKéMON…\p" .string "…And, I see your POKéMON in torment\n" .string "from PSYCHIC moves…$" -BattleFrontier_BattlePyramidLobby_Text_25201B: @ 825201B +BattleFrontier_BattlePyramidLobby_Text_HintRock: @ 825201B .string "I see ROCK-type POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from ROCK moves…$" -BattleFrontier_BattlePyramidLobby_Text_252068: @ 8252068 +BattleFrontier_BattlePyramidLobby_Text_HintFighting: @ 8252068 .string "I see FIGHTING-type POKéMON…\p" .string "…And, I see your POKéMON pummeled\n" .string "by FIGHTING moves…$" -BattleFrontier_BattlePyramidLobby_Text_2520BA: @ 82520BA +BattleFrontier_BattlePyramidLobby_Text_HintWeather: @ 82520BA .string "RAIN DANCE… SUNNY DAY…\n" .string "SANDSTORM… HAIL…\p" .string "I see POKéMON that become stronger\n" @@ -788,37 +794,37 @@ BattleFrontier_BattlePyramidLobby_Text_2520BA: @ 82520BA .string "…And, I see your POKéMON confounded\n" .string "by different types of moves…$" -BattleFrontier_BattlePyramidLobby_Text_252158: @ 8252158 +BattleFrontier_BattlePyramidLobby_Text_HintBug: @ 8252158 .string "I see BUG-type POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from different kinds of attacks…$" -BattleFrontier_BattlePyramidLobby_Text_2521B4: @ 82521B4 +BattleFrontier_BattlePyramidLobby_Text_HintDark: @ 82521B4 .string "I see DARK-type POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from DARK-type moves…$" -BattleFrontier_BattlePyramidLobby_Text_252206: @ 8252206 +BattleFrontier_BattlePyramidLobby_Text_HintWater: @ 8252206 .string "I see WATER-type POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from WATER-type moves…$" -BattleFrontier_BattlePyramidLobby_Text_25225A: @ 825225A +BattleFrontier_BattlePyramidLobby_Text_HintGhost: @ 825225A .string "I see GHOST-type POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from GHOST-type moves…$" -BattleFrontier_BattlePyramidLobby_Text_2522AE: @ 82522AE +BattleFrontier_BattlePyramidLobby_Text_HintSteel: @ 82522AE .string "I see STEEL-type POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from enormously powerful moves…$" -BattleFrontier_BattlePyramidLobby_Text_25230B: @ 825230B +BattleFrontier_BattlePyramidLobby_Text_HintFlyingDragon: @ 825230B .string "I see flying POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from enormously powerful moves…$" -BattleFrontier_BattlePyramidLobby_Text_252364: @ 8252364 +BattleFrontier_BattlePyramidLobby_Text_HintStoneEvolve: @ 8252364 .string "I see those that have evolved from\n" .string "the power of stones…\p" .string "I also sense fire, water,\n" @@ -826,18 +832,18 @@ BattleFrontier_BattlePyramidLobby_Text_252364: @ 8252364 .string "…And, I see your POKéMON suffering\n" .string "from those three powers…$" -BattleFrontier_BattlePyramidLobby_Text_252403: @ 8252403 +BattleFrontier_BattlePyramidLobby_Text_HintNormal: @ 8252403 .string "I see NORMAL-type POKéMON…\p" .string "…And, I see your POKéMON suffering\n" .string "from enormously powerful moves…$" -BattleFrontier_BattlePyramidLobby_Text_252461: @ 8252461 +BattleFrontier_BattlePyramidLobby_Text_BelieveMyFortunesOrNot: @ 8252461 .string "Whether you believe my fortunes\n" .string "or not, the choice is yours…\p" .string "The future can be changed anytime…\n" .string "I wish you safe passage…$" -BattleFrontier_BattlePyramidLobby_Text_2524DA: @ 82524DA +BattleFrontier_BattlePyramidLobby_Text_TrainersNoticeRunning: @ 82524DA .string "Did you know?\p" .string "If you run fast, TRAINERS may notice\n" .string "and come after you for a battle.\p" @@ -845,37 +851,37 @@ BattleFrontier_BattlePyramidLobby_Text_2524DA: @ 82524DA .string "don't catch their eyes, but sneak\l" .string "cautiously and quietly past them.$" -BattleFrontier_BattlePyramidLobby_Text_252595: @ 8252595 +BattleFrontier_BattlePyramidLobby_Text_LostLotOfItems: @ 8252595 .string "Awaaaaaaarrrrgh!\p" .string "I had a whole lot of items, but I lost\n" .string "them all when I lost!\p" .string "Awaaaaaaarrrrgh!$" -BattleFrontier_BattlePyramidLobby_Text_2525F4: @ 82525F4 +BattleFrontier_BattlePyramidLobby_Text_YouveDefeatedPyramidKing: @ 82525F4 .string "Welcome back!\n" .string "You've done the unthinkable!\p" .string "You've defeated the PYRAMID KING\n" .string "and conquered the BATTLE PYRAMID!$" -BattleFrontier_BattlePyramidLobby_Text_252662: @ 8252662 +BattleFrontier_BattlePyramidLobby_Text_GiveYouTheseBattlePoints: @ 8252662 .string "Young explorer!\n" .string "In commendation of your courage,\l" .string "we give you these Battle Point(s)!$" -BattleFrontier_BattlePyramidLobby_Text_2526B6: @ 82526B6 +BattleFrontier_BattlePyramidLobby_Text_RulesAreListed: @ 82526B6 .string "The Battle Quest rules are listed.$" -BattleFrontier_BattlePyramidLobby_Text_2526D9: @ 82526D9 +BattleFrontier_BattlePyramidLobby_Text_ReadWhichHeading: @ 82526D9 .string "Which heading do you want to read?$" -BattleFrontier_BattlePyramidLobby_Text_2526FC: @ 82526FC +BattleFrontier_BattlePyramidLobby_Text_ExplainMonRules: @ 82526FC .string "When the PYRAMID is conquered,\n" .string "the wild POKéMON that appear in it\l" .string "are replaced by different kinds.\p" .string "Explore, observe, and learn what kinds\n" .string "of wild POKéMON you may encounter.$" -BattleFrontier_BattlePyramidLobby_Text_2527A9: @ 82527A9 +BattleFrontier_BattlePyramidLobby_Text_ExplainTrainerRules: @ 82527A9 .string "TRAINERS are lying in wait for you\n" .string "inside the PYRAMID.\p" .string "On each floor, there are up to\n" @@ -883,7 +889,7 @@ BattleFrontier_BattlePyramidLobby_Text_2527A9: @ 82527A9 .string "When you defeat a TRAINER, you will\n" .string "get a helpful hint for your adventure.$" -BattleFrontier_BattlePyramidLobby_Text_25285A: @ 825285A +BattleFrontier_BattlePyramidLobby_Text_ExplainMazeRules: @ 825285A .string "The mazes in the PYRAMID rearrange\n" .string "themselves every time you enter it.\p" .string "The mazes are poorly lit.\n" @@ -891,7 +897,7 @@ BattleFrontier_BattlePyramidLobby_Text_25285A: @ 825285A .string "The light grows brighter whenever you\n" .string "defeat a wild POKéMON or a TRAINER.$" -BattleFrontier_BattlePyramidLobby_Text_252924: @ 8252924 +BattleFrontier_BattlePyramidLobby_Text_ExplainBagRules: @ 8252924 .string "The BATTLE BAG serves as your BAG\n" .string "while in the PYRAMID.\p" .string "There are two separate BATTLE BAGS--\n" diff --git a/data/maps/BattleFrontier_BattlePyramidTop/map.json b/data/maps/BattleFrontier_BattlePyramidTop/map.json index d73dc1692..3a304f147 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/map.json +++ b/data/maps/BattleFrontier_BattlePyramidTop/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "3", - "script": "BattleFrontier_BattlePyramidTop_EventScript_2551D0", + "script": "BattleFrontier_BattlePyramidTop_EventScript_Attendant", "flag": "0" }, { @@ -50,7 +50,7 @@ "elevation": 4, "var": "VAR_TEMP_2", "var_value": "0", - "script": "BattleFrontier_BattlePyramidTop_EventScript_255256" + "script": "BattleFrontier_BattlePyramidTop_EventScript_BattleBrandon" } ], "bg_events": [] diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc index 2e6b8f3a2..2d9006e9e 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc @@ -1,201 +1,197 @@ BattleFrontier_BattlePyramidTop_MapScripts:: @ 82550A1 - map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidTop_MapScript1_2550F4 - map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidTop_MapScript2_25516E - map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePyramidTop_MapScript1_2550B6 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePyramidTop_MapScript2_2550CE + map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidTop_OnResume + map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidTop_OnFrame + map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePyramidTop_OnTransition + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePyramidTop_OnWarp .byte 0 -BattleFrontier_BattlePyramidTop_MapScript1_2550B6: @ 82550B6 +BattleFrontier_BattlePyramidTop_OnTransition: @ 82550B6 pyramid_updatelight 200, PYRAMID_LIGHT_SET_RADIUS setvar VAR_TEMP_F, 1 end -BattleFrontier_BattlePyramidTop_MapScript2_2550CE: @ 82550CE - map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePyramidTop_EventScript_2550D8 +BattleFrontier_BattlePyramidTop_OnWarp: @ 82550CE + map_script_2 VAR_TEMP_1, 0, BattleFrontier_BattlePyramidTop_EventScript_SetUpObjects .2byte 0 -BattleFrontier_BattlePyramidTop_EventScript_2550D8:: @ 82550D8 +BattleFrontier_BattlePyramidTop_EventScript_SetUpObjects:: @ 82550D8 setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH compare VAR_TEMP_C, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_2550F3 + goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects setobjectxyperm 2, 0, 0 - -BattleFrontier_BattlePyramidTop_EventScript_2550F3:: @ 82550F3 +BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects:: @ 82550F3 end -BattleFrontier_BattlePyramidTop_MapScript1_2550F4: @ 82550F4 +BattleFrontier_BattlePyramidTop_OnResume: @ 82550F4 frontier_getbrainstatus compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_25510C + goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus call BattleFrontier_EventScript_SetBrainObjectGfx -BattleFrontier_BattlePyramidTop_EventScript_25510C:: @ 825510C +BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus:: @ 825510C copyvar VAR_TEMP_C, VAR_RESULT frontier_getstatus switch VAR_TEMP_0 - case 0, BattleFrontier_BattlePyramidTop_EventScript_255193 - case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramidTop_EventScript_252B66 - case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidTop_EventScript_255193 + case 0, BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge + case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby + case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge frontier_get FRONTIER_DATA_BATTLE_OUTCOME compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost end -BattleFrontier_BattlePyramidTop_MapScript2_25516E: @ 825516E - map_script_2 VAR_TEMP_E, 0, BattleFrontier_BattlePyramidTop_EventScript_255180 - map_script_2 VAR_TEMP_F, 1, BattleFrontier_BattlePyramidTop_EventScript_25518A +BattleFrontier_BattlePyramidTop_OnFrame: @ 825516E + map_script_2 VAR_TEMP_E, 0, BattleFrontier_BattlePyramidTop_EventScript_PlayPyramidMusic + map_script_2 VAR_TEMP_F, 1, BattleFrontier_BattlePyramidTop_EventScript_ShowMapName .2byte 0 -BattleFrontier_BattlePyramidTop_EventScript_255180:: @ 8255180 +BattleFrontier_BattlePyramidTop_EventScript_PlayPyramidMusic:: @ 8255180 playbgm MUS_PYRAMID_TOP, 0 setvar VAR_TEMP_E, 1 end -BattleFrontier_BattlePyramidTop_EventScript_25518A:: @ 825518A +BattleFrontier_BattlePyramidTop_EventScript_ShowMapName:: @ 825518A special ShowMapNamePopup setvar VAR_TEMP_F, 0 end -BattleFrontier_BattlePyramidTop_EventScript_255193:: @ 8255193 +BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge:: @ 8255193 pyramid_save CHALLENGE_STATUS_SAVING special SavePlayerParty frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - pyramid_inittrainers + pyramid_settrainers frontier_setpartyorder FRONTIER_PARTY_SIZE setvar VAR_TEMP_F, 1 end -BattleFrontier_BattlePyramidTop_EventScript_2551D0:: @ 82551D0 +BattleFrontier_BattlePyramidTop_EventScript_Attendant:: @ 82551D0 lock faceplayer compare VAR_TEMP_D, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_255236 + goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_StepForwardWhenReady compare VAR_TEMP_C, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_255240 - msgbox BattleFrontier_BattlePyramidTop_Text_255410, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside + msgbox BattleFrontier_BattlePyramidTop_Text_ReachedSummitUpYouGo, MSGBOX_DEFAULT closemessage - applymovement 1, BattleFrontier_BattlePyramidTop_Movement_2553FD + applymovement 1, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside waitmovement 0 - applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePyramidTop_Movement_255403 + applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePyramidTop_Movement_PlayerClimbToTop waitmovement 0 - applymovement 1, BattleFrontier_BattlePyramidTop_Movement_255400 + applymovement 1, BattleFrontier_BattlePyramidTop_Movement_AttendantBlockPath waitmovement 0 - message BattleFrontier_BattlePyramidTop_Text_2554E8 + message BattleFrontier_BattlePyramidTop_Text_PlayerConqueredPyramid waitmessage playfanfare MUS_ME_POINTGET waitfanfare closemessage - -BattleFrontier_BattlePyramidTop_EventScript_25521A:: @ 825521A +BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon:: @ 825521A frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13 waitstate end -BattleFrontier_BattlePyramidTop_EventScript_255236:: @ 8255236 - msgbox BattleFrontier_BattlePyramidTop_Text_255BFE, MSGBOX_DEFAULT +BattleFrontier_BattlePyramidTop_EventScript_StepForwardWhenReady:: @ 8255236 + msgbox BattleFrontier_BattlePyramidTop_Text_StepForwardWhenReady, MSGBOX_DEFAULT closemessage end -BattleFrontier_BattlePyramidTop_EventScript_255240:: @ 8255240 - msgbox BattleFrontier_BattlePyramidTop_Text_25551F, MSGBOX_DEFAULT - applymovement 1, BattleFrontier_BattlePyramidTop_Movement_2553FD +BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside:: @ 8255240 + msgbox BattleFrontier_BattlePyramidTop_Text_ChiefBeatYouHere, MSGBOX_DEFAULT + applymovement 1, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside setvar VAR_TEMP_D, 1 closemessage end -BattleFrontier_BattlePyramidTop_EventScript_255256:: @ 8255256 +BattleFrontier_BattlePyramidTop_EventScript_BattleBrandon:: @ 8255256 lockall switch VAR_TEMP_C - case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePyramidTop_EventScript_255335 - case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePyramidTop_EventScript_2552D0 - case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePyramidTop_EventScript_255388 + case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePyramidTop_EventScript_BrandonIntroGold + case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech + case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_2552D0 + goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech special SpawnCameraObject - applymovement EVENT_OBJ_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_25540C + applymovement EVENT_OBJ_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 - msgbox BattleFrontier_BattlePyramidTop_Text_255669, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidTop_Text_ExplorationsAreGrandestAdventure, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH - applymovement 2, BattleFrontier_BattlePyramidTop_Movement_25540A + applymovement 2, BattleFrontier_BattlePyramidTop_Movement_BrandonApproachPlayer waitmovement 0 - msgbox BattleFrontier_BattlePyramidTop_Text_25573E, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidTop_EventScript_2552DA + msgbox BattleFrontier_BattlePyramidTop_Text_ImPyramidKingBrandon, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonSilver end -BattleFrontier_BattlePyramidTop_EventScript_2552D0:: @ 82552D0 - applymovement 2, BattleFrontier_BattlePyramidTop_Movement_25540A +BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech:: @ 82552D0 + applymovement 2, BattleFrontier_BattlePyramidTop_Movement_BrandonApproachPlayer waitmovement 0 - -BattleFrontier_BattlePyramidTop_EventScript_2552DA:: @ 82552DA - msgbox BattleFrontier_BattlePyramidTop_Text_255846, MSGBOX_DEFAULT - call BattleFrontier_BattlePyramidTop_EventScript_2553ED +BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonSilver:: @ 82552DA + msgbox BattleFrontier_BattlePyramidTop_Text_BringCourageToOurBattle, MSGBOX_DEFAULT + call BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle playbgm MUS_PYRAMID_TOP, 0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_2552FB - goto BattleFrontier_BattlePyramidTop_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver + goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost -BattleFrontier_BattlePyramidTop_EventScript_2552FB:: @ 82552FB +BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver:: @ 82552FB frontier_getsymbols compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_25521A - msgbox BattleFrontier_BattlePyramidTop_Text_255873, MSGBOX_DEFAULT + goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon + msgbox BattleFrontier_BattlePyramidTop_Text_BrandonFrontierPassPlease, MSGBOX_DEFAULT playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattlePyramidTop_Text_2558E9 + message BattleFrontier_BattlePyramidTop_Text_ReceivedBraveSymbol waitmessage waitfanfare frontier_givesymbol - msgbox BattleFrontier_BattlePyramidTop_Text_25591D, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidTop_EventScript_25521A + msgbox BattleFrontier_BattlePyramidTop_Text_LookForwardToNextMeeting, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon -BattleFrontier_BattlePyramidTop_EventScript_255335:: @ 8255335 +BattleFrontier_BattlePyramidTop_EventScript_BrandonIntroGold:: @ 8255335 frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_255388 + goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech special SpawnCameraObject - applymovement EVENT_OBJ_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_25540C + applymovement EVENT_OBJ_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 - msgbox BattleFrontier_BattlePyramidTop_Text_255951, MSGBOX_DEFAULT + msgbox BattleFrontier_BattlePyramidTop_Text_BrandonYouveReturned, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH - applymovement 2, BattleFrontier_BattlePyramidTop_Movement_25540A + applymovement 2, BattleFrontier_BattlePyramidTop_Movement_BrandonApproachPlayer waitmovement 0 - msgbox BattleFrontier_BattlePyramidTop_Text_255A6D, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidTop_EventScript_255392 + msgbox BattleFrontier_BattlePyramidTop_Text_MyCourageIsOffMeter, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonGold end -BattleFrontier_BattlePyramidTop_EventScript_255388:: @ 8255388 - applymovement 2, BattleFrontier_BattlePyramidTop_Movement_25540A +BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech:: @ 8255388 + applymovement 2, BattleFrontier_BattlePyramidTop_Movement_BrandonApproachPlayer waitmovement 0 - -BattleFrontier_BattlePyramidTop_EventScript_255392:: @ 8255392 - msgbox BattleFrontier_BattlePyramidTop_Text_255AA1, MSGBOX_DEFAULT - call BattleFrontier_BattlePyramidTop_EventScript_2553ED +BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonGold:: @ 8255392 + msgbox BattleFrontier_BattlePyramidTop_Text_EverythingYouHave, MSGBOX_DEFAULT + call BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle playbgm MUS_PYRAMID_TOP, 0 compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_2553B3 - goto BattleFrontier_BattlePyramidTop_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold + goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost -BattleFrontier_BattlePyramidTop_EventScript_2553B3:: @ 82553B3 +BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold:: @ 82553B3 frontier_getsymbols compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_25521A - msgbox BattleFrontier_BattlePyramidTop_Text_255ACD, MSGBOX_DEFAULT + goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon + msgbox BattleFrontier_BattlePyramidTop_Text_BrandonRemarkableHaveThis, MSGBOX_DEFAULT playfanfare MUS_ME_SYMBOLGET - message BattleFrontier_BattlePyramidTop_Text_255B59 + message BattleFrontier_BattlePyramidTop_Text_BraveSymbolTookGoldenShine waitmessage waitfanfare frontier_givesymbol - msgbox BattleFrontier_BattlePyramidTop_Text_255B82, MSGBOX_DEFAULT - goto BattleFrontier_BattlePyramidTop_EventScript_25521A + msgbox BattleFrontier_BattlePyramidTop_Text_FarewellForNow, MSGBOX_DEFAULT + goto BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon -BattleFrontier_BattlePyramidTop_EventScript_2553ED:: @ 82553ED +BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle:: @ 82553ED closemessage setvar VAR_0x8004, SPECIAL_BATTLE_PYRAMID setvar VAR_0x8005, 0 @@ -203,17 +199,17 @@ BattleFrontier_BattlePyramidTop_EventScript_2553ED:: @ 82553ED waitstate return -BattleFrontier_BattlePyramidTop_Movement_2553FD: @ 82553FD +BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside: @ 82553FD walk_right walk_in_place_fastest_left step_end -BattleFrontier_BattlePyramidTop_Movement_255400: @ 8255400 +BattleFrontier_BattlePyramidTop_Movement_AttendantBlockPath: @ 8255400 walk_left walk_in_place_fastest_up step_end -BattleFrontier_BattlePyramidTop_Movement_255403: @ 8255403 +BattleFrontier_BattlePyramidTop_Movement_PlayerClimbToTop: @ 8255403 walk_up walk_up walk_up @@ -222,17 +218,17 @@ BattleFrontier_BattlePyramidTop_Movement_255403: @ 8255403 walk_in_place_fastest_down step_end -BattleFrontier_BattlePyramidTop_Movement_25540A: @ 825540A +BattleFrontier_BattlePyramidTop_Movement_BrandonApproachPlayer: @ 825540A walk_fast_down step_end -BattleFrontier_BattlePyramidTop_Movement_25540C: @ 825540C +BattleFrontier_BattlePyramidTop_Movement_CameraPanUp: @ 825540C walk_slow_up walk_slow_up delay_16 step_end -BattleFrontier_BattlePyramidTop_Text_255410: @ 8255410 +BattleFrontier_BattlePyramidTop_Text_ReachedSummitUpYouGo: @ 8255410 .string "It is a delight to see you here!\n" .string "You have reached the summit of\l" .string "the BATTLE PYRAMID!\p" @@ -243,11 +239,11 @@ BattleFrontier_BattlePyramidTop_Text_255410: @ 8255410 .string "Now, please!\n" .string "Up you go!$" -BattleFrontier_BattlePyramidTop_Text_2554E8: @ 82554E8 +BattleFrontier_BattlePyramidTop_Text_PlayerConqueredPyramid: @ 82554E8 .string "The PYRAMID's new conqueror!\n" .string "Let the name {PLAYER} be known!$" -BattleFrontier_BattlePyramidTop_Text_25551F: @ 825551F +BattleFrontier_BattlePyramidTop_Text_ChiefBeatYouHere: @ 825551F .string "It is a delight to see you here!\p" .string "Unfortunately, you were second by\n" .string "a mere fraction of time!\p" @@ -260,7 +256,7 @@ BattleFrontier_BattlePyramidTop_Text_25551F: @ 825551F .string "Now, please! When you are ready,\n" .string "take one more step of courage!$" -BattleFrontier_BattlePyramidTop_Text_255669: @ 8255669 +BattleFrontier_BattlePyramidTop_Text_ExplorationsAreGrandestAdventure: @ 8255669 .string "Young adventurer…\p" .string "Wouldn't you agree that explorations\n" .string "are the grandest of adventures?\p" @@ -270,7 +266,7 @@ BattleFrontier_BattlePyramidTop_Text_255669: @ 8255669 .string "And, above all, only your own courage\n" .string "to lead you through unknown worlds…$" -BattleFrontier_BattlePyramidTop_Text_25573E: @ 825573E +BattleFrontier_BattlePyramidTop_Text_ImPyramidKingBrandon: @ 825573E .string "Aah, yes, indeed this life is grand!\n" .string "Grand, it is! Eh?\p" .string "I'm BRANDON!\p" @@ -283,25 +279,25 @@ BattleFrontier_BattlePyramidTop_Text_25573E: @ 825573E .string "Hahahah!\n" .string "This should be exciting!$" -BattleFrontier_BattlePyramidTop_Text_255846: @ 8255846 +BattleFrontier_BattlePyramidTop_Text_BringCourageToOurBattle: @ 8255846 .string "Now, then!\n" .string "Bring your courage to our battle!$" -BattleFrontier_BattlePyramidTop_Text_255873: @ 8255873 +BattleFrontier_BattlePyramidTop_Text_BrandonFrontierPassPlease: @ 8255873 .string "BRANDON: Hahahah! Grand it was!\n" .string "Grand, yes, indeed!\p" .string "Well done! You've earned recognition!\n" .string "Your FRONTIER PASS, please!$" -BattleFrontier_BattlePyramidTop_Text_2558E9: @ 82558E9 +BattleFrontier_BattlePyramidTop_Text_ReceivedBraveSymbol: @ 82558E9 .string "The Brave Symbol was embossed on\n" .string "the FRONTIER PASS!$" -BattleFrontier_BattlePyramidTop_Text_25591D: @ 825591D +BattleFrontier_BattlePyramidTop_Text_LookForwardToNextMeeting: @ 825591D .string "Young explorer!\n" .string "I look forward to our next meeting!$" -BattleFrontier_BattlePyramidTop_Text_255951: @ 8255951 +BattleFrontier_BattlePyramidTop_Text_BrandonYouveReturned: @ 8255951 .string "BRANDON: …You've finally returned,\n" .string "young explorer…\p" .string "Your love of adventure seems to come\n" @@ -315,16 +311,16 @@ BattleFrontier_BattlePyramidTop_Text_255951: @ 8255951 .string "Those days of death-defying,\n" .string "life-affirming adventures are back…$" -BattleFrontier_BattlePyramidTop_Text_255A6D: @ 8255A6D +BattleFrontier_BattlePyramidTop_Text_MyCourageIsOffMeter: @ 8255A6D .string "Now, then!\p" .string "I sense my own courage is off\n" .string "the meter!$" -BattleFrontier_BattlePyramidTop_Text_255AA1: @ 8255AA1 +BattleFrontier_BattlePyramidTop_Text_EverythingYouHave: @ 8255AA1 .string "Everything you have!\n" .string "I'm braced for it all!$" -BattleFrontier_BattlePyramidTop_Text_255ACD: @ 8255ACD +BattleFrontier_BattlePyramidTop_Text_BrandonRemarkableHaveThis: @ 8255ACD .string "BRANDON: Hahahah!\n" .string "Remarkable!\l" .string "Yes, it's grand, indeed!\p" @@ -332,17 +328,17 @@ BattleFrontier_BattlePyramidTop_Text_255ACD: @ 8255ACD .string "You've bested me through and through!\n" .string "Here! I want you to have this!$" -BattleFrontier_BattlePyramidTop_Text_255B59: @ 8255B59 +BattleFrontier_BattlePyramidTop_Text_BraveSymbolTookGoldenShine: @ 8255B59 .string "The Brave Symbol took on\n" .string "a golden shine!$" -BattleFrontier_BattlePyramidTop_Text_255B82: @ 8255B82 +BattleFrontier_BattlePyramidTop_Text_FarewellForNow: @ 8255B82 .string "Ah, yes! It just goes to show that\n" .string "I have much to learn still!\p" .string "May our paths cross again!\n" .string "Farewell for now, young explorer!$" -BattleFrontier_BattlePyramidTop_Text_255BFE: @ 8255BFE +BattleFrontier_BattlePyramidTop_Text_StepForwardWhenReady: @ 8255BFE .string "Now, when you are ready, take courage\n" .string "and step forward.$" diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index e7842de51..275ac4041 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -209,7 +209,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984 waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 + case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 frontier_checkineligible compare VAR_0x8004, TRUE @@ -276,7 +276,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 + case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 frontier_checkineligible compare VAR_0x8004, TRUE @@ -344,7 +344,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59 waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 + case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 frontier_checkineligible compare VAR_0x8004, TRUE @@ -411,7 +411,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2 waitmessage multichoice 17, 6, MULTI_LEVEL_MODE, 0 switch VAR_RESULT - case 2, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 + case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_23F0E6 frontier_checkineligible compare VAR_0x8004, TRUE diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index 4a3d9cb96..e39c9ad94 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -6,7 +6,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: @ 8243D92 .byte 0 BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DA7: @ 8243DA7 - pyramid_healparty + pyramid_resetparty end BattleFrontier_BattleTowerMultiBattleRoom_MapScript1_243DB0: @ 8243DB0 diff --git a/data/maps/map_groups.json b/data/maps/map_groups.json index 521cc5e03..e41499ce0 100644 --- a/data/maps/map_groups.json +++ b/data/maps/map_groups.json @@ -521,7 +521,7 @@ "BattleFrontier_BattlePalaceCorridor", "BattleFrontier_BattlePalaceBattleRoom", "BattleFrontier_BattlePyramidLobby", - "BattleFrontier_BattlePyramidEmptySquare", + "BattleFrontier_BattlePyramidFloor", "BattleFrontier_BattlePyramidTop", "BattleFrontier_BattleArenaLobby", "BattleFrontier_BattleArenaCorridor", diff --git a/data/scripts/field_poison.inc b/data/scripts/field_poison.inc index d15da3399..ccdebd5cd 100644 --- a/data/scripts/field_poison.inc +++ b/data/scripts/field_poison.inc @@ -34,9 +34,9 @@ EventScript_FrontierFieldWhiteOut:: @ 82736F8 goto_if_eq BattleFrontier_BattlePike_EventScript_Retire pyramid_inchallenge compare VAR_RESULT, 1 @ On Pyramid floor - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost compare VAR_RESULT, 2 @ On Pyramid peak - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_252B42 + goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost trainerhill_inchallenge compare VAR_RESULT, TRUE goto_if_eq TrainerHill_1F_EventScript_Lost diff --git a/data/specials.inc b/data/specials.inc index be9761c03..fef21fe99 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -458,7 +458,7 @@ gSpecials:: @ 81DBA64 def_special sub_813A630 def_special BufferBattleTowerElevatorFloors def_special TryStoreHeldItemsInPyramidBag - def_special sub_81C4F24 + def_special ChooseItemsToTossFromPyramidBag def_special DoBattlePyramidMonsHaveHeldItem def_special BattlePyramidChooseMonHeldItems def_special SetBattleTowerLinkPlayerGfx diff --git a/include/battle_pyramid.h b/include/battle_pyramid.h index d77172d0b..d0681acf3 100644 --- a/include/battle_pyramid.h +++ b/include/battle_pyramid.h @@ -9,7 +9,7 @@ void GenerateBattlePyramidWildMon(void); u8 GetPyramidRunMultiplier(void); u8 InBattlePyramid(void); bool8 InBattlePyramid_(void); -void sub_81A9E90(void); +void PausePyramidChallenge(void); void SoftResetInBattlePyramid(void); void CopyPyramidTrainerSpeechBefore(u16 trainerId); void CopyPyramidTrainerWinSpeech(u16 trainerId); diff --git a/include/battle_pyramid_bag.h b/include/battle_pyramid_bag.h index f0c6e7ee4..e3d65ef90 100644 --- a/include/battle_pyramid_bag.h +++ b/include/battle_pyramid_bag.h @@ -43,7 +43,7 @@ void sub_81C4EFC(void); void GoToBattlePyramidBagMenu(u8 a0, void (*callback)(void)); void sub_81C6714(u8 taskId); void TryStoreHeldItemsInPyramidBag(void); -void sub_81C4F24(void); +void ChooseItemsToTossFromPyramidBag(void); void sub_81C5B14(u8 taskId); void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId)); diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h index cfe6e891e..004df7155 100644 --- a/include/constants/battle_pyramid.h +++ b/include/constants/battle_pyramid.h @@ -36,14 +36,14 @@ #define BATTLE_PYRAMID_FUNC_SEED_FLOOR 6 #define BATTLE_PYRAMID_FUNC_SET_ITEM 7 #define BATTLE_PYRAMID_FUNC_HIDE_ITEM 8 -#define BATTLE_PYRAMID_FUNC_INIT_TRAINERS 9 +#define BATTLE_PYRAMID_FUNC_SET_TRAINERS 9 #define BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT 10 #define BATTLE_PYRAMID_FUNC_UPDATE_STREAK 11 // unused #define BATTLE_PYRAMID_FUNC_IS_IN 12 #define BATTLE_PYRAMID_FUNC_UPDATE_LIGHT 13 #define BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS 14 #define BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE 15 -#define BATTLE_PYRAMID_FUNC_16 16 // unused +#define BATTLE_PYRAMID_FUNC_START_MENU 16 // unused #define BATTLE_PYRAMID_FUNC_RESTORE_PARTY 17 #define PYRAMID_DATA_PRIZE 0 diff --git a/include/constants/layouts.h b/include/constants/layouts.h index ba20cb3a5..55715e336 100755 --- a/include/constants/layouts.h +++ b/include/constants/layouts.h @@ -361,7 +361,7 @@ #define LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS 358 #define LAYOUT_UNKNOWN_084693AC 359 #define LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY 360 -#define LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE 361 +#define LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR 361 #define LAYOUT_BATTLE_PYRAMID_SQUARE01 362 #define LAYOUT_BATTLE_PYRAMID_SQUARE02 363 #define LAYOUT_BATTLE_PYRAMID_SQUARE03 364 diff --git a/include/constants/map_groups.h b/include/constants/map_groups.h index 14b3f1d56..75cb71da0 100755 --- a/include/constants/map_groups.h +++ b/include/constants/map_groups.h @@ -487,7 +487,7 @@ #define MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR (23 | (26 << 8)) #define MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM (24 | (26 << 8)) #define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY (25 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE (26 | (26 << 8)) +#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR (26 | (26 << 8)) #define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP (27 | (26 << 8)) #define MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY (28 | (26 << 8)) #define MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR (29 | (26 << 8)) diff --git a/include/event_scripts.h b/include/event_scripts.h index aa76155c2..9e47223bf 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -371,8 +371,6 @@ extern const u8 SecretBase_Text_Trainer7Defeated[]; extern const u8 SecretBase_Text_Trainer8Defeated[]; extern const u8 SecretBase_Text_Trainer9Defeated[]; -extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[]; - //field effects extern const u8 EventScript_FldEffStrength[]; extern const u8 EventScript_FailSweetScent[]; @@ -543,7 +541,6 @@ extern const u8 EventScript_CannotUseWaterfall[]; extern const u8 EventScript_UseDive[]; extern const u8 EventScript_UseDiveUnderwater[]; extern const u8 EventScript_FallDownHole[]; -extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8[]; extern const u8 EventScript_FieldPoison[]; extern const u8 EventScript_EggHatch[]; extern const u8 AbnormalWeather_EventScript_EndEventAndCleanup_1[]; @@ -572,7 +569,8 @@ extern const u8 SecretBase_EventScript_PutAwayDecoration[]; extern const u8 SecretBase_EventScript_SetDecoration[]; // Battle Pyramid. -extern const u8 BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88[]; +extern const u8 BattlePyramid_Retire[]; +extern const u8 BattlePyramid_WarpToNextFloor[]; extern const u8 BattlePyramid_TrainerBattle[]; extern const u8 BattlePyramid_FindItemBall[]; diff --git a/include/start_menu.h b/include/start_menu.h index 2fdb3e652..eca9f0837 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -4,9 +4,9 @@ extern bool8 (*gMenuCallback)(void); void sub_809FA18(void); -void sub_809FA34(u8 taskId); +void Task_ShowStartMenu(u8 taskId); void ShowStartMenu(void); -void sub_809FDD4(void); +void ShowBattlePyramidStartMenu(void); void SaveGame(void); void sub_80A0514(void); void sub_80A08CC(void); diff --git a/include/strings.h b/include/strings.h index 0e2646ada..d653f87a2 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1805,132 +1805,132 @@ extern const u8 gBattleDomeWinText6[]; extern const u8 gBattleDomeWinText7[]; // Battle Pyramid. -extern const u8 BattlePyramid_ExitHintUp_Text1[]; -extern const u8 BattlePyramid_ExitHintLeft_Text1[]; -extern const u8 BattlePyramid_ExitHintRight_Text1[]; -extern const u8 BattlePyramid_ExitHintDown_Text1[]; -extern const u8 BattlePyramid_ZeroItemsRemaining_Text1[]; -extern const u8 BattlePyramid_OneItemRemaining_Text1[]; -extern const u8 BattlePyramid_TwoItemsRemaining_Text1[]; -extern const u8 BattlePyramid_ThreeItemsRemaining_Text1[]; -extern const u8 BattlePyramid_FourItemsRemaining_Text1[]; -extern const u8 BattlePyramid_FiveItemsRemaining_Text1[]; -extern const u8 BattlePyramid_SixItemsRemaining_Text1[]; -extern const u8 BattlePyramid_SevenItemsRemaining_Text1[]; -extern const u8 BattlePyramid_EightItemsRemaining_Text1[]; -extern const u8 BattlePyramid_ZeroTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_OneTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_TwoTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_ThreeTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_FourTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_FiveTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_SixTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_SevenTrainersRemaining_Text1[]; -extern const u8 BattlePyramid_ExitHintUp_Text2[]; -extern const u8 BattlePyramid_ExitHintLeft_Text2[]; -extern const u8 BattlePyramid_ExitHintRight_Text2[]; -extern const u8 BattlePyramid_ExitHintDown_Text2[]; -extern const u8 BattlePyramid_ZeroItemsRemaining_Text2[]; -extern const u8 BattlePyramid_OneItemRemaining_Text2[]; -extern const u8 BattlePyramid_TwoItemsRemaining_Text2[]; -extern const u8 BattlePyramid_ThreeItemsRemaining_Text2[]; -extern const u8 BattlePyramid_FourItemsRemaining_Text2[]; -extern const u8 BattlePyramid_FiveItemsRemaining_Text2[]; -extern const u8 BattlePyramid_SixItemsRemaining_Text2[]; -extern const u8 BattlePyramid_SevenItemsRemaining_Text2[]; -extern const u8 BattlePyramid_EightItemsRemaining_Text2[]; -extern const u8 BattlePyramid_ZeroTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_OneTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_TwoTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_ThreeTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_FourTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_FiveTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_SixTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_SevenTrainersRemaining_Text2[]; -extern const u8 BattlePyramid_ExitHintUp_Text3[]; -extern const u8 BattlePyramid_ExitHintLeft_Text3[]; -extern const u8 BattlePyramid_ExitHintRight_Text3[]; -extern const u8 BattlePyramid_ExitHintDown_Text3[]; -extern const u8 BattlePyramid_ZeroItemsRemaining_Text3[]; -extern const u8 BattlePyramid_OneItemRemaining_Text3[]; -extern const u8 BattlePyramid_TwoItemsRemaining_Text3[]; -extern const u8 BattlePyramid_ThreeItemsRemaining_Text3[]; -extern const u8 BattlePyramid_FourItemsRemaining_Text3[]; -extern const u8 BattlePyramid_FiveItemsRemaining_Text3[]; -extern const u8 BattlePyramid_SixItemsRemaining_Text3[]; -extern const u8 BattlePyramid_SevenItemsRemaining_Text3[]; -extern const u8 BattlePyramid_EightItemsRemaining_Text3[]; -extern const u8 BattlePyramid_ZeroTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_OneTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_TwoTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_ThreeTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_FourTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_FiveTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_SixTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_SevenTrainersRemaining_Text3[]; -extern const u8 BattlePyramid_ExitHintUp_Text4[]; -extern const u8 BattlePyramid_ExitHintLeft_Text4[]; -extern const u8 BattlePyramid_ExitHintRight_Text4[]; -extern const u8 BattlePyramid_ExitHintDown_Text4[]; -extern const u8 BattlePyramid_ZeroItemsRemaining_Text4[]; -extern const u8 BattlePyramid_OneItemRemaining_Text4[]; -extern const u8 BattlePyramid_TwoItemsRemaining_Text4[]; -extern const u8 BattlePyramid_ThreeItemsRemaining_Text4[]; -extern const u8 BattlePyramid_FourItemsRemaining_Text4[]; -extern const u8 BattlePyramid_FiveItemsRemaining_Text4[]; -extern const u8 BattlePyramid_SixItemsRemaining_Text4[]; -extern const u8 BattlePyramid_SevenItemsRemaining_Text4[]; -extern const u8 BattlePyramid_EightItemsRemaining_Text4[]; -extern const u8 BattlePyramid_ZeroTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_OneTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_TwoTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_ThreeTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_FourTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_FiveTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_SixTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_SevenTrainersRemaining_Text4[]; -extern const u8 BattlePyramid_ExitHintUp_Text5[]; -extern const u8 BattlePyramid_ExitHintLeft_Text5[]; -extern const u8 BattlePyramid_ExitHintRight_Text5[]; -extern const u8 BattlePyramid_ExitHintDown_Text5[]; -extern const u8 BattlePyramid_ZeroItemsRemaining_Text5[]; -extern const u8 BattlePyramid_OneItemRemaining_Text5[]; -extern const u8 BattlePyramid_TwoItemsRemaining_Text5[]; -extern const u8 BattlePyramid_ThreeItemsRemaining_Text5[]; -extern const u8 BattlePyramid_FourItemsRemaining_Text5[]; -extern const u8 BattlePyramid_FiveItemsRemaining_Text5[]; -extern const u8 BattlePyramid_SixItemsRemaining_Text5[]; -extern const u8 BattlePyramid_SevenItemsRemaining_Text5[]; -extern const u8 BattlePyramid_EightItemsRemaining_Text5[]; -extern const u8 BattlePyramid_ZeroTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_OneTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_TwoTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_ThreeTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_FourTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_FiveTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_SixTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_SevenTrainersRemaining_Text5[]; -extern const u8 BattlePyramid_ExitHintUp_Text6[]; -extern const u8 BattlePyramid_ExitHintLeft_Text6[]; -extern const u8 BattlePyramid_ExitHintRight_Text6[]; -extern const u8 BattlePyramid_ExitHintDown_Text6[]; -extern const u8 BattlePyramid_ZeroItemsRemaining_Text6[]; -extern const u8 BattlePyramid_OneItemRemaining_Text6[]; -extern const u8 BattlePyramid_TwoItemsRemaining_Text6[]; -extern const u8 BattlePyramid_ThreeItemsRemaining_Text6[]; -extern const u8 BattlePyramid_FourItemsRemaining_Text6[]; -extern const u8 BattlePyramid_FiveItemsRemaining_Text6[]; -extern const u8 BattlePyramid_SixItemsRemaining_Text6[]; -extern const u8 BattlePyramid_SevenItemsRemaining_Text6[]; -extern const u8 BattlePyramid_EightItemsRemaining_Text6[]; -extern const u8 BattlePyramid_ZeroTrainersRemaining_Text6[]; -extern const u8 BattlePyramid_OneTrainersRemaining_Text6[]; -extern const u8 BattlePyramid_TwoTrainersRemaining_Text6[]; -extern const u8 BattlePyramid_ThreeTrainersRemaining_Text6[]; -extern const u8 BattlePyramid_FourTrainersRemaining_Text6[]; -extern const u8 BattlePyramid_FiveTrainersRemaining_Text6[]; -extern const u8 BattlePyramid_SixTrainersRemaining_Text6[]; -extern const u8 BattlePyramid_SevenTrainersRemaining_Text6[]; +extern const u8 BattlePyramid_Text_ExitHintUp1[]; +extern const u8 BattlePyramid_Text_ExitHintLeft1[]; +extern const u8 BattlePyramid_Text_ExitHintRight1[]; +extern const u8 BattlePyramid_Text_ExitHintDown1[]; +extern const u8 BattlePyramid_Text_ZeroItemsRemaining1[]; +extern const u8 BattlePyramid_Text_OneItemRemaining1[]; +extern const u8 BattlePyramid_Text_TwoItemsRemaining1[]; +extern const u8 BattlePyramid_Text_ThreeItemsRemaining1[]; +extern const u8 BattlePyramid_Text_FourItemsRemaining1[]; +extern const u8 BattlePyramid_Text_FiveItemsRemaining1[]; +extern const u8 BattlePyramid_Text_SixItemsRemaining1[]; +extern const u8 BattlePyramid_Text_SevenItemsRemaining1[]; +extern const u8 BattlePyramid_Text_EightItemsRemaining1[]; +extern const u8 BattlePyramid_Text_ZeroTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_OneTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_TwoTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_ThreeTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_FourTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_FiveTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_SixTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_SevenTrainersRemaining1[]; +extern const u8 BattlePyramid_Text_ExitHintUp2[]; +extern const u8 BattlePyramid_Text_ExitHintLeft2[]; +extern const u8 BattlePyramid_Text_ExitHintRight2[]; +extern const u8 BattlePyramid_Text_ExitHintDown2[]; +extern const u8 BattlePyramid_Text_ZeroItemsRemaining2[]; +extern const u8 BattlePyramid_Text_OneItemRemaining2[]; +extern const u8 BattlePyramid_Text_TwoItemsRemaining2[]; +extern const u8 BattlePyramid_Text_ThreeItemsRemaining2[]; +extern const u8 BattlePyramid_Text_FourItemsRemaining2[]; +extern const u8 BattlePyramid_Text_FiveItemsRemaining2[]; +extern const u8 BattlePyramid_Text_SixItemsRemaining2[]; +extern const u8 BattlePyramid_Text_SevenItemsRemaining2[]; +extern const u8 BattlePyramid_Text_EightItemsRemaining2[]; +extern const u8 BattlePyramid_Text_ZeroTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_OneTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_TwoTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_ThreeTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_FourTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_FiveTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_SixTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_SevenTrainersRemaining2[]; +extern const u8 BattlePyramid_Text_ExitHintUp3[]; +extern const u8 BattlePyramid_Text_ExitHintLeft3[]; +extern const u8 BattlePyramid_Text_ExitHintRight3[]; +extern const u8 BattlePyramid_Text_ExitHintDown3[]; +extern const u8 BattlePyramid_Text_ZeroItemsRemaining3[]; +extern const u8 BattlePyramid_Text_OneItemRemaining3[]; +extern const u8 BattlePyramid_Text_TwoItemsRemaining3[]; +extern const u8 BattlePyramid_Text_ThreeItemsRemaining3[]; +extern const u8 BattlePyramid_Text_FourItemsRemaining3[]; +extern const u8 BattlePyramid_Text_FiveItemsRemaining3[]; +extern const u8 BattlePyramid_Text_SixItemsRemaining3[]; +extern const u8 BattlePyramid_Text_SevenItemsRemaining3[]; +extern const u8 BattlePyramid_Text_EightItemsRemaining3[]; +extern const u8 BattlePyramid_Text_ZeroTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_OneTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_TwoTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_ThreeTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_FourTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_FiveTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_SixTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_SevenTrainersRemaining3[]; +extern const u8 BattlePyramid_Text_ExitHintUp4[]; +extern const u8 BattlePyramid_Text_ExitHintLeft4[]; +extern const u8 BattlePyramid_Text_ExitHintRight4[]; +extern const u8 BattlePyramid_Text_ExitHintDown4[]; +extern const u8 BattlePyramid_Text_ZeroItemsRemaining4[]; +extern const u8 BattlePyramid_Text_OneItemRemaining4[]; +extern const u8 BattlePyramid_Text_TwoItemsRemaining4[]; +extern const u8 BattlePyramid_Text_ThreeItemsRemaining4[]; +extern const u8 BattlePyramid_Text_FourItemsRemaining4[]; +extern const u8 BattlePyramid_Text_FiveItemsRemaining4[]; +extern const u8 BattlePyramid_Text_SixItemsRemaining4[]; +extern const u8 BattlePyramid_Text_SevenItemsRemaining4[]; +extern const u8 BattlePyramid_Text_EightItemsRemaining4[]; +extern const u8 BattlePyramid_Text_ZeroTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_OneTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_TwoTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_ThreeTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_FourTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_FiveTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_SixTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_SevenTrainersRemaining4[]; +extern const u8 BattlePyramid_Text_ExitHintUp5[]; +extern const u8 BattlePyramid_Text_ExitHintLeft5[]; +extern const u8 BattlePyramid_Text_ExitHintRight5[]; +extern const u8 BattlePyramid_Text_ExitHintDown5[]; +extern const u8 BattlePyramid_Text_ZeroItemsRemaining5[]; +extern const u8 BattlePyramid_Text_OneItemRemaining5[]; +extern const u8 BattlePyramid_Text_TwoItemsRemaining5[]; +extern const u8 BattlePyramid_Text_ThreeItemsRemaining5[]; +extern const u8 BattlePyramid_Text_FourItemsRemaining5[]; +extern const u8 BattlePyramid_Text_FiveItemsRemaining5[]; +extern const u8 BattlePyramid_Text_SixItemsRemaining5[]; +extern const u8 BattlePyramid_Text_SevenItemsRemaining5[]; +extern const u8 BattlePyramid_Text_EightItemsRemaining5[]; +extern const u8 BattlePyramid_Text_ZeroTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_OneTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_TwoTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_ThreeTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_FourTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_FiveTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_SixTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_SevenTrainersRemaining5[]; +extern const u8 BattlePyramid_Text_ExitHintUp6[]; +extern const u8 BattlePyramid_Text_ExitHintLeft6[]; +extern const u8 BattlePyramid_Text_ExitHintRight6[]; +extern const u8 BattlePyramid_Text_ExitHintDown6[]; +extern const u8 BattlePyramid_Text_ZeroItemsRemaining6[]; +extern const u8 BattlePyramid_Text_OneItemRemaining6[]; +extern const u8 BattlePyramid_Text_TwoItemsRemaining6[]; +extern const u8 BattlePyramid_Text_ThreeItemsRemaining6[]; +extern const u8 BattlePyramid_Text_FourItemsRemaining6[]; +extern const u8 BattlePyramid_Text_FiveItemsRemaining6[]; +extern const u8 BattlePyramid_Text_SixItemsRemaining6[]; +extern const u8 BattlePyramid_Text_SevenItemsRemaining6[]; +extern const u8 BattlePyramid_Text_EightItemsRemaining6[]; +extern const u8 BattlePyramid_Text_ZeroTrainersRemaining6[]; +extern const u8 BattlePyramid_Text_OneTrainersRemaining6[]; +extern const u8 BattlePyramid_Text_TwoTrainersRemaining6[]; +extern const u8 BattlePyramid_Text_ThreeTrainersRemaining6[]; +extern const u8 BattlePyramid_Text_FourTrainersRemaining6[]; +extern const u8 BattlePyramid_Text_FiveTrainersRemaining6[]; +extern const u8 BattlePyramid_Text_SixTrainersRemaining6[]; +extern const u8 BattlePyramid_Text_SevenTrainersRemaining6[]; diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index e876b6e17..493526fad 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -77,14 +77,14 @@ static void GiveBattlePyramidPrize(void); static void SeedPyramidFloor(void); static void SetPickupItem(void); static void HidePyramidItem(void); -static void InitPyramidFacilityTrainers(void); +static void SetPyramidFacilityTrainers(void); static void ShowPostBattleHintText(void); static void UpdatePyramidWinStreak(void); static void GetInBattlePyramid(void); static void UpdatePyramidLightRadius(void); static void ClearPyramidPartyHeldItems(void); static void SetPyramidFloorPalette(void); -static void sub_81A9828(void); +static void BattlePyramidStartMenu(void); static void RestorePyramidPlayerParty(void); static void InitPyramidBagItems(u8 lvlMode); static u8 GetPyramidFloorTemplateId(void); @@ -525,200 +525,200 @@ static const u8 sTrainerTextGroups[50][2] = static const u8 *const sExitDirectionHintTexts1[] = { - BattlePyramid_ExitHintUp_Text1, - BattlePyramid_ExitHintLeft_Text1, - BattlePyramid_ExitHintRight_Text1, - BattlePyramid_ExitHintDown_Text1, + BattlePyramid_Text_ExitHintUp1, + BattlePyramid_Text_ExitHintLeft1, + BattlePyramid_Text_ExitHintRight1, + BattlePyramid_Text_ExitHintDown1, }; static const u8 *const sRemainingItemsHintTexts1[] = { - BattlePyramid_ZeroItemsRemaining_Text1, - BattlePyramid_OneItemRemaining_Text1, - BattlePyramid_TwoItemsRemaining_Text1, - BattlePyramid_ThreeItemsRemaining_Text1, - BattlePyramid_FourItemsRemaining_Text1, - BattlePyramid_FiveItemsRemaining_Text1, - BattlePyramid_SixItemsRemaining_Text1, - BattlePyramid_SevenItemsRemaining_Text1, - BattlePyramid_EightItemsRemaining_Text1, + BattlePyramid_Text_ZeroItemsRemaining1, + BattlePyramid_Text_OneItemRemaining1, + BattlePyramid_Text_TwoItemsRemaining1, + BattlePyramid_Text_ThreeItemsRemaining1, + BattlePyramid_Text_FourItemsRemaining1, + BattlePyramid_Text_FiveItemsRemaining1, + BattlePyramid_Text_SixItemsRemaining1, + BattlePyramid_Text_SevenItemsRemaining1, + BattlePyramid_Text_EightItemsRemaining1, }; static const u8 *const sRemainingTrainersHintTexts1[] = { - BattlePyramid_ZeroTrainersRemaining_Text1, - BattlePyramid_OneTrainersRemaining_Text1, - BattlePyramid_TwoTrainersRemaining_Text1, - BattlePyramid_ThreeTrainersRemaining_Text1, - BattlePyramid_FourTrainersRemaining_Text1, - BattlePyramid_FiveTrainersRemaining_Text1, - BattlePyramid_SixTrainersRemaining_Text1, - BattlePyramid_SevenTrainersRemaining_Text1, + BattlePyramid_Text_ZeroTrainersRemaining1, + BattlePyramid_Text_OneTrainersRemaining1, + BattlePyramid_Text_TwoTrainersRemaining1, + BattlePyramid_Text_ThreeTrainersRemaining1, + BattlePyramid_Text_FourTrainersRemaining1, + BattlePyramid_Text_FiveTrainersRemaining1, + BattlePyramid_Text_SixTrainersRemaining1, + BattlePyramid_Text_SevenTrainersRemaining1, }; static const u8 *const sExitDirectionHintTexts2[] = { - BattlePyramid_ExitHintUp_Text2, - BattlePyramid_ExitHintLeft_Text2, - BattlePyramid_ExitHintRight_Text2, - BattlePyramid_ExitHintDown_Text2, + BattlePyramid_Text_ExitHintUp2, + BattlePyramid_Text_ExitHintLeft2, + BattlePyramid_Text_ExitHintRight2, + BattlePyramid_Text_ExitHintDown2, }; static const u8 *const sRemainingItemsHintTexts2[] = { - BattlePyramid_ZeroItemsRemaining_Text2, - BattlePyramid_OneItemRemaining_Text2, - BattlePyramid_TwoItemsRemaining_Text2, - BattlePyramid_ThreeItemsRemaining_Text2, - BattlePyramid_FourItemsRemaining_Text2, - BattlePyramid_FiveItemsRemaining_Text2, - BattlePyramid_SixItemsRemaining_Text2, - BattlePyramid_SevenItemsRemaining_Text2, - BattlePyramid_EightItemsRemaining_Text2, + BattlePyramid_Text_ZeroItemsRemaining2, + BattlePyramid_Text_OneItemRemaining2, + BattlePyramid_Text_TwoItemsRemaining2, + BattlePyramid_Text_ThreeItemsRemaining2, + BattlePyramid_Text_FourItemsRemaining2, + BattlePyramid_Text_FiveItemsRemaining2, + BattlePyramid_Text_SixItemsRemaining2, + BattlePyramid_Text_SevenItemsRemaining2, + BattlePyramid_Text_EightItemsRemaining2, }; static const u8 *const sRemainingTrainersHintTexts2[] = { - BattlePyramid_ZeroTrainersRemaining_Text2, - BattlePyramid_OneTrainersRemaining_Text2, - BattlePyramid_TwoTrainersRemaining_Text2, - BattlePyramid_ThreeTrainersRemaining_Text2, - BattlePyramid_FourTrainersRemaining_Text2, - BattlePyramid_FiveTrainersRemaining_Text2, - BattlePyramid_SixTrainersRemaining_Text2, - BattlePyramid_SevenTrainersRemaining_Text2, + BattlePyramid_Text_ZeroTrainersRemaining2, + BattlePyramid_Text_OneTrainersRemaining2, + BattlePyramid_Text_TwoTrainersRemaining2, + BattlePyramid_Text_ThreeTrainersRemaining2, + BattlePyramid_Text_FourTrainersRemaining2, + BattlePyramid_Text_FiveTrainersRemaining2, + BattlePyramid_Text_SixTrainersRemaining2, + BattlePyramid_Text_SevenTrainersRemaining2, }; static const u8 *const sExitDirectionHintTexts3[] = { - BattlePyramid_ExitHintUp_Text3, - BattlePyramid_ExitHintLeft_Text3, - BattlePyramid_ExitHintRight_Text3, - BattlePyramid_ExitHintDown_Text3, + BattlePyramid_Text_ExitHintUp3, + BattlePyramid_Text_ExitHintLeft3, + BattlePyramid_Text_ExitHintRight3, + BattlePyramid_Text_ExitHintDown3, }; static const u8 *const sRemainingItemsHintTexts3[] = { - BattlePyramid_ZeroItemsRemaining_Text3, - BattlePyramid_OneItemRemaining_Text3, - BattlePyramid_TwoItemsRemaining_Text3, - BattlePyramid_ThreeItemsRemaining_Text3, - BattlePyramid_FourItemsRemaining_Text3, - BattlePyramid_FiveItemsRemaining_Text3, - BattlePyramid_SixItemsRemaining_Text3, - BattlePyramid_SevenItemsRemaining_Text3, - BattlePyramid_EightItemsRemaining_Text3, + BattlePyramid_Text_ZeroItemsRemaining3, + BattlePyramid_Text_OneItemRemaining3, + BattlePyramid_Text_TwoItemsRemaining3, + BattlePyramid_Text_ThreeItemsRemaining3, + BattlePyramid_Text_FourItemsRemaining3, + BattlePyramid_Text_FiveItemsRemaining3, + BattlePyramid_Text_SixItemsRemaining3, + BattlePyramid_Text_SevenItemsRemaining3, + BattlePyramid_Text_EightItemsRemaining3, }; static const u8 *const sRemainingTrainersHintTexts3[] = { - BattlePyramid_ZeroTrainersRemaining_Text3, - BattlePyramid_OneTrainersRemaining_Text3, - BattlePyramid_TwoTrainersRemaining_Text3, - BattlePyramid_ThreeTrainersRemaining_Text3, - BattlePyramid_FourTrainersRemaining_Text3, - BattlePyramid_FiveTrainersRemaining_Text3, - BattlePyramid_SixTrainersRemaining_Text3, - BattlePyramid_SevenTrainersRemaining_Text3, + BattlePyramid_Text_ZeroTrainersRemaining3, + BattlePyramid_Text_OneTrainersRemaining3, + BattlePyramid_Text_TwoTrainersRemaining3, + BattlePyramid_Text_ThreeTrainersRemaining3, + BattlePyramid_Text_FourTrainersRemaining3, + BattlePyramid_Text_FiveTrainersRemaining3, + BattlePyramid_Text_SixTrainersRemaining3, + BattlePyramid_Text_SevenTrainersRemaining3, }; static const u8 *const sExitDirectionHintTexts4[] = { - BattlePyramid_ExitHintUp_Text4, - BattlePyramid_ExitHintLeft_Text4, - BattlePyramid_ExitHintRight_Text4, - BattlePyramid_ExitHintDown_Text4, + BattlePyramid_Text_ExitHintUp4, + BattlePyramid_Text_ExitHintLeft4, + BattlePyramid_Text_ExitHintRight4, + BattlePyramid_Text_ExitHintDown4, }; static const u8 *const sRemainingItemsHintTexts4[] = { - BattlePyramid_ZeroItemsRemaining_Text4, - BattlePyramid_OneItemRemaining_Text4, - BattlePyramid_TwoItemsRemaining_Text4, - BattlePyramid_ThreeItemsRemaining_Text4, - BattlePyramid_FourItemsRemaining_Text4, - BattlePyramid_FiveItemsRemaining_Text4, - BattlePyramid_SixItemsRemaining_Text4, - BattlePyramid_SevenItemsRemaining_Text4, - BattlePyramid_EightItemsRemaining_Text4, + BattlePyramid_Text_ZeroItemsRemaining4, + BattlePyramid_Text_OneItemRemaining4, + BattlePyramid_Text_TwoItemsRemaining4, + BattlePyramid_Text_ThreeItemsRemaining4, + BattlePyramid_Text_FourItemsRemaining4, + BattlePyramid_Text_FiveItemsRemaining4, + BattlePyramid_Text_SixItemsRemaining4, + BattlePyramid_Text_SevenItemsRemaining4, + BattlePyramid_Text_EightItemsRemaining4, }; static const u8 *const sRemainingTrainersHintTexts4[] = { - BattlePyramid_ZeroTrainersRemaining_Text4, - BattlePyramid_OneTrainersRemaining_Text4, - BattlePyramid_TwoTrainersRemaining_Text4, - BattlePyramid_ThreeTrainersRemaining_Text4, - BattlePyramid_FourTrainersRemaining_Text4, - BattlePyramid_FiveTrainersRemaining_Text4, - BattlePyramid_SixTrainersRemaining_Text4, - BattlePyramid_SevenTrainersRemaining_Text4, + BattlePyramid_Text_ZeroTrainersRemaining4, + BattlePyramid_Text_OneTrainersRemaining4, + BattlePyramid_Text_TwoTrainersRemaining4, + BattlePyramid_Text_ThreeTrainersRemaining4, + BattlePyramid_Text_FourTrainersRemaining4, + BattlePyramid_Text_FiveTrainersRemaining4, + BattlePyramid_Text_SixTrainersRemaining4, + BattlePyramid_Text_SevenTrainersRemaining4, }; static const u8 *const sExitDirectionHintTexts5[] = { - BattlePyramid_ExitHintUp_Text5, - BattlePyramid_ExitHintLeft_Text5, - BattlePyramid_ExitHintRight_Text5, - BattlePyramid_ExitHintDown_Text5, + BattlePyramid_Text_ExitHintUp5, + BattlePyramid_Text_ExitHintLeft5, + BattlePyramid_Text_ExitHintRight5, + BattlePyramid_Text_ExitHintDown5, }; static const u8 *const sRemainingItemsHintTexts5[] = { - BattlePyramid_ZeroItemsRemaining_Text5, - BattlePyramid_OneItemRemaining_Text5, - BattlePyramid_TwoItemsRemaining_Text5, - BattlePyramid_ThreeItemsRemaining_Text5, - BattlePyramid_FourItemsRemaining_Text5, - BattlePyramid_FiveItemsRemaining_Text5, - BattlePyramid_SixItemsRemaining_Text5, - BattlePyramid_SevenItemsRemaining_Text5, - BattlePyramid_EightItemsRemaining_Text5, + BattlePyramid_Text_ZeroItemsRemaining5, + BattlePyramid_Text_OneItemRemaining5, + BattlePyramid_Text_TwoItemsRemaining5, + BattlePyramid_Text_ThreeItemsRemaining5, + BattlePyramid_Text_FourItemsRemaining5, + BattlePyramid_Text_FiveItemsRemaining5, + BattlePyramid_Text_SixItemsRemaining5, + BattlePyramid_Text_SevenItemsRemaining5, + BattlePyramid_Text_EightItemsRemaining5, }; static const u8 *const sRemainingTrainersHintTexts5[] = { - BattlePyramid_ZeroTrainersRemaining_Text5, - BattlePyramid_OneTrainersRemaining_Text5, - BattlePyramid_TwoTrainersRemaining_Text5, - BattlePyramid_ThreeTrainersRemaining_Text5, - BattlePyramid_FourTrainersRemaining_Text5, - BattlePyramid_FiveTrainersRemaining_Text5, - BattlePyramid_SixTrainersRemaining_Text5, - BattlePyramid_SevenTrainersRemaining_Text5, + BattlePyramid_Text_ZeroTrainersRemaining5, + BattlePyramid_Text_OneTrainersRemaining5, + BattlePyramid_Text_TwoTrainersRemaining5, + BattlePyramid_Text_ThreeTrainersRemaining5, + BattlePyramid_Text_FourTrainersRemaining5, + BattlePyramid_Text_FiveTrainersRemaining5, + BattlePyramid_Text_SixTrainersRemaining5, + BattlePyramid_Text_SevenTrainersRemaining5, }; static const u8 *const sExitDirectionHintTexts6[] = { - BattlePyramid_ExitHintUp_Text6, - BattlePyramid_ExitHintLeft_Text6, - BattlePyramid_ExitHintRight_Text6, - BattlePyramid_ExitHintDown_Text6, + BattlePyramid_Text_ExitHintUp6, + BattlePyramid_Text_ExitHintLeft6, + BattlePyramid_Text_ExitHintRight6, + BattlePyramid_Text_ExitHintDown6, }; static const u8 *const sRemainingItemsHintTexts6[] = { - BattlePyramid_ZeroItemsRemaining_Text6, - BattlePyramid_OneItemRemaining_Text6, - BattlePyramid_TwoItemsRemaining_Text6, - BattlePyramid_ThreeItemsRemaining_Text6, - BattlePyramid_FourItemsRemaining_Text6, - BattlePyramid_FiveItemsRemaining_Text6, - BattlePyramid_SixItemsRemaining_Text6, - BattlePyramid_SevenItemsRemaining_Text6, - BattlePyramid_EightItemsRemaining_Text6, + BattlePyramid_Text_ZeroItemsRemaining6, + BattlePyramid_Text_OneItemRemaining6, + BattlePyramid_Text_TwoItemsRemaining6, + BattlePyramid_Text_ThreeItemsRemaining6, + BattlePyramid_Text_FourItemsRemaining6, + BattlePyramid_Text_FiveItemsRemaining6, + BattlePyramid_Text_SixItemsRemaining6, + BattlePyramid_Text_SevenItemsRemaining6, + BattlePyramid_Text_EightItemsRemaining6, }; static const u8 *const sRemainingTrainersHintTexts6[] = { - BattlePyramid_ZeroTrainersRemaining_Text6, - BattlePyramid_OneTrainersRemaining_Text6, - BattlePyramid_TwoTrainersRemaining_Text6, - BattlePyramid_ThreeTrainersRemaining_Text6, - BattlePyramid_FourTrainersRemaining_Text6, - BattlePyramid_FiveTrainersRemaining_Text6, - BattlePyramid_SixTrainersRemaining_Text6, - BattlePyramid_SevenTrainersRemaining_Text6, + BattlePyramid_Text_ZeroTrainersRemaining6, + BattlePyramid_Text_OneTrainersRemaining6, + BattlePyramid_Text_TwoTrainersRemaining6, + BattlePyramid_Text_ThreeTrainersRemaining6, + BattlePyramid_Text_FourTrainersRemaining6, + BattlePyramid_Text_FiveTrainersRemaining6, + BattlePyramid_Text_SixTrainersRemaining6, + BattlePyramid_Text_SevenTrainersRemaining6, }; static const u8 *const *const sPostBattleHintTexts1[] = @@ -787,24 +787,24 @@ static const u8 sHintTextTypes[] = static void (* const sBattlePyramidFunctions[])(void) = { - [BATTLE_PYRAMID_FUNC_INIT] = InitPyramidChallenge, - [BATTLE_PYRAMID_FUNC_GET_DATA] = GetBattlePyramidData, - [BATTLE_PYRAMID_FUNC_SET_DATA] = SetBattlePyramidData, - [BATTLE_PYRAMID_FUNC_SAVE] = SavePyramidChallenge, - [BATTLE_PYRAMID_FUNC_SET_PRIZE] = SetBattlePyramidPrize, - [BATTLE_PYRAMID_FUNC_GIVE_PRIZE] = GiveBattlePyramidPrize, - [BATTLE_PYRAMID_FUNC_SEED_FLOOR] = SeedPyramidFloor, - [BATTLE_PYRAMID_FUNC_SET_ITEM] = SetPickupItem, - [BATTLE_PYRAMID_FUNC_HIDE_ITEM] = HidePyramidItem, - [BATTLE_PYRAMID_FUNC_INIT_TRAINERS] = InitPyramidFacilityTrainers, - [BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT] = ShowPostBattleHintText, - [BATTLE_PYRAMID_FUNC_UPDATE_STREAK] = UpdatePyramidWinStreak, - [BATTLE_PYRAMID_FUNC_IS_IN] = GetInBattlePyramid, - [BATTLE_PYRAMID_FUNC_UPDATE_LIGHT] = UpdatePyramidLightRadius, - [BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS] = ClearPyramidPartyHeldItems, + [BATTLE_PYRAMID_FUNC_INIT] = InitPyramidChallenge, + [BATTLE_PYRAMID_FUNC_GET_DATA] = GetBattlePyramidData, + [BATTLE_PYRAMID_FUNC_SET_DATA] = SetBattlePyramidData, + [BATTLE_PYRAMID_FUNC_SAVE] = SavePyramidChallenge, + [BATTLE_PYRAMID_FUNC_SET_PRIZE] = SetBattlePyramidPrize, + [BATTLE_PYRAMID_FUNC_GIVE_PRIZE] = GiveBattlePyramidPrize, + [BATTLE_PYRAMID_FUNC_SEED_FLOOR] = SeedPyramidFloor, + [BATTLE_PYRAMID_FUNC_SET_ITEM] = SetPickupItem, + [BATTLE_PYRAMID_FUNC_HIDE_ITEM] = HidePyramidItem, + [BATTLE_PYRAMID_FUNC_SET_TRAINERS] = SetPyramidFacilityTrainers, + [BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT] = ShowPostBattleHintText, + [BATTLE_PYRAMID_FUNC_UPDATE_STREAK] = UpdatePyramidWinStreak, + [BATTLE_PYRAMID_FUNC_IS_IN] = GetInBattlePyramid, + [BATTLE_PYRAMID_FUNC_UPDATE_LIGHT] = UpdatePyramidLightRadius, + [BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS] = ClearPyramidPartyHeldItems, [BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE] = SetPyramidFloorPalette, - [BATTLE_PYRAMID_FUNC_16] = sub_81A9828, - [BATTLE_PYRAMID_FUNC_RESTORE_PARTY] = RestorePyramidPlayerParty, + [BATTLE_PYRAMID_FUNC_START_MENU] = BattlePyramidStartMenu, + [BATTLE_PYRAMID_FUNC_RESTORE_PARTY] = RestorePyramidPlayerParty, }; static const u16 sShortStreakRewardItems[] = {ITEM_HP_UP, ITEM_PROTEIN, ITEM_IRON, ITEM_CALCIUM, ITEM_CARBOS, ITEM_ZINC}; @@ -1029,7 +1029,7 @@ static void HidePyramidItem(void) } } -static void InitPyramidFacilityTrainers(void) +static void SetPyramidFacilityTrainers(void) { gFacilityTrainers = gBattleFrontierTrainers; } @@ -1193,9 +1193,10 @@ static void Task_SetPyramidFloorPalette(u8 taskId) } } -static void sub_81A9828(void) +// Unused. Handled by BuildStartMenuActions +static void BattlePyramidStartMenu(void) { - sub_809FDD4(); + ShowBattlePyramidStartMenu(); } static void RestorePyramidPlayerParty(void) @@ -1417,7 +1418,7 @@ u8 GetPyramidRunMultiplier(void) u8 InBattlePyramid(void) { - if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) return 1; else if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP) return 2; @@ -1427,11 +1428,11 @@ u8 InBattlePyramid(void) bool8 InBattlePyramid_(void) { - return gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE + return gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR || gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP; } -void sub_81A9E90(void) +void PausePyramidChallenge(void) { if (InBattlePyramid()) { @@ -1475,9 +1476,10 @@ u8 GetBattlePyramindTrainerEncounterMusicId(u16 trainerId) return TRAINER_ENCOUNTER_MUSIC_MALE; } -void sub_81A9F80(void) +// Unused +static void BattlePyramidRetireChallenge(void) { - ScriptContext1_SetupScript(BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88); + ScriptContext1_SetupScript(BattlePyramid_Retire); } static u16 GetUniqueTrainerId(u8 eventObjectId) @@ -1528,7 +1530,7 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio { u16 *map; int yOffset, xOffset; - const struct MapLayout *mapLayout = gMapLayouts[floorLayoutOffsets[i] + LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE]; + const struct MapLayout *mapLayout = gMapLayouts[floorLayoutOffsets[i] + LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR]; const u16 *layoutMap = mapLayout->map; gBackupMapLayout.map = backupMapData; diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 59592e49d..5a9fd5687 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -39,7 +39,7 @@ EWRAM_DATA struct PyramidBagCursorData gPyramidBagCursorData = {0}; // This file's functions. static void Task_HandlePyramidBagInput(u8 taskId); -static void sub_81C4F44(u8 taskId); +static void Task_ChooseItemsToTossFromPyramidBag(u8 taskId); static void sub_81C5B4C(u8 taskId); static void Task_BeginItemSwap(u8 taskId); static void sub_81C5D20(u8 taskId); @@ -354,14 +354,14 @@ static void sub_81C4F10(void) GoToBattlePyramidBagMenu(1, CB2_SetUpReshowBattleScreenAfterMenu2); } -void sub_81C4F24(void) +void ChooseItemsToTossFromPyramidBag(void) { ScriptContext2_Enable(); FadeScreen(1, 0); - CreateTask(sub_81C4F44, 10); + CreateTask(Task_ChooseItemsToTossFromPyramidBag, 10); } -static void sub_81C4F44(u8 taskId) +static void Task_ChooseItemsToTossFromPyramidBag(u8 taskId) { if (!gPaletteFade.active) { diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 852fa2e1b..5b2d26b3c 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -517,7 +517,7 @@ static bool8 TryStartMiscWalkingScripts(u16 metatileBehavior) } else if (MetatileBehavior_IsBattlePyramidWarp(metatileBehavior)) { - ScriptContext1_SetupScript(BattleFrontier_BattlePyramidEmptySquare_EventScript_252BE8); + ScriptContext1_SetupScript(BattlePyramid_WarpToNextFloor); return TRUE; } else if (MetatileBehavior_IsSecretBaseGlitterMat(metatileBehavior) == TRUE) diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 076859c28..74bb65b4c 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -429,7 +429,7 @@ static void sub_80AF660(u8 taskId) if (WaitForWeatherFadeIn() == TRUE) { DestroyTask(taskId); - CreateTask(sub_809FA34, 80); + CreateTask(Task_ShowStartMenu, 80); } } diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 6832c4f66..79c1ce6f4 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -1558,7 +1558,7 @@ static u8 MapNumToFrontierFacilityId(u16 mapNum) // id + 1, zero means not a fro || mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS)) return FRONTIER_FACILITY_PIKE + 1; else if (mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY) - || mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + || mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) || mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_PYRAMID_TOP)) return FRONTIER_FACILITY_PYRAMID + 1; else diff --git a/src/overworld.c b/src/overworld.c index c288f2e00..e837ed902 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -852,7 +852,7 @@ static void mli0_load_map(u32 a1) LoadCurrentMapData(); if (!(sUnknown_020322D8 & 1)) { - if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) LoadBattlePyramidEventObjectTemplates(); else if (InTrainerHill()) LoadTrainerHillEventObjectTemplates(); @@ -880,7 +880,7 @@ static void mli0_load_map(u32 a1) RunOnTransitionMapScript(); UpdateLocationHistoryForRoamer(); RoamerMoveToOtherLocationSet(); - if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) InitBattlePyramidMap(FALSE); else if (InTrainerHill()) InitTrainerHillMap(); @@ -1720,7 +1720,7 @@ void CB2_ContinueSavedGame(void) LoadSaveblockMapHeader(); ClearDiveAndHoleWarps(); trainerHillMapId = GetCurrentTrainerHillMapId(); - if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) LoadBattlePyramidFloorEventObjectScripts(); else if (trainerHillMapId != 0 && trainerHillMapId != TRAINER_HILL_ENTRANCE) LoadTrainerHillFloorEventObjectScripts(); @@ -1730,7 +1730,7 @@ void CB2_ContinueSavedGame(void) UnfreezeEventObjects(); DoTimeBasedEvents(); sub_8084788(); - if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) InitBattlePyramidMap(TRUE); else if (trainerHillMapId != 0) InitTrainerHillMap(); diff --git a/src/start_menu.c b/src/start_menu.c index c24497d74..d0e28cf02 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -512,14 +512,14 @@ static bool8 sub_809FA00(void) return TRUE; } -void sub_809FA18(void) // Called from field_screen.s +void sub_809FA18(void) { sUnknown_02037619[0] = 0; sUnknown_02037619[1] = 0; gFieldCallback2 = sub_809FA00; } -void sub_809FA34(u8 taskId) // Referenced in field_screen.s and rom_8011DC0.s +void Task_ShowStartMenu(u8 taskId) { struct Task* task = &gTasks[taskId]; @@ -539,7 +539,7 @@ void sub_809FA34(u8 taskId) // Referenced in field_screen.s and rom_8011DC0.s } } -void ShowStartMenu(void) // Called from overworld.c and field_control_avatar.s +void ShowStartMenu(void) { if (!IsUpdateLinkStateCBActive()) { @@ -547,7 +547,7 @@ void ShowStartMenu(void) // Called from overworld.c and field_control_avatar.s sub_808B864(); sub_808BCF4(); } - CreateStartMenuTask(sub_809FA34); + CreateStartMenuTask(Task_ShowStartMenu); ScriptContext2_Enable(); } @@ -743,11 +743,12 @@ static bool8 StartMenuBattlePyramidRetireCallback(void) return FALSE; } -void sub_809FDD4(void) +// Functionally unused +void ShowBattlePyramidStartMenu(void) { ClearDialogWindowAndFrameToTransparent(0, FALSE); ScriptUnfreezeEventObjects(); - CreateStartMenuTask(sub_809FA34); + CreateStartMenuTask(Task_ShowStartMenu); ScriptContext2_Enable(); } @@ -827,7 +828,7 @@ static bool8 BattlePyramidRetireCallback(void) ClearDialogWindowAndFrameToTransparent(0, TRUE); ScriptUnfreezeEventObjects(); ScriptContext2_Disable(); - ScriptContext1_SetupScript(BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88); + ScriptContext1_SetupScript(BattlePyramid_Retire); return TRUE; } @@ -853,7 +854,7 @@ static u8 RunSaveCallback(void) return sSaveDialogCallback(); } -void SaveGame(void) // Called from cable_club.s +void SaveGame(void) { InitSave(); CreateTask(SaveGameTask, 0x50); @@ -1048,7 +1049,7 @@ static u8 SaveDoSaveCallback(void) u8 saveStatus; IncrementGameStat(GAME_STAT_SAVED_GAME); - sub_81A9E90(); + PausePyramidChallenge(); if (gDifferentSaveFile == TRUE) { @@ -1202,7 +1203,7 @@ static bool32 sub_80A03E4(u8 *par1) return FALSE; } -void sub_80A0514(void) // Called from cable_club.s +void sub_80A0514(void) { if (sub_80A03E4(&gMain.state)) { @@ -1371,7 +1372,7 @@ static void sub_80A08A4(u8 taskId) } } -void sub_80A08CC(void) // Referenced in data/specials.inc and data/scripts/maps/BattleFrontier_BattleTowerLobby.inc +void sub_80A08CC(void) { u8 taskId = CreateTask(sub_8153688, 0x5); gTasks[taskId].data[2] = 1; @@ -1386,7 +1387,7 @@ static void HideStartMenuWindow(void) ScriptContext2_Disable(); } -void HideStartMenu(void) // Called from map_name_popup.s +void HideStartMenu(void) { PlaySE(SE_SELECT); HideStartMenuWindow(); diff --git a/src/union_room.c b/src/union_room.c index 735778ebb..ba973a7d9 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -2423,7 +2423,7 @@ void sub_80156E0(u8 taskId) } break; case 23: - if (!FuncIsActiveTask(sub_809FA34)) + if (!FuncIsActiveTask(Task_ShowStartMenu)) { sub_8011090(0x40, 0, 0); data->state = 4; diff --git a/src/wild_encounter.c b/src/wild_encounter.c index cb6dba1d4..52aac17f3 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -485,7 +485,7 @@ static bool8 DoWildEncounterRateTest(u32 encounterRate, bool8 ignoreAbility) { u32 ability = GetMonAbility(&gPlayerParty[0]); - if (ability == ABILITY_STENCH && gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (ability == ABILITY_STENCH && gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) encounterRate = encounterRate * 3 / 4; else if (ability == ABILITY_STENCH) encounterRate /= 2; @@ -548,7 +548,7 @@ bool8 StandardWildEncounter(u16 currMetaTileBehavior, u16 previousMetaTileBehavi BattleSetup_StartBattlePikeWildBattle(); return TRUE; } - if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) { headerId = gSaveBlock2Ptr->frontier.curChallengeBattleNum; if (previousMetaTileBehavior != currMetaTileBehavior && !DoGlobalWildEncounterDiceRoll()) @@ -686,7 +686,7 @@ bool8 SweetScentWildEncounter(void) BattleSetup_StartBattlePikeWildBattle(); return TRUE; } - if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE) + if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR) { headerId = gSaveBlock2Ptr->frontier.curChallengeBattleNum; if (TryGenerateWildMon(gBattlePyramidWildMonHeaders[headerId].landMonsInfo, WILD_AREA_LAND, 0) != TRUE) From 6967caefb246f9709032049b0ae2baee71f71eb6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 12 Dec 2019 02:35:37 -0500 Subject: [PATCH 17/35] Split finditem_std from giveitem_std --- asm/macros/event.inc | 10 +- data/event_scripts.s | 20 +- .../MossdeepCity_StevensHouse/scripts.inc | 2 +- data/scripts/item_ball_scripts.inc | 330 +++++++++--------- 4 files changed, 184 insertions(+), 178 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 9db57daf1..96971b583 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1665,10 +1665,16 @@ callstd \type .endm - .macro giveitem_std item:req, amount=1, function=0 + .macro giveitem_std item:req, amount=1 setorcopyvar VAR_0x8000, \item setorcopyvar VAR_0x8001, \amount - callstd \function + callstd STD_OBTAIN_ITEM + .endm + + .macro finditem_std item:req, amount=1 + setorcopyvar VAR_0x8000, \item + setorcopyvar VAR_0x8001, \amount + callstd STD_FIND_ITEM .endm .macro givedecoration_std decoration:req diff --git a/data/event_scripts.s b/data/event_scripts.s index c7e21e77c..c24ea1222 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -86,16 +86,16 @@ gSpecialVars:: @ 81DBA0C .include "data/specials.inc" gStdScripts:: @ 81DC2A0 - .4byte Std_ObtainItem - .4byte Std_FindItem - .4byte Std_MsgboxNPC - .4byte Std_MsgboxSign - .4byte Std_MsgboxDefault - .4byte Std_MsgboxYesNo - .4byte Std_MsgboxAutoclose - .4byte Std_ObtainDecoration - .4byte Std_RegisteredInMatchCall - .4byte Std_MsgboxGetPoints + .4byte Std_ObtainItem @ STD_OBTAIN_ITEM + .4byte Std_FindItem @ STD_FIND_ITEM + .4byte Std_MsgboxNPC @ MSGBOX_NPC + .4byte Std_MsgboxSign @ MSGBOX_SIGN + .4byte Std_MsgboxDefault @ MSGBOX_DEFAULT + .4byte Std_MsgboxYesNo @ MSGBOX_YESNO + .4byte Std_MsgboxAutoclose @ MSGBOX_AUTOCLOSE + .4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION + .4byte Std_RegisteredInMatchCall @ STD_REGISTER_MATCH_CALL + .4byte Std_MsgboxGetPoints @ MSGBOX_GETPOINTS .4byte Std_10 gStdScripts_End:: @ 81DC2CC diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index cd552bc1d..b5598e60d 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -149,7 +149,7 @@ MossdeepCity_StevensHouse_EventScript_Letter:: @ 822291B @ Unused, leftover from RS MossdeepCity_StevensHouse_EventScript_DiveItemBall:: @ 8222926 - giveitem_std ITEM_HM08, 1, 1 + finditem_std ITEM_HM08 setflag FLAG_RECEIVED_HM08 end diff --git a/data/scripts/item_ball_scripts.inc b/data/scripts/item_ball_scripts.inc index 045fbb5a7..5e926afc0 100644 --- a/data/scripts/item_ball_scripts.inc +++ b/data/scripts/item_ball_scripts.inc @@ -1,659 +1,659 @@ Route102_EventScript_ItemPotion:: @ 8290CD8 - giveitem_std ITEM_POTION, 1, 1 + finditem_std ITEM_POTION end Route103_EventScript_ItemGuardSpec:: @ 8290CE5 - giveitem_std ITEM_GUARD_SPEC, 1, 1 + finditem_std ITEM_GUARD_SPEC end Route103_EventScript_ItemPPUp:: @ 8290CF2 - giveitem_std ITEM_PP_UP, 1, 1 + finditem_std ITEM_PP_UP end Route104_EventScript_ItemPPUp:: @ 8290CFF - giveitem_std ITEM_PP_UP, 1, 1 + finditem_std ITEM_PP_UP end Route104_EventScript_ItemPokeBall:: @ 8290D0C - giveitem_std ITEM_POKE_BALL, 1, 1 + finditem_std ITEM_POKE_BALL end Route104_EventScript_ItemXAccuracy:: @ 8290D19 - giveitem_std ITEM_X_ACCURACY, 1, 1 + finditem_std ITEM_X_ACCURACY end Route104_EventScript_ItemPotion:: @ 8290D26 - giveitem_std ITEM_POTION, 1, 1 + finditem_std ITEM_POTION end Route105_EventScript_ItemIron:: @ 8290D33 - giveitem_std ITEM_IRON, 1, 1 + finditem_std ITEM_IRON end Route106_EventScript_ItemProtein:: @ 8290D40 - giveitem_std ITEM_PROTEIN, 1, 1 + finditem_std ITEM_PROTEIN end Route108_EventScript_ItemStarPiece:: @ 8290D4D - giveitem_std ITEM_STAR_PIECE, 1, 1 + finditem_std ITEM_STAR_PIECE end Route109_EventScript_ItemPPUp:: @ 8290D5A - giveitem_std ITEM_PP_UP, 1, 1 + finditem_std ITEM_PP_UP end Route109_EventScript_ItemPotion:: @ 8290D67 - giveitem_std ITEM_POTION, 1, 1 + finditem_std ITEM_POTION end Route110_EventScript_ItemRareCandy:: @ 8290D74 - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end Route110_EventScript_ItemDireHit:: @ 8290D81 - giveitem_std ITEM_DIRE_HIT, 1, 1 + finditem_std ITEM_DIRE_HIT end Route110_EventScript_ItemElixir:: @ 8290D8E - giveitem_std ITEM_ELIXIR, 1, 1 + finditem_std ITEM_ELIXIR end Route111_EventScript_ItemTM37:: @ 8290D9B - giveitem_std ITEM_TM37, 1, 1 + finditem_std ITEM_TM37 end Route111_EventScript_ItemStardust:: @ 8290DA8 - giveitem_std ITEM_STARDUST, 1, 1 + finditem_std ITEM_STARDUST end Route111_EventScript_ItemHPUp:: @ 8290DB5 - giveitem_std ITEM_HP_UP, 1, 1 + finditem_std ITEM_HP_UP end Route111_EventScript_ItemElixir:: @ 8290DC2 - giveitem_std ITEM_ELIXIR, 1, 1 + finditem_std ITEM_ELIXIR end Route112_EventScript_ItemNugget:: @ 8290DCF - giveitem_std ITEM_NUGGET, 1, 1 + finditem_std ITEM_NUGGET end Route113_EventScript_ItemMaxEther:: @ 8290DDC - giveitem_std ITEM_MAX_ETHER, 1, 1 + finditem_std ITEM_MAX_ETHER end Route113_EventScript_ItemSuperRepel:: @ 8290DE9 - giveitem_std ITEM_SUPER_REPEL, 1, 1 + finditem_std ITEM_SUPER_REPEL end Route113_EventScript_ItemHyperPotion:: @ 8290DF6 - giveitem_std ITEM_HYPER_POTION, 1, 1 + finditem_std ITEM_HYPER_POTION end Route114_EventScript_ItemRareCandy:: @ 8290E03 - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end Route114_EventScript_ItemProtein:: @ 8290E10 - giveitem_std ITEM_PROTEIN, 1, 1 + finditem_std ITEM_PROTEIN end Route114_EventScript_ItemEnergyPowder:: @ 8290E1D - giveitem_std ITEM_ENERGY_POWDER, 1, 1 + finditem_std ITEM_ENERGY_POWDER end Route115_EventScript_ItemSuperPotion:: @ 8290E2A - giveitem_std ITEM_SUPER_POTION, 1, 1 + finditem_std ITEM_SUPER_POTION end Route115_EventScript_ItemTM01:: @ 8290E37 - giveitem_std ITEM_TM01, 1, 1 + finditem_std ITEM_TM01 end Route115_EventScript_ItemIron:: @ 8290E44 - giveitem_std ITEM_IRON, 1, 1 + finditem_std ITEM_IRON end Route115_EventScript_ItemGreatBall:: @ 8290E51 - giveitem_std ITEM_GREAT_BALL, 1, 1 + finditem_std ITEM_GREAT_BALL end Route115_EventScript_ItemHealPowder:: @ 8290E5E - giveitem_std ITEM_HEAL_POWDER, 1, 1 + finditem_std ITEM_HEAL_POWDER end Route115_EventScript_ItemPPUp:: @ 8290E6B - giveitem_std ITEM_PP_UP, 1, 1 + finditem_std ITEM_PP_UP end Route116_EventScript_ItemXSpecial:: @ 8290E78 - giveitem_std ITEM_X_SPECIAL, 1, 1 + finditem_std ITEM_X_SPECIAL end Route116_EventScript_ItemEther:: @ 8290E85 - giveitem_std ITEM_ETHER, 1, 1 + finditem_std ITEM_ETHER end Route116_EventScript_ItemRepel:: @ 8290E92 - giveitem_std ITEM_REPEL, 1, 1 + finditem_std ITEM_REPEL end Route116_EventScript_ItemHPUp:: @ 8290E9F - giveitem_std ITEM_HP_UP, 1, 1 + finditem_std ITEM_HP_UP end Route116_EventScript_ItemPotion:: @ 8290EAC - giveitem_std ITEM_POTION, 1, 1 + finditem_std ITEM_POTION end Route117_EventScript_ItemGreatBall:: @ 8290EB9 - giveitem_std ITEM_GREAT_BALL, 1, 1 + finditem_std ITEM_GREAT_BALL end Route117_EventScript_ItemRevive:: @ 8290EC6 - giveitem_std ITEM_REVIVE, 1, 1 + finditem_std ITEM_REVIVE end Route118_EventScript_ItemHyperPotion:: @ 8290ED3 - giveitem_std ITEM_HYPER_POTION, 1, 1 + finditem_std ITEM_HYPER_POTION end Route119_EventScript_ItemSuperRepel:: @ 8290EE0 - giveitem_std ITEM_SUPER_REPEL, 1, 1 + finditem_std ITEM_SUPER_REPEL end Route119_EventScript_ItemZinc:: @ 8290EED - giveitem_std ITEM_ZINC, 1, 1 + finditem_std ITEM_ZINC end Route119_EventScript_ItemElixir:: @ 8290EFA - giveitem_std ITEM_ELIXIR, 1, 1 + finditem_std ITEM_ELIXIR end Route119_EventScript_ItemLeafStone:: @ 8290F07 - giveitem_std ITEM_LEAF_STONE, 1, 1 + finditem_std ITEM_LEAF_STONE end Route119_EventScript_ItemRareCandy:: @ 8290F14 - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end Route119_EventScript_ItemHyperPotion:: @ 8290F21 - giveitem_std ITEM_HYPER_POTION, 1, 1 + finditem_std ITEM_HYPER_POTION end Route119_EventScript_ItemHyperPotion2:: @ 8290F2E - giveitem_std ITEM_HYPER_POTION, 1, 1 + finditem_std ITEM_HYPER_POTION end Route119_EventScript_ItemElixir2:: @ 8290F3B - giveitem_std ITEM_ELIXIR, 1, 1 + finditem_std ITEM_ELIXIR end Route120_EventScript_ItemNugget:: @ 8290F48 - giveitem_std ITEM_NUGGET, 1, 1 + finditem_std ITEM_NUGGET end Route120_EventScript_ItemFullHeal:: @ 8290F55 - giveitem_std ITEM_FULL_HEAL, 1, 1 + finditem_std ITEM_FULL_HEAL end Route120_EventScript_ItemHyperPotion:: @ 8290F62 - giveitem_std ITEM_HYPER_POTION, 1, 1 + finditem_std ITEM_HYPER_POTION end Route120_EventScript_ItemNestBall:: @ 8290F6F - giveitem_std ITEM_NEST_BALL, 1, 1 + finditem_std ITEM_NEST_BALL end Route120_EventScript_ItemRevive:: @ 8290F7C - giveitem_std ITEM_REVIVE, 1, 1 + finditem_std ITEM_REVIVE end Route121_EventScript_ItemCarbos:: @ 8290F89 - giveitem_std ITEM_CARBOS, 1, 1 + finditem_std ITEM_CARBOS end Route121_EventScript_ItemRevive:: @ 8290F96 - giveitem_std ITEM_REVIVE, 1, 1 + finditem_std ITEM_REVIVE end Route121_EventScript_ItemZinc:: @ 8290FA3 - giveitem_std ITEM_ZINC, 1, 1 + finditem_std ITEM_ZINC end Route123_EventScript_ItemCalcium:: @ 8290FB0 - giveitem_std ITEM_CALCIUM, 1, 1 + finditem_std ITEM_CALCIUM end Route123_EventScript_ItemUltraBall:: @ 8290FBD - giveitem_std ITEM_ULTRA_BALL, 1, 1 + finditem_std ITEM_ULTRA_BALL end Route123_EventScript_ItemElixir:: @ 8290FCA - giveitem_std ITEM_ELIXIR, 1, 1 + finditem_std ITEM_ELIXIR end Route123_EventScript_ItemPPUp:: @ 8290FD7 - giveitem_std ITEM_PP_UP, 1, 1 + finditem_std ITEM_PP_UP end Route123_EventScript_ItemRevivalHerb:: @ 8290FE4 - giveitem_std ITEM_REVIVAL_HERB, 1, 1 + finditem_std ITEM_REVIVAL_HERB end Route124_EventScript_ItemRedShard:: @ 8290FF1 - giveitem_std ITEM_RED_SHARD, 1, 1 + finditem_std ITEM_RED_SHARD end Route124_EventScript_ItemBlueShard:: @ 8290FFE - giveitem_std ITEM_BLUE_SHARD, 1, 1 + finditem_std ITEM_BLUE_SHARD end Route124_EventScript_ItemYellowShard:: @ 829100B - giveitem_std ITEM_YELLOW_SHARD, 1, 1 + finditem_std ITEM_YELLOW_SHARD end Route125_EventScript_ItemBigPearl:: @ 8291018 - giveitem_std ITEM_BIG_PEARL, 1, 1 + finditem_std ITEM_BIG_PEARL end Route126_EventScript_ItemGreenShard:: @ 8291025 - giveitem_std ITEM_GREEN_SHARD, 1, 1 + finditem_std ITEM_GREEN_SHARD end Route127_EventScript_ItemZinc:: @ 8291032 - giveitem_std ITEM_ZINC, 1, 1 + finditem_std ITEM_ZINC end Route127_EventScript_ItemCarbos:: @ 829103F - giveitem_std ITEM_CARBOS, 1, 1 + finditem_std ITEM_CARBOS end Route127_EventScript_ItemRareCandy:: @ 829104C - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end Route132_EventScript_ItemRareCandy:: @ 8291059 - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end Route132_EventScript_ItemProtein:: @ 8291066 - giveitem_std ITEM_PROTEIN, 1, 1 + finditem_std ITEM_PROTEIN end Route133_EventScript_ItemBigPearl:: @ 8291073 - giveitem_std ITEM_BIG_PEARL, 1, 1 + finditem_std ITEM_BIG_PEARL end Route133_EventScript_ItemStarPiece:: @ 8291080 - giveitem_std ITEM_STAR_PIECE, 1, 1 + finditem_std ITEM_STAR_PIECE end Route133_EventScript_ItemMaxRevive:: @ 829108D - giveitem_std ITEM_MAX_REVIVE, 1, 1 + finditem_std ITEM_MAX_REVIVE end Route134_EventScript_ItemCarbos:: @ 829109A - giveitem_std ITEM_CARBOS, 1, 1 + finditem_std ITEM_CARBOS end Route134_EventScript_ItemStarPiece:: @ 82910A7 - giveitem_std ITEM_STAR_PIECE, 1, 1 + finditem_std ITEM_STAR_PIECE end PetalburgCity_EventScript_ItemMaxRevive:: @ 82910B4 - giveitem_std ITEM_MAX_REVIVE, 1, 1 + finditem_std ITEM_MAX_REVIVE end PetalburgCity_EventScript_ItemEther:: @ 82910C1 - giveitem_std ITEM_ETHER, 1, 1 + finditem_std ITEM_ETHER end MauvilleCity_EventScript_ItemXSpeed:: @ 82910CE - giveitem_std ITEM_X_SPEED, 1, 1 + finditem_std ITEM_X_SPEED end RustboroCity_EventScript_ItemXDefend:: @ 82910DB - giveitem_std ITEM_X_DEFEND, 1, 1 + finditem_std ITEM_X_DEFEND end LilycoveCity_EventScript_ItemMaxRepel:: @ 82910E8 - giveitem_std ITEM_MAX_REPEL, 1, 1 + finditem_std ITEM_MAX_REPEL end MossdeepCity_EventScript_ItemNetBall:: @ 82910F5 - giveitem_std ITEM_NET_BALL, 1, 1 + finditem_std ITEM_NET_BALL end PetalburgWoods_EventScript_ItemXAttack:: @ 8291102 - giveitem_std ITEM_X_ATTACK, 1, 1 + finditem_std ITEM_X_ATTACK end PetalburgWoods_EventScript_ItemGreatBall:: @ 829110F - giveitem_std ITEM_GREAT_BALL, 1, 1 + finditem_std ITEM_GREAT_BALL end PetalburgWoods_EventScript_ItemEther:: @ 829111C - giveitem_std ITEM_ETHER, 1, 1 + finditem_std ITEM_ETHER end PetalburgWoods_EventScript_ItemParalyzeHeal:: @ 8291129 - giveitem_std ITEM_PARALYZE_HEAL, 1, 1 + finditem_std ITEM_PARALYZE_HEAL end RusturfTunnel_EventScript_ItemPokeBall:: @ 8291136 - giveitem_std ITEM_POKE_BALL, 1, 1 + finditem_std ITEM_POKE_BALL end RusturfTunnel_EventScript_ItemMaxEther:: @ 8291143 - giveitem_std ITEM_MAX_ETHER, 1, 1 + finditem_std ITEM_MAX_ETHER end GraniteCave_1F_EventScript_ItemEscapeRope:: @ 8291150 - giveitem_std ITEM_ESCAPE_ROPE, 1, 1 + finditem_std ITEM_ESCAPE_ROPE end GraniteCave_B1F_EventScript_ItemPokeBall:: @ 829115D - giveitem_std ITEM_POKE_BALL, 1, 1 + finditem_std ITEM_POKE_BALL end GraniteCave_B2F_EventScript_ItemRepel:: @ 829116A - giveitem_std ITEM_REPEL, 1, 1 + finditem_std ITEM_REPEL end GraniteCave_B2F_EventScript_ItemRareCandy:: @ 8291177 - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end JaggedPass_EventScript_ItemBurnHeal:: @ 8291184 - giveitem_std ITEM_BURN_HEAL, 1, 1 + finditem_std ITEM_BURN_HEAL end FieryPath_EventScript_ItemFireStone:: @ 8291191 - giveitem_std ITEM_FIRE_STONE, 1, 1 + finditem_std ITEM_FIRE_STONE end FieryPath_EventScript_ItemTM06:: @ 829119E - giveitem_std ITEM_TM06, 1, 1 + finditem_std ITEM_TM06 end MeteorFalls_1F_1R_EventScript_ItemTM23:: @ 82911AB - giveitem_std ITEM_TM23, 1, 1 + finditem_std ITEM_TM23 end MeteorFalls_1F_1R_EventScript_ItemFullHeal:: @ 82911B8 - giveitem_std ITEM_FULL_HEAL, 1, 1 + finditem_std ITEM_FULL_HEAL end MeteorFalls_1F_1R_EventScript_ItemMoonStone:: @ 82911C5 - giveitem_std ITEM_MOON_STONE, 1, 1 + finditem_std ITEM_MOON_STONE end MeteorFalls_1F_1R_EventScript_ItemPPUP:: @ 82911D2 - giveitem_std ITEM_PP_UP, 1, 1 + finditem_std ITEM_PP_UP end MeteorFalls_B1F_2R_EventScript_ItemTM02:: @ 82911DF - giveitem_std ITEM_TM02, 1, 1 + finditem_std ITEM_TM02 end NewMauville_Inside_EventScript_ItemUltraRope:: @ 82911EC - giveitem_std ITEM_ULTRA_BALL, 1, 1 + finditem_std ITEM_ULTRA_BALL end NewMauville_Inside_EventScript_ItemEscapeRope:: @ 82911F9 - giveitem_std ITEM_ESCAPE_ROPE, 1, 1 + finditem_std ITEM_ESCAPE_ROPE end NewMauville_Inside_EventScript_ItemThunderStone:: @ 8291206 - giveitem_std ITEM_THUNDER_STONE, 1, 1 + finditem_std ITEM_THUNDER_STONE end NewMauville_Inside_EventScript_ItemFullHeal:: @ 8291213 - giveitem_std ITEM_FULL_HEAL, 1, 1 + finditem_std ITEM_FULL_HEAL end NewMauville_Inside_EventScript_ItemParalyzeHeal:: @ 8291220 - giveitem_std ITEM_PARALYZE_HEAL, 1, 1 + finditem_std ITEM_PARALYZE_HEAL end AbandonedShip_Rooms_1F_EventScript_ItemHarborMail:: @ 829122D - giveitem_std ITEM_HARBOR_MAIL, 1, 1 + finditem_std ITEM_HARBOR_MAIL end AbandonedShip_Rooms_B1F_EventScript_ItemEscapeRope:: @ 829123A - giveitem_std ITEM_ESCAPE_ROPE, 1, 1 + finditem_std ITEM_ESCAPE_ROPE end AbandonedShip_Rooms2_B1F_EventScript_ItemDiveBall:: @ 8291247 - giveitem_std ITEM_DIVE_BALL, 1, 1 + finditem_std ITEM_DIVE_BALL end AbandonedShip_Room_B1F_EventScript_ItemTM13:: @ 8291254 - giveitem_std ITEM_TM13, 1, 1 + finditem_std ITEM_TM13 end AbandonedShip_Rooms2_1F_EventScript_ItemRevive:: @ 8291261 - giveitem_std ITEM_REVIVE, 1, 1 + finditem_std ITEM_REVIVE end AbandonedShip_CaptainsOffice_EventScript_ItemStorageKey:: @ 829126E - giveitem_std ITEM_STORAGE_KEY, 1, 1 + finditem_std ITEM_STORAGE_KEY end AbandonedShip_HiddenFloorRooms_EventScript_ItemLuxuryBall:: @ 829127B - giveitem_std ITEM_LUXURY_BALL, 1, 1 + finditem_std ITEM_LUXURY_BALL end AbandonedShip_HiddenFloorRooms_EventScript_ItemScanner:: @ 8291288 - giveitem_std ITEM_SCANNER, 1, 1 + finditem_std ITEM_SCANNER end AbandonedShip_HiddenFloorRooms_EventScript_ItemWaterStone:: @ 8291295 - giveitem_std ITEM_WATER_STONE, 1, 1 + finditem_std ITEM_WATER_STONE end AbandonedShip_HiddenFloorRooms_EventScript_ItemTM18:: @ 82912A2 - giveitem_std ITEM_TM18, 1, 1 + finditem_std ITEM_TM18 end ScorchedSlab_EventScript_ItemTM11:: @ 82912AF - giveitem_std ITEM_TM11, 1, 1 + finditem_std ITEM_TM11 end SafariZone_Northwest_EventScript_ItemTM22:: @ 82912BC - giveitem_std ITEM_TM22, 1, 1 + finditem_std ITEM_TM22 end SafariZone_North_EventScript_ItemCalcium:: @ 82912C9 - giveitem_std ITEM_CALCIUM, 1, 1 + finditem_std ITEM_CALCIUM end SafariZone_Southwest_EventScript_ItemMaxRevive:: @ 82912D6 - giveitem_std ITEM_MAX_REVIVE, 1, 1 + finditem_std ITEM_MAX_REVIVE end SafariZone_Northeast_EventScript_ItemNugget:: @ 82912E3 - giveitem_std ITEM_NUGGET, 1, 1 + finditem_std ITEM_NUGGET end SafariZone_Southeast_EventScript_ItemBigPearl:: @ 82912F0 - giveitem_std ITEM_BIG_PEARL, 1, 1 + finditem_std ITEM_BIG_PEARL end MtPyre_2F_EventScript_ItemUltraBall:: @ 82912FD - giveitem_std ITEM_ULTRA_BALL, 1, 1 + finditem_std ITEM_ULTRA_BALL end MtPyre_3F_EventScript_ItemSuperRepel:: @ 829130A - giveitem_std ITEM_SUPER_REPEL, 1, 1 + finditem_std ITEM_SUPER_REPEL end MtPyre_4F_EventScript_ItemSeaIncense:: @ 8291317 - giveitem_std ITEM_SEA_INCENSE, 1, 1 + finditem_std ITEM_SEA_INCENSE end MtPyre_5F_EventScript_ItemLaxIncense:: @ 8291324 - giveitem_std ITEM_LAX_INCENSE, 1, 1 + finditem_std ITEM_LAX_INCENSE end MtPyre_6F_EventScript_ItemTM30:: @ 8291331 - giveitem_std ITEM_TM30, 1, 1 + finditem_std ITEM_TM30 end MtPyre_Exterior_EventScript_ItemMaxPotion:: @ 829133E - giveitem_std ITEM_MAX_POTION, 1, 1 + finditem_std ITEM_MAX_POTION end MtPyre_Exterior_EventScript_ItemTM48:: @ 829134B - giveitem_std ITEM_TM48, 1, 1 + finditem_std ITEM_TM48 end AquaHideout_B1F_EventScript_ItemMasterBall:: @ 8291358 - giveitem_std ITEM_MASTER_BALL, 1, 1 + finditem_std ITEM_MASTER_BALL end AquaHideout_B1F_EventScript_ItemNugget:: @ 8291365 - giveitem_std ITEM_NUGGET, 1, 1 + finditem_std ITEM_NUGGET end AquaHideout_B1F_EventScript_ItemMaxElixir:: @ 8291372 - giveitem_std ITEM_MAX_ELIXIR, 1, 1 + finditem_std ITEM_MAX_ELIXIR end AquaHideout_B2F_EventScript_ItemNestBall:: @ 829137F - giveitem_std ITEM_NEST_BALL, 1, 1 + finditem_std ITEM_NEST_BALL end AquaHideout_B2F_EventScript_ItemMasterBall:: @ 829138C - giveitem_std ITEM_MASTER_BALL, 1, 1 // Unused + finditem_std ITEM_MASTER_BALL // Unused end Route119_EventScript_ItemNugget:: @ 8291399 - giveitem_std ITEM_NUGGET, 1, 1 + finditem_std ITEM_NUGGET end Route119_EventScript_ItemMaxElixir:: @ 82913A6 - giveitem_std ITEM_MAX_ELIXIR, 1, 1 + finditem_std ITEM_MAX_ELIXIR end Route119_EventScript_ItemNestBall:: @ 82913B3 - giveitem_std ITEM_NEST_BALL, 1, 1 + finditem_std ITEM_NEST_BALL end ShoalCave_LowTideEntranceRoom_EventScript_ItemBigPearl:: @ 82913C0 - giveitem_std ITEM_BIG_PEARL, 1, 1 + finditem_std ITEM_BIG_PEARL end ShoalCave_LowTideInnerRoom_EventScript_ItemRareCandy:: @ 82913CD - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end ShoalCave_LowTideStairsRoom_EventScript_ItemIceHeal:: @ 82913DA - giveitem_std ITEM_ICE_HEAL, 1, 1 + finditem_std ITEM_ICE_HEAL end ShoalCave_LowTideIceRoom_EventScript_ItemTM07:: @ 82913E7 - giveitem_std ITEM_TM07, 1, 1 + finditem_std ITEM_TM07 end ShoalCave_LowTideIceRoom_EventScript_ItemNeverMeltIce:: @ 82913F4 - giveitem_std ITEM_NEVER_MELT_ICE, 1, 1 + finditem_std ITEM_NEVER_MELT_ICE end SeafloorCavern_Room9_EventScript_ItemTM26:: @ 8291401 - giveitem_std ITEM_TM26, 1, 1 + finditem_std ITEM_TM26 end Route110_TrickHousePuzzle1_EventScript_ItemOrangeMail:: @ 829140E - giveitem_std ITEM_ORANGE_MAIL, 1, 1 + finditem_std ITEM_ORANGE_MAIL end Route110_TrickHousePuzzle2_EventScript_ItemHarborMail:: @ 829141B - giveitem_std ITEM_HARBOR_MAIL, 1, 1 + finditem_std ITEM_HARBOR_MAIL end Route110_TrickHousePuzzle2_EventScript_ItemWaveMail:: @ 8291428 - giveitem_std ITEM_WAVE_MAIL, 1, 1 + finditem_std ITEM_WAVE_MAIL end Route110_TrickHousePuzzle3_EventScript_ItemShadowMail:: @ 8291435 - giveitem_std ITEM_SHADOW_MAIL, 1, 1 + finditem_std ITEM_SHADOW_MAIL end Route110_TrickHousePuzzle3_EventScript_ItemWoodMail:: @ 8291442 - giveitem_std ITEM_WOOD_MAIL, 1, 1 + finditem_std ITEM_WOOD_MAIL end Route110_TrickHousePuzzle4_EventScript_ItemMechMail:: @ 829144F - giveitem_std ITEM_MECH_MAIL, 1, 1 + finditem_std ITEM_MECH_MAIL end Route110_TrickHousePuzzle6_EventScript_ItemGlitterMail:: @ 829145C - giveitem_std ITEM_GLITTER_MAIL, 1, 1 + finditem_std ITEM_GLITTER_MAIL end Route110_TrickHousePuzzle7_EventScript_ItemTropicMail:: @ 8291469 - giveitem_std ITEM_TROPIC_MAIL, 1, 1 + finditem_std ITEM_TROPIC_MAIL end Route110_TrickHousePuzzle8_EventScript_ItemBeadMail:: @ 8291476 - giveitem_std ITEM_BEAD_MAIL, 1, 1 + finditem_std ITEM_BEAD_MAIL end VictoryRoad_1F_EventScript_ItemMaxElixir:: @ 8291483 - giveitem_std ITEM_MAX_ELIXIR, 1, 1 + finditem_std ITEM_MAX_ELIXIR end VictoryRoad_1F_EventScript_ItemPPUp:: @ 8291490 - giveitem_std ITEM_PP_UP, 1, 1 + finditem_std ITEM_PP_UP end VictoryRoad_B1F_EventScript_ItemTM29:: @ 829149D - giveitem_std ITEM_TM29, 1, 1 + finditem_std ITEM_TM29 end VictoryRoad_B1F_EventScript_ItemFullRestore:: @ 82914AA - giveitem_std ITEM_FULL_RESTORE, 1, 1 + finditem_std ITEM_FULL_RESTORE end VictoryRoad_B2F_EventScript_ItemFullHeal:: @ 82914B7 - giveitem_std ITEM_FULL_HEAL, 1, 1 + finditem_std ITEM_FULL_HEAL end ArtisanCave_B1F_EventScript_ItemHPUp:: @ 82914C4 - giveitem_std ITEM_HP_UP, 1, 1 + finditem_std ITEM_HP_UP end ArtisanCave_1F_EventScript_ItemCarbos:: @ 82914D1 - giveitem_std ITEM_CARBOS, 1, 1 + finditem_std ITEM_CARBOS end MagmaHideout_1F_EventScript_ItemRareCandy:: @ 82914DE - giveitem_std ITEM_RARE_CANDY, 1, 1 + finditem_std ITEM_RARE_CANDY end MagmaHideout_2F_2R_EventScript_MaxElixir:: @ 82914EB - giveitem_std ITEM_MAX_ELIXIR, 1, 1 + finditem_std ITEM_MAX_ELIXIR end MagmaHideout_2F_2R_EventScript_ItemFullRestore:: @ 82914F8 - giveitem_std ITEM_FULL_RESTORE, 1, 1 + finditem_std ITEM_FULL_RESTORE end MagmaHideout_3F_1R_EventScript_ItemNugget:: @ 8291505 - giveitem_std ITEM_NUGGET, 1, 1 + finditem_std ITEM_NUGGET end MagmaHideout_3F_2R_EventScript_ItemPPMax:: @ 8291512 - giveitem_std ITEM_PP_MAX, 1, 1 + finditem_std ITEM_PP_MAX end MagmaHideout_4F_EventScript_MaxRevive:: @ 829151F - giveitem_std ITEM_MAX_REVIVE, 1, 1 + finditem_std ITEM_MAX_REVIVE end MagmaHideout_3F_3R_EventScript_ItemEscapeRope:: @ 829152C - giveitem_std ITEM_ESCAPE_ROPE, 1, 1 + finditem_std ITEM_ESCAPE_ROPE end From 97b5560bdb5a0c13d673cce8d9c75120c93e8645 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 15 Dec 2019 00:55:21 -0500 Subject: [PATCH 18/35] Document Battle Tent scripts --- .../scripts.inc | 5 +- .../scripts.inc | 5 +- .../scripts.inc | 143 +++++----- .../scripts.inc | 36 +-- .../FallarborTown_BattleTentLobby/map.json | 12 +- .../FallarborTown_BattleTentLobby/scripts.inc | 247 ++++++++--------- .../scripts.inc | 54 ++-- .../scripts.inc | 145 +++++----- .../SlateportCity_BattleTentLobby/map.json | 12 +- .../SlateportCity_BattleTentLobby/scripts.inc | 228 +++++++-------- .../scripts.inc | 104 +++---- .../scripts.inc | 37 +-- .../VerdanturfTown_BattleTentLobby/map.json | 14 +- .../scripts.inc | 260 +++++++++--------- data/text/battle_tent.inc | 149 +++++----- 15 files changed, 748 insertions(+), 703 deletions(-) diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index a96063caa..561753d0f 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -540,11 +540,12 @@ BattleFrontier_BattleDomeLobby_Text_24A51D: @ 824A51D .string "Here is your prize for your Battle\n" .string "Tournament victory.$" -VerdanturfTown_BattleTentLobby_Text_24A554: @ 824A554 +BattleFrontier_BattleDomeLobby_Text_ReceivedPrize: @ 824A554 .string "{PLAYER} received the prize\n" .string "{STR_VAR_1}.$" -VerdanturfTown_BattleTentLobby_Text_24A56E: @ 824A56E +@ Unused +BattleFrontier_BattleDomeLobby_Text_BagFullMakeRoom: @ 824A56E .string "Oh, your BAG appears to be full.\p" .string "Please make room in your BAG, then come\n" .string "see me.$" diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 275ac4041..7694efaae 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -1003,11 +1003,12 @@ BattleFrontier_BattleTowerLobby_Text_23F641: @ 823F641 .string "you have earned this fabulous prize!\p" .string "$" -SlateportCity_BattleTentLobby_Text_23F68C: @ 823F68C +BattleFrontier_BattleTowerLobby_Text_ReceivedPrize: @ 823F68C .string "{PLAYER} received the prize\n" .string "{STR_VAR_1}.$" -SlateportCity_BattleTentLobby_Text_23F6A6: @ 823F6A6 +@ Unused +BattleFrontier_BattleTowerLobby_Text_BagFullMakeRoom: @ 823F6A6 .string "Oh, your BAG appears to be full.\p" .string "Please make room in your BAG, then come\n" .string "see me.$" diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index ba8b3536f..5bad66f01 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -1,50 +1,53 @@ FallarborTown_BattleTentBattleRoom_MapScripts:: @ 8200899 map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_BattleTentBattleRoom_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentBattleRoom_MapScript2_2008DD - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentBattleRoom_MapScript2_200BB0 + map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentBattleRoom_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentBattleRoom_OnWarp .byte 0 + @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden + @ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_1 + @ The opponent is represented by object event 3, which has the gfx id VAR_OBJ_GFX_ID_0 + FallarborTown_BattleTentBattleRoom_OnTransition: @ 82008A9 - call FallarborTown_BattleTentBattleRoom_EventScript_2008AF + call FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx end -FallarborTown_BattleTentBattleRoom_EventScript_2008AF:: @ 82008AF +FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: @ 82008AF checkplayergender compare VAR_RESULT, MALE - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_2008C7 + goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale compare VAR_RESULT, FEMALE - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_2008D2 + goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return -FallarborTown_BattleTentBattleRoom_EventScript_2008C7:: @ 82008C7 +FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @ 82008C7 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return -FallarborTown_BattleTentBattleRoom_EventScript_2008D2:: @ 82008D2 +FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale:: @ 82008D2 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return -FallarborTown_BattleTentBattleRoom_MapScript2_2008DD: @ 82008DD - map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentBattleRoom_EventScript_2008E7 +FallarborTown_BattleTentBattleRoom_OnFrame: @ 82008DD + map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom .2byte 0 -FallarborTown_BattleTentBattleRoom_EventScript_2008E7:: @ 82008E7 +FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom:: @ 82008E7 lockall showobjectat 1, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM - applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_200B8D + applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 0 - goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_200B73 - -FallarborTown_BattleTentBattleRoom_EventScript_20090F:: @ 820090F + goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge +FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: @ 820090F tower_setopponent addobject 3 - applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_200B96 + applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter waitmovement 0 - applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_200BA3 + applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump playse SE_W187 waitse waitmovement 0 @@ -54,40 +57,38 @@ FallarborTown_BattleTentBattleRoom_EventScript_20090F:: @ 820090F waitmessage call BattleFrontier_BattleArenaBattleRoom_EventScript_DoArenaBattle switch VAR_RESULT - case 1, FallarborTown_BattleTentBattleRoom_EventScript_20099C - applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_200BA3 + case 1, FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent + applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump playse SE_W173 waitse waitmovement 0 fallarbortent_getopponentname msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsOpponent, MSGBOX_DEFAULT - -FallarborTown_BattleTentBattleRoom_EventScript_20097E:: @ 820097E +FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: @ 820097E frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 waitstate -FallarborTown_BattleTentBattleRoom_EventScript_20099C:: @ 820099C - applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_200BA3 +FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @ 820099C + applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump playse SE_BAN waitse waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsPlayer, MSGBOX_DEFAULT closemessage - -FallarborTown_BattleTentBattleRoom_EventScript_2009B3:: @ 82009B3 +FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum:: @ 82009B3 frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT - case 3, FallarborTown_BattleTentBattleRoom_EventScript_200AF3 - applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_200B9E + case 3, FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon + applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_OpponentExit waitmovement 0 removeobject 3 - applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_200BA6 + applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_200B94 + applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_MonsWillBeRestored, MSGBOX_DEFAULT special LoadPlayerParty @@ -96,66 +97,69 @@ FallarborTown_BattleTentBattleRoom_EventScript_2009B3:: @ 82009B3 playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty - -FallarborTown_BattleTentBattleRoom_EventScript_200A2A:: @ 8200A2A +FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: @ 8200A2A frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 1 - call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_200B43 + call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent compare VAR_RESULT, 2 - call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_200B4A + call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT - case 0, FallarborTown_BattleTentBattleRoom_EventScript_200AD8 - case 1, FallarborTown_BattleTentBattleRoom_EventScript_200A78 - case 2, FallarborTown_BattleTentBattleRoom_EventScript_200AA6 + case 0, FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge + case 1, FallarborTown_BattleTentBattleRoom_EventScript_AskPauseChallenge + case 2, FallarborTown_BattleTentBattleRoom_EventScript_AskRetireChallenge -FallarborTown_BattleTentBattleRoom_EventScript_200A78:: @ 8200A78 +FallarborTown_BattleTentBattleRoom_EventScript_AskPauseChallenge:: @ 8200A78 msgbox BattleFrontier_BattleArenaBattleRoom_Text_SaveAndShutDown, MSGBOX_YESNO switch VAR_RESULT - case NO, FallarborTown_BattleTentBattleRoom_EventScript_200A2A - case YES, FallarborTown_BattleTentBattleRoom_EventScript_200B51 - case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_200A2A + case NO, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge + case YES, FallarborTown_BattleTentBattleRoom_EventScript_PauseChallenge + case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge -FallarborTown_BattleTentBattleRoom_EventScript_200AA6:: @ 8200AA6 +FallarborTown_BattleTentBattleRoom_EventScript_AskRetireChallenge:: @ 8200AA6 message BattleFrontier_BattleArenaBattleRoom_Text_RetireFromChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, FallarborTown_BattleTentBattleRoom_EventScript_200A2A - case 0, FallarborTown_BattleTentBattleRoom_EventScript_20097E - case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_200A2A + case 1, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge + case 0, FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost + case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge -FallarborTown_BattleTentBattleRoom_EventScript_200AD8:: @ 8200AD8 +FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: @ 8200AD8 closemessage - applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_200BAB + applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantReturnToPos waitmovement 0 - applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_200B92 + applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceBattle waitmovement 0 - goto FallarborTown_BattleTentBattleRoom_EventScript_20090F + goto FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter waitstate -FallarborTown_BattleTentBattleRoom_EventScript_200AF3:: @ 8200AF3 +FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: @ 8200AF3 delay 60 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 waitstate + +@ Unreachable code block? The flow into the next block also doesnt make sense arena_get ARENA_DATA_WIN_STREAK compare VAR_RESULT, MAX_STREAK - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_2009B3 + goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum addvar VAR_RESULT, 1 arena_set ARENA_DATA_WIN_STREAK, VAR_RESULT -FallarborTown_BattleTentBattleRoom_EventScript_200B43:: @ 8200B43 +@ See above + +FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent:: @ 8200B43 message BattleFrontier_BattleArenaBattleRoom_Text_ReadyFor2ndOpponent waitmessage return -FallarborTown_BattleTentBattleRoom_EventScript_200B4A:: @ 8200B4A +FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent:: @ 8200B4A message BattleFrontier_BattleArenaBattleRoom_Text_ReadyFor3rdOpponent waitmessage return -FallarborTown_BattleTentBattleRoom_EventScript_200B51:: @ 8200B51 +FallarborTown_BattleTentBattleRoom_EventScript_PauseChallenge:: @ 8200B51 message BattleFrontier_BattleArenaBattleRoom_Text_SavingPleaseWait waitmessage fallarbortent_save CHALLENGE_STATUS_PAUSED @@ -165,30 +169,30 @@ FallarborTown_BattleTentBattleRoom_EventScript_200B51:: @ 8200B51 frontier_reset end -FallarborTown_BattleTentBattleRoom_EventScript_200B73:: @ 8200B73 - applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_200BA6 +FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge:: @ 8200B73 + applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_200B94 + applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant waitmovement 0 - goto FallarborTown_BattleTentBattleRoom_EventScript_200A2A + goto FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge end -FallarborTown_BattleTentBattleRoom_Movement_200B8D: @ 8200B8D +FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter: @ 8200B8D walk_up walk_up walk_up walk_in_place_fastest_right step_end -FallarborTown_BattleTentBattleRoom_Movement_200B92: @ 8200B92 +FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceBattle: @ 8200B92 walk_in_place_fastest_right step_end -FallarborTown_BattleTentBattleRoom_Movement_200B94: @ 8200B94 +FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant: @ 8200B94 walk_in_place_fastest_left step_end -FallarborTown_BattleTentBattleRoom_Movement_200B96: @ 8200B96 +FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter: @ 8200B96 walk_down walk_down walk_down @@ -196,41 +200,42 @@ FallarborTown_BattleTentBattleRoom_Movement_200B96: @ 8200B96 walk_in_place_fastest_left step_end -FallarborTown_BattleTentBattleRoom_Movement_200B9C: @ 8200B9C +@ Unused +FallarborTown_BattleTentBattleRoom_Movement_OpponentStepForward: @ 8200B9C walk_left step_end -FallarborTown_BattleTentBattleRoom_Movement_200B9E: @ 8200B9E +FallarborTown_BattleTentBattleRoom_Movement_OpponentExit: @ 8200B9E walk_up walk_up walk_up walk_up step_end -FallarborTown_BattleTentBattleRoom_Movement_200BA3: @ 8200BA3 +FallarborTown_BattleTentBattleRoom_Movement_AttendantJump: @ 8200BA3 disable_jump_landing_ground_effect jump_in_place_down step_end -FallarborTown_BattleTentBattleRoom_Movement_200BA6: @ 8200BA6 +FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer: @ 8200BA6 walk_down walk_down walk_down walk_in_place_fastest_right step_end -FallarborTown_BattleTentBattleRoom_Movement_200BAB: @ 8200BAB +FallarborTown_BattleTentBattleRoom_Movement_AttendantReturnToPos: @ 8200BAB walk_up walk_up walk_up walk_in_place_fastest_down step_end -FallarborTown_BattleTentBattleRoom_MapScript2_200BB0: @ 8200BB0 - map_script_2 VAR_TEMP_1, 0, FallarborTown_BattleTentBattleRoom_EventScript_200BBA +FallarborTown_BattleTentBattleRoom_OnWarp: @ 8200BB0 + map_script_2 VAR_TEMP_1, 0, FallarborTown_BattleTentBattleRoom_EventScript_SetUpObjects .2byte 0 -FallarborTown_BattleTentBattleRoom_EventScript_200BBA:: @ 8200BBA +FallarborTown_BattleTentBattleRoom_EventScript_SetUpObjects:: @ 8200BBA hideobjectat EVENT_OBJ_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM hideobjectat 1, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM removeobject 3 diff --git a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc index 327033829..bc8bdb512 100644 --- a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc +++ b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc @@ -1,21 +1,21 @@ FallarborTown_BattleTentCorridor_MapScripts:: @ 82006A7 - map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentCorridor_MapScript2_2006AD + map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentCorridor_OnFrame .byte 0 -FallarborTown_BattleTentCorridor_MapScript2_2006AD: @ 82006AD - map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentCorridor_EventScript_2006B7 +FallarborTown_BattleTentCorridor_OnFrame: @ 82006AD + map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentCorridor_EventScript_EnterCorridor .2byte 0 -FallarborTown_BattleTentCorridor_EventScript_2006B7:: @ 82006B7 +FallarborTown_BattleTentCorridor_EventScript_EnterCorridor:: @ 82006B7 lockall setvar VAR_TEMP_0, 1 - applymovement 1, FallarborTown_BattleTentCorridor_Movement_2006FB - applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentCorridor_Movement_2006FB + applymovement 1, FallarborTown_BattleTentCorridor_Movement_WalkToDoor + applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentCorridor_Movement_WalkToDoor waitmovement 0 opendoor 2, 1 waitdooranim - applymovement 1, FallarborTown_BattleTentCorridor_Movement_200701 - applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentCorridor_Movement_200700 + applymovement 1, FallarborTown_BattleTentCorridor_Movement_AttendantEnterDoor + applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentCorridor_Movement_PlayerEnterDoor waitmovement 0 closedoor 2, 1 waitdooranim @@ -25,40 +25,44 @@ FallarborTown_BattleTentCorridor_EventScript_2006B7:: @ 82006B7 releaseall end -FallarborTown_BattleTentCorridor_Movement_2006FB: @ 82006FB +FallarborTown_BattleTentCorridor_Movement_WalkToDoor: @ 82006FB walk_up walk_up walk_up walk_up step_end -FallarborTown_BattleTentCorridor_Movement_200700: @ 8200700 +FallarborTown_BattleTentCorridor_Movement_PlayerEnterDoor: @ 8200700 walk_up - -FallarborTown_BattleTentCorridor_Movement_200701: @ 8200701 +FallarborTown_BattleTentCorridor_Movement_AttendantEnterDoor: @ 8200701 walk_up set_invisible step_end -FallarborTown_BattleTentCorridor_Text_200704: @ 8200704 +@ Leftover text from when this was a Contest Hall in R/S +@ Unused +FallarborTown_ContestHall_Text_DoAllRightInPreliminary: @ 8200704 .string "We do all right in the preliminary round,\n" .string "but we can never win the appeals…\p" .string "Maybe it means I have to watch what\n" .string "other contestants are doing…$" -FallarborTown_BattleTentCorridor_Text_200791: @ 8200791 +@ Unused +FallarborTown_ContestHall_Text_MonAllTheseRibbons: @ 8200791 .string "See!\n" .string "My POKéMON won all these RIBBONS!\p" .string "Have your POKéMON earned any RIBBONS?\n" .string "You can check them on your POKéNAV.$" -FallarborTown_BattleTentCorridor_Text_200802: @ 8200802 +@ Unused +FallarborTown_ContestHall_Text_CantWinEverywhere: @ 8200802 .string "I can't beat GYM LEADERS…\p" .string "I can't win any CONTESTS…\p" .string "I've been here, there, and everywhere,\n" .string "and it's all for naught…$" -FallarborTown_BattleTentCorridor_Text_200876: @ 8200876 +@ Unused +FallarborTown_ContestHall_Text_SuperRankStage: @ 8200876 .string "POKéMON CONTESTS\n" .string "SUPER RANK STAGE!$" diff --git a/data/maps/FallarborTown_BattleTentLobby/map.json b/data/maps/FallarborTown_BattleTentLobby/map.json index 4c565ff8c..b48119689 100644 --- a/data/maps/FallarborTown_BattleTentLobby/map.json +++ b/data/maps/FallarborTown_BattleTentLobby/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_BattleTentLobby_EventScript_200001", + "script": "FallarborTown_BattleTentLobby_EventScript_Attendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_BattleTentLobby_EventScript_20020D", + "script": "FallarborTown_BattleTentLobby_EventScript_Hiker", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_BattleTentLobby_EventScript_200216", + "script": "FallarborTown_BattleTentLobby_EventScript_LittleBoy", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_BattleTentLobby_EventScript_20021F", + "script": "FallarborTown_BattleTentLobby_EventScript_Lass", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "FallarborTown_BattleTentLobby_EventScript_200228", + "script": "FallarborTown_BattleTentLobby_EventScript_Scott", "flag": "FLAG_HIDE_FALLARBOR_TOWN_BATTLE_TENT_SCOTT" } ], @@ -104,7 +104,7 @@ "y": 5, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "FallarborTown_BattleTentLobby_EventScript_20024F" + "script": "FallarborTown_BattleTentLobby_EventScript_RulesBoard" } ] } \ No newline at end of file diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index fddadae15..ef5c4299c 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -1,32 +1,32 @@ FallarborTown_BattleTentLobby_MapScripts:: @ 81FFE66 - map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentLobby_MapScript2_1FFE85 - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentLobby_MapScript2_1FFE71 + map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentLobby_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentLobby_OnWarp .byte 0 -FallarborTown_BattleTentLobby_MapScript2_1FFE71: @ 81FFE71 - map_script_2 VAR_TEMP_1, 0, FallarborTown_BattleTentLobby_EventScript_1FFE7B +FallarborTown_BattleTentLobby_OnWarp: @ 81FFE71 + map_script_2 VAR_TEMP_1, 0, FallarborTown_BattleTentLobby_EventScript_TurnPlayerNorth .2byte 0 -FallarborTown_BattleTentLobby_EventScript_1FFE7B:: @ 81FFE7B +FallarborTown_BattleTentLobby_EventScript_TurnPlayerNorth:: @ 81FFE7B setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -FallarborTown_BattleTentLobby_MapScript2_1FFE85: @ 81FFE85 - map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentLobby_EventScript_1FFEAF - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, FallarborTown_BattleTentLobby_EventScript_1FFEB8 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, FallarborTown_BattleTentLobby_EventScript_1FFFCD - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, FallarborTown_BattleTentLobby_EventScript_1FFEED - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, FallarborTown_BattleTentLobby_EventScript_1FFF93 +FallarborTown_BattleTentLobby_OnFrame: @ 81FFE85 + map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentLobby_EventScript_GetChallengeStatus + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, FallarborTown_BattleTentLobby_EventScript_QuitWithoutSaving + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, FallarborTown_BattleTentLobby_EventScript_ResumeChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, FallarborTown_BattleTentLobby_EventScript_WonChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, FallarborTown_BattleTentLobby_EventScript_LostChallenge .2byte 0 -FallarborTown_BattleTentLobby_EventScript_1FFEAF:: @ 81FFEAF +FallarborTown_BattleTentLobby_EventScript_GetChallengeStatus:: @ 81FFEAF frontier_getstatus end -FallarborTown_BattleTentLobby_EventScript_1FFEB8:: @ 81FFEB8 +FallarborTown_BattleTentLobby_EventScript_QuitWithoutSaving:: @ 81FFEB8 lockall - msgbox FallarborTown_BattleTentLobby_Text_2C4DED, MSGBOX_DEFAULT + msgbox FallarborTown_BattleTentLobby_Text_DidntSaveBeforeQuitting, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_TEMP_0, 255 @@ -34,10 +34,10 @@ FallarborTown_BattleTentLobby_EventScript_1FFEB8:: @ 81FFEB8 releaseall end -FallarborTown_BattleTentLobby_EventScript_1FFEED:: @ 81FFEED +FallarborTown_BattleTentLobby_EventScript_WonChallenge:: @ 81FFEED lockall - msgbox FallarborTown_BattleTentLobby_Text_2C4EC3, MSGBOX_DEFAULT - message FallarborTown_BattleTentLobby_Text_2C4EFF + msgbox FallarborTown_BattleTentLobby_Text_BeatThreeTrainers, MSGBOX_DEFAULT + message FallarborTown_BattleTentLobby_Text_WaitWhileSaveGame waitmessage fallarbortent_setrandomprize frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 @@ -45,103 +45,102 @@ FallarborTown_BattleTentLobby_EventScript_1FFEED:: @ 81FFEED playse SE_SAVE waitse -FallarborTown_BattleTentLobby_EventScript_1FFF27:: @ 81FFF27 - msgbox FallarborTown_BattleTentLobby_Text_2C4F22, MSGBOX_DEFAULT +FallarborTown_BattleTentLobby_EventScript_GivePrize:: @ 81FFF27 + msgbox FallarborTown_BattleTentLobby_Text_PresentYouWithPrize, MSGBOX_DEFAULT fallarbortent_giveprize switch VAR_RESULT - case 0, FallarborTown_BattleTentLobby_EventScript_1FFF73 + case FALSE, FallarborTown_BattleTentLobby_EventScript_NoRoomForPrize frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - message FallarborTown_BattleTentLobby_Text_2C4F69 + message FallarborTown_BattleTentLobby_Text_ReceivedPrize waitmessage playfanfare MUS_FANFA4 waitfanfare - msgbox FallarborTown_BattleTentLobby_Text_2C501F, MSGBOX_DEFAULT + msgbox FallarborTown_BattleTentLobby_Text_AwaitAnotherChallenge2, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -FallarborTown_BattleTentLobby_EventScript_1FFF73:: @ 81FFF73 - msgbox FallarborTown_BattleTentLobby_Text_2C4F83, MSGBOX_DEFAULT +FallarborTown_BattleTentLobby_EventScript_NoRoomForPrize:: @ 81FFF73 + msgbox FallarborTown_BattleTentLobby_Text_BagFullReturnForPrize, MSGBOX_DEFAULT waitmessage closemessage setvar VAR_TEMP_0, 255 releaseall end -FallarborTown_BattleTentLobby_EventScript_1FFF84:: @ 81FFF84 +FallarborTown_BattleTentLobby_EventScript_PrizeWaiting:: @ 81FFF84 lockall - msgbox FallarborTown_BattleTentLobby_Text_2C4EC3, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_1FFF27 + msgbox FallarborTown_BattleTentLobby_Text_BeatThreeTrainers, MSGBOX_DEFAULT + goto FallarborTown_BattleTentLobby_EventScript_GivePrize end -FallarborTown_BattleTentLobby_EventScript_1FFF93:: @ 81FFF93 +FallarborTown_BattleTentLobby_EventScript_LostChallenge:: @ 81FFF93 lockall - message FallarborTown_BattleTentLobby_Text_2C4FD7 + message FallarborTown_BattleTentLobby_Text_ThankYouWaitWhileSaving waitmessage frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 fallarbortent_save 0 playse SE_SAVE waitse - msgbox FallarborTown_BattleTentLobby_Text_2C501F, MSGBOX_DEFAULT + msgbox FallarborTown_BattleTentLobby_Text_AwaitAnotherChallenge2, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -FallarborTown_BattleTentLobby_EventScript_1FFFCD:: @ 81FFFCD +FallarborTown_BattleTentLobby_EventScript_ResumeChallenge:: @ 81FFFCD lockall - message FallarborTown_BattleTentLobby_Text_2C504C + message FallarborTown_BattleTentLobby_Text_LookingForwardToArrival waitmessage fallarbortent_save CHALLENGE_STATUS_SAVING playse SE_SAVE waitse frontier_set FRONTIER_DATA_PAUSED, FALSE setvar VAR_TEMP_0, 255 - goto FallarborTown_BattleTentLobby_EventScript_20013C + goto FallarborTown_BattleTentLobby_EventScript_EnterChallenge -FallarborTown_BattleTentLobby_EventScript_200001:: @ 8200001 +FallarborTown_BattleTentLobby_EventScript_Attendant:: @ 8200001 lock faceplayer fallarbortent_getprize - compare VAR_RESULT, 0 - goto_if_ne FallarborTown_BattleTentLobby_EventScript_1FFF84 + compare VAR_RESULT, ITEM_NONE + goto_if_ne FallarborTown_BattleTentLobby_EventScript_PrizeWaiting special SavePlayerParty - msgbox FallarborTown_BattleTentLobby_Text_2C47EB, MSGBOX_DEFAULT - -FallarborTown_BattleTentLobby_EventScript_200021:: @ 8200021 - message FallarborTown_BattleTentLobby_Text_2C4843 + msgbox FallarborTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT +FallarborTown_BattleTentLobby_EventScript_AskEnterChallenge:: @ 8200021 + message FallarborTown_BattleTentLobby_Text_TakeChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, 0 switch VAR_RESULT - case 0, FallarborTown_BattleTentLobby_EventScript_20005D - case 1, FallarborTown_BattleTentLobby_EventScript_200169 - case 2, FallarborTown_BattleTentLobby_EventScript_2001C5 - case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_2001C5 + case 0, FallarborTown_BattleTentLobby_EventScript_TryEnterChallenge + case 1, FallarborTown_BattleTentLobby_EventScript_ExplainChallenge + case 2, FallarborTown_BattleTentLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_CancelChallenge -FallarborTown_BattleTentLobby_EventScript_20005D:: @ 820005D +FallarborTown_BattleTentLobby_EventScript_TryEnterChallenge:: @ 820005D setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_ARENA setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_RESULT, 2 frontier_checkineligible compare VAR_0x8004, TRUE - goto_if_eq FallarborTown_BattleTentLobby_EventScript_200176 + goto_if_eq FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT - msgbox FallarborTown_BattleTentLobby_Text_2C4BC8, MSGBOX_DEFAULT + msgbox FallarborTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen 1 setvar VAR_0x8004, 2 setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate compare VAR_RESULT, 0 - goto_if_eq FallarborTown_BattleTentLobby_EventScript_2001C2 - msgbox FallarborTown_BattleTentLobby_Text_2C4B35, MSGBOX_YESNO + goto_if_eq FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + msgbox FallarborTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT - case NO, FallarborTown_BattleTentLobby_EventScript_2001C2 - case YES, FallarborTown_BattleTentLobby_EventScript_2000E2 - case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_2001C2 + case NO, FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + case YES, FallarborTown_BattleTentLobby_EventScript_SaveBeforeChallenge + case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge -FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2 +FallarborTown_BattleTentLobby_EventScript_SaveBeforeChallenge:: @ 82000E2 setvar VAR_TEMP_0, 0 frontier_set FRONTIER_DATA_SELECTED_MON_ORDER fallarbortent_init @@ -153,170 +152,166 @@ FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 compare VAR_RESULT, 0 - goto_if_eq FallarborTown_BattleTentLobby_EventScript_2001AB - -FallarborTown_BattleTentLobby_EventScript_20013C:: @ 820013C + goto_if_eq FallarborTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed +FallarborTown_BattleTentLobby_EventScript_EnterChallenge:: @ 820013C special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE - msgbox FallarborTown_BattleTentLobby_Text_2C4DC3, MSGBOX_DEFAULT + msgbox FallarborTown_BattleTentLobby_Text_GuideYouToBattleTent, MSGBOX_DEFAULT closemessage - call FallarborTown_BattleTentLobby_EventScript_2001CF + call FallarborTown_BattleTentLobby_EventScript_WalkToDoor warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7 setvar VAR_TEMP_0, 0 waitstate end -FallarborTown_BattleTentLobby_EventScript_200169:: @ 8200169 - msgbox FallarborTown_BattleTentLobby_Text_2C48AC, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_200021 +FallarborTown_BattleTentLobby_EventScript_ExplainChallenge:: @ 8200169 + msgbox FallarborTown_BattleTentLobby_Text_ExplainFallarborTent, MSGBOX_DEFAULT + goto FallarborTown_BattleTentLobby_EventScript_AskEnterChallenge -FallarborTown_BattleTentLobby_EventScript_200176:: @ 8200176 +FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMons:: @ 8200176 switch VAR_RESULT - case FRONTIER_LVL_50, FallarborTown_BattleTentLobby_EventScript_200191 - case FRONTIER_LVL_OPEN, FallarborTown_BattleTentLobby_EventScript_20019E + case FRONTIER_LVL_50, FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMonsLv50 + case FRONTIER_LVL_OPEN, FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMonsLvOpen +FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMonsLv50:: @ 8200191 + msgbox FallarborTown_BattleTentLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT + goto FallarborTown_BattleTentLobby_EventScript_EndCancelChallenge -FallarborTown_BattleTentLobby_EventScript_200191:: @ 8200191 - msgbox FallarborTown_BattleTentLobby_Text_2C4BFA, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_2001CD +FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMonsLvOpen:: @ 820019E + msgbox FallarborTown_BattleTentLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT + goto FallarborTown_BattleTentLobby_EventScript_EndCancelChallenge -FallarborTown_BattleTentLobby_EventScript_20019E:: @ 820019E - msgbox FallarborTown_BattleTentLobby_Text_2C4CC0, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_2001CD - -FallarborTown_BattleTentLobby_EventScript_2001AB:: @ 82001AB +FallarborTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed:: @ 82001AB frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - goto FallarborTown_BattleTentLobby_EventScript_2001C5 + goto FallarborTown_BattleTentLobby_EventScript_CancelChallenge -FallarborTown_BattleTentLobby_EventScript_2001C2:: @ 82001C2 +FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge:: @ 82001C2 special LoadPlayerParty - -FallarborTown_BattleTentLobby_EventScript_2001C5:: @ 82001C5 - msgbox FallarborTown_BattleTentLobby_Text_2C487F, MSGBOX_DEFAULT - -FallarborTown_BattleTentLobby_EventScript_2001CD:: @ 82001CD +FallarborTown_BattleTentLobby_EventScript_CancelChallenge:: @ 82001C5 + msgbox FallarborTown_BattleTentLobby_Text_AwaitAnotherChallenge, MSGBOX_DEFAULT +FallarborTown_BattleTentLobby_EventScript_EndCancelChallenge:: @ 82001CD release end -FallarborTown_BattleTentLobby_EventScript_2001CF:: @ 82001CF - applymovement 1, FallarborTown_BattleTentLobby_Movement_2001FE - applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentLobby_Movement_200205 +FallarborTown_BattleTentLobby_EventScript_WalkToDoor:: @ 82001CF + applymovement 1, FallarborTown_BattleTentLobby_Movement_AttendantWalkToDoor + applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentLobby_Movement_PlayerWalkToDoor waitmovement 0 opendoor 6, 1 waitdooranim - applymovement 1, FallarborTown_BattleTentLobby_Movement_200202 - applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentLobby_Movement_200209 + applymovement 1, FallarborTown_BattleTentLobby_Movement_AttendantEnterDoor + applymovement EVENT_OBJ_ID_PLAYER, FallarborTown_BattleTentLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 6, 1 waitdooranim return -FallarborTown_BattleTentLobby_Movement_2001FE: @ 82001FE +FallarborTown_BattleTentLobby_Movement_AttendantWalkToDoor: @ 82001FE walk_up walk_up walk_up step_end -FallarborTown_BattleTentLobby_Movement_200202: @ 8200202 +FallarborTown_BattleTentLobby_Movement_AttendantEnterDoor: @ 8200202 walk_up set_invisible step_end -FallarborTown_BattleTentLobby_Movement_200205: @ 8200205 +FallarborTown_BattleTentLobby_Movement_PlayerWalkToDoor: @ 8200205 walk_up walk_up walk_up step_end -FallarborTown_BattleTentLobby_Movement_200209: @ 8200209 +FallarborTown_BattleTentLobby_Movement_PlayerEnterDoor: @ 8200209 walk_up walk_up set_invisible step_end -FallarborTown_BattleTentLobby_EventScript_20020D:: @ 820020D - msgbox FallarborTown_BattleTentLobby_Text_20045A, MSGBOX_NPC +FallarborTown_BattleTentLobby_EventScript_Hiker:: @ 820020D + msgbox FallarborTown_BattleTentLobby_Text_CameToCampOut, MSGBOX_NPC end -FallarborTown_BattleTentLobby_EventScript_200216:: @ 8200216 - msgbox FallarborTown_BattleTentLobby_Text_200304, MSGBOX_NPC +FallarborTown_BattleTentLobby_EventScript_LittleBoy:: @ 8200216 + msgbox FallarborTown_BattleTentLobby_Text_MakeThinkImJustKid, MSGBOX_NPC end -FallarborTown_BattleTentLobby_EventScript_20021F:: @ 820021F - msgbox FallarborTown_BattleTentLobby_Text_200382, MSGBOX_NPC +FallarborTown_BattleTentLobby_EventScript_Lass:: @ 820021F + msgbox FallarborTown_BattleTentLobby_Text_FallarborTentMyFavorite, MSGBOX_NPC end -FallarborTown_BattleTentLobby_EventScript_200228:: @ 8200228 +FallarborTown_BattleTentLobby_EventScript_Scott:: @ 8200228 lock faceplayer - goto_if_set FLAG_MET_SCOTT_IN_FALLARBOR, FallarborTown_BattleTentLobby_EventScript_200245 - msgbox FallarborTown_BattleTentLobby_Text_200501, MSGBOX_DEFAULT + goto_if_set FLAG_MET_SCOTT_IN_FALLARBOR, FallarborTown_BattleTentLobby_EventScript_ScottAlreadySpokenTo + msgbox FallarborTown_BattleTentLobby_Text_ScottLookingForSomeone, MSGBOX_DEFAULT addvar VAR_SCOTT_STATE, 1 setflag FLAG_MET_SCOTT_IN_FALLARBOR release end -FallarborTown_BattleTentLobby_EventScript_200245:: @ 8200245 - msgbox FallarborTown_BattleTentLobby_Text_200653, MSGBOX_DEFAULT +FallarborTown_BattleTentLobby_EventScript_ScottAlreadySpokenTo:: @ 8200245 + msgbox FallarborTown_BattleTentLobby_Text_ScottMakeChallenge, MSGBOX_DEFAULT release end -FallarborTown_BattleTentLobby_EventScript_20024F:: @ 820024F +FallarborTown_BattleTentLobby_EventScript_RulesBoard:: @ 820024F lockall msgbox BattleFrontier_BattleArenaLobby_Text_RulesAreListed, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_20025E + goto FallarborTown_BattleTentLobby_EventScript_ReadRulesBoard end -FallarborTown_BattleTentLobby_EventScript_20025E:: @ 820025E +FallarborTown_BattleTentLobby_EventScript_ReadRulesBoard:: @ 820025E message BattleFrontier_BattleArenaLobby_Text_ReadWhichHeading waitmessage multichoice 17, 0, MULTI_FALLARBOR_TENT_RULES, 0 switch VAR_RESULT - case 0, FallarborTown_BattleTentLobby_EventScript_2002BC - case 1, FallarborTown_BattleTentLobby_EventScript_2002CA - case 2, FallarborTown_BattleTentLobby_EventScript_2002D8 - case 3, FallarborTown_BattleTentLobby_EventScript_2002E6 - case 4, FallarborTown_BattleTentLobby_EventScript_2002F4 - case 5, FallarborTown_BattleTentLobby_EventScript_200302 - case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_200302 + case 0, FallarborTown_BattleTentLobby_EventScript_RulesLevel + case 1, FallarborTown_BattleTentLobby_EventScript_RulesBattle + case 2, FallarborTown_BattleTentLobby_EventScript_RulesMind + case 3, FallarborTown_BattleTentLobby_EventScript_RulesSkill + case 4, FallarborTown_BattleTentLobby_EventScript_RulesBody + case 5, FallarborTown_BattleTentLobby_EventScript_ExitRules + case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_ExitRules end -FallarborTown_BattleTentLobby_EventScript_2002BC:: @ 82002BC - msgbox FallarborTown_BattleTentLobby_Text_2C67CD, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_20025E +FallarborTown_BattleTentLobby_EventScript_RulesLevel:: @ 82002BC + msgbox BattleTentLobby_Text_ExplainLevelRules, MSGBOX_DEFAULT + goto FallarborTown_BattleTentLobby_EventScript_ReadRulesBoard end -FallarborTown_BattleTentLobby_EventScript_2002CA:: @ 82002CA +FallarborTown_BattleTentLobby_EventScript_RulesBattle:: @ 82002CA msgbox BattleFrontier_BattleArenaLobby_Text_ExplainBattleRules, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_20025E + goto FallarborTown_BattleTentLobby_EventScript_ReadRulesBoard end -FallarborTown_BattleTentLobby_EventScript_2002D8:: @ 82002D8 +FallarborTown_BattleTentLobby_EventScript_RulesMind:: @ 82002D8 msgbox BattleFrontier_BattleArenaLobby_Text_ExplainMindRules, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_20025E + goto FallarborTown_BattleTentLobby_EventScript_ReadRulesBoard end -FallarborTown_BattleTentLobby_EventScript_2002E6:: @ 82002E6 +FallarborTown_BattleTentLobby_EventScript_RulesSkill:: @ 82002E6 msgbox BattleFrontier_BattleArenaLobby_Text_ExplainSkillRules, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_20025E + goto FallarborTown_BattleTentLobby_EventScript_ReadRulesBoard end -FallarborTown_BattleTentLobby_EventScript_2002F4:: @ 82002F4 +FallarborTown_BattleTentLobby_EventScript_RulesBody:: @ 82002F4 msgbox BattleFrontier_BattleArenaLobby_Text_ExplainBodyRules, MSGBOX_DEFAULT - goto FallarborTown_BattleTentLobby_EventScript_20025E + goto FallarborTown_BattleTentLobby_EventScript_ReadRulesBoard end -FallarborTown_BattleTentLobby_EventScript_200302:: @ 8200302 +FallarborTown_BattleTentLobby_EventScript_ExitRules:: @ 8200302 releaseall end -FallarborTown_BattleTentLobby_Text_200304: @ 8200304 +FallarborTown_BattleTentLobby_Text_MakeThinkImJustKid: @ 8200304 .string "Fufufufufu.\p" .string "I'm going to make everyone think\n" .string "I'm just a kid and let them play down.\p" .string "Then, I'll shock them and grab\n" .string "the title!$" -FallarborTown_BattleTentLobby_Text_200382: @ 8200382 +FallarborTown_BattleTentLobby_Text_FallarborTentMyFavorite: @ 8200382 .string "You know how BATTLE TENTS offer\n" .string "different events in different towns?\p" .string "My favorite is definitely the BATTLE\n" @@ -325,7 +320,7 @@ FallarborTown_BattleTentLobby_Text_200382: @ 8200382 .string "try to win with all their faith in\l" .string "their POKéMON.$" -FallarborTown_BattleTentLobby_Text_20045A: @ 820045A +FallarborTown_BattleTentLobby_Text_CameToCampOut: @ 820045A .string "I heard something about some tent,\n" .string "so I came to camp out.\p" .string "I didn't know that tents these days\n" @@ -333,7 +328,7 @@ FallarborTown_BattleTentLobby_Text_20045A: @ 820045A .string "Since I'm here, I may as well try\n" .string "my hand at battling!$" -FallarborTown_BattleTentLobby_Text_200501: @ 8200501 +FallarborTown_BattleTentLobby_Text_ScottLookingForSomeone: @ 8200501 .string "SCOTT: Hi, {PLAYER}{KUN}!\n" .string "So you came out to this BATTLE TENT!\p" .string "The people in these parts tend to be\n" @@ -348,7 +343,7 @@ FallarborTown_BattleTentLobby_Text_200501: @ 8200501 .string "Whoops! Never mind!\n" .string "Keep working at it!$" -FallarborTown_BattleTentLobby_Text_200653: @ 8200653 +FallarborTown_BattleTentLobby_Text_ScottMakeChallenge: @ 8200653 .string "SCOTT: Instead of wasting your\n" .string "time with the likes of me, why not\l" .string "make a challenge?$" diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index 541dc3aae..00c093c49 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -1,51 +1,54 @@ SlateportCity_BattleTentBattleRoom_MapScripts:: @ 8209960 map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_BattleTentBattleRoom_OnTransition - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentBattleRoom_MapScript2_20999A - map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentBattleRoom_MapScript2_2099B4 + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentBattleRoom_OnWarp + map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentBattleRoom_OnFrame .byte 0 + @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden + @ The player is represented instead by object event 3, which has the gfx id VAR_OBJ_GFX_ID_1 + SlateportCity_BattleTentBattleRoom_OnTransition: @ 8209970 - call SlateportCity_BattleTentBattleRoom_EventScript_209976 + call SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfx end -SlateportCity_BattleTentBattleRoom_EventScript_209976:: @ 8209976 +SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfx:: @ 8209976 checkplayergender compare VAR_RESULT, MALE - goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_20998E + goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale compare VAR_RESULT, FEMALE - goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_209994 + goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return -SlateportCity_BattleTentBattleRoom_EventScript_20998E:: @ 820998E +SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @ 820998E setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return -SlateportCity_BattleTentBattleRoom_EventScript_209994:: @ 8209994 +SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale:: @ 8209994 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return -SlateportCity_BattleTentBattleRoom_MapScript2_20999A: @ 820999A - map_script_2 VAR_TEMP_1, 0, SlateportCity_BattleTentBattleRoom_EventScript_2099A4 +SlateportCity_BattleTentBattleRoom_OnWarp: @ 820999A + map_script_2 VAR_TEMP_1, 0, SlateportCity_BattleTentBattleRoom_EventScript_SetUpObjects .2byte 0 -SlateportCity_BattleTentBattleRoom_EventScript_2099A4:: @ 82099A4 +SlateportCity_BattleTentBattleRoom_EventScript_SetUpObjects:: @ 82099A4 setvar VAR_TEMP_1, 1 hideobjectat EVENT_OBJ_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM hideobjectat 2, MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM end -SlateportCity_BattleTentBattleRoom_MapScript2_2099B4: @ 82099B4 - map_script_2 VAR_TEMP_0, 0, SlateportCity_BattleTentBattleRoom_EventScript_2099BE +SlateportCity_BattleTentBattleRoom_OnFrame: @ 82099B4 + map_script_2 VAR_TEMP_0, 0, SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom .2byte 0 -SlateportCity_BattleTentBattleRoom_EventScript_2099BE:: @ 82099BE - applymovement 3, SlateportCity_BattleTentBattleRoom_Movement_209A99 +SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom:: @ 82099BE + applymovement 3, SlateportCity_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 factory_setopponentgfx setobjectxyperm 2, 5, 1 removeobject 2 addobject 2 - applymovement 2, SlateportCity_BattleTentBattleRoom_Movement_209A9E + applymovement 2, SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter waitmovement 0 battletent_getopponentintro lockall @@ -58,41 +61,40 @@ SlateportCity_BattleTentBattleRoom_EventScript_2099BE:: @ 82099BE special DoSpecialTrainerBattle waitstate switch VAR_RESULT - case 1, SlateportCity_BattleTentBattleRoom_EventScript_209A39 - -SlateportCity_BattleTentCorridor_EventScript_209A1B:: @ 8209A1B + case 1, SlateportCity_BattleTentBattleRoom_EventScript_DefeatedOpponent +SlateportCity_BattleTent_EventScript_WarpToLobbyLost:: @ 8209A1B frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6 waitstate +@ forced stop -SlateportCity_BattleTentBattleRoom_EventScript_209A39:: @ 8209A39 +SlateportCity_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @ 8209A39 frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT - case 3, SlateportCity_BattleTentBattleRoom_EventScript_209A7B -@ case 3, SlateportCity_BattleTentCorridor_EventScript_209A7B + case 3, SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon setvar VAR_0x8006, 1 warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 3 waitstate +@ forced stop -SlateportCity_BattleTentBattleRoom_EventScript_209A7B:: @ 8209A7B -SlateportCity_BattleTentCorridor_EventScript_209A7B:: @ 8209A7B +SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: @ 8209A7B frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6 waitstate @ forced stop -SlateportCity_BattleTentBattleRoom_Movement_209A99: @ 8209A99 +SlateportCity_BattleTentBattleRoom_Movement_PlayerEnter: @ 8209A99 walk_up walk_up walk_up walk_in_place_fastest_right step_end -SlateportCity_BattleTentBattleRoom_Movement_209A9E: @ 8209A9E +SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter: @ 8209A9E walk_down walk_down walk_down diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 8e9b5f1b4..c786bce01 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -1,51 +1,52 @@ SlateportCity_BattleTentCorridor_MapScripts:: @ 8208E26 - map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentCorridor_MapScript2_208E5B - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentCorridor_MapScript2_208E31 + map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentCorridor_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentCorridor_OnWarp .byte 0 -SlateportCity_BattleTentCorridor_MapScript2_208E31: @ 8208E31 - map_script_2 VAR_TEMP_1, 0, SlateportCity_BattleTentCorridor_EventScript_208E3B + @ This is Slateport Tent's version of the Battle Factory Pre-Battle Room + +SlateportCity_BattleTentCorridor_OnWarp: @ 8208E31 + map_script_2 VAR_TEMP_1, 0, SlateportCity_BattleTentCorridor_EventScript_SetUpObjects .2byte 0 -SlateportCity_BattleTentCorridor_EventScript_208E3B:: @ 8208E3B +SlateportCity_BattleTentCorridor_EventScript_SetUpObjects:: @ 8208E3B setvar VAR_TEMP_1, 1 compare VAR_0x8006, 1 - goto_if_ne SlateportCity_BattleTentCorridor_EventScript_208E56 + goto_if_ne SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth setobjectxy 1, 2, 2 turnobject 1, DIR_SOUTH - -SlateportCity_BattleTentCorridor_EventScript_208E56:: @ 8208E56 +SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth:: @ 8208E56 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -SlateportCity_BattleTentCorridor_MapScript2_208E5B: @ 8208E5B - map_script_2 VAR_TEMP_0, 0, SlateportCity_BattleTentCorridor_EventScript_208E65 +SlateportCity_BattleTentCorridor_OnFrame: @ 8208E5B + map_script_2 VAR_TEMP_0, 0, SlateportCity_BattleTentCorridor_EventScript_EnterCorridor .2byte 0 -SlateportCity_BattleTentCorridor_EventScript_208E65:: @ 8208E65 +SlateportCity_BattleTentCorridor_EventScript_EnterCorridor:: @ 8208E65 compare VAR_0x8006, 1 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_208EEE + goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 - applymovement 1, SlateportCity_BattleTentCorridor_Movement_209062 - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_209059 + applymovement 1, SlateportCity_BattleTentCorridor_Movement_AttendantEnter + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerEnter waitmovement 0 compare VAR_0x8006, 2 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_209044 + goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge slateporttent_generaterentalmons slateporttent_generateopponentmons msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT fadescreen 1 slateporttent_rentmons waitstate -SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4 +SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom:: @ 8208EB4 msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage applymovement 1, Common_Movement_WalkInPlaceFastestUp waitmovement 0 opendoor 2, 1 waitdooranim - applymovement 1, SlateportCity_BattleTentCorridor_Movement_209068 - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_20905E + applymovement 1, SlateportCity_BattleTentCorridor_Movement_AttendantExit + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerExit waitmovement 0 closedoor 2, 1 waitdooranim @@ -53,69 +54,69 @@ SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4 waitstate end -SlateportCity_BattleTentCorridor_EventScript_208EEE:: @ 8208EEE +SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle:: @ 8208EEE factory_setopponentmons factory_resethelditems msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_LetUsRestoreMons, MSGBOX_DEFAULT playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty -SlateportCity_BattleTentCorridor_EventScript_208F0D:: @ 8208F0D +SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent:: @ 8208F0D frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 1 - call_if_eq SlateportCity_BattleTentCorridor_EventScript_209014 + call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent compare VAR_RESULT, 2 - call_if_eq SlateportCity_BattleTentCorridor_EventScript_20901B + call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT - case 0, SlateportCity_BattleTentCorridor_EventScript_208FBB - case 1, SlateportCity_BattleTentCorridor_EventScript_208F5B - case 2, SlateportCity_BattleTentCorridor_EventScript_208F89 + case 0, SlateportCity_BattleTentCorridor_EventScript_AskSwapMon + case 1, SlateportCity_BattleTentCorridor_EventScript_AskPauseChallenge + case 2, SlateportCity_BattleTentCorridor_EventScript_AskRetireChallenge -SlateportCity_BattleTentCorridor_EventScript_208F5B:: @ 8208F5B +SlateportCity_BattleTentCorridor_EventScript_AskPauseChallenge:: @ 8208F5B msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_SaveAndQuitGame, MSGBOX_YESNO switch VAR_RESULT - case NO, SlateportCity_BattleTentCorridor_EventScript_208F0D - case YES, SlateportCity_BattleTentCorridor_EventScript_209022 - case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208F0D + case NO, SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent + case YES, SlateportCity_BattleTentCorridor_EventScript_PauseChallenge + case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent -SlateportCity_BattleTentCorridor_EventScript_208F89:: @ 8208F89 +SlateportCity_BattleTentCorridor_EventScript_AskRetireChallenge:: @ 8208F89 message BattleFrontier_BattleFactoryPreBattleRoom_Text_RetireFromChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, SlateportCity_BattleTentCorridor_EventScript_208F0D - case 0, SlateportCity_BattleTentCorridor_EventScript_209A1B - case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208F0D + case 1, SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent + case 0, SlateportCity_BattleTent_EventScript_WarpToLobbyLost + case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent -SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB +SlateportCity_BattleTentCorridor_EventScript_AskSwapMon:: @ 8208FBB slateporttent_generateopponentmons msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_LikeToSwapMon, MSGBOX_YESNO switch VAR_RESULT - case NO, SlateportCity_BattleTentCorridor_EventScript_208EB4 - case YES, SlateportCity_BattleTentCorridor_EventScript_208FF1 - case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208EB4 + case NO, SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom + case YES, SlateportCity_BattleTentCorridor_EventScript_SwapMons + case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom -SlateportCity_BattleTentCorridor_EventScript_208FF1:: @ 8208FF1 +SlateportCity_BattleTentCorridor_EventScript_SwapMons:: @ 8208FF1 fadescreen 1 slateporttent_swapmons waitstate compare VAR_RESULT, 1 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_208EB4 + goto_if_eq SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT - goto SlateportCity_BattleTentCorridor_EventScript_208EB4 + goto SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom -SlateportCity_BattleTentCorridor_EventScript_209014:: @ 8209014 +SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent:: @ 8209014 message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor2ndOpponent waitmessage return -SlateportCity_BattleTentCorridor_EventScript_20901B:: @ 820901B +SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent:: @ 820901B message BattleFrontier_BattleFactoryPreBattleRoom_Text_ReadyFor3rdOpponent waitmessage return -SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022 +SlateportCity_BattleTentCorridor_EventScript_PauseChallenge:: @ 8209022 message BattleFrontier_BattleFactoryPreBattleRoom_Text_SavingDataPleaseWait waitmessage slateporttent_save CHALLENGE_STATUS_PAUSED @@ -125,25 +126,25 @@ SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022 frontier_reset end -SlateportCity_BattleTentCorridor_EventScript_209044:: @ 8209044 +SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge:: @ 8209044 special SavePlayerParty factory_setparties 0 - goto SlateportCity_BattleTentCorridor_EventScript_208F0D + goto SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent -SlateportCity_BattleTentCorridor_Movement_209059: @ 8209059 +SlateportCity_BattleTentCorridor_Movement_PlayerEnter: @ 8209059 walk_up walk_up walk_up walk_up step_end -SlateportCity_BattleTentCorridor_Movement_20905E: @ 820905E +SlateportCity_BattleTentCorridor_Movement_PlayerExit: @ 820905E walk_up walk_up set_invisible step_end -SlateportCity_BattleTentCorridor_Movement_209062: @ 8209062 +SlateportCity_BattleTentCorridor_Movement_AttendantEnter: @ 8209062 walk_up walk_up walk_up @@ -151,12 +152,14 @@ SlateportCity_BattleTentCorridor_Movement_209062: @ 8209062 walk_in_place_fastest_down step_end -SlateportCity_BattleTentCorridor_Movement_209068: @ 8209068 +SlateportCity_BattleTentCorridor_Movement_AttendantExit: @ 8209068 walk_up set_invisible step_end -SlateportCity_BattleTentCorridor_Text_20906B: @ 820906B +@ Leftover text from when this was a Contest Hall in R/S +@ Unused +SlateportCity_ContestHall_Text_AdviceForContests: @ 820906B .string "Want a tasty little bit of advice\n" .string "for CONTESTS?\p" .string "Using a certain move after another\n" @@ -167,12 +170,14 @@ SlateportCity_BattleTentCorridor_Text_20906B: @ 820906B .string "Of course, your opponents might try\n" .string "disrupting your POKéMON's showing.$" -SlateportCity_BattleTentCorridor_Text_20917A: @ 820917A +@ Unused +SlateportCity_ContestHall_Text_MyPapaIsContestJudge: @ 820917A .string "My papa, he's a CONTEST JUDGE.\p" .string "I wonder what I should be when I\n" .string "grow up, a JUDGE or a GYM LEADER?$" -SlateportCity_BattleTentCorridor_Text_2091DC: @ 82091DC +@ Unused +SlateportCity_ContestHall_Text_ImLikeMajorlyCheesed: @ 82091DC .string "Hey, man, I'm like majorly cheesed,\n" .string "you know. Like, you know, I just\l" .string "wanted to know why my POKéMON\l" @@ -184,7 +189,8 @@ SlateportCity_BattleTentCorridor_Text_2091DC: @ 82091DC .string "Hey, like, you! Zip it, you know?\n" .string "Just, you know, take this!$" -SlateportCity_BattleTentCorridor_Text_209322: @ 8209322 +@ Unused +SlateportCity_ContestHall_Text_ExplainTorment: @ 8209322 .string "That's, like, TM41, you know?\n" .string "Hey, it's TORMENT, you hearing me?\p" .string "Like, it won't let the other guy\n" @@ -192,7 +198,8 @@ SlateportCity_BattleTentCorridor_Text_209322: @ 8209322 .string "Hey, now, you listen here, like,\n" .string "I'm not laying a torment on you!$" -SlateportCity_BattleTentCorridor_Text_2093ED: @ 82093ED +@ Unused +SlateportCity_ContestHall_Text_MCStepUpTakePartInContest: @ 82093ED .string "MC: Oh, my, my!\n" .string "Now isn't that a dandy of a POKéMON?\p" .string "Please! Do step right up and take\n" @@ -200,7 +207,8 @@ SlateportCity_BattleTentCorridor_Text_2093ED: @ 82093ED .string "You'll do well! I'm sure of it!\n" .string "My eyes have never failed me!$" -SlateportCity_BattleTentCorridor_Text_2094A1: @ 82094A1 +@ Unused +SlateportCity_ContestHall_Text_JudgeWouldntDoToMissContest: @ 82094A1 .string "JUDGE: Well, hello there!\n" .string "I see that you're a TRAINER!\p" .string "Then, it just wouldn't do for you\n" @@ -208,17 +216,20 @@ SlateportCity_BattleTentCorridor_Text_2094A1: @ 82094A1 .string "Get a CONTEST PASS in VERDANTURF\n" .string "CITY and enter anytime!$" -SlateportCity_BattleTentCorridor_Text_20954E: @ 820954E +@ Unused +SlateportCity_ContestHall_Text_ItsAppealTime: @ 820954E .string "It's appeal time!\n" .string "What should I lead with?$" -SlateportCity_BattleTentCorridor_Text_209579: @ 8209579 +@ Unused +SlateportCity_ContestHall_Text_DidntPayAttentionToAppeal: @ 8209579 .string "They didn't pay much attention to\n" .string "my POKéMON's appeal…\p" .string "Humph, that JUDGE, he doesn't know\n" .string "a good thing when he sees it.$" -SlateportCity_BattleTentCorridor_Text_2095F1: @ 82095F1 +@ Unused +SlateportCity_ContestHall_Text_RewardWithSageAdvice: @ 82095F1 .string "Oh, hi! You must be a serious fan to get\n" .string "this close to the action.\p" .string "I'll reward your enthusiasm with\n" @@ -230,35 +241,41 @@ SlateportCity_BattleTentCorridor_Text_2095F1: @ 82095F1 .string "Well, you'd think something good has\n" .string "to happen!$" -SlateportCity_BattleTentCorridor_Text_209718: @ 8209718 +@ Unused +SlateportCity_ContestHall_Text_MoreFreakedOutThanMon: @ 8209718 .string "I can't do this! I'm more freaked out\n" .string "than my POKéMON.\p" .string "I'm shivering and my heart is racing!$" -SlateportCity_BattleTentCorridor_Text_209775: @ 8209775 +@ Unused +SlateportCity_ContestHall_Text_BattleAndContestAlike: @ 8209775 .string "A battle and a CONTEST aren't the\n" .string "same, but they are alike, too.\p" .string "You need to work hard and believe\n" .string "in the POKéMON you've raised.$" -SlateportCity_BattleTentCorridor_Text_2097F6: @ 82097F6 +@ Unused +SlateportCity_ContestHall_Text_MonLooksOnTopOfGame: @ 82097F6 .string "That POKéMON looks like it's on top\n" .string "of its game, huh?\p" .string "A POKéMON that does good in the\n" .string "secondary judging seems to be more\l" .string "relaxed when it's doing appeals.$" -SlateportCity_BattleTentCorridor_Text_209890: @ 8209890 +@ Unused +SlateportCity_ContestHall_Text_MyMonBetterThanThatLot: @ 8209890 .string "Will you look at that sorry sight?\p" .string "Heh, my POKéMON's absolutely better\n" .string "than that lot!$" -SlateportCity_BattleTentCorridor_Text_2098E6: @ 82098E6 +@ Unused +SlateportCity_ContestHall_Text_GetUrgeToMoveWithMon: @ 82098E6 .string "Don't you get the urge to move with\n" .string "POKéMON if they're putting on an\l" .string "energetic appeal?$" -SlateportCity_BattleTentCorridor_Text_20993D: @ 820993D +@ Unused +SlateportCity_ContestHall_Text_HyperRankStage: @ 820993D .string "POKéMON CONTESTS\n" .string "HYPER RANK STAGE!$" diff --git a/data/maps/SlateportCity_BattleTentLobby/map.json b/data/maps/SlateportCity_BattleTentLobby/map.json index 45783e2c9..b1d06a144 100644 --- a/data/maps/SlateportCity_BattleTentLobby/map.json +++ b/data/maps/SlateportCity_BattleTentLobby/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_BattleTentLobby_EventScript_2088AA", + "script": "SlateportCity_BattleTentLobby_EventScript_Attendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_BattleTentLobby_EventScript_208A3D", + "script": "SlateportCity_BattleTentLobby_EventScript_TormentGiver", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_BattleTentLobby_EventScript_208A7E", + "script": "SlateportCity_BattleTentLobby_EventScript_Man", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_BattleTentLobby_EventScript_208A87", + "script": "SlateportCity_BattleTentLobby_EventScript_Girl", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "SlateportCity_BattleTentLobby_EventScript_208A90", + "script": "SlateportCity_BattleTentLobby_EventScript_Woman", "flag": "0" } ], @@ -104,7 +104,7 @@ "y": 5, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "SlateportCity_BattleTentLobby_EventScript_208A99" + "script": "SlateportCity_BattleTentLobby_EventScript_RulesBoard" } ] } \ No newline at end of file diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 793e96c10..6a74d6a6f 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -1,32 +1,32 @@ SlateportCity_BattleTentLobby_MapScripts:: @ 8208730 - map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentLobby_MapScript2_20874F - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentLobby_MapScript2_20873B + map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentLobby_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentLobby_OnWarp .byte 0 -SlateportCity_BattleTentLobby_MapScript2_20873B: @ 820873B - map_script_2 VAR_TEMP_1, 0, SlateportCity_BattleTentLobby_EventScript_208745 +SlateportCity_BattleTentLobby_OnWarp: @ 820873B + map_script_2 VAR_TEMP_1, 0, SlateportCity_BattleTentLobby_EventScript_TurnPlayerNorth .2byte 0 -SlateportCity_BattleTentLobby_EventScript_208745:: @ 8208745 +SlateportCity_BattleTentLobby_EventScript_TurnPlayerNorth:: @ 8208745 setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -SlateportCity_BattleTentLobby_MapScript2_20874F: @ 820874F - map_script_2 VAR_TEMP_0, 0, SlateportCity_BattleTentLobby_EventScript_208779 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, SlateportCity_BattleTentLobby_EventScript_208782 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, SlateportCity_BattleTentLobby_EventScript_208871 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, SlateportCity_BattleTentLobby_EventScript_2087B7 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, SlateportCity_BattleTentLobby_EventScript_208837 +SlateportCity_BattleTentLobby_OnFrame: @ 820874F + map_script_2 VAR_TEMP_0, 0, SlateportCity_BattleTentLobby_EventScript_GetChallengeStatus + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, SlateportCity_BattleTentLobby_EventScript_QuitWithoutSaving + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, SlateportCity_BattleTentLobby_EventScript_ResumeChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, SlateportCity_BattleTentLobby_EventScript_WonChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, SlateportCity_BattleTentLobby_EventScript_LostChallenge .2byte 0 -SlateportCity_BattleTentLobby_EventScript_208779:: @ 8208779 +SlateportCity_BattleTentLobby_EventScript_GetChallengeStatus:: @ 8208779 frontier_getstatus end -SlateportCity_BattleTentLobby_EventScript_208782:: @ 8208782 +SlateportCity_BattleTentLobby_EventScript_QuitWithoutSaving:: @ 8208782 lockall - msgbox SlateportCity_BattleTentLobby_Text_2C5DFA, MSGBOX_DEFAULT + msgbox SlateportCity_BattleTentLobby_Text_DidntSaveBeforeQuitting, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_TEMP_0, 255 @@ -34,50 +34,50 @@ SlateportCity_BattleTentLobby_EventScript_208782:: @ 8208782 releaseall end -SlateportCity_BattleTentLobby_EventScript_2087B7:: @ 82087B7 +SlateportCity_BattleTentLobby_EventScript_WonChallenge:: @ 82087B7 lockall - message SlateportCity_BattleTentLobby_Text_2C5C6F + message SlateportCity_BattleTentLobby_Text_WonThreeMatchesReturnMons waitmessage slateporttent_setrandomprize frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 slateporttent_save 0 playse SE_SAVE waitse -SlateportCity_BattleTentLobby_EventScript_2087E9:: @ 82087E9 - msgbox SlateportCity_BattleTentLobby_Text_2C5D14, MSGBOX_DEFAULT +SlateportCity_BattleTentLobby_EventScript_GivePrize:: @ 82087E9 + msgbox SlateportCity_BattleTentLobby_Text_AwardYouThisPrize, MSGBOX_DEFAULT slateporttent_giveprize switch VAR_RESULT - case 0, SlateportCity_BattleTentLobby_EventScript_20882A + case FALSE, SlateportCity_BattleTentLobby_EventScript_NoRoomForPrize frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - message SlateportCity_BattleTentLobby_Text_23F68C + message BattleFrontier_BattleTowerLobby_Text_ReceivedPrize @ Odd that it uses Tower's instead of Factory's or its own waitmessage playfanfare MUS_FANFA4 waitfanfare - goto SlateportCity_BattleTentLobby_EventScript_208861 + goto SlateportCity_BattleTentLobby_EventScript_EndGivePrize -SlateportCity_BattleTentLobby_EventScript_20882A:: @ 820882A - msgbox SlateportCity_BattleTentLobby_Text_2C5D52, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_208861 +SlateportCity_BattleTentLobby_EventScript_NoRoomForPrize:: @ 820882A + msgbox SlateportCity_BattleTentLobby_Text_NoRoomInBagMakeRoom, MSGBOX_DEFAULT + goto SlateportCity_BattleTentLobby_EventScript_EndGivePrize -SlateportCity_BattleTentLobby_EventScript_208837:: @ 8208837 +SlateportCity_BattleTentLobby_EventScript_LostChallenge:: @ 8208837 lockall - message SlateportCity_BattleTentLobby_Text_2C5BA2 + message SlateportCity_BattleTentLobby_Text_ReturnRentalMonsSaveResults waitmessage frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 slateporttent_save 0 playse SE_SAVE waitse -SlateportCity_BattleTentLobby_EventScript_208861:: @ 8208861 - msgbox SlateportCity_BattleTentLobby_Text_2C5AA5, MSGBOX_DEFAULT +SlateportCity_BattleTentLobby_EventScript_EndGivePrize:: @ 8208861 + msgbox SlateportCity_BattleTentLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -SlateportCity_BattleTentLobby_EventScript_208871:: @ 8208871 +SlateportCity_BattleTentLobby_EventScript_ResumeChallenge:: @ 8208871 lockall - message SlateportCity_BattleTentLobby_Text_2C5DA7 + message SlateportCity_BattleTentLobby_Text_BeenWaitingForYou waitmessage slateporttent_save CHALLENGE_STATUS_SAVING playse SE_SAVE @@ -85,37 +85,37 @@ SlateportCity_BattleTentLobby_EventScript_208871:: @ 8208871 frontier_set FRONTIER_DATA_PAUSED, FALSE setvar VAR_TEMP_0, 255 setvar VAR_0x8006, 2 - goto SlateportCity_BattleTentLobby_EventScript_2089AC + goto SlateportCity_BattleTentLobby_EventScript_EnterChallenge -SlateportCity_BattleTentLobby_EventScript_2088AA:: @ 82088AA +SlateportCity_BattleTentLobby_EventScript_Attendant:: @ 82088AA lock faceplayer slateporttent_getprize - compare VAR_RESULT, 0 - goto_if_ne SlateportCity_BattleTentLobby_EventScript_2087E9 + compare VAR_RESULT, ITEM_NONE + goto_if_ne SlateportCity_BattleTentLobby_EventScript_GivePrize special SavePlayerParty - msgbox SlateportCity_BattleTentLobby_Text_2C5810, MSGBOX_DEFAULT -SlateportCity_BattleTentLobby_EventScript_2088CA:: @ 82088CA - message SlateportCity_BattleTentLobby_Text_2C586A + msgbox SlateportCity_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT +SlateportCity_BattleTentLobby_EventScript_AskEnterChallenge:: @ 82088CA + message SlateportCity_BattleTentLobby_Text_TakeChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, 0 switch VAR_RESULT - case 0, SlateportCity_BattleTentLobby_EventScript_208906 - case 1, SlateportCity_BattleTentLobby_EventScript_208A07 - case 2, SlateportCity_BattleTentLobby_EventScript_208A2E - case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_208A2E + case 0, SlateportCity_BattleTentLobby_EventScript_TryEnterChallenge + case 1, SlateportCity_BattleTentLobby_EventScript_ExplainChallenge + case 2, SlateportCity_BattleTentLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_CancelChallenge -SlateportCity_BattleTentLobby_EventScript_208906:: @ 8208906 +SlateportCity_BattleTentLobby_EventScript_TryEnterChallenge:: @ 8208906 setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_FACTORY setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT - msgbox SlateportCity_BattleTentLobby_Text_2C5B06, MSGBOX_YESNO + msgbox SlateportCity_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT - case NO, SlateportCity_BattleTentLobby_EventScript_208A2B - case YES, SlateportCity_BattleTentLobby_EventScript_208950 - case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_208A2B + case NO, SlateportCity_BattleTentLobby_EventScript_LoadPartyCancelChallenge + case YES, SlateportCity_BattleTentLobby_EventScript_SaveBeforeChallenge + case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_LoadPartyCancelChallenge -SlateportCity_BattleTentLobby_EventScript_208950:: @ 8208950 +SlateportCity_BattleTentLobby_EventScript_SaveBeforeChallenge:: @ 8208950 setvar VAR_TEMP_0, 0 frontier_set FRONTIER_DATA_SELECTED_MON_ORDER slateporttent_init @@ -126,156 +126,156 @@ SlateportCity_BattleTentLobby_EventScript_208950:: @ 8208950 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 compare VAR_RESULT, 0 - goto_if_eq SlateportCity_BattleTentLobby_EventScript_208A14 + goto_if_eq SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed setvar VAR_0x8006, 0 -SlateportCity_BattleTentLobby_EventScript_2089AC:: @ 82089AC - msgbox SlateportCity_BattleTentLobby_Text_2C5B8C, MSGBOX_DEFAULT +SlateportCity_BattleTentLobby_EventScript_EnterChallenge:: @ 82089AC + msgbox SlateportCity_BattleTentLobby_Text_StepThisWay, MSGBOX_DEFAULT closemessage - call SlateportCity_BattleTentLobby_EventScript_2089C9 + call SlateportCity_BattleTentLobby_EventScript_WalkToDoor warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 7 setvar VAR_TEMP_0, 0 waitstate end -SlateportCity_BattleTentLobby_EventScript_2089C9:: @ 82089C9 - applymovement 1, SlateportCity_BattleTentLobby_Movement_2089F8 - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_2089FF +SlateportCity_BattleTentLobby_EventScript_WalkToDoor:: @ 82089C9 + applymovement 1, SlateportCity_BattleTentLobby_Movement_AttendantWalkToDoor + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerWalkToDoor waitmovement 0 opendoor 6, 1 waitdooranim - applymovement 1, SlateportCity_BattleTentLobby_Movement_2089FC - applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_208A03 + applymovement 1, SlateportCity_BattleTentLobby_Movement_AttendantEnterDoor + applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 6, 1 waitdooranim return -SlateportCity_BattleTentLobby_Movement_2089F8: @ 82089F8 +SlateportCity_BattleTentLobby_Movement_AttendantWalkToDoor: @ 82089F8 walk_up walk_up walk_up step_end -SlateportCity_BattleTentLobby_Movement_2089FC: @ 82089FC +SlateportCity_BattleTentLobby_Movement_AttendantEnterDoor: @ 82089FC walk_up set_invisible step_end -SlateportCity_BattleTentLobby_Movement_2089FF: @ 82089FF +SlateportCity_BattleTentLobby_Movement_PlayerWalkToDoor: @ 82089FF walk_up walk_up walk_up step_end -SlateportCity_BattleTentLobby_Movement_208A03: @ 8208A03 +SlateportCity_BattleTentLobby_Movement_PlayerEnterDoor: @ 8208A03 walk_up walk_up set_invisible step_end -SlateportCity_BattleTentLobby_EventScript_208A07:: @ 8208A07 - msgbox SlateportCity_BattleTentLobby_Text_2C589C, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_2088CA +SlateportCity_BattleTentLobby_EventScript_ExplainChallenge:: @ 8208A07 + msgbox SlateportCity_BattleTentLobby_Text_ExplainSlateportTent, MSGBOX_DEFAULT + goto SlateportCity_BattleTentLobby_EventScript_AskEnterChallenge -SlateportCity_BattleTentLobby_EventScript_208A14:: @ 8208A14 +SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed:: @ 8208A14 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - goto SlateportCity_BattleTentLobby_EventScript_208A2E + goto SlateportCity_BattleTentLobby_EventScript_CancelChallenge -SlateportCity_BattleTentLobby_EventScript_208A2B:: @ 8208A2B +SlateportCity_BattleTentLobby_EventScript_LoadPartyCancelChallenge:: @ 8208A2B special LoadPlayerParty - -SlateportCity_BattleTentLobby_EventScript_208A2E:: @ 8208A2E - msgbox SlateportCity_BattleTentLobby_Text_2C5AA5, MSGBOX_DEFAULT +SlateportCity_BattleTentLobby_EventScript_CancelChallenge:: @ 8208A2E + msgbox SlateportCity_BattleTentLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT release end -SlateportCity_BattleTentLobby_Movement_208A38:: @ 8208A38 +@ Unused +SlateportCity_BattleTentLobby_Movement_UnusedEnterDoor:: @ 8208A38 walk_up walk_up walk_up set_invisible step_end -SlateportCity_BattleTentLobby_EventScript_208A3D:: @ 8208A3D +SlateportCity_BattleTentLobby_EventScript_TormentGiver:: @ 8208A3D lock faceplayer - goto_if_set FLAG_RECEIVED_TM41, SlateportCity_BattleTentLobby_EventScript_208A74 - msgbox SlateportCity_BattleTentLobby_Text_208B4E, MSGBOX_DEFAULT + goto_if_set FLAG_RECEIVED_TM41, SlateportCity_BattleTentLobby_EventScript_ReceivedTorment + msgbox SlateportCity_BattleTentLobby_Text_CouldntFindMonForMe, MSGBOX_DEFAULT giveitem_std ITEM_TM41 - compare VAR_RESULT, 0 + compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM41 - msgbox SlateportCity_BattleTentLobby_Text_208C5C, MSGBOX_DEFAULT + msgbox SlateportCity_BattleTentLobby_Text_ExplainTorment, MSGBOX_DEFAULT release end -SlateportCity_BattleTentLobby_EventScript_208A74:: @ 8208A74 - msgbox SlateportCity_BattleTentLobby_Text_208C5C, MSGBOX_DEFAULT +SlateportCity_BattleTentLobby_EventScript_ReceivedTorment:: @ 8208A74 + msgbox SlateportCity_BattleTentLobby_Text_ExplainTorment, MSGBOX_DEFAULT release end -SlateportCity_BattleTentLobby_EventScript_208A7E:: @ 8208A7E - msgbox SlateportCity_BattleTentLobby_Text_208D27, MSGBOX_NPC +SlateportCity_BattleTentLobby_EventScript_Man:: @ 8208A7E + msgbox SlateportCity_BattleTentLobby_Text_IllTryUsingBugMons, MSGBOX_NPC end -SlateportCity_BattleTentLobby_EventScript_208A87:: @ 8208A87 - msgbox SlateportCity_BattleTentLobby_Text_208DA6, MSGBOX_NPC +SlateportCity_BattleTentLobby_EventScript_Girl:: @ 8208A87 + msgbox SlateportCity_BattleTentLobby_Text_BattleEvenWithoutToughMons, MSGBOX_NPC end -SlateportCity_BattleTentLobby_EventScript_208A90:: @ 8208A90 - msgbox SlateportCity_BattleTentLobby_Text_208DF1, MSGBOX_NPC +SlateportCity_BattleTentLobby_EventScript_Woman:: @ 8208A90 + msgbox SlateportCity_BattleTentLobby_Text_NiceIfMoreSelection, MSGBOX_NPC end -SlateportCity_BattleTentLobby_EventScript_208A99:: @ 8208A99 +SlateportCity_BattleTentLobby_EventScript_RulesBoard:: @ 8208A99 lockall msgbox BattleFrontier_BattleFactoryLobby_Text_RulesAreListed, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_208AA8 + goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard end -SlateportCity_BattleTentLobby_EventScript_208AA8:: @ 8208AA8 +SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard:: @ 8208AA8 message BattleFrontier_BattleFactoryLobby_Text_ReadWhichHeading waitmessage multichoice 17, 0, MULTI_SLATEPORT_TENT_RULES, 0 switch VAR_RESULT - case 0, SlateportCity_BattleTentLobby_EventScript_208B06 - case 1, SlateportCity_BattleTentLobby_EventScript_208B14 - case 2, SlateportCity_BattleTentLobby_EventScript_208B22 - case 3, SlateportCity_BattleTentLobby_EventScript_208B30 - case 4, SlateportCity_BattleTentLobby_EventScript_208B3E - case 5, SlateportCity_BattleTentLobby_EventScript_208B4C - case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_208B4C + case 0, SlateportCity_BattleTentLobby_EventScript_RulesBasics + case 1, SlateportCity_BattleTentLobby_EventScript_RulesSwapPartner + case 2, SlateportCity_BattleTentLobby_EventScript_RulesSwapNumber + case 3, SlateportCity_BattleTentLobby_EventScript_RulesSwapNotes + case 4, SlateportCity_BattleTentLobby_EventScript_RulesMons + case 5, SlateportCity_BattleTentLobby_EventScript_ExitRules + case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_ExitRules end -SlateportCity_BattleTentLobby_EventScript_208B06:: @ 8208B06 - msgbox SlateportCity_BattleTentLobby_Text_2C5F08, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_208AA8 +SlateportCity_BattleTentLobby_EventScript_RulesBasics:: @ 8208B06 + msgbox SlateportCity_BattleTentLobby_Text_ExplainBasicRules, MSGBOX_DEFAULT + goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard end -SlateportCity_BattleTentLobby_EventScript_208B14:: @ 8208B14 - msgbox SlateportCity_BattleTentLobby_Text_2C5F9D, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_208AA8 +SlateportCity_BattleTentLobby_EventScript_RulesSwapPartner:: @ 8208B14 + msgbox SlateportCity_BattleTentLobby_Text_ExplainSwapPartnerRules, MSGBOX_DEFAULT + goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard end -SlateportCity_BattleTentLobby_EventScript_208B22:: @ 8208B22 - msgbox SlateportCity_BattleTentLobby_Text_2C6020, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_208AA8 +SlateportCity_BattleTentLobby_EventScript_RulesSwapNumber:: @ 8208B22 + msgbox SlateportCity_BattleTentLobby_Text_ExplainSwapNumberRules, MSGBOX_DEFAULT + goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard end -SlateportCity_BattleTentLobby_EventScript_208B30:: @ 8208B30 - msgbox SlateportCity_BattleTentLobby_Text_2C60C0, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_208AA8 +SlateportCity_BattleTentLobby_EventScript_RulesSwapNotes:: @ 8208B30 + msgbox SlateportCity_BattleTentLobby_Text_ExplainSwapNotes, MSGBOX_DEFAULT + goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard end -SlateportCity_BattleTentLobby_EventScript_208B3E:: @ 8208B3E - msgbox SlateportCity_BattleTentLobby_Text_2C61FE, MSGBOX_DEFAULT - goto SlateportCity_BattleTentLobby_EventScript_208AA8 +SlateportCity_BattleTentLobby_EventScript_RulesMons:: @ 8208B3E + msgbox SlateportCity_BattleTentLobby_Text_ExplainMonRules, MSGBOX_DEFAULT + goto SlateportCity_BattleTentLobby_EventScript_ReadRulesBoard end -SlateportCity_BattleTentLobby_EventScript_208B4C:: @ 8208B4C +SlateportCity_BattleTentLobby_EventScript_ExitRules:: @ 8208B4C releaseall end -SlateportCity_BattleTentLobby_Text_208B4E: @ 8208B4E +SlateportCity_BattleTentLobby_Text_CouldntFindMonForMe: @ 8208B4E .string "So, like, I couldn't find myself any\n" .string "POKéMON that were, like, for me.\p" .string "So, I figured, like, hey, I should file\n" @@ -285,7 +285,7 @@ SlateportCity_BattleTentLobby_Text_208B4E: @ 8208B4E .string "Hey, like, you! Zip it, you know?\n" .string "Just, you know, take this!$" -SlateportCity_BattleTentLobby_Text_208C5C: @ 8208C5C +SlateportCity_BattleTentLobby_Text_ExplainTorment: @ 8208C5C .string "That's, like, TM41, you know?\n" .string "Hey, it's TORMENT, you hearing me?\p" .string "Like, it won't let the other guy\n" @@ -293,18 +293,18 @@ SlateportCity_BattleTentLobby_Text_208C5C: @ 8208C5C .string "Hey, now, you listen here, like,\n" .string "I'm not laying a torment on you!$" -SlateportCity_BattleTentLobby_Text_208D27: @ 8208D27 +SlateportCity_BattleTentLobby_Text_IllTryUsingBugMons: @ 8208D27 .string "I don't really like BUG POKéMON,\n" .string "but maybe I'll try using some for\l" .string "a change of pace.\p" .string "Who knows, I might even get to like\n" .string "them!$" -SlateportCity_BattleTentLobby_Text_208DA6: @ 8208DA6 +SlateportCity_BattleTentLobby_Text_BattleEvenWithoutToughMons: @ 8208DA6 .string "You can battle all you want here even\n" .string "if you don't have any tough POKéMON.$" -SlateportCity_BattleTentLobby_Text_208DF1: @ 8208DF1 +SlateportCity_BattleTentLobby_Text_NiceIfMoreSelection: @ 8208DF1 .string "Wouldn't it be nice if they had more of\n" .string "a selection?$" diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index 4760880e2..31004fa3d 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -1,68 +1,70 @@ VerdanturfTown_BattleTentBattleRoom_MapScripts:: @ 82022FA map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_BattleTentBattleRoom_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentBattleRoom_MapScript2_20233E - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentBattleRoom_MapScript2_202541 + map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentBattleRoom_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentBattleRoom_OnWarp .byte 0 + @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden + @ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_1 + @ The opponent is represented by object event 2, which has the gfx id VAR_OBJ_GFX_ID_0 + VerdanturfTown_BattleTentBattleRoom_OnTransition: @ 820230A - call VerdanturfTown_BattleTentBattleRoom_EventScript_202310 + call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx end -VerdanturfTown_BattleTentBattleRoom_EventScript_202310:: @ 8202310 +VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: @ 8202310 checkplayergender compare VAR_RESULT, MALE - goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_202328 + goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale compare VAR_RESULT, FEMALE - goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_202333 + goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return -VerdanturfTown_BattleTentBattleRoom_EventScript_202328:: @ 8202328 +VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @ 8202328 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL return -VerdanturfTown_BattleTentBattleRoom_EventScript_202333:: @ 8202333 +VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale:: @ 8202333 setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL return -VerdanturfTown_BattleTentBattleRoom_MapScript2_20233E: @ 820233E - map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_202348 +VerdanturfTown_BattleTentBattleRoom_OnFrame: @ 820233E + map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom .2byte 0 -VerdanturfTown_BattleTentBattleRoom_EventScript_202348:: @ 8202348 +VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom:: @ 8202348 showobjectat 1, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM - applymovement 1, VerdanturfTown_BattleTentBattleRoom_Movement_202575 + applymovement 1, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 0 - goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_20243C - -VerdanturfTown_BattleTentBattleRoom_EventScript_20236F:: @ 820236F + goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge +VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: @ 820236F tower_setopponent addobject 2 - applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_20257B + applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter waitmovement 0 battletent_getopponentintro msgbox gStringVar4, MSGBOX_DEFAULT waitmessage call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle switch VAR_RESULT - case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_2023C8 - -VerdanturfTown_BattleTentBattleRoom_EventScript_2023AA:: @ 82023AA + case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent +VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: @ 82023AA frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 waitstate -VerdanturfTown_BattleTentBattleRoom_EventScript_2023C8:: @ 82023C8 +VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @ 82023C8 frontier_get FRONTIER_DATA_BATTLE_NUM addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT - case 3, VerdanturfTown_BattleTentBattleRoom_EventScript_202501 - applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_202581 + case 3, VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon + applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit waitmovement 0 removeobject 2 applymovement 3, Common_Movement_WalkInPlaceFastestDown @@ -76,48 +78,48 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_2023C8:: @ 82023C8 waitfanfare special HealPlayerParty -VerdanturfTown_BattleTentBattleRoom_EventScript_20243C:: @ 820243C +VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: @ 820243C frontier_get FRONTIER_DATA_BATTLE_NUM compare VAR_RESULT, 1 - call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_202565 + call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent compare VAR_RESULT, 2 - call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_20256C + call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1 switch VAR_RESULT - case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_2024EA - case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_20248A - case 2, VerdanturfTown_BattleTentBattleRoom_EventScript_2024B8 + case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge + case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_AskPauseChallenge + case 2, VerdanturfTown_BattleTentBattleRoom_EventScript_AskRetireChallenge -VerdanturfTown_BattleTentBattleRoom_EventScript_20248A:: @ 820248A +VerdanturfTown_BattleTentBattleRoom_EventScript_AskPauseChallenge:: @ 820248A msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SaveAndQuitGame, MSGBOX_YESNO switch VAR_RESULT - case NO, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C - case YES, VerdanturfTown_BattleTentBattleRoom_EventScript_20251F - case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C + case NO, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge + case YES, VerdanturfTown_BattleTentBattleRoom_EventScript_PauseChallenge + case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge -VerdanturfTown_BattleTentBattleRoom_EventScript_2024B8:: @ 82024B8 +VerdanturfTown_BattleTentBattleRoom_EventScript_AskRetireChallenge:: @ 82024B8 message BattleFrontier_BattlePalaceBattleRoom_Text_WishToQuitChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, 0 switch VAR_RESULT - case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C - case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_2023AA - case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_20243C + case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge + case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost + case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge -VerdanturfTown_BattleTentBattleRoom_EventScript_2024EA:: @ 82024EA +VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: @ 82024EA applymovement 3, Common_Movement_WalkInPlaceFastestRight applymovement 1, Common_Movement_WalkInPlaceFastestRight waitmovement 0 closemessage - goto VerdanturfTown_BattleTentBattleRoom_EventScript_20236F + goto VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter -VerdanturfTown_BattleTentBattleRoom_EventScript_202501:: @ 8202501 +VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: @ 8202501 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 waitstate -VerdanturfTown_BattleTentBattleRoom_EventScript_20251F:: @ 820251F +VerdanturfTown_BattleTentBattleRoom_EventScript_PauseChallenge:: @ 820251F message BattleFrontier_BattlePalaceBattleRoom_Text_SavingData waitmessage verdanturftent_save CHALLENGE_STATUS_PAUSED @@ -127,33 +129,33 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20251F:: @ 820251F frontier_reset end -VerdanturfTown_BattleTentBattleRoom_MapScript2_202541: @ 8202541 - map_script_2 VAR_TEMP_1, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_20254B +VerdanturfTown_BattleTentBattleRoom_OnWarp: @ 8202541 + map_script_2 VAR_TEMP_1, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_SetUpObjects .2byte 0 -VerdanturfTown_BattleTentBattleRoom_EventScript_20254B:: @ 820254B +VerdanturfTown_BattleTentBattleRoom_EventScript_SetUpObjects:: @ 820254B hideobjectat 1, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM - call VerdanturfTown_BattleTentBattleRoom_EventScript_202310 + call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx setvar VAR_TEMP_1, 1 - applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_202573 + applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_SetInvisible removeobject 2 end -VerdanturfTown_BattleTentBattleRoom_EventScript_202565:: @ 8202565 +VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent:: @ 8202565 message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor2ndOpponent waitmessage return -VerdanturfTown_BattleTentBattleRoom_EventScript_20256C:: @ 820256C +VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent:: @ 820256C message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor3rdOpponent waitmessage return -VerdanturfTown_BattleTentBattleRoom_Movement_202573: @ 8202573 +VerdanturfTown_BattleTentBattleRoom_Movement_SetInvisible: @ 8202573 set_invisible step_end -VerdanturfTown_BattleTentBattleRoom_Movement_202575: @ 8202575 +VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter: @ 8202575 set_visible walk_up walk_up @@ -161,7 +163,7 @@ VerdanturfTown_BattleTentBattleRoom_Movement_202575: @ 8202575 face_right step_end -VerdanturfTown_BattleTentBattleRoom_Movement_20257B: @ 820257B +VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter: @ 820257B walk_down walk_down walk_down @@ -169,7 +171,7 @@ VerdanturfTown_BattleTentBattleRoom_Movement_20257B: @ 820257B face_left step_end -VerdanturfTown_BattleTentBattleRoom_Movement_202581: @ 8202581 +VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit: @ 8202581 walk_up walk_up walk_up diff --git a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc index 907ef3fd6..05991bef0 100644 --- a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc @@ -1,21 +1,21 @@ VerdanturfTown_BattleTentCorridor_MapScripts:: @ 820208A - map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentCorridor_MapScript2_202090 + map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentCorridor_OnFrame .byte 0 -VerdanturfTown_BattleTentCorridor_MapScript2_202090: @ 8202090 - map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentCorridor_EventScript_20209A +VerdanturfTown_BattleTentCorridor_OnFrame: @ 8202090 + map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentCorridor_EventScript_EnterCorridor .2byte 0 -VerdanturfTown_BattleTentCorridor_EventScript_20209A:: @ 820209A +VerdanturfTown_BattleTentCorridor_EventScript_EnterCorridor:: @ 820209A lockall setvar VAR_TEMP_0, 1 - applymovement 1, VerdanturfTown_BattleTentCorridor_Movement_2020DE - applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_2020DE + applymovement 1, VerdanturfTown_BattleTentCorridor_Movement_WalkToDoor + applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_WalkToDoor waitmovement 0 opendoor 2, 1 waitdooranim - applymovement 1, VerdanturfTown_BattleTentCorridor_Movement_2020E4 - applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_2020E3 + applymovement 1, VerdanturfTown_BattleTentCorridor_Movement_AttendantEnterDoor + applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_PlayerEnterDoor waitmovement 0 closedoor 2, 1 waitdooranim @@ -25,22 +25,24 @@ VerdanturfTown_BattleTentCorridor_EventScript_20209A:: @ 820209A releaseall end -VerdanturfTown_BattleTentCorridor_Movement_2020DE: @ 82020DE +VerdanturfTown_BattleTentCorridor_Movement_WalkToDoor: @ 82020DE walk_up walk_up walk_up walk_up step_end -VerdanturfTown_BattleTentCorridor_Movement_2020E3: @ 82020E3 +VerdanturfTown_BattleTentCorridor_Movement_PlayerEnterDoor: @ 82020E3 walk_up - -VerdanturfTown_BattleTentCorridor_Movement_2020E4: @ 82020E4 +VerdanturfTown_BattleTentCorridor_Movement_AttendantEnterDoor: @ 82020E4 walk_up set_invisible step_end -VerdanturfTown_BattleTentCorridor_Text_2020E7: @ 82020E7 + +@ Leftover text from when this was a Contest Hall in R/S +@ Unused +VerdanturfTown_ContestHall_Text_WhichContestYouEntering: @ 82020E7 .string "Which CONTEST are you entering?\n" .string "Want a piece of advice?\p" .string "In any CONTEST, for example, a CUTE\n" @@ -49,21 +51,24 @@ VerdanturfTown_BattleTentCorridor_Text_2020E7: @ 82020E7 .string "You need to work out ways for raising\n" .string "POKéMON better.$" -VerdanturfTown_BattleTentCorridor_Text_2021C4: @ 82021C4 +@ Unused +VerdanturfTown_ContestHall_Text_RaisedMonToBeCute: @ 82021C4 .string "I raised my POKéMON to be cute.\p" .string "I found out you can put POKéMON in\n" .string "a CONTEST for cuteness!\p" .string "I'm so glad I raised my POKéMON with\n" .string "loving care…$" -VerdanturfTown_BattleTentCorridor_Text_202251: @ 8202251 +@ Unused +VerdanturfTown_ContestHall_Text_MyMonRules: @ 8202251 .string "My POKéMON rules!\p" .string "It's cool, tough yet beautiful, cute,\n" .string "and smart. It's complete!\p" .string "I may as well go for wins in every\n" .string "single CONTEST.$" -VerdanturfTown_BattleTentCorridor_Text_2022D6: @ 82022D6 +@ Unused +VerdanturfTown_ContestHall_Text_NormalRankStage: @ 82022D6 .string "POKéMON CONTESTS\n" .string "NORMAL RANK STAGE!$" diff --git a/data/maps/VerdanturfTown_BattleTentLobby/map.json b/data/maps/VerdanturfTown_BattleTentLobby/map.json index 2a5660271..adc0be316 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/map.json +++ b/data/maps/VerdanturfTown_BattleTentLobby/map.json @@ -24,7 +24,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "VerdanturfTown_BattleTentLobby_EventScript_201873", + "script": "VerdanturfTown_BattleTentLobby_EventScript_Attendant", "flag": "0" }, { @@ -37,7 +37,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "VerdanturfTown_BattleTentLobby_EventScript_201A7B", + "script": "VerdanturfTown_BattleTentLobby_EventScript_AttractGiver", "flag": "0" }, { @@ -50,7 +50,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "VerdanturfTown_BattleTentLobby_EventScript_201ABC", + "script": "VerdanturfTown_BattleTentLobby_EventScript_Boy1", "flag": "0" }, { @@ -63,7 +63,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "VerdanturfTown_BattleTentLobby_EventScript_201AC5", + "script": "VerdanturfTown_BattleTentLobby_EventScript_Boy2", "flag": "0" }, { @@ -76,7 +76,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "VerdanturfTown_BattleTentLobby_EventScript_201AD0", + "script": "VerdanturfTown_BattleTentLobby_EventScript_Scott", "flag": "FLAG_HIDE_VERDANTURF_TOWN_SCOTT" }, { @@ -89,7 +89,7 @@ "movement_range_y": 1, "trainer_type": "0", "trainer_sight_or_berry_tree_id": "0", - "script": "VerdanturfTown_BattleTentLobby_EventScript_201AF7", + "script": "VerdanturfTown_BattleTentLobby_EventScript_LittleBoy", "flag": "0" } ], @@ -117,7 +117,7 @@ "y": 5, "elevation": 0, "player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY", - "script": "VerdanturfTown_BattleTentLobby_EventScript_201B02" + "script": "VerdanturfTown_BattleTentLobby_EventScript_RulesBoard" } ] } \ No newline at end of file diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index f15bbd4f8..7e450dac4 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -1,30 +1,30 @@ VerdanturfTown_BattleTentLobby_MapScripts:: @ 82016D0 - map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentLobby_MapScript2_2016EF - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentLobby_MapScript2_2016DB + map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentLobby_OnFrame + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentLobby_OnWarp .byte 0 -VerdanturfTown_BattleTentLobby_MapScript2_2016DB: @ 82016DB - map_script_2 VAR_TEMP_1, 0, VerdanturfTown_BattleTentLobby_EventScript_2016E5 +VerdanturfTown_BattleTentLobby_OnWarp: @ 82016DB + map_script_2 VAR_TEMP_1, 0, VerdanturfTown_BattleTentLobby_EventScript_TurnPlayerNorth .2byte 0 -VerdanturfTown_BattleTentLobby_EventScript_2016E5:: @ 82016E5 +VerdanturfTown_BattleTentLobby_EventScript_TurnPlayerNorth:: @ 82016E5 setvar VAR_TEMP_1, 1 turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH end -VerdanturfTown_BattleTentLobby_MapScript2_2016EF: @ 82016EF - map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentLobby_EventScript_201719 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, VerdanturfTown_BattleTentLobby_EventScript_201722 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, VerdanturfTown_BattleTentLobby_EventScript_201837 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, VerdanturfTown_BattleTentLobby_EventScript_201757 - map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, VerdanturfTown_BattleTentLobby_EventScript_2017FD +VerdanturfTown_BattleTentLobby_OnFrame: @ 82016EF + map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentLobby_EventScript_GetChallengeStatus + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, VerdanturfTown_BattleTentLobby_EventScript_QuitWithoutSaving + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, VerdanturfTown_BattleTentLobby_EventScript_ResumeChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, VerdanturfTown_BattleTentLobby_EventScript_WonChallenge + map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, VerdanturfTown_BattleTentLobby_EventScript_LostChallenge .2byte 0 -VerdanturfTown_BattleTentLobby_EventScript_201719:: @ 8201719 +VerdanturfTown_BattleTentLobby_EventScript_GetChallengeStatus:: @ 8201719 frontier_getstatus end -VerdanturfTown_BattleTentLobby_EventScript_201722:: @ 8201722 +VerdanturfTown_BattleTentLobby_EventScript_QuitWithoutSaving:: @ 8201722 lockall msgbox BattleFrontier_BattlePalaceLobby_Text_FailedToSaveBeforeEndingChallenge, MSGBOX_DEFAULT closemessage @@ -34,10 +34,10 @@ VerdanturfTown_BattleTentLobby_EventScript_201722:: @ 8201722 releaseall end -VerdanturfTown_BattleTentLobby_EventScript_201757:: @ 8201757 +VerdanturfTown_BattleTentLobby_EventScript_WonChallenge:: @ 8201757 lockall - msgbox VerdanturfTown_BattleTentLobby_Text_2C5731, MSGBOX_DEFAULT - message VerdanturfTown_BattleTentLobby_Text_2C5791 + msgbox VerdanturfTown_BattleTentLobby_Text_AchievedThreeWinStreak, MSGBOX_DEFAULT + message VerdanturfTown_BattleTentLobby_Text_FeatWillBeRecorded waitmessage verdanturftent_setrandomprize frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 @@ -45,23 +45,23 @@ VerdanturfTown_BattleTentLobby_EventScript_201757:: @ 8201757 playse SE_SAVE waitse -VerdanturfTown_BattleTentLobby_EventScript_201791:: @ 8201791 - msgbox VerdanturfTown_BattleTentLobby_Text_2C57CD, MSGBOX_DEFAULT +VerdanturfTown_BattleTentLobby_EventScript_GivePrize:: @ 8201791 + msgbox VerdanturfTown_BattleTentLobby_Text_PresentYouWithPrize, MSGBOX_DEFAULT verdanturftent_giveprize switch VAR_RESULT - case 0, VerdanturfTown_BattleTentLobby_EventScript_2017DD + case FALSE, VerdanturfTown_BattleTentLobby_EventScript_NoRoomForPrize frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - message VerdanturfTown_BattleTentLobby_Text_24A554 + message BattleFrontier_BattleDomeLobby_Text_ReceivedPrize @ Odd that it used Dome's copy instead of Palace's waitmessage playfanfare MUS_FANFA4 waitfanfare - msgbox VerdanturfTown_BattleTentLobby_Text_2C539A, MSGBOX_DEFAULT + msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -VerdanturfTown_BattleTentLobby_EventScript_2017DD:: @ 82017DD +VerdanturfTown_BattleTentLobby_EventScript_NoRoomForPrize:: @ 82017DD msgbox BattleFrontier_BattlePalaceLobby_Text_NoSpaceForPrize, MSGBOX_DEFAULT waitmessage closemessage @@ -69,27 +69,27 @@ VerdanturfTown_BattleTentLobby_EventScript_2017DD:: @ 82017DD releaseall end -VerdanturfTown_BattleTentLobby_EventScript_2017EE:: @ 82017EE +VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting:: @ 82017EE lockall - msgbox VerdanturfTown_BattleTentLobby_Text_2C5731, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201791 + msgbox VerdanturfTown_BattleTentLobby_Text_AchievedThreeWinStreak, MSGBOX_DEFAULT + goto VerdanturfTown_BattleTentLobby_EventScript_GivePrize end -VerdanturfTown_BattleTentLobby_EventScript_2017FD:: @ 82017FD +VerdanturfTown_BattleTentLobby_EventScript_LostChallenge:: @ 82017FD lockall - message VerdanturfTown_BattleTentLobby_Text_2C56B8 + message VerdanturfTown_BattleTentLobby_Text_ResultsWillBeRecorded waitmessage frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 verdanturftent_save 0 playse SE_SAVE waitse - msgbox VerdanturfTown_BattleTentLobby_Text_2C539A, MSGBOX_DEFAULT + msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT closemessage setvar VAR_TEMP_0, 255 releaseall end -VerdanturfTown_BattleTentLobby_EventScript_201837:: @ 8201837 +VerdanturfTown_BattleTentLobby_EventScript_ResumeChallenge:: @ 8201837 lockall msgbox BattleFrontier_BattlePalaceLobby_Text_WeHaveBeenWaiting, MSGBOX_DEFAULT message BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge @@ -99,50 +99,49 @@ VerdanturfTown_BattleTentLobby_EventScript_201837:: @ 8201837 waitse frontier_set FRONTIER_DATA_PAUSED, FALSE setvar VAR_TEMP_0, 255 - goto VerdanturfTown_BattleTentLobby_EventScript_2019AE + goto VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge -VerdanturfTown_BattleTentLobby_EventScript_201873:: @ 8201873 +VerdanturfTown_BattleTentLobby_EventScript_Attendant:: @ 8201873 lock faceplayer verdanturftent_getprize - compare VAR_RESULT, 0 - goto_if_ne VerdanturfTown_BattleTentLobby_EventScript_2017EE + compare VAR_RESULT, ITEM_NONE + goto_if_ne VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting special SavePlayerParty - msgbox VerdanturfTown_BattleTentLobby_Text_2C50C3, MSGBOX_DEFAULT - -VerdanturfTown_BattleTentLobby_EventScript_201893:: @ 8201893 - message VerdanturfTown_BattleTentLobby_Text_2C5129 + msgbox VerdanturfTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT +VerdanturfTown_BattleTentLobby_EventScript_AskEnterChallenge:: @ 8201893 + message VerdanturfTown_BattleTentLobby_Text_TakeChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, 0 switch VAR_RESULT - case 0, VerdanturfTown_BattleTentLobby_EventScript_2018CF - case 1, VerdanturfTown_BattleTentLobby_EventScript_2019DB - case 2, VerdanturfTown_BattleTentLobby_EventScript_201A37 - case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_201A37 + case 0, VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge + case 1, VerdanturfTown_BattleTentLobby_EventScript_ExplainChallenge + case 2, VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge + case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge -VerdanturfTown_BattleTentLobby_EventScript_2018CF:: @ 82018CF +VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge:: @ 82018CF setvar VAR_FRONTIER_FACILITY, FRONTIER_FACILITY_PALACE setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_RESULT, 2 frontier_checkineligible compare VAR_0x8004, TRUE - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_2019E8 + goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT - msgbox VerdanturfTown_BattleTentLobby_Text_2C5633, MSGBOX_DEFAULT + msgbox VerdanturfTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen 1 setvar VAR_0x8004, 1 setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate compare VAR_RESULT, 0 - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_201A34 - msgbox VerdanturfTown_BattleTentLobby_Text_2C5662, MSGBOX_YESNO + goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + msgbox VerdanturfTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT - case NO, VerdanturfTown_BattleTentLobby_EventScript_201A34 - case YES, VerdanturfTown_BattleTentLobby_EventScript_201954 - case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_201A34 + case NO, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + case YES, VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge + case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge -VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954 +VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge:: @ 8201954 setvar VAR_TEMP_0, 0 frontier_set FRONTIER_DATA_SELECTED_MON_ORDER verdanturftent_init @@ -154,185 +153,184 @@ VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 compare VAR_RESULT, 0 - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_201A1D - -VerdanturfTown_BattleTentLobby_EventScript_2019AE:: @ 82019AE + goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed +VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge:: @ 82019AE special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE - msgbox VerdanturfTown_BattleTentLobby_Text_2C56A2, MSGBOX_DEFAULT + msgbox VerdanturfTown_BattleTentLobby_Text_NowFollowMe, MSGBOX_DEFAULT closemessage - call VerdanturfTown_BattleTentLobby_EventScript_201A41 + call VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7 setvar VAR_TEMP_0, 0 waitstate end -VerdanturfTown_BattleTentLobby_EventScript_2019DB:: @ 82019DB - msgbox VerdanturfTown_BattleTentLobby_Text_2C5163, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201893 +VerdanturfTown_BattleTentLobby_EventScript_ExplainChallenge:: @ 82019DB + msgbox VerdanturfTown_BattleTentLobby_Text_ExplainVerdanturfTent, MSGBOX_DEFAULT + goto VerdanturfTown_BattleTentLobby_EventScript_AskEnterChallenge -VerdanturfTown_BattleTentLobby_EventScript_2019E8:: @ 82019E8 +VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons:: @ 82019E8 switch VAR_RESULT - case FRONTIER_LVL_50, VerdanturfTown_BattleTentLobby_EventScript_201A03 - case FRONTIER_LVL_OPEN, VerdanturfTown_BattleTentLobby_EventScript_201A10 + case FRONTIER_LVL_50, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLv50 + case FRONTIER_LVL_OPEN, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLvOpen -VerdanturfTown_BattleTentLobby_EventScript_201A03:: @ 8201A03 - msgbox VerdanturfTown_BattleTentLobby_Text_2C543D, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201A3F +VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLv50:: @ 8201A03 + msgbox VerdanturfTown_BattleTentLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT + goto VerdanturfTown_BattleTentLobby_EventScript_EndCancelChallenge -VerdanturfTown_BattleTentLobby_EventScript_201A10:: @ 8201A10 - msgbox VerdanturfTown_BattleTentLobby_Text_2C5538, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201A3F +VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMonsLvOpen:: @ 8201A10 + msgbox VerdanturfTown_BattleTentLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT + goto VerdanturfTown_BattleTentLobby_EventScript_EndCancelChallenge -VerdanturfTown_BattleTentLobby_EventScript_201A1D:: @ 8201A1D +VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed:: @ 8201A1D frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 - goto VerdanturfTown_BattleTentLobby_EventScript_201A37 + goto VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge -VerdanturfTown_BattleTentLobby_EventScript_201A34:: @ 8201A34 +VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge:: @ 8201A34 special LoadPlayerParty -VerdanturfTown_BattleTentLobby_EventScript_201A37:: @ 8201A37 - msgbox VerdanturfTown_BattleTentLobby_Text_2C539A, MSGBOX_DEFAULT -VerdanturfTown_BattleTentLobby_EventScript_201A3F:: @ 8201A3F +VerdanturfTown_BattleTentLobby_EventScript_CancelChallenge:: @ 8201A37 + msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT +VerdanturfTown_BattleTentLobby_EventScript_EndCancelChallenge:: @ 8201A3F release end -VerdanturfTown_BattleTentLobby_EventScript_201A41:: @ 8201A41 - applymovement 1, VerdanturfTown_BattleTentLobby_Movement_201A70 - applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_201A70 +VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor:: @ 8201A41 + applymovement 1, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor + applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor waitmovement 0 opendoor 6, 1 waitdooranim - applymovement 1, VerdanturfTown_BattleTentLobby_Movement_201A74 - applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_201A77 + applymovement 1, VerdanturfTown_BattleTentLobby_Movement_AttendantEnterDoor + applymovement EVENT_OBJ_ID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 6, 1 waitdooranim return -VerdanturfTown_BattleTentLobby_Movement_201A70: @ 8201A70 +VerdanturfTown_BattleTentLobby_Movement_WalkToDoor: @ 8201A70 walk_up walk_up walk_up step_end -VerdanturfTown_BattleTentLobby_Movement_201A74: @ 8201A74 +VerdanturfTown_BattleTentLobby_Movement_AttendantEnterDoor: @ 8201A74 walk_up set_invisible step_end -VerdanturfTown_BattleTentLobby_Movement_201A77: @ 8201A77 +VerdanturfTown_BattleTentLobby_Movement_PlayerEnterDoor: @ 8201A77 walk_up walk_up set_invisible step_end -VerdanturfTown_BattleTentLobby_EventScript_201A7B:: @ 8201A7B +VerdanturfTown_BattleTentLobby_EventScript_AttractGiver:: @ 8201A7B lock faceplayer - goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_BattleTentLobby_EventScript_201AB2 - msgbox VerdanturfTown_BattleTentLobby_Text_201D9E, MSGBOX_DEFAULT + goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract + msgbox VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep, MSGBOX_DEFAULT giveitem_std ITEM_TM45 compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM45 - msgbox VerdanturfTown_BattleTentLobby_Text_201E43, MSGBOX_DEFAULT + msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT release end -VerdanturfTown_BattleTentLobby_EventScript_201AB2:: @ 8201AB2 - msgbox VerdanturfTown_BattleTentLobby_Text_201E43, MSGBOX_DEFAULT +VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract:: @ 8201AB2 + msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT release end -VerdanturfTown_BattleTentLobby_EventScript_201ABC:: @ 8201ABC - msgbox VerdanturfTown_BattleTentLobby_Text_201EB1, MSGBOX_NPC +VerdanturfTown_BattleTentLobby_EventScript_Boy1:: @ 8201ABC + msgbox VerdanturfTown_BattleTentLobby_Text_TaughtWhatKindsOfMoves, MSGBOX_NPC end -VerdanturfTown_BattleTentLobby_EventScript_201AC5:: @ 8201AC5 +VerdanturfTown_BattleTentLobby_EventScript_Boy2:: @ 8201AC5 lock - msgbox VerdanturfTown_BattleTentLobby_Text_201BD4, MSGBOX_DEFAULT + msgbox VerdanturfTown_BattleTentLobby_Text_MonsReluctantToUseDislikedMoves, MSGBOX_DEFAULT release end -VerdanturfTown_BattleTentLobby_EventScript_201AD0:: @ 8201AD0 +VerdanturfTown_BattleTentLobby_EventScript_Scott:: @ 8201AD0 lock faceplayer - goto_if_set FLAG_MET_SCOTT_IN_VERDANTURF, VerdanturfTown_BattleTentLobby_EventScript_201AED - msgbox VerdanturfTown_BattleTentLobby_Text_201F3F, MSGBOX_DEFAULT + goto_if_set FLAG_MET_SCOTT_IN_VERDANTURF, VerdanturfTown_BattleTentLobby_EventScript_ScottAlreadySpokenTo + msgbox VerdanturfTown_BattleTentLobby_Text_ScottCanMeetToughTrainers, MSGBOX_DEFAULT addvar VAR_SCOTT_STATE, 1 setflag FLAG_MET_SCOTT_IN_VERDANTURF release end -VerdanturfTown_BattleTentLobby_EventScript_201AED:: @ 8201AED - msgbox VerdanturfTown_BattleTentLobby_Text_202025, MSGBOX_DEFAULT +VerdanturfTown_BattleTentLobby_EventScript_ScottAlreadySpokenTo:: @ 8201AED + msgbox VerdanturfTown_BattleTentLobby_Text_ScottVisitRegularly, MSGBOX_DEFAULT release end -VerdanturfTown_BattleTentLobby_EventScript_201AF7:: @ 8201AF7 +VerdanturfTown_BattleTentLobby_EventScript_LittleBoy:: @ 8201AF7 lock - msgbox VerdanturfTown_BattleTentLobby_Text_201D11, MSGBOX_DEFAULT + msgbox VerdanturfTown_BattleTentLobby_Text_GentleMonsScaryIfAngry, MSGBOX_DEFAULT release end -VerdanturfTown_BattleTentLobby_EventScript_201B02:: @ 8201B02 +VerdanturfTown_BattleTentLobby_EventScript_RulesBoard:: @ 8201B02 lockall - msgbox VerdanturfTown_BattleTentLobby_Text_2C6878, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201B11 + msgbox VerdanturfTown_BattleTentLobby_Text_RulesAreListed, MSGBOX_DEFAULT + goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard end -VerdanturfTown_BattleTentLobby_EventScript_201B11:: @ 8201B11 +VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard:: @ 8201B11 message BattleFrontier_BattlePalaceLobby_Text_ReadWhichHeading waitmessage setvar VAR_0x8004, SCROLL_MULTI_BATTLE_TENT_RULES special ShowScrollableMultichoice waitstate switch VAR_RESULT - case 0, VerdanturfTown_BattleTentLobby_EventScript_201B7E - case 1, VerdanturfTown_BattleTentLobby_EventScript_201B8C - case 2, VerdanturfTown_BattleTentLobby_EventScript_201B9A - case 3, VerdanturfTown_BattleTentLobby_EventScript_201BA8 - case 4, VerdanturfTown_BattleTentLobby_EventScript_201BB6 - case 5, VerdanturfTown_BattleTentLobby_EventScript_201BC4 - case 6, VerdanturfTown_BattleTentLobby_EventScript_201BD2 - case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_201BD2 + case 0, VerdanturfTown_BattleTentLobby_EventScript_RulesLevel + case 1, VerdanturfTown_BattleTentLobby_EventScript_RulesBasics + case 2, VerdanturfTown_BattleTentLobby_EventScript_RulesNature + case 3, VerdanturfTown_BattleTentLobby_EventScript_RulesMoves + case 4, VerdanturfTown_BattleTentLobby_EventScript_RulesUnderpowered + case 5, VerdanturfTown_BattleTentLobby_EventScript_RulesWhenInDanger + case 6, VerdanturfTown_BattleTentLobby_EventScript_ExitRules + case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_ExitRules end -VerdanturfTown_BattleTentLobby_EventScript_201B7E:: @ 8201B7E - msgbox VerdanturfTown_BattleTentLobby_Text_2C67CD, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201B11 +VerdanturfTown_BattleTentLobby_EventScript_RulesLevel:: @ 8201B7E + msgbox BattleTentLobby_Text_ExplainLevelRules, MSGBOX_DEFAULT + goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard end -VerdanturfTown_BattleTentLobby_EventScript_201B8C:: @ 8201B8C +VerdanturfTown_BattleTentLobby_EventScript_RulesBasics:: @ 8201B8C msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesBasics, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201B11 + goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard end -VerdanturfTown_BattleTentLobby_EventScript_201B9A:: @ 8201B9A +VerdanturfTown_BattleTentLobby_EventScript_RulesNature:: @ 8201B9A msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesNature, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201B11 + goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard end -VerdanturfTown_BattleTentLobby_EventScript_201BA8:: @ 8201BA8 +VerdanturfTown_BattleTentLobby_EventScript_RulesMoves:: @ 8201BA8 msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesMoves, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201B11 + goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard end -VerdanturfTown_BattleTentLobby_EventScript_201BB6:: @ 8201BB6 +VerdanturfTown_BattleTentLobby_EventScript_RulesUnderpowered:: @ 8201BB6 msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesUnderpowered, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201B11 + goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard end -VerdanturfTown_BattleTentLobby_EventScript_201BC4:: @ 8201BC4 +VerdanturfTown_BattleTentLobby_EventScript_RulesWhenInDanger:: @ 8201BC4 msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainRulesWhenInDanger, MSGBOX_DEFAULT - goto VerdanturfTown_BattleTentLobby_EventScript_201B11 + goto VerdanturfTown_BattleTentLobby_EventScript_ReadRulesBoard end -VerdanturfTown_BattleTentLobby_EventScript_201BD2:: @ 8201BD2 +VerdanturfTown_BattleTentLobby_EventScript_ExitRules:: @ 8201BD2 releaseall end -VerdanturfTown_BattleTentLobby_Text_201BD4: @ 8201BD4 +VerdanturfTown_BattleTentLobby_Text_MonsReluctantToUseDislikedMoves: @ 8201BD4 .string "If it doesn't like a certain move,\n" .string "a POKéMON will be reluctant to use it.\p" .string "It doesn't matter how strong it is,\n" @@ -344,14 +342,14 @@ VerdanturfTown_BattleTentLobby_Text_201BD4: @ 8201BD4 .string "potential, it's probably failing at\l" .string "using a disliked move against its will.$" -VerdanturfTown_BattleTentLobby_Text_201D11: @ 8201D11 +VerdanturfTown_BattleTentLobby_Text_GentleMonsScaryIfAngry: @ 8201D11 .string "My big sister is gentle usually.\n" .string "But when she gets angry,\l" .string "she's really, really scary!\p" .string "I bet a gentle POKéMON will be scary\n" .string "if it gets angry!$" -VerdanturfTown_BattleTentLobby_Text_201D9E: @ 8201D9E +VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep: @ 8201D9E .string "My feelings toward my POKéMON…\n" .string "The attraction runs deep…\p" .string "Oh, hi, you didn't see that, did you?\n" @@ -359,20 +357,20 @@ VerdanturfTown_BattleTentLobby_Text_201D9E: @ 8201D9E .string "How would you like this TM for\n" .string "your POKéMON?$" -VerdanturfTown_BattleTentLobby_Text_201E43: @ 8201E43 +VerdanturfTown_BattleTentLobby_Text_AttractionMutual: @ 8201E43 .string "My feelings toward my POKéMON…\n" .string "I'm sure the attraction is mutual!\p" .string "They battle exactly the way I want\n" .string "them to!$" -VerdanturfTown_BattleTentLobby_Text_201EB1: @ 8201EB1 +VerdanturfTown_BattleTentLobby_Text_TaughtWhatKindsOfMoves: @ 8201EB1 .string "What kind of moves have you taught\n" .string "your POKéMON?\p" .string "I think you would give yourself\n" .string "an advantage if they knew how to\l" .string "heal or protect themselves.$" -VerdanturfTown_BattleTentLobby_Text_201F3F: @ 8201F3F +VerdanturfTown_BattleTentLobby_Text_ScottCanMeetToughTrainers: @ 8201F3F .string "SCOTT: Hey there, {PLAYER}{KUN}!\n" .string "I thought I might see you here.\p" .string "A BATTLE TENT's a place where\n" @@ -382,7 +380,7 @@ VerdanturfTown_BattleTentLobby_Text_201F3F: @ 8201F3F .string "{PLAYER}{KUN}, I expect you to do\n" .string "the best you can!$" -VerdanturfTown_BattleTentLobby_Text_202025: @ 8202025 +VerdanturfTown_BattleTentLobby_Text_ScottVisitRegularly: @ 8202025 .string "SCOTT: I visit here regularly in hopes\n" .string "of seeing tough TRAINERS in action\l" .string "in whatever the situation.$" diff --git a/data/text/battle_tent.inc b/data/text/battle_tent.inc index 48ea8f4d5..98aa689ce 100644 --- a/data/text/battle_tent.inc +++ b/data/text/battle_tent.inc @@ -1,17 +1,17 @@ -FallarborTown_BattleTentLobby_Text_2C47EB: @ 82C47EB +FallarborTown_BattleTentLobby_Text_WelcomeToBattleTent: @ 82C47EB .string "I welcome you to the BATTLE TENT\n" .string "FALLARBOR SITE!\p" .string "I am your guide to the Set KO Tourney!$" -FallarborTown_BattleTentLobby_Text_2C4843: @ 82C4843 +FallarborTown_BattleTentLobby_Text_TakeChallenge: @ 82C4843 .string "Now, do you wish to take the challenge\n" .string "of a Set KO Tourney?$" -FallarborTown_BattleTentLobby_Text_2C487F: @ 82C487F +FallarborTown_BattleTentLobby_Text_AwaitAnotherChallenge: @ 82C487F .string "We await your challenge on\n" .string "another occasion!$" -FallarborTown_BattleTentLobby_Text_2C48AC: @ 82C48AC +FallarborTown_BattleTentLobby_Text_ExplainFallarborTent: @ 82C48AC .string "In the FALLARBOR BATTLE TENT,\n" .string "we undertake the Set KO Tourney.\p" .string "All participants enter with a team of\n" @@ -32,20 +32,21 @@ FallarborTown_BattleTentLobby_Text_2C48AC: @ 82C48AC .string "three TRAINERS in succession,\l" .string "we will present you with a fine prize.$" -FallarborTown_BattleTentLobby_Text_2C4B35: @ 82C4B35 +FallarborTown_BattleTentLobby_Text_SaveBeforeChallenge: @ 82C4B35 .string "Before showing you to the BATTLE\n" .string "TENT, I must save. Is that okay?$" -FallarborTown_BattleTentLobby_Text_2C4B77: @ 82C4B77 +@ Unused +FallarborTown_BattleTentLobby_Text_WhichLevelMode: @ 82C4B77 .string "We offer two levels of challenge,\n" .string "Level 50 and Open Level.\l" .string "Which is your choice?$" -FallarborTown_BattleTentLobby_Text_2C4BC8: @ 82C4BC8 +FallarborTown_BattleTentLobby_Text_SelectThreeMons: @ 82C4BC8 .string "Very well, now select your\n" .string "three POKéMON, please.$" -FallarborTown_BattleTentLobby_Text_2C4BFA: @ 82C4BFA +FallarborTown_BattleTentLobby_Text_NotEnoughValidMonsLv50: @ 82C4BFA .string "My dear challenger!\p" .string "You do not have the three POKéMON\n" .string "required for entry.\p" @@ -55,7 +56,7 @@ FallarborTown_BattleTentLobby_Text_2C4BFA: @ 82C4BFA .string "When you have made your preparations,\n" .string "please do return.$" -FallarborTown_BattleTentLobby_Text_2C4CC0: @ 82C4CC0 +FallarborTown_BattleTentLobby_Text_NotEnoughValidMonsLvOpen: @ 82C4CC0 .string "My dear challenger!\p" .string "You do not have the three POKéMON\n" .string "required for entry.\p" @@ -67,11 +68,11 @@ FallarborTown_BattleTentLobby_Text_2C4CC0: @ 82C4CC0 .string "When you have made your preparations,\n" .string "please do return.$" -FallarborTown_BattleTentLobby_Text_2C4DC3: @ 82C4DC3 +FallarborTown_BattleTentLobby_Text_GuideYouToBattleTent: @ 82C4DC3 .string "I shall now guide you to\n" .string "the BATTLE TENT.$" -FallarborTown_BattleTentLobby_Text_2C4DED: @ 82C4DED +FallarborTown_BattleTentLobby_Text_DidntSaveBeforeQuitting: @ 82C4DED .string "My dear challenger!\p" .string "You did not save the game before\n" .string "shutting down, did you?\p" @@ -81,52 +82,52 @@ FallarborTown_BattleTentLobby_Text_2C4DED: @ 82C4DED .string "You may, of course, start with a fresh\n" .string "challenge.$" -FallarborTown_BattleTentLobby_Text_2C4EC3: @ 82C4EC3 +FallarborTown_BattleTentLobby_Text_BeatThreeTrainers: @ 82C4EC3 .string "How splendid! You have beaten\n" .string "three TRAINERS in succession!$" -FallarborTown_BattleTentLobby_Text_2C4EFF: @ 82C4EFF +FallarborTown_BattleTentLobby_Text_WaitWhileSaveGame: @ 82C4EFF .string "Please wait while I save the game.$" -FallarborTown_BattleTentLobby_Text_2C4F22: @ 82C4F22 +FallarborTown_BattleTentLobby_Text_PresentYouWithPrize: @ 82C4F22 .string "In commemoration of your 3-win streak,\n" .string "we present you with this prize.$" -FallarborTown_BattleTentLobby_Text_2C4F69: @ 82C4F69 +FallarborTown_BattleTentLobby_Text_ReceivedPrize: @ 82C4F69 .string "{PLAYER} received the prize\n" .string "{STR_VAR_1}.$" -FallarborTown_BattleTentLobby_Text_2C4F83: @ 82C4F83 +FallarborTown_BattleTentLobby_Text_BagFullReturnForPrize: @ 82C4F83 .string "Oh?\n" .string "Your BAG seems to be full.\p" .string "I urge you to clear space and\n" .string "return for your prize.$" -FallarborTown_BattleTentLobby_Text_2C4FD7: @ 82C4FD7 +FallarborTown_BattleTentLobby_Text_ThankYouWaitWhileSaving: @ 82C4FD7 .string "Thank you so much for participating!\p" .string "Please wait while I save the game.$" -FallarborTown_BattleTentLobby_Text_2C501F: @ 82C501F +FallarborTown_BattleTentLobby_Text_AwaitAnotherChallenge2: @ 82C501F .string "We await your challenge on\n" .string "another occasion!$" -FallarborTown_BattleTentLobby_Text_2C504C: @ 82C504C +FallarborTown_BattleTentLobby_Text_LookingForwardToArrival: @ 82C504C .string "We have been looking forward to\n" .string "your arrival.\p" .string "Before I show you to the BATTLE TENT,\n" .string "I must save the game. Please wait.$" -VerdanturfTown_BattleTentLobby_Text_2C50C3: @ 82C50C3 +VerdanturfTown_BattleTentLobby_Text_WelcomeToBattleTent: @ 82C50C3 .string "I welcome you to the BATTLE TENT\n" .string "VERDANTURF SITE!\p" .string "Here, the TRAINER's trust toward\n" .string "POKéMON is tested.$" -VerdanturfTown_BattleTentLobby_Text_2C5129: @ 82C5129 +VerdanturfTown_BattleTentLobby_Text_TakeChallenge: @ 82C5129 .string "Do you wish to take the VERDANTURF\n" .string "BATTLE TENT challenge?$" -VerdanturfTown_BattleTentLobby_Text_2C5163: @ 82C5163 +VerdanturfTown_BattleTentLobby_Text_ExplainVerdanturfTent: @ 82C5163 .string "In the VERDANTURF BATTLE TENT,\n" .string "there is one crucial rule that must\l" .string "be obeyed.\p" @@ -146,16 +147,17 @@ VerdanturfTown_BattleTentLobby_Text_2C5163: @ 82C5163 .string "If you don't save before interrupting,\n" .string "you will be disqualified.$" -VerdanturfTown_BattleTentLobby_Text_2C539A: @ 82C539A +VerdanturfTown_BattleTentLobby_Text_ReturnFortified: @ 82C539A .string "When you have fortified your heart\n" .string "and POKéMON, you must return.$" -VerdanturfTown_BattleTentLobby_Text_2C53DB: @ 82C53DB +@ Unused +VerdanturfTown_BattleTentLobby_Text_WhichLevelMode: @ 82C53DB .string "There are two levels of difficulty,\n" .string "Level 50 and Open Level.\l" .string "Which is your choice of a challenge?$" -VerdanturfTown_BattleTentLobby_Text_2C543D: @ 82C543D +VerdanturfTown_BattleTentLobby_Text_NotEnoughValidMonsLv50: @ 82C543D .string "Sigh…\p" .string "You do not have the three POKéMON\n" .string "required for the challenge.\p" @@ -167,7 +169,7 @@ VerdanturfTown_BattleTentLobby_Text_2C543D: @ 82C543D .string "Come back when you have made\n" .string "your preparations.$" -VerdanturfTown_BattleTentLobby_Text_2C5538: @ 82C5538 +VerdanturfTown_BattleTentLobby_Text_NotEnoughValidMonsLvOpen: @ 82C5538 .string "Sigh…\p" .string "You do not have the three POKéMON\n" .string "required for the challenge.\p" @@ -179,48 +181,48 @@ VerdanturfTown_BattleTentLobby_Text_2C5538: @ 82C5538 .string "Come back when you have made\n" .string "your preparations.$" -VerdanturfTown_BattleTentLobby_Text_2C5633: @ 82C5633 +VerdanturfTown_BattleTentLobby_Text_SelectThreeMons: @ 82C5633 .string "Good. Now, you must select your\n" .string "three POKéMON.$" -VerdanturfTown_BattleTentLobby_Text_2C5662: @ 82C5662 +VerdanturfTown_BattleTentLobby_Text_SaveBeforeChallenge: @ 82C5662 .string "I must save before I show you to\n" .string "the BATTLE TENT. Is that okay?$" -VerdanturfTown_BattleTentLobby_Text_2C56A2: @ 82C56A2 +VerdanturfTown_BattleTentLobby_Text_NowFollowMe: @ 82C56A2 .string "Good.\n" .string "Now, follow me.$" -VerdanturfTown_BattleTentLobby_Text_2C56B8: @ 82C56B8 +VerdanturfTown_BattleTentLobby_Text_ResultsWillBeRecorded: @ 82C56B8 .string "I feel privileged for having seen\n" .string "your POKéMON's exploits.\p" .string "The results will be recorded.\n" .string "I must ask you to briefly wait.$" -VerdanturfTown_BattleTentLobby_Text_2C5731: @ 82C5731 +VerdanturfTown_BattleTentLobby_Text_AchievedThreeWinStreak: @ 82C5731 .string "To achieve a 3-win streak…\p" .string "The bonds that bind your heart with\n" .string "your POKéMON seem firm and true.$" -VerdanturfTown_BattleTentLobby_Text_2C5791: @ 82C5791 +VerdanturfTown_BattleTentLobby_Text_FeatWillBeRecorded: @ 82C5791 .string "Your feat will be recorded.\n" .string "I must ask you to briefly wait.$" -VerdanturfTown_BattleTentLobby_Text_2C57CD: @ 82C57CD +VerdanturfTown_BattleTentLobby_Text_PresentYouWithPrize: @ 82C57CD .string "For the feat of your 3-win streak,\n" .string "we present you with this prize.$" -SlateportCity_BattleTentLobby_Text_2C5810: @ 82C5810 +SlateportCity_BattleTentLobby_Text_WelcomeToBattleTent: @ 82C5810 .string "Welcome to the BATTLE TENT\n" .string "SLATEPORT SITE!\p" .string "I am your guide to the Battle Swap\n" .string "Tournament.$" -SlateportCity_BattleTentLobby_Text_2C586A: @ 82C586A +SlateportCity_BattleTentLobby_Text_TakeChallenge: @ 82C586A .string "Would you like to take the Battle\n" .string "Swap challenge?$" -SlateportCity_BattleTentLobby_Text_2C589C: @ 82C589C +SlateportCity_BattleTentLobby_Text_ExplainSlateportTent: @ 82C589C .string "Here at the SLATEPORT BATTLE TENT,\n" .string "we hold Battle Swap events\l" .string "using rental POKéMON.\p" @@ -238,36 +240,39 @@ SlateportCity_BattleTentLobby_Text_2C589C: @ 82C589C .string "If you don't save before interrupting,\n" .string "you will be disqualified.$" -SlateportCity_BattleTentLobby_Text_2C5AA5: @ 82C5AA5 +SlateportCity_BattleTentLobby_Text_LookForwardToNextVisit: @ 82C5AA5 .string "We look forward to your next visit.$" -SlateportCity_BattleTentLobby_Text_2C5AC9: @ 82C5AC9 +@ Unused +SlateportCity_BattleTentLobby_Text_WhichLevelMode: @ 82C5AC9 .string "Which level do you wish to challenge?\n" .string "Level 50 or Level 100?$" -SlateportCity_BattleTentLobby_Text_2C5B06: @ 82C5B06 +SlateportCity_BattleTentLobby_Text_SaveBeforeChallenge: @ 82C5B06 .string "Before you begin your challenge,\n" .string "I need to save data. Is that okay?$" -SlateportCity_BattleTentLobby_Text_2C5B4A: @ 82C5B4A +@ Unused +SlateportCity_BattleTentLobby_Text_HoldMonsForSafekeeping: @ 82C5B4A .string "Okay, I will hold your POKéMON for\n" .string "safekeeping while you compete.$" -SlateportCity_BattleTentLobby_Text_2C5B8C: @ 82C5B8C +SlateportCity_BattleTentLobby_Text_StepThisWay: @ 82C5B8C .string "Please step this way.$" -SlateportCity_BattleTentLobby_Text_2C5BA2: @ 82C5BA2 +SlateportCity_BattleTentLobby_Text_ReturnRentalMonsSaveResults: @ 82C5BA2 .string "Thank you for participating!\p" .string "I will return your POKéMON in exchange\n" .string "for our rental POKéMON.\p" .string "I must also save your event results.\n" .string "Please wait.$" -SlateportCity_BattleTentLobby_Text_2C5C30: @ 82C5C30 +@ Unused +SlateportCity_BattleTentLobby_Text_ReturnMonsExchangeRentals: @ 82C5C30 .string "I will return your POKéMON in exchange\n" .string "for our rental POKéMON.$" -SlateportCity_BattleTentLobby_Text_2C5C6F: @ 82C5C6F +SlateportCity_BattleTentLobby_Text_WonThreeMatchesReturnMons: @ 82C5C6F .string "Congratulations!\n" .string "You've won three straight matches!\p" .string "I will return your POKéMON in exchange\n" @@ -275,61 +280,65 @@ SlateportCity_BattleTentLobby_Text_2C5C6F: @ 82C5C6F .string "I must also save your event results.\n" .string "Please wait.$" -SlateportCity_BattleTentLobby_Text_2C5D14: @ 82C5D14 +SlateportCity_BattleTentLobby_Text_AwardYouThisPrize: @ 82C5D14 .string "In recognition of your 3-win streak,\n" .string "we award you this prize.$" -SlateportCity_BattleTentLobby_Text_2C5D52: @ 82C5D52 +SlateportCity_BattleTentLobby_Text_NoRoomInBagMakeRoom: @ 82C5D52 .string "Oh?\n" .string "You seem to have no room for this.\p" .string "Please make room in your BAG and\n" .string "let me know.$" -SlateportCity_BattleTentLobby_Text_2C5DA7: @ 82C5DA7 +SlateportCity_BattleTentLobby_Text_BeenWaitingForYou: @ 82C5DA7 .string "We've been waiting for you!\p" .string "Before we resume your challenge,\n" .string "I must save the game.$" -SlateportCity_BattleTentLobby_Text_2C5DFA: @ 82C5DFA +SlateportCity_BattleTentLobby_Text_DidntSaveBeforeQuitting: @ 82C5DFA .string "I'm sorry to say this, but you didn't\n" .string "save before you quit playing last time.\p" .string "As a result, you have been disqualified\n" .string "from your challenge.$" -SlateportCity_BattleTentLobby_Text_2C5E85: @ 82C5E85 +@ Unused +SlateportCity_BattleTentLobby_Text_ReturnPersonalMons: @ 82C5E85 .string "We'll return your personal POKéMON.$" -SlateportCity_BattleTentLobby_Text_2C5EA9: @ 82C5EA9 +@ Unused +SlateportCity_BattleTentLobby_Text_ReceivedPrize: @ 82C5EA9 .string "{PLAYER} received the prize\n" .string "{STR_VAR_1}.$" -SlateportCity_BattleTentLobby_Text_2C5EC3: @ 82C5EC3 +@ Unused +SlateportCity_BattleTentLobby_Text_RulesAreListed: @ 82C5EC3 .string "The Battle Swap rules are listed.$" -SlateportCity_BattleTentLobby_Text_2C5EE5: @ 82C5EE5 +@ Unused +SlateportCity_BattleTentLobby_Text_ReadWhichHeading: @ 82C5EE5 .string "Which heading do you want to read?$" -SlateportCity_BattleTentLobby_Text_2C5F08: @ 82C5F08 +SlateportCity_BattleTentLobby_Text_ExplainBasicRules: @ 82C5F08 .string "In a Battle Swap event, you may use\n" .string "only three POKéMON.\p" .string "Whether you are renting or swapping,\n" .string "your team may not have two or more\l" .string "of the same POKéMON.$" -SlateportCity_BattleTentLobby_Text_2C5F9D: @ 82C5F9D +SlateportCity_BattleTentLobby_Text_ExplainSwapPartnerRules: @ 82C5F9D .string "You may swap POKéMON only with\n" .string "the TRAINER you have just defeated.\p" .string "You may swap for only those POKéMON\n" .string "used by the beaten TRAINER.$" -SlateportCity_BattleTentLobby_Text_2C6020: @ 82C6020 +SlateportCity_BattleTentLobby_Text_ExplainSwapNumberRules: @ 82C6020 .string "After every battle you win, you may\n" .string "swap for one of your defeated\l" .string "opponent's POKéMON.\p" .string "You will not be able to swap POKéMON\n" .string "with the third TRAINER in the event.$" -SlateportCity_BattleTentLobby_Text_2C60C0: @ 82C60C0 +SlateportCity_BattleTentLobby_Text_ExplainSwapNotes: @ 82C60C0 .string "There are two key points to be aware\n" .string "of when swapping POKéMON.\p" .string "First, when swapping, you can't check\n" @@ -341,20 +350,23 @@ SlateportCity_BattleTentLobby_Text_2C60C0: @ 82C60C0 .string "This sequence remains unchanged\n" .string "even when swaps are made.$" -SlateportCity_BattleTentLobby_Text_2C61FE: @ 82C61FE +SlateportCity_BattleTentLobby_Text_ExplainMonRules: @ 82C61FE .string "The POKéMON of the SLATEPORT\n" .string "BATTLE TENT are all rentals.\p" .string "All rental POKéMON are kept at\n" .string "Level 30.$" -VerdanturfTown_BattleTentLobby_Text_2C6261: @ 82C6261 +@ Unused +VerdanturfTown_BattleTentLobby_Text_RulesAreListed2: @ 82C6261 .string "The VERDANTURF BATTLE TENT\n" .string "rules are listed.$" -VerdanturfTown_BattleTentLobby_Text_2C628E: @ 82C628E +@ Unused +VerdanturfTown_BattleTentLobby_Text_ReadWhichHeading: @ 82C628E .string "Which heading do you want to read?$" -VerdanturfTown_BattleTentLobby_Text_2C62B1: @ 82C62B1 +@ Unused +VerdanturfTown_BattleTentLobby_Text_ExplainBasicRules: @ 82C62B1 .string "Here at the VERDANTURF BATTLE TENT,\n" .string "POKéMON are required to think and\l" .string "battle by themselves.\p" @@ -362,7 +374,8 @@ VerdanturfTown_BattleTentLobby_Text_2C62B1: @ 82C62B1 .string "with people behave differently\l" .string "depending on their nature.$" -VerdanturfTown_BattleTentLobby_Text_2C636D: @ 82C636D +@ Unused +VerdanturfTown_BattleTentLobby_Text_ExplainNatureRules: @ 82C636D .string "Depending on its nature, a POKéMON\n" .string "may prefer to attack no matter what.\p" .string "Another POKéMON may prefer to protect\n" @@ -375,7 +388,8 @@ VerdanturfTown_BattleTentLobby_Text_2C636D: @ 82C636D .string "It may also dislike certain moves that\n" .string "it has trouble using.$" -VerdanturfTown_BattleTentLobby_Text_2C64BA: @ 82C64BA +@ Unused +VerdanturfTown_BattleTentLobby_Text_ExplainMoveRules: @ 82C64BA .string "There are offensive moves that inflict\n" .string "direct damage on the foe.\p" .string "There are defensive moves that are\n" @@ -388,7 +402,8 @@ VerdanturfTown_BattleTentLobby_Text_2C64BA: @ 82C64BA .string "POKéMON will consider using moves in\n" .string "these three categories.$" -VerdanturfTown_BattleTentLobby_Text_2C6612: @ 82C6612 +@ Unused +VerdanturfTown_BattleTentLobby_Text_ExplainUnderpoweredRules: @ 82C6612 .string "When not under command by its TRAINER,\n" .string "a POKéMON may be unable to effectively\l" .string "use certain moves.\p" @@ -398,21 +413,21 @@ VerdanturfTown_BattleTentLobby_Text_2C6612: @ 82C6612 .string "do not match its nature, it will often\l" .string "be unable to live up to its potential.$" -VerdanturfTown_BattleTentLobby_Text_2C671E: @ 82C671E +@ Unused +VerdanturfTown_BattleTentLobby_Text_ExplainWhenInDangerRules: @ 82C671E .string "Depending on its nature, a POKéMON may\n" .string "start using moves that don't match its\l" .string "nature when it is in trouble.\p" .string "If a POKéMON begins behaving oddly\n" .string "in a pinch, watch it carefully.$" -FallarborTown_BattleTentLobby_Text_2C67CD: @ 82C67CD -VerdanturfTown_BattleTentLobby_Text_2C67CD: @ 82C67CD +BattleTentLobby_Text_ExplainLevelRules: @ 82C67CD .string "At this BATTLE TENT, the levels of\n" .string "your opponents will be adjusted to\l" .string "match the levels of your POKéMON.\p" .string "However, no TRAINER you face will\n" .string "have any POKéMON below Level 30.$" -VerdanturfTown_BattleTentLobby_Text_2C6878: @ 82C6878 +VerdanturfTown_BattleTentLobby_Text_RulesAreListed: @ 82C6878 .string "The VERDANTURF BATTLE TENT\n" .string "rules are listed.$" From a04347816f71a9a6d92579d0d6b54268c6c8a96d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 15 Dec 2019 10:25:47 -0500 Subject: [PATCH 19/35] Split PokenavMatchCallEntries from PokenavMonList --- include/pokenav.h | 56 ++++++++++++++++++++++--------------- src/pokenav_match_call_ui.c | 16 +++++------ src/pokenav_unk_10.c | 3 -- src/pokenav_unk_3.c | 11 ++------ src/pokenav_unk_4.c | 6 ++-- src/pokenav_unk_6.c | 3 -- src/pokenav_unk_8.c | 10 ++----- src/pokenav_unk_9.c | 9 ++---- 8 files changed, 54 insertions(+), 60 deletions(-) diff --git a/include/pokenav.h b/include/pokenav.h index e2c2a4d08..f12469e71 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -7,14 +7,42 @@ typedef u32 (*LoopedTask)(s32 state); -// TODO: This struct is also used generally by Match Call, should probably be renamed struct PokenavMonList { - u8 id1; - u8 id2; + u8 boxId; + u8 monId; u16 data; }; +struct PokenavMatchCallEntries +{ + bool8 isSpecialTrainer; + u8 mapSec; + u16 headerId; +}; + +struct PokenavListTemplate +{ + union { + struct PokenavMonList *monList; + struct PokenavMatchCallEntries *matchCallEntries; + } list; + u16 unk4; + u16 unk6; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u8 unkC; + u8 unkD; + u8 unkE; + union { + void (*unk10_1)(struct PokenavMonList *, u8 *a1); + void (*unk10_2)(struct PokenavMatchCallEntries *, u8 *a1); + } listFunc; + void (*unk14)(u16 a0, u32 a1, u32 a2); +}; + struct PokenavSub18 { u16 unk0; @@ -161,22 +189,6 @@ void SetPokenavVBlankCallback(void); void SetVBlankCallback_(IntrCallback callback); // pokenav_match_call_ui.c -struct MatchCallListTemplate -{ - struct PokenavMonList * unk0; - u16 unk4; - u16 unk6; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; - u8 unkD; - u8 unkE; - void (*unk10)(struct PokenavMonList *, u8 *a1); - void (*unk14)(u16 a0, u32 a1, u32 a2); -}; - u32 GetSelectedMatchCall(void); bool32 sub_81C8224(void); int MatchCall_MoveCursorUp(void); @@ -191,7 +203,7 @@ bool32 sub_81C8820(void); void PrintCheckPageInfo(s16 a0); u32 GetMatchCallListTopIndex(void); void sub_81C87F0(void); -bool32 sub_81C81D4(const struct BgTemplate *arg0, struct MatchCallListTemplate *arg1, s32 arg2); +bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2); void sub_81C8234(void); // pokenav_match_call_data.c @@ -263,7 +275,7 @@ void sub_81CAB38(void); int sub_81CAE28(void); int GetNumberRegistered(void); int sub_81CAE48(void); -struct PokenavMonList *sub_81CAE94(void); +struct PokenavMatchCallEntries *sub_81CAE94(void); u16 GetMatchCallMapSec(int); bool32 ShouldDrawRematchPokeballIcon(int index); void ClearRematchPokeballIcon(u16 windowId, u32 a1); @@ -272,7 +284,7 @@ const u8 *GetMatchCallFlavorText(int index, int textType); const u8 *GetMatchCallMessageText(int index, u8 *arg1); u16 GetMatchCallOptionCursorPos(void); u16 GetMatchCallOptionId(int arg0); -void BufferMatchCallNameAndDesc(struct PokenavMonList * arg0, u8 *str); +void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries * arg0, u8 *str); u8 sub_81CB0C8(int rematchIndex); int GetIndexDeltaOfNextCheckPageDown(int index); int GetIndexDeltaOfNextCheckPageUp(int index); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index f6546ec50..fd346393e 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -46,7 +46,7 @@ struct PokenavSub17Substruct u32 unk28; s32 unk2C; u32 unk30; - void (*unk34)(struct PokenavMonList *, u8*); + void (*unk34)(struct PokenavMatchCallEntries *, u8*); void (*unk38)(u16, u32, u32); struct Sprite *rightArrow; struct Sprite *upArrow; @@ -67,8 +67,8 @@ struct PokenavSub17 extern void sub_81DB620(u32 windowId, u32 a1, u32 a2, u32 a3, u32 a4); void sub_81C82E4(struct PokenavSub17 *a0); -bool32 sub_81C91AC(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct MatchCallListTemplate *a2, s32 a3); -void sub_81C9160(struct MatchCallWindowState *a0, struct MatchCallListTemplate *a1); +bool32 sub_81C91AC(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3); +void sub_81C9160(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1); void SpriteCB_MatchCallUpArrow(struct Sprite *sprite); void SpriteCB_MatchCallDownArrow(struct Sprite *sprite); void SpriteCB_MatchCallRightArrow(struct Sprite *sprite); @@ -98,7 +98,7 @@ static const u32 sMatchcallArrowSpriteSheetData[] = INCBIN_U32("graphics/pokenav EWRAM_DATA u32 gUnknown_0203CF44 = 0; -bool32 sub_81C81D4(const struct BgTemplate *arg0, struct MatchCallListTemplate *arg1, s32 arg2) +bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2) { struct PokenavSub17 *structPtr = AllocSubstruct(17, sizeof(struct PokenavSub17)); if (structPtr == NULL) @@ -934,9 +934,9 @@ void ToggleMatchCallVerticalArrows(bool32 shouldHide) structPtr->unk0.downArrow->data[7] = shouldHide; } -void sub_81C9160(struct MatchCallWindowState *a0, struct MatchCallListTemplate *a1) +void sub_81C9160(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1) { - a0->unk10 = a1->unk0; + a0->unk10 = a1->list.matchCallEntries; a0->windowTopIndex = a1->unk6; a0->listLength = a1->unk4; a0->unkC = a1->unk8; @@ -962,13 +962,13 @@ void sub_81C9160(struct MatchCallWindowState *a0, struct MatchCallListTemplate * } } -bool32 sub_81C91AC(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct MatchCallListTemplate *a2, s32 a3) +bool32 sub_81C91AC(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3) { struct WindowTemplate window; a0->unk0.bg = a1->bg; a0->unk0.unk6 = a3; - a0->unk34 = a2->unk10; + a0->unk34 = a2->listFunc.unk10_2; a0->unk38 = a2->unk14; a0->unk0.unk1 = a2->unkD; a0->unk0.unk2 = a2->unk9; diff --git a/src/pokenav_unk_10.c b/src/pokenav_unk_10.c index 3d8cf2197..099843f83 100644 --- a/src/pokenav_unk_10.c +++ b/src/pokenav_unk_10.c @@ -13,9 +13,6 @@ #include "window.h" #include "constants/songs.h" -#define boxId id1 // naming multi-purpose field -#define monId id2 // naming multi-purpose field - struct PokenavSub13 { u8 filler0[0x8]; diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c index 6a5fb3f8a..28e84b50b 100755 --- a/src/pokenav_unk_3.c +++ b/src/pokenav_unk_3.c @@ -15,11 +15,6 @@ #include "constants/flags.h" #include "constants/songs.h" -// naming multi-purpose fields -#define isSpecialTrainer id1 // Entries with their own match call header in pokenav_match_call_data.c -#define mapSec id2 -#define headerId data - struct Pokenav3Struct { u16 optionCursorPos; @@ -31,7 +26,7 @@ struct Pokenav3Struct u32 unk10; u32 unk14; u32 (*callback)(struct Pokenav3Struct*); - struct PokenavMonList matchCallEntries[MAX_REMATCH_ENTRIES - 1]; + struct PokenavMatchCallEntries matchCallEntries[MAX_REMATCH_ENTRIES - 1]; }; static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *); @@ -304,7 +299,7 @@ int unref_sub_81CAE6C(int arg0) return state->matchCallEntries[arg0].headerId; } -struct PokenavMonList *sub_81CAE94(void) +struct PokenavMatchCallEntries *sub_81CAE94(void) { struct Pokenav3Struct *state = GetSubstructPtr(5); return state->matchCallEntries; @@ -400,7 +395,7 @@ u16 GetMatchCallOptionId(int optionId) return state->matchCallOptions[optionId]; } -void BufferMatchCallNameAndDesc(struct PokenavMonList *matchCallEntry, u8 *str) +void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries *matchCallEntry, u8 *str) { const u8 *trainerName; const u8 *className; diff --git a/src/pokenav_unk_4.c b/src/pokenav_unk_4.c index 8dbea443d..d8a1a0dfa 100755 --- a/src/pokenav_unk_4.c +++ b/src/pokenav_unk_4.c @@ -865,8 +865,8 @@ u32 ExitMatchCall(s32 taskState) static void sub_81CBBB8(void) { - struct MatchCallListTemplate template; - template.unk0 = sub_81CAE94(); + struct PokenavListTemplate template; + template.list.matchCallEntries = sub_81CAE94(); template.unk4 = GetNumberRegistered(); template.unk8 = 4; template.unk6 = 0; @@ -876,7 +876,7 @@ static void sub_81CBBB8(void) template.unkC = 8; template.unkD = 3; template.unkE = 7; - template.unk10 = BufferMatchCallNameAndDesc; + template.listFunc.unk10_2 = BufferMatchCallNameAndDesc; template.unk14 = TryDrawRematchPokeballIcon; sub_81C81D4(&gUnknown_0862278C[2], &template, 2); CreateTask(sub_81CBC64, 7); diff --git a/src/pokenav_unk_6.c b/src/pokenav_unk_6.c index c96c3ac1c..4c93c0d41 100644 --- a/src/pokenav_unk_6.c +++ b/src/pokenav_unk_6.c @@ -14,9 +14,6 @@ #include "constants/songs.h" #include "constants/species.h" -#define boxId id1 // naming multi-purpose field -#define monId id2 // naming multi-purpose field - struct PokenavSub11 { u32 monPal[3][0x20]; diff --git a/src/pokenav_unk_8.c b/src/pokenav_unk_8.c index 6871292bf..6c1460dd1 100644 --- a/src/pokenav_unk_8.c +++ b/src/pokenav_unk_8.c @@ -10,10 +10,6 @@ #include "international_string_util.h" #include "constants/songs.h" -#define boxId id1 // naming multi-purpose field -#define monId id2 // naming multi-purpose field - - struct PokenavSub7 { u32 (*unk0)(struct PokenavSub7 *); @@ -655,8 +651,8 @@ static void sub_81CF7F4(struct PokenavSub8 * ptr) static void sub_81CF88C(void) { - struct MatchCallListTemplate template; - template.unk0 = sub_81CF0D0(); + struct PokenavListTemplate template; + template.list.monList = sub_81CF0D0(); template.unk4 = sub_81CF0E0(); template.unk8 = 4; template.unk6 = sub_81CF10C(); @@ -666,7 +662,7 @@ static void sub_81CF88C(void) template.unkC = 8; template.unkD = 2; template.unkE = 1; - template.unk10 = sub_81CF8E4; + template.listFunc.unk10_1 = sub_81CF8E4; template.unk14 = NULL; sub_81C81D4(&gUnknown_08623590[1], &template, 0); } diff --git a/src/pokenav_unk_9.c b/src/pokenav_unk_9.c index 2f7d37382..b1a344de9 100644 --- a/src/pokenav_unk_9.c +++ b/src/pokenav_unk_9.c @@ -8,9 +8,6 @@ #include "international_string_util.h" #include "constants/songs.h" -#define boxId id1 // naming multi-purpose field -#define monId id2 // naming multi-purpose field - struct PokenavSub9 { u32 (*unk0)(struct PokenavSub9*); @@ -668,8 +665,8 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2) static void sub_81D0304(void) { - struct MatchCallListTemplate template; - template.unk0 = sub_81CFB28(); + struct PokenavListTemplate template; + template.list.monList = sub_81CFB28(); template.unk4 = sub_81CFB38(); template.unk8 = 4; template.unk6 = sub_81CFB64(); @@ -679,7 +676,7 @@ static void sub_81D0304(void) template.unkC = 8; template.unkD = 2; template.unkE = 1; - template.unk10 = sub_81D035C; + template.listFunc.unk10_1 = sub_81D035C; template.unk14 = NULL; sub_81C81D4(&gUnknown_086237B0[1], &template, 0); } From 96ec5e1b84f2c1d189dc67b53a113d0299b4f37b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 15 Dec 2019 11:42:50 -0500 Subject: [PATCH 20/35] Use fadescreen constants --- asm/macros/event.inc | 16 +++++------ data/event_scripts.s | 21 ++++++++------- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 4 +-- .../scripts.inc | 10 +++---- .../scripts.inc | 6 ++--- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 8 +++--- data/maps/BattleFrontier_Lounge7/scripts.inc | 2 +- data/maps/CaveOfOrigin_B1F/scripts.inc | 4 +-- .../EverGrandeCity_HallOfFame/scripts.inc | 4 +-- .../scripts.inc | 2 +- .../FallarborTown_BattleTentLobby/scripts.inc | 2 +- data/maps/FarawayIsland_Interior/scripts.inc | 4 +-- .../LilycoveCity_ContestLobby/scripts.inc | 16 +++++------ .../scripts.inc | 10 +++---- .../scripts.inc | 4 +-- data/maps/MagmaHideout_4F/scripts.inc | 4 +-- .../MossdeepCity_SpaceCenter_2F/scripts.inc | 12 ++++----- data/maps/MtChimney/scripts.inc | 4 +-- data/maps/MtPyre_Summit/scripts.inc | 4 +-- data/maps/Route101/scripts.inc | 2 +- data/maps/Route113_GlassWorkshop/scripts.inc | 4 +-- .../Route119_WeatherInstitute_2F/scripts.inc | 4 +-- data/maps/Route120/scripts.inc | 4 +-- data/maps/SkyPillar_Outside/scripts.inc | 4 +-- data/maps/SkyPillar_Top/scripts.inc | 8 +++--- .../scripts.inc | 6 ++--- .../scripts.inc | 8 +++--- data/maps/SootopolisCity/scripts.inc | 8 +++--- .../scripts.inc | 2 +- data/maps/TrainerHill_Entrance/scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- data/scripts/abnormal_weather.inc | 4 +-- data/scripts/apprentice.inc | 2 +- data/scripts/berry_blender.inc | 8 +++--- data/scripts/berry_tree.inc | 2 +- data/scripts/cable_club.inc | 18 ++++++------- data/scripts/day_care.inc | 2 +- data/scripts/field_poison.inc | 4 +-- data/scripts/lilycove_lady.inc | 8 +++--- data/scripts/pc_transfer.inc | 2 +- data/scripts/players_house.inc | 4 +-- data/scripts/safari_zone.inc | 2 +- data/scripts/secret_base.inc | 4 +-- include/constants/field_weather.h | 24 +++++++++++++++++ include/field_weather.h | 27 +------------------ src/battle_pyramid_bag.c | 2 +- src/cable_club.c | 8 +++--- src/decoration.c | 10 +++---- src/easy_chat.c | 2 +- src/egg_hatch.c | 2 +- src/item_use.c | 2 +- src/player_pc.c | 6 ++--- src/pokemon_storage_system.c | 2 +- src/pokenav.c | 2 +- src/scrcmd.c | 7 ++--- src/secret_base.c | 2 +- src/shop.c | 4 +-- src/start_menu.c | 2 +- src/union_room.c | 2 +- 69 files changed, 188 insertions(+), 187 deletions(-) create mode 100644 include/constants/field_weather.h diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 96971b583..8b43d0821 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1101,16 +1101,16 @@ .2byte \index .endm - @ Fades the screen to and from black and white. Mode 0x00 fades from black, mode 0x01 fades out to black, mode 0x2 fades in from white, and mode 0x3 fades out to white. - .macro fadescreen effect:req + @ Fades the screen to and from black and white. Modes are FADE_(TO/FROM)_(WHITE/BLACK) + .macro fadescreen mode:req .byte 0x97 - .byte \effect + .byte \mode .endm - @ Fades the screen to and from black and white. Mode 0x00 fades from black, mode 0x01 fades out to black, mode 0x2 fades in from white, and mode 0x3 fades out to white. Other modes may exist. - .macro fadescreenspeed effect:req, speed:req + @ Fades the screen to and from black and white. Modes are FADE_(TO/FROM)_(WHITE/BLACK) + .macro fadescreenspeed mode:req, speed:req .byte 0x98 - .byte \effect + .byte \mode .byte \speed .endm @@ -1517,9 +1517,9 @@ .4byte \pointer .endm - .macro fadescreenswapbuffers byte:req + .macro fadescreenswapbuffers mode:req .byte 0xdc - .byte \byte + .byte \mode .endm .macro buffertrainerclassname out:req, class:req diff --git a/data/event_scripts.s b/data/event_scripts.s index c24ea1222..4402f5517 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -24,6 +24,7 @@ #include "constants/field_poison.h" #include "constants/field_specials.h" #include "constants/field_tasks.h" +#include "constants/field_weather.h" #include "constants/flags.h" #include "constants/frontier_util.h" #include "constants/game_stat.h" @@ -720,9 +721,9 @@ Common_EventScript_ShowPokemonCenterSign:: @ 8271E73 end Common_ShowEasyChatScreen:: @ 8271E7C - fadescreen 1 + fadescreen FADE_TO_BLACK special ShowEasyChatScreen - fadescreen 0 + fadescreen FADE_FROM_BLACK return Common_EventScript_ReadyPetalburgGymForBattle:: @ 8271E84 @@ -773,17 +774,17 @@ Common_EventScript_PlayGymBadgeFanfare:: @ 827207E return Common_EventScript_OutOfCenterPartyHeal:: @ 8272083 - fadescreen 1 + fadescreen FADE_TO_BLACK playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty - fadescreen 0 + fadescreen FADE_FROM_BLACK return EventScript_RegionMap:: @ 827208F lockall msgbox Common_Text_LookCloserAtMap, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK special FieldShowRegionMap waitstate releaseall @@ -868,7 +869,7 @@ Common_EventScript_FerryDepartIsland:: @ 8272250 .include "data/scripts/kecleon.inc" Common_EventScript_NameReceivedPartyMon:: @ 82723DD - fadescreen 1 + fadescreen FADE_TO_BLACK special ChangePokemonNickname waitstate return @@ -1045,16 +1046,16 @@ Common_EventScript_DirectCornerAttendant:: @ 8273767 end Common_EventScript_RemoveStaticPokemon:: @ 827376D - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK removeobject VAR_LAST_TALKED - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK release end Common_EventScript_LegendaryFlewAway:: @ 8273776 - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK removeobject VAR_LAST_TALKED - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK bufferspeciesname 0, VAR_0x8004 msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT release diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index f2251165c..1764b8ffd 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -240,7 +240,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_PauseChallenge:: @ 825789A arena_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index d6c3a3ca5..b4879f493 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -133,7 +133,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge:: @ 8255E47 goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleArenaLobby_Text_SelectThreeMons, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_PARTY_SIZE diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index a96063caa..0bcbf95e1 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -166,7 +166,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249ABF:: @ 8249ABF goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_249C15 frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleDomeLobby_Text_24A26E, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_PARTY_SIZE @@ -367,7 +367,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249D84:: @ 8249D84 call_if_eq BattleFrontier_BattleDomeLobby_EventScript_249DDB compare VAR_RESULT, 3 call_if_eq BattleFrontier_BattleDomeLobby_EventScript_249DE4 - fadescreen 1 + fadescreen FADE_TO_BLACK dome_showresultstree waitstate end diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc index 56d8e2e64..c554922d6 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc @@ -91,20 +91,20 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3BB:: @ 824B3BB dome_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3DD:: @ 824B3DD msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B9B5, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK dome_showopponentinfo waitstate goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F BattleFrontier_BattleDomePreBattleRoom_EventScript_24B3F5:: @ 824B3F5 call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B40A - fadescreen 1 + fadescreen FADE_TO_BLACK dome_showtourneytree waitstate goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F @@ -138,7 +138,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B46D:: @ 824B46D message BattleFrontier_BattleDomePreBattleRoom_Text_24B70C waitmessage waitbuttonpress - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, 2 @ 2 of the 3 party mons are selected for battle @@ -227,7 +227,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B5C7:: @ 824B5C7 waitfanfare special HealPlayerParty call BattleFrontier_BattleDomePreBattleRoom_EventScript_24B600 - fadescreen 1 + fadescreen FADE_TO_BLACK dome_showstatictourneytree waitstate goto BattleFrontier_BattleDomePreBattleRoom_EventScript_24B24F diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index 11c731f24..47385a1d7 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -39,7 +39,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterRoom:: @ 8259AF9 call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentType call BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentStyle msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK factory_setswapped factory_rentmons waitstate @@ -163,7 +163,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapMon:: @ 8259D98 case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons:: @ 8259DF2 - fadescreen 1 + fadescreen FADE_TO_BLACK factory_swapmons waitstate compare VAR_RESULT, 1 @@ -208,7 +208,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_PauseChallenge:: @ 8259E47 factory_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 3f635767d..fbc348797 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -168,7 +168,7 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_PauseChallenge:: @ 824FB3F palace_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index 64000a6ac..b50468e19 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -155,7 +155,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge:: @ 824D9E6 goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_PARTY_SIZE diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index f0c7b941b..4389d0d0f 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -118,7 +118,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge:: @ 825B8BB goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_PARTY_SIZE diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index a0c7ece1d..825530806 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -125,7 +125,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_PauseChallenge:: @ 825C9FD pike_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 7d3ddb2f1..6d6ce708a 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -131,7 +131,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge:: @ 8250904 goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_PARTY_SIZE diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc index 9c4012604..6bbf91708 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc @@ -146,7 +146,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_241E22:: @ 8241E22 tower_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc index c0c6fa900..6d7bb156f 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom2/scripts.inc @@ -219,7 +219,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_2492DB:: @ 82492DB tower_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 275ac4041..dd07de014 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -216,7 +216,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E984:: @ 823E984 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_2407A6, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_PARTY_SIZE @@ -283,7 +283,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EAED:: @ 823EAED goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_240A50, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_DOUBLES_PARTY_SIZE @@ -351,7 +351,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC59:: @ 823EC59 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_240DDB, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE @@ -418,7 +418,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EDC2:: @ 823EDC2 goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F02B frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_24115E, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK call BattleFrontier_EventScript_GetLvlMode copyvar VAR_0x8004, VAR_RESULT setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index 97e41cd96..3dd8fc98c 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -264,7 +264,7 @@ BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection:: @ 826564F BattleFrontier_Lounge7_EventScript_TeachTutorMove:: @ 8265696 msgbox BattleFrontier_Lounge7_Text_TeachMoveToWhichMon, MSGBOX_DEFAULT special GetBattleFrontierTutorMoveIndex - fadescreen 1 + fadescreen FADE_TO_BLACK special CloseBattlePointsWindow special CloseBattleFrontierTutorWindow special ChooseMonForMoveTutor diff --git a/data/maps/CaveOfOrigin_B1F/scripts.inc b/data/maps/CaveOfOrigin_B1F/scripts.inc index 378819f43..552f3b095 100644 --- a/data/maps/CaveOfOrigin_B1F/scripts.inc +++ b/data/maps/CaveOfOrigin_B1F/scripts.inc @@ -50,12 +50,12 @@ CaveOfOrigin_B1F_EventScript_AtSkyPillar:: @ 823584D msgbox CaveOfOrigin_B1F_Text_WellHeadToSkyPillar, MSGBOX_DEFAULT closemessage playse SE_KAIDAN - fadescreenspeed 1, 4 + fadescreenspeed FADE_TO_BLACK, 4 setflag FLAG_WALLACE_GOES_TO_SKY_PILLAR setvar VAR_SOOTOPOLIS_CITY_STATE, 3 removeobject 1 clearflag FLAG_HIDE_SKY_PILLAR_WALLACE - fadescreen 0 + fadescreen FADE_FROM_BLACK release end diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc index 3fe146f99..89cda0e40 100644 --- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc +++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc @@ -52,7 +52,7 @@ EverGrandeCity_HallOfFame_EventScript_EnterHallOfFame:: @ 8229850 EverGrandeCity_HallOfFame_EventScript_GameClearMale:: @ 82298E9 setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F - fadescreenspeed 1, 24 + fadescreenspeed FADE_TO_BLACK, 24 special GameClear waitstate releaseall @@ -60,7 +60,7 @@ EverGrandeCity_HallOfFame_EventScript_GameClearMale:: @ 82298E9 EverGrandeCity_HallOfFame_EventScript_GameClearFemale:: @ 82298F5 setrespawn HEAL_LOCATION_LITTLEROOT_TOWN_MAYS_HOUSE_2F - fadescreenspeed 1, 24 + fadescreenspeed FADE_TO_BLACK, 24 special GameClear waitstate releaseall diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index ba8b3536f..b748cc7da 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -161,7 +161,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_200B51:: @ 8200B51 fallarbortent_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index fddadae15..6c82c7ea0 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -128,7 +128,7 @@ FallarborTown_BattleTentLobby_EventScript_20005D:: @ 820005D goto_if_eq FallarborTown_BattleTentLobby_EventScript_200176 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT msgbox FallarborTown_BattleTentLobby_Text_2C4BC8, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_0x8004, 2 setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index 20121d500..2cdb626bd 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -190,10 +190,10 @@ FarawayIsland_Interior_EventScript_MewHideLeft:: @ 8267ED0 FarawayIsland_Interior_EventScript_HideMewWhenGrassCut:: @ 8267EDB lockall - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK setflag FLAG_HIDE_MEW removeobject 1 - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK msgbox FarawayIsland_Interior_Text_TheFeelingOfBeingWatchedFaded, MSGBOX_DEFAULT closemessage releaseall diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index b6874d99f..bdfce4325 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -42,7 +42,7 @@ LilycoveCity_ContestLobby_EventScript_ContestArtist:: @ 821A264 waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 0 lockall msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO @@ -216,7 +216,7 @@ LilycoveCity_ContestLobby_EventScript_LinkContestArtist:: @ 821A436 waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 0 msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO compare VAR_RESULT, YES @@ -504,42 +504,42 @@ LilycoveCity_ContestLobby_EventScript_NinjaBoy:: @ 821A735 LilycoveCity_ContestLobby_EventScript_ContestWinner1:: @ 821A73E lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 1 releaseall end LilycoveCity_ContestLobby_EventScript_ContestWinner2:: @ 821A745 lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 2 releaseall end LilycoveCity_ContestLobby_EventScript_ContestWinner3:: @ 821A74C lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 3 releaseall end LilycoveCity_ContestLobby_EventScript_ContestWinner4:: @ 821A753 lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 4 releaseall end LilycoveCity_ContestLobby_EventScript_ContestWinner5:: @ 821A75A lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 5 releaseall end LilycoveCity_ContestLobby_EventScript_ContestWinner6:: @ 821A761 lockall - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 6 releaseall end diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index 4279d3064..f3328a979 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -182,35 +182,35 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_RichBoy:: @ 821999C LilycoveCity_LilycoveMuseum_2F_EventScript_ShowCoolPainting:: @ 82199A5 msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 9 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_ShowBeautyPainting:: @ 82199B3 msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 10 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_ShowCutePainting:: @ 82199C1 msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 11 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_ShowSmartPainting:: @ 82199CF msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 12 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_ShowToughPainting:: @ 82199DD msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsPaintingOfPokemon, MSGBOX_SIGN - fadescreen 1 + fadescreen FADE_TO_BLACK showcontestwinner 13 releaseall end diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc index 7d9e0f239..2592ccd9c 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc +++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc @@ -25,9 +25,9 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: @ 821EA3B compare VAR_RESULT, 1 goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_MonOnlyKnowsOneMove msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMoveShouldBeForgotten, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK special MoveDeleterChooseMoveToForget - fadescreen 0 + fadescreen FADE_FROM_BLACK compare VAR_0x8005, MAX_MON_MOVES goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget special BufferMoveDeleterNicknameAndMove diff --git a/data/maps/MagmaHideout_4F/scripts.inc b/data/maps/MagmaHideout_4F/scripts.inc index 08b59e1f0..e536709b1 100644 --- a/data/maps/MagmaHideout_4F/scripts.inc +++ b/data/maps/MagmaHideout_4F/scripts.inc @@ -62,14 +62,14 @@ MagmaHideout_4F_EventScript_Maxie:: @ 823A560 setvar VAR_SLATEPORT_CITY_STATE, 1 setflag FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT setvar VAR_SLATEPORT_HARBOR_STATE, 1 - fadescreen 1 + fadescreen FADE_TO_BLACK removeobject 6 removeobject 2 removeobject 3 removeobject 4 removeobject 5 setflag FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS - fadescreen 0 + fadescreen FADE_FROM_BLACK releaseall end diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 403377161..602c6b231 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -248,7 +248,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle:: @ 822400C applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown waitmovement 0 special SavePlayerParty - fadescreen 1 + fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 @@ -267,7 +267,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle:: @ 8224032 special LoadPlayerParty switch VAR_RESULT case 1, MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha - fadescreen 1 + fadescreen FADE_TO_BLACK special SetCB2WhiteOut waitstate @@ -287,7 +287,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: @ 8224071 closemessage setvar VAR_MOSSDEEP_CITY_STATE, 3 fadedefaultbgm - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_MOSSDEEP_SPACE_CENTER_STATE, 3 setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA @@ -304,10 +304,10 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: @ 8224071 setobjectxy 1, 6, 2 turnobject 1, DIR_NORTH call MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayer - fadescreen 0 + fadescreen FADE_FROM_BLACK msgbox MossdeepCity_SpaceCenter_2F_Text_StevenThankYouComeSeeMeAtHome, MSGBOX_DEFAULT closemessage - fadescreen 1 + fadescreen FADE_TO_BLACK setflag FLAG_DEFEATED_MAGMA_SPACE_CENTER setflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN removeobject 4 @@ -319,7 +319,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: @ 8224071 setobjectxyperm 3, 5, 6 setobjectmovementtype 3, MOVEMENT_TYPE_WANDER_AROUND addobject 3 - fadescreen 0 + fadescreen FADE_FROM_BLACK end MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayer:: @ 8224131 diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index a70d7e3ae..e57260b2a 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -47,13 +47,13 @@ MtChimney_EventScript_Maxie:: @ 822EE0B msgbox MtChimney_Text_MaxieYouHaventSeenLastOfMagma, MSGBOX_DEFAULT closemessage delay 30 - fadescreen 1 + fadescreen FADE_TO_BLACK removeobject 2 removeobject 29 removeobject 3 removeobject 22 setflag FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA - fadescreen 0 + fadescreen FADE_FROM_BLACK setobjectxyperm 1, 10, 12 addobject 1 compare VAR_FACING, DIR_EAST diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc index 577b87076..c13dd0da7 100644 --- a/data/maps/MtPyre_Summit/scripts.inc +++ b/data/maps/MtPyre_Summit/scripts.inc @@ -45,7 +45,7 @@ MtPyre_Summit_EventScript_TeamAquaExits:: @ 823203C call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer2 msgbox MtPyre_Summit_Text_ArchieWeGotTheOrbLetsGo, MSGBOX_DEFAULT closemessage - fadescreen 1 + fadescreen FADE_TO_BLACK removeobject 2 removeobject 4 removeobject 5 @@ -54,7 +54,7 @@ MtPyre_Summit_EventScript_TeamAquaExits:: @ 823203C setflag FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE setflag FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA fadedefaultbgm - fadescreen 0 + fadescreen FADE_FROM_BLACK delay 20 setvar VAR_MT_PYRE_STATE, 1 compare VAR_0x8008, 0 diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index dca3dc47d..56a256ca9 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -220,7 +220,7 @@ Route101_EventScript_BirchsBag:: @ 81EBE16 faceplayer setflag FLAG_SYS_POKEMON_GET setflag FLAG_RESCUED_BIRCH - fadescreen 1 + fadescreen FADE_TO_BLACK removeobject 4 setobjectxy EVENT_OBJ_ID_PLAYER, 6, 13 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc index 30d453abd..57c5f9f57 100644 --- a/data/maps/Route113_GlassWorkshop/scripts.inc +++ b/data/maps/Route113_GlassWorkshop/scripts.inc @@ -206,10 +206,10 @@ Route113_GlassWorkshop_EventScript_ChooseDifferentItem:: @ 826F003 Route113_GlassWorkshop_EventScript_MakeGlassItem:: @ 826F00F msgbox Route113_GlassWorkshop_Text_IllMakeItemForYou, MSGBOX_DEFAULT closemessage - fadescreen 1 + fadescreen FADE_TO_BLACK playse SE_SELECT delay 30 - fadescreen 0 + fadescreen FADE_FROM_BLACK msgbox Route113_GlassWorkshop_Text_IveFinishedGlassItem, MSGBOX_DEFAULT compare VAR_0x8009, 0 call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassFlute diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 0433877a5..7363b1331 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -64,7 +64,7 @@ Route119_WeatherInstitute_2F_EventScript_ShellyDefeated:: @ 826FFC8 setvar VAR_WEATHER_INSTITUTE_STATE, 1 clearflag FLAG_HIDE_WEATHER_INSTITUTE_2F_WORKERS fadedefaultbgm - fadescreen 1 + fadescreen FADE_TO_BLACK setflag FLAG_HIDE_ROUTE_119_TEAM_AQUA setflag FLAG_HIDE_WEATHER_INSTITUTE_2F_AQUA_GRUNT_M removeobject 1 @@ -74,7 +74,7 @@ Route119_WeatherInstitute_2F_EventScript_ShellyDefeated:: @ 826FFC8 removeobject 7 applymovement EVENT_OBJ_ID_PLAYER, Route119_WeatherInstitute_2F_Movement_PlayerReturnToPosition waitmovement 0 - fadescreen 0 + fadescreen FADE_FROM_BLACK applymovement 5, Route119_WeatherInstitute_2F_Movement_ScientistApproachPlayer waitmovement 0 copyobjectxytoperm 5 diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index a965ff060..6018e2d95 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -225,10 +225,10 @@ Route120_EventScript_StevenBattleKecleon:: @ 81F568B end Route120_EventScript_RemoveBridgeKecleonPostBattle:: @ 81F571C - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK removeobject 30 @ Invisible Bridge Kecleon removeobject 36 @ Visible Bridge Kecleon - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK goto Route120_EventScript_StevenGiveDeconScope end diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index 49fdc6b9a..84d034237 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -80,12 +80,12 @@ SkyPillar_Outside_EventScript_WallaceScene:: @ 8239304 msgbox SkyPillar_Outside_Text_GotToGoBackForSootopolis, MSGBOX_DEFAULT closemessage playse SE_KAIDAN - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK clearflag FLAG_HIDE_MAP_NAME_POPUP setvar VAR_SOOTOPOLIS_CITY_STATE, 4 removeobject 1 clearflag FLAG_HIDE_SOOTOPOLIS_CITY_WALLACE - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK releaseall end diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index e12919082..b67675d93 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -76,16 +76,16 @@ SkyPillar_Top_EventScript_RanFromRayquaza:: @ 8239771 end SkyPillar_Top_EventScript_DefeatedRayquaza2:: @ 823977C - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK removeobject VAR_LAST_TALKED - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK releaseall end SkyPillar_Top_EventScript_RanFromRayquaza2:: @ 8239785 - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK removeobject VAR_LAST_TALKED - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK bufferspeciesname 0, VAR_0x8004 msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT releaseall diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 8e9b5f1b4..5a8665de3 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -34,7 +34,7 @@ SlateportCity_BattleTentCorridor_EventScript_208E65:: @ 8208E65 slateporttent_generaterentalmons slateporttent_generateopponentmons msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK slateporttent_rentmons waitstate SlateportCity_BattleTentCorridor_EventScript_208EB4:: @ 8208EB4 @@ -97,7 +97,7 @@ SlateportCity_BattleTentCorridor_EventScript_208FBB:: @ 8208FBB case MULTI_B_PRESSED, SlateportCity_BattleTentCorridor_EventScript_208EB4 SlateportCity_BattleTentCorridor_EventScript_208FF1:: @ 8208FF1 - fadescreen 1 + fadescreen FADE_TO_BLACK slateporttent_swapmons waitstate compare VAR_RESULT, 1 @@ -121,7 +121,7 @@ SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022 slateporttent_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc index 9facd0937..38fb70e7d 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc @@ -61,11 +61,11 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: @ 820BB00 closemessage savebgm MUS_DUMMY fadedefaultbgm - fadescreen 1 + fadescreen FADE_TO_BLACK removeobject 2 removeobject 3 removeobject 4 - fadescreen 0 + fadescreen FADE_FROM_BLACK delay 30 setflag FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight @@ -75,7 +75,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: @ 820BB00 call Common_EventScript_PlayerHandedOverTheItem msgbox SlateportCity_OceanicMuseum_2F_Text_SternIveGotToGo, MSGBOX_DEFAULT closemessage - fadescreen 1 + fadescreen FADE_TO_BLACK playfanfare MUS_ME_ASA waitfanfare special HealPlayerParty @@ -87,7 +87,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: @ 820BB00 clearflag FLAG_HIDE_ROUTE_116_DEVON_EMPLOYEE setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_CORP_3F_EMPLOYEE setvar VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE, 1 - fadescreen 0 + fadescreen FADE_FROM_BLACK release end diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index faec31717..6b80168b9 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -214,7 +214,7 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: @ 81E5946 waitmovement 0 special RemoveCameraObject delay 60 - fadescreenspeed 1, 8 + fadescreenspeed FADE_TO_BLACK, 8 setweather WEATHER_ABNORMAL doweather setvar VAR_0x8004, 0 @@ -314,7 +314,7 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: @ 81E5A82 waitmovement 0 special RemoveCameraObject delay 60 - fadescreenspeed 1, 8 + fadescreenspeed FADE_TO_BLACK, 8 setweather WEATHER_ABNORMAL doweather setvar VAR_0x8004, 0 @@ -505,7 +505,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: @ 81E5C1E waitmovement 0 special RemoveCameraObject delay 60 - fadescreenspeed 1, 8 + fadescreenspeed FADE_TO_BLACK, 8 call SootopolisCity_EventScript_SetRoughWater removeobject 9 removeobject 10 @@ -558,7 +558,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: @ 81E5CCE waitmovement 0 special RemoveCameraObject delay 60 - fadescreenspeed 1, 8 + fadescreenspeed FADE_TO_BLACK, 8 call SootopolisCity_EventScript_SetRoughWater removeobject 9 removeobject 10 diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index 043d9ad82..949d199d5 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -126,7 +126,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle:: @ 8227AE2 SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty:: @ 8227AEF msgbox SootopolisCity_MysteryEventsHouse_1F_Text_KeepItTo3On3, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate return diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index 0e8d28c1d..cde7aae2f 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -219,7 +219,7 @@ TrainerHill_Entrance_Movement_PlayerExitElevator: @ 8268385 TrainerHill_Entrance_EventScript_Records:: @ 8268388 lockall - fadescreen 1 + fadescreen FADE_TO_BLACK special ShowTrainerHillRecords waitstate releaseall diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index 4760880e2..e37916517 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -123,7 +123,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_20251F:: @ 820251F verdanturftent_save CHALLENGE_STATUS_PAUSED playse SE_SAVE waitse - fadescreen 1 + fadescreen FADE_TO_BLACK frontier_reset end diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index f15bbd4f8..690ca37db 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -129,7 +129,7 @@ VerdanturfTown_BattleTentLobby_EventScript_2018CF:: @ 82018CF goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_2019E8 frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT msgbox VerdanturfTown_BattleTentLobby_Text_2C5633, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_0x8004, 1 setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier diff --git a/data/scripts/abnormal_weather.inc b/data/scripts/abnormal_weather.inc index 9a900f315..88da0405f 100644 --- a/data/scripts/abnormal_weather.inc +++ b/data/scripts/abnormal_weather.inc @@ -179,7 +179,7 @@ AbnormalWeather_EventScript_EndEventAndCleanup_1:: @ 8273D1F AbnormalWeather_EventScript_EndEventAndCleanup_2:: @ 8273D31 closemessage - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK setweather WEATHER_SUNNY doweather call AbnormalWeather_EventScript_CleanupMapTiles @@ -187,7 +187,7 @@ AbnormalWeather_EventScript_EndEventAndCleanup_2:: @ 8273D31 setvar VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_NONE setvar VAR_SHOULD_END_ABNORMAL_WEATHER, 0 clearflag FLAG_HIDE_MAP_NAME_POPUP - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK releaseall end diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc index 53b43a1f9..b3ae904a0 100644 --- a/data/scripts/apprentice.inc +++ b/data/scripts/apprentice.inc @@ -96,7 +96,7 @@ Apprentice_EventScript_UseWhatHeldItem: @ 82B6ACF apprentice_msg TRUE, APPRENTICE_MSG_WHAT_HELD_ITEM apprentice_freequestion Apprentice_EventScript_ChooseHoldItem: @ 82B6B09 - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_RESULT, 0 apprentice_openbag compare VAR_RESULT, FALSE diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc index 1d0862a65..b699c8e04 100644 --- a/data/scripts/berry_blender.inc +++ b/data/scripts/berry_blender.inc @@ -302,7 +302,7 @@ BerryBlender_EventScript_TryUseBerryBlender1: @ 8293CEE @ VAR_0x8009 here is the Blender number. 1 is top right, 2 is bottom right, 3 is bottom left BerryBlender_EventScript_DoBerryBlending: @ 8293D2C copyvar VAR_0x8004, VAR_0x8009 - fadescreen 1 + fadescreen FADE_TO_BLACK special DoBerryBlending waitstate releaseall @@ -629,7 +629,7 @@ BerryBlender_EventScript_FourPlayerLink: @ 8294139 BerryBlender_EventScript_DoLinkBerryBlending: @ 8294147 setvar VAR_0x8004, 0 - fadescreen 1 + fadescreen FADE_TO_BLACK removeobject 240 removeobject 239 removeobject 238 @@ -678,7 +678,7 @@ BerryBlender_EventScript_LinkError: @ 829419D end BerryBlender_EventScript_SpawnLinkPartners: @ 82941AA - fadescreen 1 + fadescreen FADE_TO_BLACK specialvar VAR_RESULT, GetLinkPartnerNames copyvar VAR_0x8008, VAR_RESULT copyvar VAR_0x8004, VAR_0x8008 @@ -687,7 +687,7 @@ BerryBlender_EventScript_SpawnLinkPartners: @ 82941AA end BerryBlender_EventScript_LinkPlayersArrived: @ 82941C4 - fadescreen 0 + fadescreen FADE_FROM_BLACK switch VAR_0x8008 case 2, BerryBlender_EventScript_TwoPlayerLink case 3, BerryBlender_EventScript_ThreePlayerLink diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index 6b2da5ccb..f4b592b69 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -39,7 +39,7 @@ BerryTree_EventScript_WantToPlant:: @ 8274374 end BerryTree_EventScript_ChooseBerryToPlant:: @ 8274393 - fadescreen 1 + fadescreen FADE_TO_BLACK closemessage special Bag_ChooseBerry waitstate diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index f37596961..2da5fa6b6 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -723,7 +723,7 @@ EventScript_BattleColosseum2P_PlayerSpot1:: @ 827737E end EventScript_BattleColosseum4P_PlayerSpot0:: @ 8277388 - fadescreen 1 + fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 @@ -734,7 +734,7 @@ EventScript_BattleColosseum4P_PlayerSpot0:: @ 8277388 end EventScript_BattleColosseum4P_PlayerSpot1:: @ 82773A3 - fadescreen 1 + fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 @@ -745,7 +745,7 @@ EventScript_BattleColosseum4P_PlayerSpot1:: @ 82773A3 end EventScript_BattleColosseum4P_PlayerSpot2:: @ 82773BE - fadescreen 1 + fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 @@ -756,7 +756,7 @@ EventScript_BattleColosseum4P_PlayerSpot2:: @ 82773BE end EventScript_BattleColosseum4P_PlayerSpot3:: @ 82773D9 - fadescreen 1 + fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 @@ -838,14 +838,14 @@ RecordCorner_EventScript_ReceivedGiftItem:: @ 8277471 CableClub_EventScript_ReadTrainerCard:: @ 827747E msgbox CableClub_Text_GotToLookAtTrainerCard, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK special Script_ShowLinkTrainerCard waitstate end CableClub_EventScript_ReadTrainerCardColored:: @ 827748D msgbox CableClub_Text_GotToLookAtColoredTrainerCard, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK special Script_ShowLinkTrainerCard waitstate end @@ -1309,7 +1309,7 @@ EventScript_WirelessBoxResults:: @ 8277B8A specialvar VAR_RESULT, IsWirelessAdapterConnected compare VAR_RESULT, FALSE goto_if_eq CableClub_EventScript_AdapterNotConnected - fadescreen 1 + fadescreen FADE_TO_BLACK special sub_801A42C waitstate msgbox CableClub_Text_ParticipantsStepUpToCounter, MSGBOX_DEFAULT @@ -1408,7 +1408,7 @@ MossdeepCity_GameCorner_1F_EventScript_PlayPokemonJump:: @ 8277CE9 compare VAR_RESULT, FALSE goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_0x8005, 0 special ChooseMonForWirelessMinigame waitstate @@ -1427,7 +1427,7 @@ MossdeepCity_GameCorner_1F_EventScript_PlayDodrioBerryPicking:: @ 8277D35 compare VAR_RESULT, FALSE goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_0x8005, 1 special ChooseMonForWirelessMinigame waitstate diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index 968464f9d..6506897ee 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -102,7 +102,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise:: @ 8291D56 compare VAR_RESULT, 2 goto_if_eq Route117_PokemonDayCare_EventScript_OnlyTwoAliveMons msgbox Route117_PokemonDayCare_Text_WhichMonShouldWeRaise, MSGBOX_DEFAULT - fadescreen 1 + fadescreen FADE_TO_BLACK special ChooseSendDaycareMon waitstate compare VAR_0x8004, 255 diff --git a/data/scripts/field_poison.inc b/data/scripts/field_poison.inc index ccdebd5cd..3ce36b384 100644 --- a/data/scripts/field_poison.inc +++ b/data/scripts/field_poison.inc @@ -15,7 +15,7 @@ EventScript_FieldWhiteOut:: @ 82736D9 waitbuttonpress special Script_FadeOutMapMusic waitstate - fadescreen 1 + fadescreen FADE_TO_BLACK call_if_set FLAG_WHITEOUT_TO_LAVARIDGE, EventScript_SetRespawnLavaridgePkmnCenter special SetCB2WhiteOut waitstate @@ -42,7 +42,7 @@ EventScript_FrontierFieldWhiteOut:: @ 82736F8 goto_if_eq TrainerHill_1F_EventScript_Lost special Script_FadeOutMapMusic waitstate - fadescreen 1 + fadescreen FADE_TO_BLACK special SetCB2WhiteOut waitstate end diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index f553ea0ad..c2ff593cf 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -73,7 +73,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor:: @ 82A845E end LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem:: @ 82A846C - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_RESULT, 0 special Script_FavorLadyOpenBagMenu waitstate @@ -326,7 +326,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz:: @ 82A8778 LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz:: @ 82A8785 msgbox LilycoveCity_PokemonCenter_1F_Text_PickYourPrize, MSGBOX_DEFAULT LilycoveCity_PokemonCenter_1F_EventScript_PickPrize:: @ 82A878D - fadescreen 1 + fadescreen FADE_TO_BLACK setvar VAR_RESULT, 0 special Script_QuizLadyOpenBagMenu waitstate @@ -350,7 +350,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz:: @ 82A87CE special ClearQuizLadyPlayerAnswer setvar VAR_0x8004, EASY_CHAT_TYPE_QUIZ_QUESTION LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion:: @ 82A87E1 - fadescreen 1 + fadescreen FADE_TO_BLACK special QuizLadySetCustomQuestion waitstate compare VAR_RESULT, 0 @@ -418,7 +418,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock:: @ 82A88B0 end LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock:: @ 82A88BA - fadescreen 1 + fadescreen FADE_TO_BLACK special OpenPokeblockCaseForContestLady waitstate compare VAR_RESULT, 0xFFFF diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc index cc583022d..ec58b26f1 100644 --- a/data/scripts/pc_transfer.inc +++ b/data/scripts/pc_transfer.inc @@ -6,7 +6,7 @@ Common_EventScript_GetGiftMonPartySlot:: @ 827378B return Common_EventScript_NameReceivedBoxMon:: @ 8273797 - fadescreen 1 + fadescreen FADE_TO_BLACK special ChangeBoxPokemonNickname waitstate lock diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index 1b706e603..58618efe7 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -101,14 +101,14 @@ PlayersHouse_2F_EventScript_MomComesUpstairsFemale:: @ 829280F PlayersHouse_2F_EventScript_CheckWallClock:: @ 829283F incrementgamestat GAME_STAT_CHECKED_CLOCK - fadescreen 1 + fadescreen FADE_TO_BLACK special Special_ViewWallClock waitstate releaseall end PlayersHouse_2F_EventScript_SetWallClock:: @ 8292849 - fadescreen 1 + fadescreen FADE_TO_BLACK special StartWallClock waitstate return diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 72d1d3c92..6a811d935 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -52,7 +52,7 @@ EventScript_PokeBlockFeeder:: @ 82A4BAC end SafariZone_EventScript_ChoosePokeblock:: @ 82A4BD0 - fadescreen 1 + fadescreen FADE_TO_BLACK special OpenPokeblockCaseOnFeeder waitstate compare VAR_RESULT, 0xFFFF diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index 617b19b42..0f2ad02b1 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -214,10 +214,10 @@ SecretBase_EventScript_AlreadyHasSecretBase:: @ 8275BE8 msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance - fadescreenswapbuffers 1 + fadescreenswapbuffers FADE_TO_BLACK special MoveOutOfSecretBaseFromOutside closemessage - fadescreenswapbuffers 0 + fadescreenswapbuffers FADE_FROM_BLACK msgbox SecretBase_Text_MovingCompletedUseSecretPower, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance diff --git a/include/constants/field_weather.h b/include/constants/field_weather.h new file mode 100644 index 000000000..e84dbc48c --- /dev/null +++ b/include/constants/field_weather.h @@ -0,0 +1,24 @@ +#ifndef GUARD_CONSTANTS_FIELD_WEATHER_H +#define GUARD_CONSTANTS_FIELD_WEATHER_H + +#define MAX_RAIN_SPRITES 24 +#define NUM_CLOUD_SPRITES 3 +#define NUM_FOG_HORIZONTAL_SPRITES 20 +#define NUM_ASH_SPRITES 20 +#define NUM_FOG_DIAGONAL_SPRITES 20 +#define NUM_SANDSTORM_SPRITES 20 +#define NUM_SWIRL_SANDSTORM_SPRITES 5 + +// Controls how the weather should be changing the screen palettes. +#define WEATHER_PAL_STATE_CHANGING_WEATHER 0 +#define WEATHER_PAL_STATE_SCREEN_FADING_IN 1 +#define WEATHER_PAL_STATE_SCREEN_FADING_OUT 2 +#define WEATHER_PAL_STATE_IDLE 3 + +// Modes for FadeScreen +#define FADE_FROM_BLACK 0 +#define FADE_TO_BLACK 1 +#define FADE_FROM_WHITE 2 +#define FADE_TO_WHITE 3 + +#endif // GUARD_CONSTANTS_FIELD_WEATHER_H diff --git a/include/field_weather.h b/include/field_weather.h index e587da233..1af320151 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -2,32 +2,7 @@ #define GUARD_WEATHER_H #include "sprite.h" - -#define MAX_RAIN_SPRITES 24 -#define NUM_CLOUD_SPRITES 3 -#define NUM_FOG_HORIZONTAL_SPRITES 20 -#define NUM_ASH_SPRITES 20 -#define NUM_FOG_DIAGONAL_SPRITES 20 -#define NUM_SANDSTORM_SPRITES 20 -#define NUM_SWIRL_SANDSTORM_SPRITES 5 - -// Controls how the weather should be changing the screen palettes. -enum -{ - WEATHER_PAL_STATE_CHANGING_WEATHER, - WEATHER_PAL_STATE_SCREEN_FADING_IN, - WEATHER_PAL_STATE_SCREEN_FADING_OUT, - WEATHER_PAL_STATE_IDLE, -}; - -// For the FadeScreen function. -enum -{ - FADE_FROM_BLACK, - FADE_TO_BLACK, - FADE_FROM_WHITE, - FADE_TO_WHITE, -}; +#include "constants/field_weather.h" struct Weather { diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 5a9fd5687..bdd1b1462 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -357,7 +357,7 @@ static void sub_81C4F10(void) void ChooseItemsToTossFromPyramidBag(void) { ScriptContext2_Enable(); - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); CreateTask(Task_ChooseItemsToTossFromPyramidBag, 10); } diff --git a/src/cable_club.c b/src/cable_club.c index b1675030b..ab72ee3f2 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -816,7 +816,7 @@ static void sub_80B32B4(u8 taskId) switch (task->data[0]) { case 0: - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gLinkType = LINKTYPE_BATTLE; ClearLinkCallback_2(); task->data[0]++; @@ -862,7 +862,7 @@ static void sub_80B33BC(u8 taskId) switch (data[0]) { case 0: - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gLinkType = LINKTYPE_BATTLE; ClearLinkCallback_2(); data[0] = 1; @@ -1077,7 +1077,7 @@ static void sub_80B37FC(u8 taskId) { case 0: ScriptContext2_Enable(); - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); ClearLinkCallback_2(); task->data[0]++; break; @@ -1110,7 +1110,7 @@ static void sub_80B3894(u8 taskId) { case 0: ScriptContext2_Enable(); - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); ClearLinkRfuCallback(); data[0]++; break; diff --git a/src/decoration.c b/src/decoration.c index 2a47dd553..4198f432f 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -608,7 +608,7 @@ static void DecorationMenuAction_PutAway(u8 taskId) { RemoveDecorationWindow(0); ClearDialogWindowAndFrame(0, 0); - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].data[2] = 0; gTasks[taskId].func = sub_8129ABC; } @@ -1292,7 +1292,7 @@ void sub_8127F68(u8 taskId) { if (sub_8127F38() == TRUE) { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].data[2] = 0; gTasks[taskId].func = sub_8128060; } @@ -1682,7 +1682,7 @@ void CancelDecorating(u8 taskId) void sub_8128BBC(u8 taskId) { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].data[2] = 0; gTasks[taskId].func = c1_overworld_prev_quest; } @@ -2551,7 +2551,7 @@ void ReturnDecorationPrompt(u8 taskId) void PutAwayDecoration(u8 taskId) { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].data[2] = 0; gTasks[taskId].func = sub_81298EC; } @@ -2570,7 +2570,7 @@ void StopPuttingAwayDecorations(u8 taskId) void sub_812A22C(u8 taskId) { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].data[2] = 0; gTasks[taskId].func = sub_812A25C; } diff --git a/src/easy_chat.c b/src/easy_chat.c index 995a2bc7e..6bb1d9c86 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -1341,7 +1341,7 @@ static void CB2_QuizLadyQuestion(void) switch (gMain.state) { case 0: - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); break; case 1: if (!gPaletteFade.active) diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 2ce2c04bb..2a942c9d9 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -461,7 +461,7 @@ void EggHatch(void) { ScriptContext2_Enable(); CreateTask(Task_EggHatch, 10); - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); } static void Task_EggHatch(u8 taskID) diff --git a/src/item_use.c b/src/item_use.c index 0b7625054..4d5796f59 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -601,7 +601,7 @@ void ItemUseOutOfBattle_PokeblockCase(u8 taskId) else { gFieldCallback = sub_80AF6D4; - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].func = sub_80FDC00; } } diff --git a/src/player_pc.c b/src/player_pc.c index 94484ab72..e10af43b8 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -484,7 +484,7 @@ static void ItemStorageMenuProcessInput(u8 taskId) static void ItemStorage_Deposit(u8 taskId) { gTasks[taskId].func = Task_ItemStorage_Deposit; - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); } static void Task_ItemStorage_Deposit(u8 taskId) @@ -714,7 +714,7 @@ static void Mailbox_MailOptionsProcessInput(u8 taskId) static void Mailbox_DoMailRead(u8 taskId) { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].func = Mailbox_FadeAndReadMail; } @@ -813,7 +813,7 @@ static void Mailbox_Give(u8 taskId) Mailbox_NoPokemonForMail(taskId); else { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); gTasks[taskId].func = Mailbox_DoGiveMailPokeMenu; } } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index fae152bb2..3118f66cd 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1790,7 +1790,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId) } else { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); task->data[0] = 4; } break; diff --git a/src/pokenav.c b/src/pokenav.c index 9f12380df..511c323d1 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -320,7 +320,7 @@ void CB2_InitPokeNav(void) void OpenPokenavForTutorial(void) { SetMainCallback2(CB2_InitPokenavForTutorial); - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); } static void CB2_InitPokenavForTutorial(void) diff --git a/src/scrcmd.c b/src/scrcmd.c index a9be5c3ef..a6ead183b 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -650,13 +650,14 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx) switch (mode) { - case 1: + case FADE_TO_BLACK: + case FADE_TO_WHITE: default: CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE); FadeScreen(mode, 0); break; - case 0: - case 2: + case FADE_FROM_BLACK: + case FADE_FROM_WHITE: CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_DECOMP_BUFFER_SIZE); FadeScreen(mode, 0); break; diff --git a/src/secret_base.c b/src/secret_base.c index b9826a257..1d5313383 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -423,7 +423,7 @@ static void Task_EnterSecretBase(u8 taskId) void EnterSecretBase(void) { CreateTask(Task_EnterSecretBase, 0); - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); } diff --git a/src/shop.c b/src/shop.c index 324154d2e..3fe490941 100755 --- a/src/shop.c +++ b/src/shop.c @@ -348,7 +348,7 @@ static void Task_HandleShopMenuBuy(u8 taskId) data[8] = (u32)CB2_InitBuyMenu >> 16; data[9] = (u32)CB2_InitBuyMenu; gTasks[taskId].func = Task_GoToBuyOrSellMenu; - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); } static void Task_HandleShopMenuSell(u8 taskId) @@ -357,7 +357,7 @@ static void Task_HandleShopMenuSell(u8 taskId) data[8] = (u32)CB2_GoToSellMenu >> 16; data[9] = (u32)CB2_GoToSellMenu; gTasks[taskId].func = Task_GoToBuyOrSellMenu; - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); } void CB2_ExitSellMenu(void) diff --git a/src/start_menu.c b/src/start_menu.c index d0e28cf02..b9ecf77be 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -581,7 +581,7 @@ static bool8 HandleStartMenuInput(void) && gMenuCallback != StartMenuSafariZoneRetireCallback && gMenuCallback != StartMenuBattlePyramidRetireCallback) { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); } return FALSE; diff --git a/src/union_room.c b/src/union_room.c index ba973a7d9..1655b78da 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1583,7 +1583,7 @@ void sub_8014790(u8 taskId) case 1: if (!ScriptContext1_IsScriptSetUp()) { - FadeScreen(1, 0); + FadeScreen(FADE_TO_BLACK, 0); data[0] = 2; } break; From 3f858c1c26bbc8301970d8201d58577da764cd62 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 12 Dec 2019 10:16:05 +0800 Subject: [PATCH 21/35] sub_8022F04 --- asm/berry_crush.s | 2527 --------------------------------------------- src/berry_crush.c | 1665 +++++++++++++++++++++++++++-- 2 files changed, 1556 insertions(+), 2636 deletions(-) diff --git a/asm/berry_crush.s b/asm/berry_crush.s index cd70df741..ebf819188 100755 --- a/asm/berry_crush.s +++ b/asm/berry_crush.s @@ -5,2533 +5,6 @@ .text - thumb_func_start sub_8021A28 -sub_8021A28: @ 8021A28 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x2C - str r0, [sp, 0xC] - lsls r1, 24 - lsrs r1, 24 - str r1, [sp, 0x10] - lsls r2, 24 - lsrs r2, 24 - str r2, [sp, 0x14] - lsls r3, 24 - movs r0, 0 - str r0, [sp, 0x18] - movs r1, 0 - str r1, [sp, 0x1C] - ldr r2, [sp, 0xC] - adds r2, 0x68 - str r2, [sp, 0x20] - movs r4, 0xF0 - lsls r4, 24 - adds r3, r4 - lsrs r3, 24 - ldr r0, [sp, 0x10] - cmp r0, 0x2 - bne _08021A68 - adds r0, r3, 0 - subs r0, 0x2A - lsls r0, 24 - lsrs r3, r0, 24 -_08021A68: - ldr r2, [sp, 0xC] - ldrb r1, [r2, 0x9] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 1 - subs r6, r3, r0 - cmp r6, 0 - ble _08021A84 - lsrs r0, r6, 31 - adds r0, r6, r0 - asrs r0, 1 - adds r6, r0, 0 - adds r6, 0x10 - b _08021A86 -_08021A84: - movs r6, 0x10 -_08021A86: - movs r5, 0 - ldr r3, [sp, 0xC] - ldrb r3, [r3, 0x9] - cmp r5, r3 - bcc _08021A92 - b _08021D14 -_08021A92: - ldr r4, [sp, 0x10] - lsls r4, 2 - str r4, [sp, 0x24] -_08021A98: - bl DynamicPlaceholderTextUtil_Reset - ldr r0, [sp, 0x10] - cmp r0, 0x1 - beq _08021B48 - cmp r0, 0x1 - bgt _08021AC0 - cmp r0, 0 - beq _08021ADE - ldr r4, [sp, 0x14] - subs r4, 0x4 - lsls r1, r6, 24 - mov r10, r1 - ldr r2, [sp, 0x1C] - adds r2, 0xA2 - mov r9, r2 - ldr r3, [sp, 0x18] - lsls r3, 5 - mov r8, r3 - b _08021C5A -_08021AC0: - ldr r4, [sp, 0x10] - cmp r4, 0x2 - bne _08021AC8 - b _08021C1C -_08021AC8: - ldr r4, [sp, 0x14] - subs r4, 0x4 - lsls r0, r6, 24 - mov r10, r0 - ldr r1, [sp, 0x1C] - adds r1, 0xA2 - mov r9, r1 - ldr r2, [sp, 0x18] - lsls r2, 5 - mov r8, r2 - b _08021C5A -_08021ADE: - ldr r0, [sp, 0x20] - adds r0, 0x20 - adds r0, r5 - ldrb r0, [r0] - str r0, [sp, 0x18] - lsls r3, r5, 1 - ldr r2, [sp, 0x20] - adds r2, 0xC - cmp r5, 0 - beq _08021B04 - adds r0, r2, r3 - subs r1, r5, 0x1 - lsls r1, 1 - adds r1, r2, r1 - ldrh r0, [r0] - ldrh r1, [r1] - cmp r0, r1 - beq _08021B04 - str r5, [sp, 0x1C] -_08021B04: - ldr r4, [sp, 0x24] - ldr r1, [sp, 0x10] - adds r0, r4, r1 - lsls r0, 1 - adds r0, r3, r0 - adds r0, r2, r0 - ldrh r1, [r0] - ldr r0, =gStringVar4 - movs r2, 0x1 - movs r3, 0x4 - bl ConvertIntToDecimalStringN - ldr r0, =gUnknown_082F43B4 - adds r0, r4, r0 - ldr r1, [r0] - ldr r0, =gStringVar4 - bl StringAppend - ldr r4, [sp, 0x14] - subs r4, 0x4 - lsls r2, r6, 24 - mov r10, r2 - ldr r3, [sp, 0x1C] - adds r3, 0xA2 - mov r9, r3 - ldr r0, [sp, 0x18] - lsls r0, 5 - mov r8, r0 - b _08021C5A - .pool -_08021B48: - ldr r1, [sp, 0x20] - adds r0, r1, r5 - adds r0, 0x28 - ldrb r0, [r0] - str r0, [sp, 0x18] - lsls r3, r5, 1 - adds r2, r1, 0 - adds r2, 0xC - cmp r5, 0 - beq _08021B72 - adds r0, r3, 0 - adds r0, 0xA - adds r0, r2, r0 - adds r1, r3, 0 - adds r1, 0x8 - adds r1, r2, r1 - ldrh r0, [r0] - ldrh r1, [r1] - cmp r0, r1 - beq _08021B72 - str r5, [sp, 0x1C] -_08021B72: - ldr r0, [sp, 0x24] - ldr r1, [sp, 0x10] - adds r4, r0, r1 - lsls r4, 1 - adds r4, r3, r4 - adds r4, r2, r4 - ldrh r1, [r4] - lsrs r1, 4 - ldr r0, =gStringVar1 - movs r2, 0x1 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - movs r7, 0 - ldrb r0, [r4] - movs r3, 0xF - ands r3, r0 - movs r2, 0 - ldr r4, [sp, 0x10] - lsls r4, 2 - str r4, [sp, 0x28] - ldr r4, [sp, 0x14] - subs r4, 0x4 - lsls r0, r6, 24 - mov r10, r0 - ldr r1, [sp, 0x1C] - adds r1, 0xA2 - mov r9, r1 - ldr r0, [sp, 0x18] - lsls r0, 5 - mov r8, r0 - adds r6, 0xE - adds r5, 0x1 - ldr r1, =gUnknown_082F334C - mov r12, r1 -_08021BB8: - movs r0, 0x3 - subs r1, r0, r2 - adds r0, r3, 0 - asrs r0, r1 - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08021BD0 - lsls r0, r2, 2 - add r0, r12 - ldr r0, [r0] - adds r7, r0 -_08021BD0: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x3 - bls _08021BB8 - adds r0, r7, 0 - ldr r1, =0x000f4240 - bl __udivsi3 - lsls r0, 24 - lsrs r3, r0, 24 - ldr r0, =gStringVar2 - adds r1, r3, 0 - movs r2, 0x2 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - ldr r0, =gUnknown_082F43B4 - ldr r2, [sp, 0x28] - adds r0, r2, r0 - ldr r1, [r0] - ldr r0, =gStringVar4 - bl StringExpandPlaceholders - b _08021C5E - .pool -_08021C1C: - str r5, [sp, 0x18] - str r5, [sp, 0x1C] - lsls r7, r5, 5 - ldr r3, [sp, 0xC] - adds r0, r3, r7 - adds r0, 0xA4 - ldrb r2, [r0] - cmp r2, 0x2B - bls _08021C30 - movs r2, 0 -_08021C30: - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - ldr r0, =gBerries - adds r1, r0 - ldr r0, =gStringVar1 - bl StringCopy - ldr r0, =gUnknown_082F43B4 - ldr r1, [r0, 0x8] - ldr r0, =gStringVar4 - bl StringExpandPlaceholders - ldr r4, [sp, 0x14] - subs r4, 0x4 - lsls r0, r6, 24 - mov r10, r0 - movs r1, 0xA2 - adds r1, r5 - mov r9, r1 - mov r8, r7 -_08021C5A: - adds r6, 0xE - adds r5, 0x1 -_08021C5E: - movs r0, 0x2 - ldr r1, =gStringVar4 - adds r2, r4, 0 - bl GetStringRightAlignXOffset - adds r2, r0, 0 - ldr r3, [sp, 0xC] - movs r4, 0xDD - lsls r4, 1 - adds r0, r3, r4 - ldrb r0, [r0] - lsls r2, 24 - lsrs r2, 24 - mov r1, r10 - lsrs r3, r1, 24 - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - movs r4, 0 - str r4, [sp, 0x4] - ldr r1, =gStringVar4 - str r1, [sp, 0x8] - movs r1, 0x2 - bl AddTextPrinterParameterized3 - ldr r3, [sp, 0x18] - ldr r2, [sp, 0xC] - ldrb r2, [r2, 0x8] - cmp r3, r2 - bne _08021CC0 - ldr r0, =gStringVar3 - ldr r1, =gText_1DotBlueF700 - bl StringCopy - b _08021CC8 - .pool -_08021CC0: - ldr r0, =gStringVar3 - ldr r1, =gText_1DotF700 - bl StringCopy -_08021CC8: - ldr r4, =gStringVar3 - mov r3, r9 - strb r3, [r4] - mov r1, r8 - adds r1, 0x98 - ldr r0, [sp, 0xC] - adds r1, r0, r1 - movs r0, 0 - bl DynamicPlaceholderTextUtil_SetPlaceholderPtr - ldr r0, =gStringVar4 - adds r1, r4, 0 - bl DynamicPlaceholderTextUtil_ExpandPlaceholders - ldr r1, [sp, 0xC] - movs r2, 0xDD - lsls r2, 1 - adds r0, r1, r2 - ldrb r0, [r0] - mov r4, r10 - lsrs r3, r4, 24 - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - movs r1, 0 - str r1, [sp, 0x4] - ldr r2, =gStringVar4 - str r2, [sp, 0x8] - movs r1, 0x2 - movs r2, 0x4 - bl AddTextPrinterParameterized3 - lsls r0, r5, 24 - lsrs r5, r0, 24 - ldr r3, [sp, 0xC] - ldrb r3, [r3, 0x9] - cmp r5, r3 - bcs _08021D14 - b _08021A98 -_08021D14: - add sp, 0x2C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8021A28 - - thumb_func_start sub_8021D34 -sub_8021D34: @ 8021D34 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x1C - mov r8, r0 - movs r0, 0 - mov r10, r0 - movs r6, 0 - movs r1, 0 - str r1, [sp, 0xC] - mov r2, r8 - adds r2, 0x68 - str r2, [sp, 0x10] - movs r4, 0xDD - lsls r4, 1 - add r4, r8 - mov r9, r4 - ldrb r0, [r4] - movs r1, 0x4 - bl GetWindowAttribute - lsls r0, 27 - movs r1, 0xD6 - lsls r1, 24 - adds r0, r1 - lsrs r7, r0, 24 - movs r0, 0x9C - lsls r0, 1 - add r0, r8 - ldr r2, [sp, 0x10] - ldrh r1, [r2, 0x4] - bl sub_8021944 - ldrb r0, [r4] - ldr r4, =sBerryCrushTextColors1 - str r4, [sp] - str r6, [sp, 0x4] - ldr r1, =gText_TimeColon - str r1, [sp, 0x8] - movs r1, 0x2 - movs r2, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - ldr r4, =gText_SpaceSec - movs r0, 0x2 - adds r1, r4, 0 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - movs r1, 0xB0 - subs r0, r1, r0 - lsls r0, 24 - lsrs r6, r0, 24 - mov r2, r9 - ldrb r0, [r2] - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - mov r2, r10 - str r2, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - movs r0, 0x9F - lsls r0, 1 - add r0, r8 - movs r4, 0 - ldrsh r1, [r0, r4] - ldr r0, =gStringVar1 - movs r2, 0x2 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - ldr r0, =gStringVar2 - movs r1, 0xA0 - lsls r1, 1 - add r1, r8 - movs r2, 0 - ldrsh r1, [r1, r2] - movs r2, 0x2 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - ldr r5, =gStringVar4 - ldr r1, =gText_XDotY2 - adds r0, r5, 0 - bl StringExpandPlaceholders - movs r0, 0x2 - adds r1, r5, 0 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - subs r0, r6, r0 - lsls r0, 24 - lsrs r6, r0, 24 - mov r4, r9 - ldrb r0, [r4] - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - mov r2, r10 - str r2, [sp, 0x4] - str r5, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - ldr r4, =gText_SpaceMin - movs r0, 0x2 - adds r1, r4, 0 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - subs r0, r6, r0 - lsls r0, 24 - lsrs r6, r0, 24 - mov r1, r9 - ldrb r0, [r1] - ldr r2, =sBerryCrushTextColors1 - str r2, [sp] - mov r1, r10 - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - movs r0, 0x9E - lsls r0, 1 - add r0, r8 - movs r2, 0 - ldrsh r1, [r0, r2] - ldr r0, =gStringVar1 - movs r2, 0x2 - movs r3, 0x1 - bl ConvertIntToDecimalStringN - ldr r1, =gText_StrVar1 - adds r0, r5, 0 - bl StringExpandPlaceholders - movs r0, 0x2 - adds r1, r5, 0 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - subs r0, r6, r0 - lsls r0, 24 - lsrs r6, r0, 24 - mov r4, r9 - ldrb r0, [r4] - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - mov r2, r10 - str r2, [sp, 0x4] - str r5, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - adds r0, r7, 0 - adds r0, 0xE - lsls r0, 24 - lsrs r7, r0, 24 - ldrb r0, [r4] - ldr r4, =sBerryCrushTextColors1 - str r4, [sp] - mov r1, r10 - str r1, [sp, 0x4] - ldr r1, =gText_PressingSpeed - str r1, [sp, 0x8] - movs r1, 0x2 - movs r2, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - ldr r4, =gText_TimesPerSec - movs r0, 0x2 - adds r1, r4, 0 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - movs r2, 0xB0 - subs r0, r2, r0 - lsls r0, 24 - str r0, [sp, 0x18] - lsrs r6, r0, 24 - mov r1, r9 - ldrb r0, [r1] - ldr r2, =sBerryCrushTextColors1 - str r2, [sp] - mov r1, r10 - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - mov r4, r8 - ldrb r2, [r4, 0x16] - ldrh r0, [r4, 0x16] - mov r12, r0 - movs r1, 0x7 - mov r9, r1 - movs r5, 0x1 - ldr r3, =gUnknown_082F334C -_08021EEC: - mov r4, r9 - mov r0, r10 - subs r1, r4, r0 - adds r0, r2, 0 - asrs r0, r1 - ands r0, r5 - cmp r0, 0 - beq _08021F0A - mov r1, r10 - lsls r0, r1, 2 - adds r0, r3 - ldr r0, [r0] - ldr r4, [sp, 0xC] - adds r4, r0 - str r4, [sp, 0xC] -_08021F0A: - mov r0, r10 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - cmp r0, 0x7 - bls _08021EEC - ldr r0, =gStringVar1 - mov r2, r12 - lsrs r1, r2, 8 - movs r2, 0x1 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - ldr r4, =gStringVar2 - ldr r1, =0x000f4240 - ldr r0, [sp, 0xC] - bl __udivsi3 - adds r1, r0, 0 - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - ldr r4, =gStringVar4 - ldr r1, =gText_XDotY3 - adds r0, r4, 0 - bl StringExpandPlaceholders - movs r2, 0x1 - negs r2, r2 - movs r0, 0x2 - adds r1, r4, 0 - bl GetStringWidth - subs r0, r6, r0 - lsls r0, 24 - lsrs r6, r0, 24 - mov r0, r8 - adds r0, 0x25 - ldrb r1, [r0] - movs r0, 0x2 - ands r0, r1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - beq _08021FC4 - movs r0, 0xDD - lsls r0, 1 - add r0, r8 - ldrb r0, [r0] - ldr r1, =sBerryCrushTextColors4 - str r1, [sp] - movs r1, 0 - str r1, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - b _08021FDE - .pool -_08021FC4: - movs r0, 0xDD - lsls r0, 1 - add r0, r8 - ldrb r0, [r0] - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - str r2, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 -_08021FDE: - adds r0, r7, 0 - adds r0, 0xE - lsls r0, 24 - lsrs r7, r0, 24 - movs r4, 0xDD - lsls r4, 1 - add r8, r4 - mov r1, r8 - ldrb r0, [r1] - ldr r2, =sBerryCrushTextColors1 - mov r9, r2 - str r2, [sp] - movs r5, 0 - str r5, [sp, 0x4] - ldr r1, =gText_Silkiness - str r1, [sp, 0x8] - movs r1, 0x2 - movs r2, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - ldr r0, =gStringVar1 - ldr r4, [sp, 0x10] - ldrh r1, [r4, 0x8] - movs r2, 0x1 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - ldr r4, =gStringVar4 - ldr r1, =gText_Var1Percent - adds r0, r4, 0 - bl StringExpandPlaceholders - movs r2, 0x1 - negs r2, r2 - movs r0, 0x2 - adds r1, r4, 0 - bl GetStringWidth - movs r1, 0xB0 - subs r1, r0 - lsls r1, 24 - lsrs r6, r1, 24 - mov r1, r8 - ldrb r0, [r1] - mov r2, r9 - str r2, [sp] - str r5, [sp, 0x4] - str r4, [sp, 0x8] - movs r1, 0x2 - adds r2, r6, 0 - adds r3, r7, 0 - bl AddTextPrinterParameterized3 - add sp, 0x1C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8021D34 - - thumb_func_start sub_8022070 -sub_8022070: @ 8022070 - push {r4-r6,lr} - sub sp, 0x8 - adds r4, r0, 0 - adds r6, r1, 0 - adds r0, r6, 0 - adds r0, 0x80 - ldrb r0, [r0] - cmp r0, 0x5 - bls _08022084 - b _08022218 -_08022084: - lsls r0, 2 - ldr r1, =_08022094 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08022094: - .4byte _080220AC - .4byte _080220F8 - .4byte _0802210C - .4byte _08022130 - .4byte _080221F8 - .4byte _08022200 -_080220AC: - ldrb r0, [r4, 0x9] - subs r0, 0x2 - lsls r0, 24 - lsrs r5, r0, 24 - adds r0, r6, 0 - bl sub_8022554 - ldrh r0, [r4, 0x12] - lsls r0, 3 - ldr r2, =gUnknown_082F32CC - mov r1, sp - adds r0, r2 - ldm r0!, {r2,r3} - stm r1!, {r2,r3} - ldrh r0, [r4, 0x12] - cmp r0, 0xD - bne _080220DC - ldr r0, =gUnknown_082F3344 - adds r0, 0x4 - b _080220DE - .pool -_080220DC: - ldr r0, =gUnknown_082F3344 -_080220DE: - adds r0, r5, r0 - ldrb r1, [r0] - mov r0, sp - strb r1, [r0, 0x4] - mov r0, sp - bl AddWindow - adds r1, r6, 0 - adds r1, 0x82 - strb r0, [r1] - b _08022218 - .pool -_080220F8: - adds r4, r6, 0 - adds r4, 0x82 - ldrb r0, [r4] - bl PutWindowTilemap - ldrb r0, [r4] - movs r1, 0 - bl FillWindowPixelBuffer - b _08022218 -_0802210C: - adds r5, r6, 0 - adds r5, 0x82 - ldrb r0, [r5] - ldr r4, =0x0000021d - adds r1, r4, 0 - movs r2, 0xD0 - bl LoadUserWindowBorderGfx_ - ldrb r0, [r5] - movs r1, 0 - adds r2, r4, 0 - movs r3, 0xD - bl DrawStdFrameWithCustomTileAndPalette - b _08022218 - .pool -_08022130: - ldrb r0, [r4, 0x9] - subs r0, 0x2 - lsls r0, 24 - lsrs r5, r0, 24 - ldrh r0, [r4, 0x12] - cmp r0, 0xC - beq _08022184 - cmp r0, 0xC - bgt _08022148 - cmp r0, 0xB - beq _0802214E - b _08022218 -_08022148: - cmp r0, 0xD - beq _080221C8 - b _08022218 -_0802214E: - adds r0, r6, 0 - adds r0, 0x82 - ldrb r0, [r0] - ldr r3, =gText_PressesRankings - movs r1, 0x14 - movs r2, 0x3 - bl sub_80219C8 - ldr r0, =gUnknown_082F3344 - adds r0, r5, r0 - ldrb r3, [r0] - lsls r3, 27 - lsrs r3, 24 - adds r0, r4, 0 - movs r1, 0 - movs r2, 0xA0 - bl sub_8021A28 - adds r1, r6, 0 - adds r1, 0x80 - movs r0, 0x5 - b _08022220 - .pool -_08022184: - adds r0, r6, 0 - adds r0, 0x82 - ldrb r0, [r0] - ldr r2, =gUnknown_082F43B4 - adds r1, r4, 0 - adds r1, 0x8F - ldrb r1, [r1] - adds r1, 0x3 - lsls r1, 2 - adds r1, r2 - ldr r3, [r1] - movs r1, 0x14 - movs r2, 0x4 - bl sub_80219C8 - ldr r0, =gUnknown_082F3344 - adds r0, r5, r0 - ldrb r3, [r0] - lsls r3, 27 - lsrs r3, 24 - adds r0, r4, 0 - movs r1, 0x1 - movs r2, 0xA0 - bl sub_8021A28 - adds r1, r6, 0 - adds r1, 0x80 - movs r0, 0x5 - b _08022220 - .pool -_080221C8: - adds r0, r6, 0 - adds r0, 0x82 - ldrb r0, [r0] - ldr r3, =gText_CrushingResults - movs r1, 0x16 - movs r2, 0x3 - bl sub_80219C8 - ldr r0, =gUnknown_082F3344 - adds r0, 0x4 - adds r0, r5, r0 - ldrb r3, [r0] - lsls r3, 27 - lsrs r3, 24 - adds r0, r4, 0 - movs r1, 0x2 - movs r2, 0xB0 - bl sub_8021A28 - b _08022218 - .pool -_080221F8: - adds r0, r4, 0 - bl sub_8021D34 - b _08022218 -_08022200: - adds r0, r6, 0 - adds r0, 0x82 - ldrb r0, [r0] - movs r1, 0x3 - bl CopyWindowToVram - adds r1, r6, 0 - adds r1, 0x80 - movs r0, 0 - strb r0, [r1] - movs r0, 0x1 - b _08022224 -_08022218: - adds r1, r6, 0 - adds r1, 0x80 - ldrb r0, [r1] - adds r0, 0x1 -_08022220: - strb r0, [r1] - movs r0, 0 -_08022224: - add sp, 0x8 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8022070 - - thumb_func_start sub_802222C -sub_802222C: @ 802222C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0xDD - lsls r0, 1 - adds r5, r4, r0 - ldrb r0, [r5] - movs r1, 0x1 - bl ClearStdWindowAndFrameToTransparent - ldrb r0, [r5] - bl RemoveWindow - adds r0, r4, 0 - bl sub_8022600 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802222C - - thumb_func_start sub_8022250 -sub_8022250: @ 8022250 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - lsls r0, 24 - lsrs r4, r0, 24 - movs r0, 0 - mov r9, r0 - movs r1, 0 - str r1, [sp, 0xC] - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - ldr r1, =gTasks + 0x8 - adds r6, r0, r1 - movs r1, 0 - ldrsh r0, [r6, r1] - cmp r0, 0x1 - beq _080222D0 - cmp r0, 0x1 - bgt _08022288 - cmp r0, 0 - beq _08022296 - b _080224BA - .pool -_08022288: - cmp r0, 0x2 - bne _0802228E - b _08022480 -_0802228E: - cmp r0, 0x3 - bne _08022294 - b _08022494 -_08022294: - b _080224BA -_08022296: - ldr r0, =gUnknown_082F32EC - bl AddWindow - strh r0, [r6, 0x2] - lsls r0, 24 - lsrs r0, 24 - bl PutWindowTilemap - ldrb r0, [r6, 0x2] - movs r1, 0 - bl FillWindowPixelBuffer - ldrb r0, [r6, 0x2] - ldr r4, =0x0000021d - adds r1, r4, 0 - movs r2, 0xD0 - bl LoadUserWindowBorderGfx_ - ldrb r0, [r6, 0x2] - movs r1, 0 - adds r2, r4, 0 - movs r3, 0xD - bl DrawStdFrameWithCustomTileAndPalette - b _080224BA - .pool -_080222D0: - ldr r0, =gText_BerryCrush2 - mov r10, r0 - movs r1, 0x1 - negs r1, r1 - mov r8, r1 - movs r0, 0x1 - mov r1, r10 - mov r2, r8 - bl GetStringWidth - lsrs r0, 1 - movs r4, 0x60 - subs r0, r4, r0 - lsls r0, 24 - lsrs r7, r0, 24 - ldrb r0, [r6, 0x2] - ldr r5, =sBerryCrushTextColorTable - str r5, [sp] - mov r1, r9 - str r1, [sp, 0x4] - mov r1, r10 - str r1, [sp, 0x8] - movs r1, 0x1 - adds r2, r7, 0 - movs r3, 0x1 - bl AddTextPrinterParameterized3 - ldr r0, =gText_PressingSpeedRankings - mov r10, r0 - movs r0, 0x1 - mov r1, r10 - mov r2, r8 - bl GetStringWidth - lsrs r0, 1 - subs r4, r0 - lsls r4, 24 - lsrs r7, r4, 24 - ldrb r0, [r6, 0x2] - str r5, [sp] - mov r1, r9 - str r1, [sp, 0x4] - mov r1, r10 - str r1, [sp, 0x8] - movs r1, 0x1 - adds r2, r7, 0 - movs r3, 0x11 - bl AddTextPrinterParameterized3 - movs r0, 0x29 - mov r10, r0 -_08022336: - mov r1, r9 - adds r1, 0x2 - ldr r0, =gStringVar1 - movs r2, 0 - movs r3, 0x1 - bl ConvertIntToDecimalStringN - ldr r0, =gStringVar4 - ldr r1, =gText_Var1Players - bl StringExpandPlaceholders - ldrb r0, [r6, 0x2] - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - movs r1, 0 - str r1, [sp, 0x4] - ldr r1, =gStringVar4 - str r1, [sp, 0x8] - movs r1, 0x1 - movs r2, 0 - mov r3, r10 - bl AddTextPrinterParameterized3 - movs r0, 0x1 - ldr r1, =gText_TimesPerSec - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - movs r1, 0xC0 - subs r1, r0 - lsls r1, 24 - lsrs r7, r1, 24 - ldrb r0, [r6, 0x2] - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - movs r1, 0 - str r1, [sp, 0x4] - ldr r1, =gText_TimesPerSec - str r1, [sp, 0x8] - movs r1, 0x1 - adds r2, r7, 0 - mov r3, r10 - bl AddTextPrinterParameterized3 - movs r2, 0 - mov r0, r9 - lsls r4, r0, 1 - mov r1, r10 - adds r1, 0x10 - str r1, [sp, 0x10] - movs r0, 0x1 - add r9, r0 - adds r0, r4, r6 - ldrb r3, [r0, 0x4] - movs r1, 0x7 - mov r12, r1 - movs r0, 0x1 - mov r8, r0 - ldr r5, =gUnknown_082F334C -_080223AE: - mov r0, r12 - subs r1, r0, r2 - adds r0, r3, 0 - asrs r0, r1 - mov r1, r8 - ands r0, r1 - cmp r0, 0 - beq _080223CA - lsls r0, r2, 2 - adds r0, r5 - ldr r0, [r0] - ldr r1, [sp, 0xC] - adds r1, r0 - str r1, [sp, 0xC] -_080223CA: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x7 - bls _080223AE - adds r0, r4, r6 - ldrh r1, [r0, 0x4] - lsrs r1, 8 - ldr r0, =gStringVar1 - movs r2, 0x1 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - ldr r0, [sp, 0xC] - ldr r1, =0x000f4240 - bl __udivsi3 - adds r1, r0, 0 - ldr r0, =gStringVar2 - movs r2, 0x2 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - ldr r0, =gStringVar4 - ldr r1, =gText_XDotY3 - bl StringExpandPlaceholders - movs r0, 0x1 - ldr r1, =gStringVar4 - movs r2, 0x1 - negs r2, r2 - bl GetStringWidth - subs r0, r7, r0 - lsls r0, 24 - lsrs r7, r0, 24 - ldrb r0, [r6, 0x2] - ldr r1, =sBerryCrushTextColors1 - str r1, [sp] - movs r1, 0 - str r1, [sp, 0x4] - ldr r1, =gStringVar4 - str r1, [sp, 0x8] - movs r1, 0x1 - adds r2, r7, 0 - mov r3, r10 - bl AddTextPrinterParameterized3 - ldr r1, [sp, 0x10] - lsls r0, r1, 24 - lsrs r0, 24 - mov r10, r0 - movs r0, 0 - str r0, [sp, 0xC] - mov r1, r9 - lsls r0, r1, 24 - lsrs r0, 24 - mov r9, r0 - cmp r0, 0x3 - bhi _08022444 - b _08022336 -_08022444: - ldrb r0, [r6, 0x2] - movs r1, 0x3 - bl CopyWindowToVram - b _080224BA - .pool -_08022480: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - bne _080224BA - b _080224C0 - .pool -_08022494: - ldrb r0, [r6, 0x2] - movs r1, 0x1 - bl ClearStdWindowAndFrameToTransparent - ldrb r0, [r6, 0x2] - bl ClearWindowTilemap - ldrb r0, [r6, 0x2] - bl RemoveWindow - adds r0, r4, 0 - bl DestroyTask - bl EnableBothScriptContexts - bl ScriptContext2_Disable - mov r0, r9 - b _080224BE -_080224BA: - ldrh r0, [r6] - adds r0, 0x1 -_080224BE: - strh r0, [r6] -_080224C0: - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8022250 - - thumb_func_start ShowBerryCrushRankings -ShowBerryCrushRankings: @ 80224D0 - push {lr} - bl ScriptContext2_Enable - ldr r0, =sub_8022250 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - movs r3, 0xF6 - lsls r3, 1 - adds r0, r2, r3 - ldrh r0, [r0] - strh r0, [r1, 0xC] - adds r3, 0x2 - adds r0, r2, r3 - ldrh r0, [r0] - strh r0, [r1, 0xE] - adds r3, 0x2 - adds r0, r2, r3 - ldrh r0, [r0] - strh r0, [r1, 0x10] - adds r3, 0x2 - adds r0, r2, r3 - ldrh r0, [r0] - strh r0, [r1, 0x12] - pop {r0} - bx r0 - .pool - thumb_func_end ShowBerryCrushRankings - - thumb_func_start sub_8022524 -sub_8022524: @ 8022524 - push {r4,lr} - adds r4, r0, 0 - lsls r1, 16 - lsrs r1, 16 - bl sub_8021944 - movs r0, 0x4 - ldrsh r1, [r4, r0] - movs r0, 0 - bl sub_8035044 - movs r0, 0x6 - ldrsh r1, [r4, r0] - movs r0, 0x1 - bl sub_8035044 - movs r0, 0x8 - ldrsh r1, [r4, r0] - movs r0, 0x2 - bl sub_8035044 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8022524 - - thumb_func_start sub_8022554 -sub_8022554: @ 8022554 - push {lr} - ldr r2, [r0, 0x78] - adds r2, 0x3E - ldrb r1, [r2] - movs r3, 0x4 - orrs r1, r3 - strb r1, [r2] - ldr r1, [r0, 0x7C] - adds r1, 0x3E - ldrb r0, [r1] - orrs r0, r3 - strb r0, [r1] - movs r0, 0x2 - movs r1, 0x1 - bl sub_803547C - movs r0, 0x1 - movs r1, 0x1 - bl sub_803547C - movs r0, 0 - movs r1, 0x1 - bl sub_803547C - pop {r0} - bx r0 - thumb_func_end sub_8022554 - - thumb_func_start sub_8022588 -sub_8022588: @ 8022588 - push {r4-r7,lr} - adds r5, r0, 0 - movs r6, 0 - ldrb r0, [r5, 0x9] - cmp r6, r0 - bcs _080225E8 - ldr r7, =gUnknown_082F417C -_08022596: - lsls r0, r6, 2 - movs r1, 0xA2 - lsls r1, 1 - adds r2, r5, r1 - adds r2, r0 - ldrb r1, [r5, 0x9] - subs r1, 0x2 - lsls r0, r1, 2 - adds r0, r1 - adds r0, r6, r0 - adds r0, r7 - ldrb r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - ldr r1, =gUnknown_082F4190 - adds r0, r1 - str r0, [r2] - ldrb r0, [r0] - lsls r0, 3 - ldr r1, =gUnknown_082F32F4 - adds r0, r1 - bl AddWindow - ldr r1, =0x000001bb - adds r4, r5, r1 - adds r4, r6 - strb r0, [r4] - ldrb r0, [r4] - bl PutWindowTilemap - ldrb r0, [r4] - movs r1, 0 - bl FillWindowPixelBuffer - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - ldrb r0, [r5, 0x9] - cmp r6, r0 - bcc _08022596 -_080225E8: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8022588 - - thumb_func_start sub_8022600 -sub_8022600: @ 8022600 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x14 - adds r6, r0, 0 - movs r7, 0 - ldrb r0, [r6, 0x9] - cmp r7, r0 - bcs _080226B6 - movs r1, 0 - mov r8, r1 -_08022616: - ldr r1, =0x000001bb - adds r0, r6, r1 - adds r5, r0, r7 - ldrb r0, [r5] - bl PutWindowTilemap - ldrb r0, [r6, 0x8] - cmp r7, r0 - bne _08022668 - lsls r4, r7, 5 - adds r4, 0x98 - adds r4, r6, r4 - movs r0, 0x2 - adds r1, r4, 0 - movs r2, 0 - bl GetStringWidth - lsrs r0, 1 - movs r2, 0x24 - subs r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r0, [r5] - mov r1, r8 - str r1, [sp] - str r1, [sp, 0x4] - ldr r1, =sBerryCrushTextColors2 - str r1, [sp, 0x8] - mov r1, r8 - str r1, [sp, 0xC] - str r4, [sp, 0x10] - movs r1, 0x2 - movs r3, 0x1 - bl AddTextPrinterParameterized4 - b _0802269C - .pool -_08022668: - lsls r4, r7, 5 - adds r4, 0x98 - adds r4, r6, r4 - movs r0, 0x2 - adds r1, r4, 0 - movs r2, 0 - bl GetStringWidth - lsrs r0, 1 - movs r2, 0x24 - subs r2, r0 - lsls r2, 24 - lsrs r2, 24 - ldrb r0, [r5] - mov r1, r8 - str r1, [sp] - str r1, [sp, 0x4] - ldr r1, =sBerryCrushTextColors3 - str r1, [sp, 0x8] - mov r1, r8 - str r1, [sp, 0xC] - str r4, [sp, 0x10] - movs r1, 0x2 - movs r3, 0x1 - bl AddTextPrinterParameterized4 -_0802269C: - ldr r1, =0x000001bb - adds r0, r6, r1 - adds r0, r7 - ldrb r0, [r0] - movs r1, 0x3 - bl CopyWindowToVram - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - ldrb r0, [r6, 0x9] - cmp r7, r0 - bcc _08022616 -_080226B6: - movs r0, 0 - bl CopyBgTilemapBufferToVram - add sp, 0x14 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8022600 - - thumb_func_start sub_80226D0 -sub_80226D0: @ 80226D0 - push {r4-r6,lr} - sub sp, 0x8 - adds r6, r0, 0 - movs r5, 0 - ldr r0, =gUnknown_08DE3FD4 - ldr r4, =gDecompressionBuffer - adds r1, r4, 0 - bl LZ77UnCompWram - b _0802271A - .pool -_080226EC: - lsls r1, r5, 2 - movs r2, 0xA2 - lsls r2, 1 - adds r0, r6, r2 - adds r0, r1 - ldr r3, [r0] - ldrb r0, [r3] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r4, r1 - ldrb r2, [r3, 0x1] - ldrb r3, [r3, 0x2] - movs r0, 0xA - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x3 - bl CopyToBgTilemapBufferRect - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 -_0802271A: - ldrb r0, [r6, 0x9] - cmp r5, r0 - bcc _080226EC - movs r0, 0x3 - bl CopyBgTilemapBufferToVram - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_80226D0 - - thumb_func_start sub_8022730 -sub_8022730: @ 8022730 - push {r4-r7,lr} - adds r6, r0, 0 - movs r5, 0 - ldr r0, =0x0000ff98 - strh r0, [r6, 0x2A] - strh r5, [r6, 0x2C] - ldr r1, =gSpriteCoordOffsetX - strh r5, [r1] - ldr r1, =gSpriteCoordOffsetY - strh r0, [r1] - ldr r4, =gUnknown_082F41F4 -_08022746: - lsls r0, r5, 3 - adds r0, r4 - bl LoadCompressedSpriteSheet - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x3 - bls _08022746 - ldr r0, =gUnknown_082F421C - bl LoadSpritePalettes - ldr r0, =gUnknown_082F430C - movs r1, 0x78 - movs r2, 0x58 - movs r3, 0x5 - bl CreateSprite - lsls r0, 24 - lsrs r2, r0, 24 - movs r0, 0xAC - lsls r0, 1 - adds r3, r6, r0 - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - str r0, [r3] - ldrb r1, [r0, 0x5] - movs r2, 0xC - orrs r1, r2 - strb r1, [r0, 0x5] - ldr r1, [r3] - adds r1, 0x3E - ldrb r0, [r1] - movs r2, 0x2 - orrs r0, r2 - strb r0, [r1] - ldr r1, [r3] - adds r1, 0x2C - ldrb r0, [r1] - movs r2, 0x40 - orrs r0, r2 - strb r0, [r1] - movs r5, 0 - ldrb r1, [r6, 0x9] - cmp r5, r1 - bcs _08022822 - movs r7, 0x4 -_080227AA: - lsls r4, r5, 2 - movs r3, 0xA2 - lsls r3, 1 - adds r0, r6, r3 - adds r0, r4 - ldr r0, [r0] - ldrh r1, [r0, 0x4] - adds r1, 0x78 - lsls r1, 16 - asrs r1, 16 - ldrh r2, [r0, 0x6] - adds r2, 0x20 - lsls r2, 16 - asrs r2, 16 - ldr r0, =gUnknown_082F4324 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r2, r0, 24 - movs r0, 0xAE - lsls r0, 1 - adds r3, r6, r0 - adds r3, r4 - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - ldr r0, =gSprites - adds r1, r0 - str r1, [r3] - ldrb r0, [r1, 0x5] - movs r4, 0xD - negs r4, r4 - adds r2, r4, 0 - ands r0, r2 - orrs r0, r7 - strb r0, [r1, 0x5] - ldr r1, [r3] - adds r1, 0x3E - ldrb r0, [r1] - orrs r0, r7 - strb r0, [r1] - ldr r2, [r3] - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2] - ldr r2, [r3] - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - ldrb r0, [r6, 0x9] - cmp r5, r0 - bcc _080227AA -_08022822: - movs r5, 0 - ldr r4, =gUnknown_082F41CC+6 - adds r7, r4, 0x1 -_08022828: - lsls r2, r5, 1 - adds r0, r2, r4 - movs r1, 0 - ldrsb r1, [r0, r1] - adds r1, 0x78 - adds r2, r7 - ldrb r2, [r2] - lsls r2, 24 - asrs r2, 24 - adds r2, 0x88 - ldr r0, =gUnknown_082F433C - movs r3, 0x6 - bl CreateSprite - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r5, 2 - movs r1, 0xC2 - lsls r1, 1 - adds r3, r6, r1 - adds r3, r0 - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - str r0, [r3] - ldrb r1, [r0, 0x5] - movs r2, 0xC - orrs r1, r2 - strb r1, [r0, 0x5] - ldr r2, [r3] - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - ldr r2, [r3] - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - ldr r0, [r3] - strh r5, [r0, 0x2E] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xA - bls _08022828 - movs r5, 0 -_0802288E: - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 19 - movs r3, 0xB0 - lsls r3, 16 - adds r1, r3 - asrs r1, 16 - ldr r0, =gUnknown_082F4354 - movs r2, 0x8 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r5, 2 - movs r4, 0xD8 - lsls r4, 1 - adds r3, r6, r4 - adds r3, r0 - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - str r0, [r3] - ldrb r1, [r0, 0x5] - movs r4, 0xD - negs r4, r4 - adds r2, r4, 0 - ands r1, r2 - strb r1, [r0, 0x5] - ldr r2, [r3] - adds r2, 0x3E - ldrb r0, [r2] - adds r4, 0x8 - adds r1, r4, 0 - ands r0, r1 - strb r0, [r2] - ldr r2, [r3] - adds r2, 0x2C - ldrb r0, [r2] - movs r3, 0x41 - negs r3, r3 - adds r1, r3, 0 - ands r0, r1 - strb r0, [r2] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x1 - bls _0802288E - ldr r4, =gUnknown_082F4384 - movs r0, 0 - movs r1, 0 - adds r2, r4, 0 - bl sub_8034D14 - adds r2, r4, 0 - adds r2, 0x10 - movs r0, 0x1 - movs r1, 0 - bl sub_8034D14 - adds r4, 0x20 - movs r0, 0x2 - movs r1, 0 - adds r2, r4, 0 - bl sub_8034D14 - ldrh r0, [r6, 0x12] - cmp r0, 0x1 - bne _08022928 - movs r4, 0x9C - lsls r4, 1 - adds r0, r6, r4 - bl sub_8022554 -_08022928: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8022730 - - thumb_func_start sub_8022960 -sub_8022960: @ 8022960 - push {r4-r6,lr} - adds r5, r0, 0 - movs r4, 0 - movs r0, 0x4 - bl FreeSpriteTilesByTag - movs r0, 0x3 - bl FreeSpriteTilesByTag - movs r0, 0x2 - bl FreeSpriteTilesByTag - movs r0, 0x1 - bl FreeSpriteTilesByTag - movs r0, 0x4 - bl FreeSpritePaletteByTag - movs r0, 0x2 - bl FreeSpritePaletteByTag - movs r0, 0x1 - bl FreeSpritePaletteByTag - movs r0, 0xD8 - lsls r0, 1 - adds r6, r5, r0 -_08022996: - lsls r0, r4, 2 - adds r0, r6, r0 - ldr r0, [r0] - bl DestroySprite - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x1 - bls _08022996 - movs r0, 0x2 - bl sub_80353DC - movs r0, 0x1 - bl sub_80353DC - movs r0, 0 - bl sub_80353DC - movs r4, 0 - movs r1, 0xC2 - lsls r1, 1 - adds r6, r5, r1 -_080229C4: - lsls r0, r4, 2 - adds r0, r6, r0 - ldr r0, [r0] - bl DestroySprite - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xA - bls _080229C4 - movs r4, 0 - ldrb r2, [r5, 0x9] - cmp r4, r2 - bcs _080229FC -_080229E0: - lsls r1, r4, 2 - movs r2, 0xAE - lsls r2, 1 - adds r0, r5, r2 - adds r0, r1 - ldr r0, [r0] - bl DestroySprite - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r0, [r5, 0x9] - cmp r4, r0 - bcc _080229E0 -_080229FC: - movs r1, 0xAC - lsls r1, 1 - adds r0, r5, r1 - ldr r2, [r0] - adds r0, r2, 0 - adds r0, 0x3E - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08022A18 - adds r0, r2, 0 - bl DestroySprite -_08022A18: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8022960 - - thumb_func_start sub_8022A20 -sub_8022A20: @ 8022A20 - push {lr} - adds r3, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08022A46 - adds r2, r3, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - subs r2, 0x12 - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] -_08022A46: - pop {r0} - bx r0 - thumb_func_end sub_8022A20 - - thumb_func_start sub_8022A4C -sub_8022A4C: @ 8022A4C - push {r4,r5,lr} - adds r3, r0, 0 - movs r1, 0 - ldr r5, =SpriteCallbackDummy - adds r2, r3, 0 - adds r2, 0x2E - movs r4, 0 -_08022A5A: - lsls r0, r1, 1 - adds r0, r2, r0 - strh r4, [r0] - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x7 - bls _08022A5A - movs r0, 0 - strh r0, [r3, 0x24] - strh r0, [r3, 0x26] - adds r2, r3, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - subs r2, 0x12 - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - str r5, [r3, 0x1C] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8022A4C - - thumb_func_start sub_8022A94 -sub_8022A94: @ 8022A94 - push {r4-r6,lr} - adds r5, r0, 0 - adds r4, r5, 0 - adds r4, 0x2E - ldrh r0, [r4, 0x4] - ldrh r1, [r4, 0x2] - adds r0, r1 - strh r0, [r4, 0x2] - lsls r0, 16 - asrs r0, 24 - ldrh r2, [r5, 0x26] - adds r0, r2 - strh r0, [r5, 0x26] - movs r1, 0xE - ldrsh r0, [r4, r1] - movs r6, 0x80 - lsls r6, 8 - ands r0, r6 - cmp r0, 0 - beq _08022AFA - ldrh r0, [r4, 0x6] - ldrh r2, [r5, 0x2E] - adds r0, r2 - strh r0, [r5, 0x2E] - ldrh r0, [r4, 0xA] - ldrh r1, [r4, 0x8] - adds r0, r1 - strh r0, [r4, 0x8] - lsls r0, 16 - asrs r0, 23 - movs r2, 0xC - ldrsh r1, [r4, r2] - bl Sin - strh r0, [r5, 0x24] - movs r1, 0xE - ldrsh r0, [r4, r1] - ands r0, r6 - cmp r0, 0 - beq _08022AFA - ldrh r0, [r4, 0x8] - lsls r0, 16 - asrs r0, 23 - cmp r0, 0x7E - ble _08022AFA - movs r0, 0 - strh r0, [r5, 0x24] - ldrh r1, [r4, 0xE] - ldr r0, =0x00007fff - ands r0, r1 - strh r0, [r4, 0xE] -_08022AFA: - ldrh r0, [r4] - lsls r0, 16 - asrs r0, 23 - strh r0, [r5, 0x20] - movs r2, 0x22 - ldrsh r1, [r5, r2] - movs r2, 0x26 - ldrsh r0, [r5, r2] - adds r1, r0 - ldrh r2, [r4, 0xE] - ldr r0, =0x00007fff - ands r0, r2 - cmp r1, r0 - ble _08022B1A - ldr r0, =sub_8022A4C - str r0, [r5, 0x1C] -_08022B1A: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8022A94 - - thumb_func_start sub_8022B28 -sub_8022B28: @ 8022B28 - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r6, r0, 0 - adds r7, r6, 0 - adds r7, 0x2E - movs r0, 0 - mov r8, r0 - movs r2, 0xA0 - lsls r2, 2 - strh r2, [r7, 0x2] - movs r0, 0x20 - strh r0, [r7, 0x4] - movs r1, 0xA8 - strh r1, [r7, 0xE] - movs r0, 0x24 - ldrsh r4, [r6, r0] - lsls r4, 23 - lsrs r4, 16 - ldrh r0, [r6, 0x22] - subs r1, r0 - lsls r1, 23 - asrs r1, 16 - adds r2, 0x20 - asrs r2, 1 - movs r0, 0x7 - bl sub_81515D4 - adds r5, r0, 0 - ldrh r0, [r6, 0x20] - lsls r0, 7 - strh r0, [r6, 0x2E] - lsls r4, 16 - asrs r4, 16 - lsls r5, 16 - asrs r5, 16 - movs r0, 0x7 - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_81515D4 - strh r0, [r7, 0x6] - movs r0, 0x7 - adds r1, r5, 0 - movs r2, 0x55 - bl sub_8151550 - adds r2, r0, 0 - mov r1, r8 - strh r1, [r7, 0x8] - movs r1, 0xFE - lsls r1, 6 - lsls r2, 16 - asrs r2, 16 - movs r0, 0x7 - bl sub_81515D4 - strh r0, [r7, 0xA] - movs r2, 0x24 - ldrsh r0, [r6, r2] - cmp r0, 0 - bge _08022BA6 - adds r0, 0x3 -_08022BA6: - asrs r0, 2 - strh r0, [r7, 0xC] - ldrh r0, [r7, 0xE] - ldr r2, =0xffff8000 - adds r1, r2, 0 - orrs r0, r1 - strh r0, [r7, 0xE] - mov r0, r8 - strh r0, [r6, 0x26] - strh r0, [r6, 0x24] - ldr r0, =sub_8022A94 - str r0, [r6, 0x1C] - adds r2, r6, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - adds r2, 0x12 - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8022B28 - - thumb_func_start sub_8022BEC -sub_8022BEC: @ 8022BEC - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r7, r2, 0 - lsls r0, 16 - lsrs r5, r0, 16 - lsls r1, 24 - lsrs r4, r1, 24 - mov r8, r4 - bl sub_8020C00 - adds r6, r0, 0 - cmp r5, 0x19 - bls _08022C0A - movs r5, 0 -_08022C0A: - cmp r4, 0 - beq _08022C14 - cmp r4, 0x1 - beq _08022C40 - b _08022C4A -_08022C14: - cmp r5, 0 - beq _08022C28 - ldr r0, =gUnknown_082F43CC - lsls r1, r5, 2 - adds r1, r0 - ldr r2, [r1] - adds r0, r6, 0 - adds r1, r7, 0 - bl _call_via_r2 -_08022C28: - ldrb r0, [r6, 0xE] - cmp r0, 0x19 - bls _08022C32 - mov r0, r8 - strb r0, [r6, 0xE] -_08022C32: - ldr r0, =gUnknown_082F43CC - ldrb r1, [r6, 0xE] - lsls r1, 2 - b _08022C44 - .pool -_08022C40: - ldr r0, =gUnknown_082F43CC - lsls r1, r5, 2 -_08022C44: - adds r1, r0 - ldr r0, [r1] - str r0, [r6, 0x4] -_08022C4A: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8022BEC - - thumb_func_start sub_8022C58 -sub_8022C58: @ 8022C58 - push {r4-r6,lr} - sub sp, 0x4 - adds r6, r0, 0 - ldrb r2, [r1] - ldrb r3, [r1, 0x1] - lsls r3, 8 - orrs r2, r3 - ldrb r3, [r1, 0x2] - lsls r3, 16 - orrs r2, r3 - ldrb r3, [r1, 0x3] - lsls r3, 24 - adds r0, r2, 0 - orrs r0, r3 - ldrb r2, [r1, 0x9] - strb r2, [r1] - ldrb r4, [r1, 0x8] - lsls r4, 8 - ldrb r2, [r1, 0x7] - orrs r4, r2 - ldr r5, =gPaletteFade - ldrb r3, [r5, 0x8] - movs r2, 0x7F - ands r2, r3 - strb r2, [r5, 0x8] - movs r5, 0x4 - ldrsb r5, [r1, r5] - ldrb r2, [r1, 0x5] - ldrb r3, [r1, 0x6] - str r4, [sp] - adds r1, r5, 0 - bl BeginNormalPaletteFade - bl UpdatePaletteFade - movs r0, 0x2 - strb r0, [r6, 0xE] - movs r0, 0 - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8022C58 - - thumb_func_start sub_8022CB0 -sub_8022CB0: @ 8022CB0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0xC] - cmp r0, 0x1 - beq _08022CE4 - cmp r0, 0x1 - bgt _08022CC6 - cmp r0, 0 - beq _08022CD0 - b _08022D06 -_08022CC6: - cmp r0, 0x2 - beq _08022CEA - cmp r0, 0x3 - beq _08022CF6 - b _08022D06 -_08022CD0: - bl UpdatePaletteFade - lsls r0, 24 - cmp r0, 0 - bne _08022D0C - ldrb r0, [r5] - cmp r0, 0 - bne _08022D06 - movs r0, 0x3 - b _08022D0A -_08022CE4: - bl sub_8010434 - b _08022D06 -_08022CEA: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - bne _08022D06 - b _08022D0C -_08022CF6: - ldrb r0, [r4, 0xF] - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r0, 0 - strb r0, [r4, 0xC] - b _08022D0E -_08022D06: - ldrb r0, [r4, 0xC] - adds r0, 0x1 -_08022D0A: - strb r0, [r4, 0xC] -_08022D0C: - movs r0, 0 -_08022D0E: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8022CB0 - - thumb_func_start sub_8022D14 -sub_8022D14: @ 8022D14 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x10 - adds r7, r0, 0 - adds r5, r1, 0 - ldrb r4, [r5, 0x3] - lsls r4, 8 - ldrb r0, [r5, 0x2] - orrs r4, r0 - ldrb r6, [r7, 0xC] - cmp r6, 0x1 - beq _08022DC0 - cmp r6, 0x1 - bgt _08022D38 - cmp r6, 0 - beq _08022D42 - b _08022E08 -_08022D38: - cmp r6, 0x2 - beq _08022DD8 - cmp r6, 0x3 - beq _08022DE8 - b _08022E08 -_08022D42: - movs r0, 0 - movs r1, 0 - bl DrawDialogueFrame - ldrb r1, [r5, 0x1] - movs r0, 0x2 - mov r8, r0 - ands r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _08022D90 - ldr r4, =gStringVar4 - ldr r1, =gUnknown_082F32A4 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - adds r0, r4, 0 - bl StringExpandPlaceholders - ldrb r3, [r7, 0xB] - str r6, [sp] - mov r0, r8 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x1 - adds r2, r4, 0 - bl AddTextPrinterParameterized2 - b _08022DB2 - .pool -_08022D90: - ldr r1, =gUnknown_082F32A4 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r2, [r0] - ldrb r3, [r7, 0xB] - str r4, [sp] - mov r0, r8 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x1 - bl AddTextPrinterParameterized2 -_08022DB2: - movs r0, 0 - movs r1, 0x3 - bl CopyWindowToVram - b _08022E08 - .pool -_08022DC0: - movs r0, 0 - bl IsTextPrinterActive - lsls r0, 16 - cmp r0, 0 - bne _08022E0E - cmp r4, 0 - bne _08022E08 - ldrb r0, [r7, 0xC] - adds r0, 0x1 - strb r0, [r7, 0xC] - b _08022E08 -_08022DD8: - ldr r0, =gMain - ldrh r0, [r0, 0x2E] - ands r4, r0 - cmp r4, 0 - bne _08022E08 - b _08022E0E - .pool -_08022DE8: - ldrb r1, [r5, 0x1] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08022DFA - movs r0, 0 - movs r1, 0x1 - bl ClearDialogWindowAndFrame -_08022DFA: - ldrb r0, [r7, 0xE] - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - ldrb r0, [r5, 0x4] - b _08022E0C -_08022E08: - ldrb r0, [r7, 0xC] - adds r0, 0x1 -_08022E0C: - strb r0, [r7, 0xC] -_08022E0E: - movs r0, 0 - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8022D14 - - thumb_func_start sub_8022E1C -sub_8022E1C: @ 8022E1C - push {r4,lr} - adds r4, r0, 0 - bl sub_802104C - cmp r0, 0 - beq _08022E34 - ldrb r0, [r4, 0xE] - adds r2, r4, 0 - adds r2, 0x36 - movs r1, 0 - bl sub_8022BEC -_08022E34: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8022E1C - - thumb_func_start sub_8022E3C -sub_8022E3C: @ 8022E3C - push {r4,lr} - adds r4, r0, 0 - bl sub_802130C - cmp r0, 0 - beq _08022E54 - ldrb r0, [r4, 0xE] - adds r2, r4, 0 - adds r2, 0x36 - movs r1, 0 - bl sub_8022BEC -_08022E54: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8022E3C - - thumb_func_start sub_8022E5C -sub_8022E5C: @ 8022E5C - push {r4,lr} - adds r4, r0, 0 - ldrb r0, [r4, 0xC] - cmp r0, 0 - beq _08022E6C - cmp r0, 0x1 - beq _08022E72 - b _08022E9C -_08022E6C: - bl sub_8010434 - b _08022E9C -_08022E72: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08022EA2 - ldr r0, =0x000001e5 - bl PlayNewMapMusic - movs r0, 0x7 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r1, 0 - movs r0, 0x3 - strh r0, [r4, 0x12] - strb r1, [r4, 0xC] - b _08022EA2 - .pool -_08022E9C: - ldrb r0, [r4, 0xC] - adds r0, 0x1 - strb r0, [r4, 0xC] -_08022EA2: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8022E5C - - thumb_func_start sub_8022EAC -sub_8022EAC: @ 8022EAC - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0xC] - cmp r0, 0 - beq _08022EC2 - cmp r0, 0x1 - beq _08022EE8 - adds r0, 0x1 - b _08022EF8 -_08022EC2: - adds r0, r4, 0 - bl sub_8024578 - movs r0, 0x1 - str r0, [sp] - adds r0, r5, 0 - movs r1, 0 - movs r2, 0x1 - movs r3, 0 - bl sub_8024644 - movs r0, 0x7 - strb r0, [r4, 0xE] - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - b _08022EFA -_08022EE8: - movs r0, 0x8 - strb r0, [r4, 0xE] - movs r0, 0x5 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r0, 0x2 -_08022EF8: - strb r0, [r4, 0xC] -_08022EFA: - movs r0, 0 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8022EAC - - thumb_func_start sub_8022F04 -sub_8022F04: @ 8022F04 - push {lr} - movs r1, 0 - str r1, [r0, 0x4] - ldr r0, =sub_8020E1C - bl SetMainCallback2 - movs r0, 0 - pop {r1} - bx r1 - .pool - thumb_func_end sub_8022F04 - thumb_func_start sub_8022F1C sub_8022F1C: @ 8022F1C push {r4-r7,lr} diff --git a/src/berry_crush.c b/src/berry_crush.c index 5303da11a..11028b0af 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1,26 +1,33 @@ #include "global.h" -#include "malloc.h" +#include "berry.h" #include "berry_powder.h" #include "bg.h" +#include "decompress.h" +#include "dynamic_placeholder_text_util.h" #include "event_data.h" #include "gpu_regs.h" #include "graphics.h" +#include "international_string_util.h" #include "item_icon.h" #include "item_menu.h" #include "link.h" #include "link_rfu.h" #include "main.h" +#include "malloc.h" #include "math_util.h" #include "menu.h" #include "overworld.h" #include "palette.h" #include "rom_8034C54.h" #include "scanline_effect.h" +#include "script.h" #include "sound.h" #include "sprite.h" #include "string_util.h" +#include "strings.h" #include "task.h" #include "text.h" +#include "text_window.h" #include "trig.h" #include "window.h" #include "constants/items.h" @@ -30,8 +37,9 @@ struct BerryCrushGame_Player { u16 unk0; - u8 filler2[0x12]; - u8 unk14[0xC]; + u8 filler2[2]; + u8 unk4[16]; + u8 unk14[12]; }; struct BerryCrushGame_PlayersSeparate @@ -48,7 +56,12 @@ typedef union BerryCrushGame_Players struct BerryCrushGame_138_C { - u8 filler0[0x8]; + u8 unk0; + u8 unk1; + u8 unk2; + u8 filler3; + u16 unk4; + u16 unk6; s16 unk8; u16 unkA; }; @@ -56,16 +69,19 @@ struct BerryCrushGame_138_C struct BerryCrushGame_138 { u8 filler0[0x4]; - u16 unk4; - u16 unk6; - u16 unk8; - struct BerryCrushGame_138_C *unkC[5]; - u8 filler1C[0x4]; + s16 unk4; + s16 unk6; + s16 unk8; + const struct BerryCrushGame_138_C *unkC[5]; + struct Sprite *unk20; struct Sprite *unk24[5]; struct Sprite *unk38[5]; - struct Sprite *unk4C[5]; - struct Sprite *unk60[5]; - struct Sprite *unk74[5]; + struct Sprite *unk4C[11]; + struct Sprite *unk78[2]; + u8 unk80; + u8 filler81; + u8 unk82; + u8 unk83[5]; }; struct BerryCrushGame_4E @@ -83,10 +99,22 @@ struct __attribute__((packed)) BerryCrushGame_40 struct BerryCrushGame_4E unkE; }; +struct BerryCrushGame_68 +{ + int unk00; + u16 unk04; + u8 filler06[2]; + u16 unk08; + u16 unk0A; + u16 unk0C[8]; // TODO: Resolve the type of the field. + BerryCrushGame_Players unk1C; + u8 fillerBC[20]; +}; + struct BerryCrushGame { MainCallback unk0; - void (* unk4)(struct BerryCrushGame *, u8 *); + u32 (* unk4)(struct BerryCrushGame *, u8 *); u8 unk8; u8 unk9; u8 unkA; @@ -113,13 +141,7 @@ struct BerryCrushGame u8 unk36[0xA]; struct BerryCrushGame_40 unk40; u8 filler60[0x8]; - int unk68; - u16 unk6C; - u8 filler6E[0x4]; - u16 unk72; - u8 filler74[0x10]; - BerryCrushGame_Players unk84; - u8 filler124[0x14]; + struct BerryCrushGame_68 unk68; struct BerryCrushGame_138 unk138; u8 unk1C0[0x1000]; u8 unk11C0[0x1000]; @@ -141,6 +163,9 @@ void sub_8022730(struct BerryCrushGame *); void sub_8022960(struct BerryCrushGame *); void sub_8022524(struct BerryCrushGame_138 *, u16); void sub_8022B28(struct Sprite *); +void sub_8022554(struct BerryCrushGame_138 *r0); +void sub_8024578(struct BerryCrushGame *); +void sub_8024644(u8 *, u32, u32, u32, u32); static EWRAM_DATA struct BerryCrushGame *gUnknown_02022C90 = NULL; @@ -154,6 +179,46 @@ extern const s8 gUnknown_082F41CC[][2]; extern const s8 gUnknown_082F41D2[][2]; extern const u32 gUnknown_082F334C[]; extern const u8 sBerryCrushTextColors1[][3]; +extern const u8 *gUnknown_082F43B4[]; +extern const u8 gText_Var1Berry[]; +extern const u8 gText_XDotY[]; +extern const u8 gText_1DotBlueF700[]; +extern const u8 gText_1DotF700[]; +extern const u8 gText_TimeColon[]; +extern const u8 gText_SpaceSec[]; +extern const u8 gText_XDotY2[]; +extern const u8 gText_SpaceMin[]; +extern const u8 gText_StrVar1[]; +extern const u8 gText_PressingSpeed[]; +extern const u8 gText_TimesPerSec[]; +extern const u8 gText_XDotY3[]; +extern const u8 sBerryCrushTextColors4[]; +extern const u8 gText_Silkiness[]; +extern const u8 gText_Var1Percent[]; +extern const struct WindowTemplate gUnknown_082F32CC[]; +extern const u8 gUnknown_082F3344[][4]; +extern const u8 gText_PressesRankings[]; +extern const u8 gText_CrushingResults[]; +extern const struct WindowTemplate gUnknown_082F32EC; +extern const u8 gText_BerryCrush2[]; +extern const u8 sBerryCrushTextColorTable[][3]; +extern const u8 gText_PressingSpeedRankings[]; +extern const u8 gText_Var1Players[]; +extern const struct WindowTemplate gUnknown_082F32F4[]; +extern const u8 gUnknown_082F417C[][5]; +extern const struct BerryCrushGame_138_C gUnknown_082F4190[]; +extern const u8 sBerryCrushTextColors2[][3]; +extern const u8 sBerryCrushTextColors3[][3]; +extern const u32 gUnknown_08DE3FD4[]; +extern const struct CompressedSpriteSheet gUnknown_082F41F4[]; +extern const struct SpritePalette gUnknown_082F421C; +extern const struct SpriteTemplate gUnknown_082F430C; +extern const struct SpriteTemplate gUnknown_082F4324; +extern const struct SpriteTemplate gUnknown_082F433C; +extern const struct SpriteTemplate gUnknown_082F4354; +extern const struct UnkStruct3 gUnknown_082F4384[]; +extern u32 (*const gUnknown_082F43CC[])(struct BerryCrushGame *, u8 *); +extern const u8 *const gUnknown_082F32A4[]; struct BerryCrushGame *sub_8020C00(void) { @@ -237,7 +302,7 @@ static void sub_8020D8C(void) else RemoveBagItem(gSpecialVar_ItemId, 1); - gUnknown_02022C90->unk84.separate.others[gUnknown_02022C90->unk8].unk0 = gSpecialVar_ItemId - FIRST_BERRY_INDEX; + gUnknown_02022C90->unk68.unk1C.separate.others[gUnknown_02022C90->unk8].unk0 = gSpecialVar_ItemId - FIRST_BERRY_INDEX; gUnknown_02022C90->unkE = 1; gUnknown_02022C90->unkF = 9; sub_8024604(gUnknown_02022C90->unk36, 0, -1, 0, 16, 0, 0); @@ -266,10 +331,10 @@ void sub_8020E58(void) { u32 var0, var1; - var0 = gUnknown_02022C90->unk6C; + var0 = gUnknown_02022C90->unk68.unk04; var0 <<= 8; var0 = sub_81515FC(var0, 60 << 8); - var1 = gUnknown_02022C90->unk72; + var1 = gUnknown_02022C90->unk68.unk0A; var1 <<= 8; var1 = sub_81515FC(var1, var0) & 0xFFFF; gUnknown_02022C90->unk16 = var1; @@ -305,7 +370,7 @@ void sub_8020E58(void) break; } - gUnknown_02022C90->unk1C = gUnknown_02022C90->unk68; + gUnknown_02022C90->unk1C = gUnknown_02022C90->unk68.unk00; if (GiveBerryPowder(gUnknown_02022C90->unk1C)) return; @@ -335,18 +400,23 @@ static void sub_8020FA0(u8 taskId) sub_8021450(gUnknown_02022C90); } -#ifdef NONMATCHING +#define PLAYER_UNK14(game, i) \ + ((u8 *)(game) \ + + offsetof(struct BerryCrushGame, unk68) \ + + offsetof(struct BerryCrushGame_68, unk1C) \ + + offsetof(struct BerryCrushGame_Player, unk14) \ + + sizeof(struct BerryCrushGame_Player) * (i)) + void sub_8020FC4(struct BerryCrushGame *arg0) { u8 i; for (i = 0; i < arg0->unk9; i++) - StringCopy(arg0->unk84.players[i].unk14, gLinkPlayers[i].name); - + StringCopy(PLAYER_UNK14(arg0, i), gLinkPlayers[i].name); for (; i < 5; i++) { - memset(arg0->unk84.players[i].unk14, 1, PLAYER_NAME_LENGTH); - arg0->unk84.players[i].unk14[PLAYER_NAME_LENGTH] = EOS; + memset(PLAYER_UNK14(arg0, i), 1, PLAYER_NAME_LENGTH); + arg0->unk68.unk1C.players[i].unk14[PLAYER_NAME_LENGTH] = EOS; } switch (gSaveBlock2Ptr->optionsTextSpeed) @@ -362,85 +432,6 @@ void sub_8020FC4(struct BerryCrushGame *arg0) break; } } -#else -NAKED -void sub_8020FC4(struct BerryCrushGame *arg0) -{ - asm_unified("\n\ - push {r4-r6,lr}\n\ - adds r6, r0, 0\n\ - movs r5, 0\n\ - b _08020FE6\n\ -LOOP_1:\n\ - lsls r0, r5, 5\n\ - adds r0, 0x98\n\ - adds r0, r6, r0\n\ - lsls r1, r5, 3\n\ - subs r1, r5\n\ - lsls r1, 2\n\ - ldr r2, =gLinkPlayers + 8\n\ - adds r1, r2\n\ - bl StringCopy\n\ - adds r0, r5, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ -_08020FE6:\n\ - ldrb r0, [r6, 0x9]\n\ - cmp r5, r0\n\ - bcc LOOP_1\n\ - cmp r5, 0x4\n\ - bhi _08021012\n\ -_08020FF0:\n\ - lsls r4, r5, 5\n\ - adds r0, r4, 0\n\ - adds r0, 0x98\n\ - adds r0, r6, r0\n\ - movs r1, 0x1\n\ - movs r2, 0x7\n\ - bl memset\n\ - adds r4, r6, r4\n\ - adds r4, 0x9F\n\ - movs r0, 0xFF\n\ - strb r0, [r4]\n\ - adds r0, r5, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - cmp r5, 0x4\n\ - bls _08020FF0\n\ -_08021012:\n\ - ldr r0, =gSaveBlock2Ptr\n\ - ldr r0, [r0]\n\ - ldrb r0, [r0, 0x14]\n\ - lsls r0, 29\n\ - lsrs r0, 29\n\ - cmp r0, 0x1\n\ - beq _0802103E\n\ - cmp r0, 0x1\n\ - bgt _08021034\n\ - cmp r0, 0\n\ - beq _0802103A\n\ - b _08021046\n\ - .pool\n\ -_08021034:\n\ - cmp r0, 0x2\n\ - beq _08021042\n\ - b _08021046\n\ -_0802103A:\n\ - movs r0, 0x8\n\ - b _08021044\n\ -_0802103E:\n\ - movs r0, 0x4\n\ - b _08021044\n\ -_08021042:\n\ - movs r0, 0x1\n\ -_08021044:\n\ - strb r0, [r6, 0xB]\n\ -_08021046:\n\ - pop {r4-r6}\n\ - pop {r0}\n\ - bx r0"); -} -#endif // NONMATCHING int sub_802104C(void) { @@ -636,7 +627,7 @@ void sub_80214A8(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) &gUnknown_082F436C, gUnknown_082F41E8[i], gUnknown_082F41E8[i], - arg0->unk84.separate.others[i].unk0 + 133); + arg0->unk68.unk1C.separate.others[i].unk0 + 133); arg1->unk38[i] = &gSprites[spriteId]; arg1->unk38[i]->oam.priority = 3; arg1->unk38[i]->affineAnimPaused = 1; @@ -823,3 +814,1459 @@ void sub_80219C8(u8 windowId, u8 left, u8 colorId, const u8 *string) left = (left * 4) - (GetStringWidth(2, string, -1) / 2u); AddTextPrinterParameterized3(windowId, 2, left, 0, sBerryCrushTextColors1[colorId], 0, string); } + +#ifdef NONMATCHING +void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) +{ + s32 r6; + u8 i, j; + u8 sp18 = 0; + u8 sp1C = 0; + struct BerryCrushGame_68 *sp20 = &sp0C->unk68; + u32 xOffset; + u32 r8, r9, r4, r7, r3_; + u8 r10, r2; + + r3 -= 16; + if (sp10 == 2) + r3 -= 42; + r6 = r3 - 14 * sp0C->unk9; + if (r6 > 0) + r6 = r6 / 2 + 16; + else + r6 = 16; + i = 0; + while (i < sp0C->unk9) + { + DynamicPlaceholderTextUtil_Reset(); + switch (sp10) + { + default: // how can you write this twice?????? + r4 = sp14 - 4; + r10 = r6; + r9 = sp1C + 0xA2; + r8 = sp18; + r6 += 14; // should be tail merged, but not + ++i; + break; + case 0: + sp18 = sp20->unk1C.separate.player.unk4[i]; + if (i != 0 && sp20->unk0C[i] != sp20->unk0C[i - 1]) + sp1C = i; + ConvertIntToDecimalStringN( + gStringVar4, + sp20->unk0C[5 * sp10 + i], // ~ line 145. 2 * i was stored in temp variable + 1, + 4 + ); + StringAppend(gStringVar4, gUnknown_082F43B4[sp10]); + r4 = sp14 - 4; + r10 = r6; // shift right should happen after the switch + r9 = sp1C + 0xA2; + r8 = sp18; + r6 += 14; + ++i; + break; + case 1: + sp18 = sp20->unk1C.separate.player.unk4[i + 8]; + if (i != 0 && sp20->unk0C[i + 5] != sp20->unk0C[i + 4]) // damn, access to unk0C is weird again + sp1C = i; + ConvertIntToDecimalStringN( + gStringVar1, + sp20->unk0C[5 * sp10 + i] >> 4, + 1, + 3 + ); + j = 0; + r3_ = 15 & (u8)sp20->unk0C[5 * sp10 + i]; + r4 = sp14 - 4; + r10 = r6; + r9 = sp1C + 0xA2; + r8 = sp18; + r6 += 14; + ++i; + for (; j < 4; ++j) + if (((r3_ >> (3 - j)) & 1) != 0) // why does it load constant 1 into r10? + r7 += gUnknown_082F334C[j]; + ConvertIntToDecimalStringN( + gStringVar2, + (u8)(r7 / 1000000), + 2, + 2 + ); + StringExpandPlaceholders(gStringVar4, gText_XDotY); + break; + case 2: + sp18 = i; + sp1C = i; + r2 = sp0C->unk68.unk1C.separate.others[i].unk0; + if (r2 > 43) + r2 = 0; + StringCopy(gStringVar1,gBerries[r2].name); + StringExpandPlaceholders(gStringVar4, gText_Var1Berry); + r4 = sp14 - 4; + r10 = r6; + r9 = sp1C + 0xA2; + r8 = i; + r6 += 14; + ++i; + break; + } + xOffset = GetStringRightAlignXOffset(2, gStringVar4, r4); + AddTextPrinterParameterized3( + sp0C->unk138.unk82, + 2, + xOffset, + r10, + sBerryCrushTextColors1[0], + 0, + gStringVar4 + ); + if (sp18 == sp0C->unk8) + StringCopy(gStringVar3, gText_1DotBlueF700); + else + StringCopy(gStringVar3, gText_1DotF700); + gStringVar3[0] = r9; + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, PLAYER_UNK14(sp0C, r8)); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gStringVar3); + AddTextPrinterParameterized3( + sp0C->unk138.unk82, + 2, + 4, + r10, + sBerryCrushTextColors1[0], + 0, + gStringVar4 + ); + } +} +#else +NAKED +void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) +{ + asm_unified("\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x2C\n\ + str r0, [sp, 0xC]\n\ + lsls r1, 24\n\ + lsrs r1, 24\n\ + str r1, [sp, 0x10]\n\ + lsls r2, 24\n\ + lsrs r2, 24\n\ + str r2, [sp, 0x14]\n\ + lsls r3, 24\n\ + movs r0, 0\n\ + str r0, [sp, 0x18]\n\ + movs r1, 0\n\ + str r1, [sp, 0x1C]\n\ + ldr r2, [sp, 0xC]\n\ + adds r2, 0x68\n\ + str r2, [sp, 0x20]\n\ + movs r4, 0xF0\n\ + lsls r4, 24\n\ + adds r3, r4\n\ + lsrs r3, 24\n\ + ldr r0, [sp, 0x10]\n\ + cmp r0, 0x2\n\ + bne _08021A68\n\ + adds r0, r3, 0\n\ + subs r0, 0x2A\n\ + lsls r0, 24\n\ + lsrs r3, r0, 24\n\ + _08021A68:\n\ + ldr r2, [sp, 0xC]\n\ + ldrb r1, [r2, 0x9]\n\ + lsls r0, r1, 3\n\ + subs r0, r1\n\ + lsls r0, 1\n\ + subs r6, r3, r0\n\ + cmp r6, 0\n\ + ble _08021A84\n\ + lsrs r0, r6, 31\n\ + adds r0, r6, r0\n\ + asrs r0, 1\n\ + adds r6, r0, 0\n\ + adds r6, 0x10\n\ + b _08021A86\n\ + _08021A84:\n\ + movs r6, 0x10\n\ + _08021A86:\n\ + movs r5, 0\n\ + ldr r3, [sp, 0xC]\n\ + ldrb r3, [r3, 0x9]\n\ + cmp r5, r3\n\ + bcc _08021A92\n\ + b _08021D14\n\ + _08021A92:\n\ + ldr r4, [sp, 0x10]\n\ + lsls r4, 2\n\ + str r4, [sp, 0x24]\n\ + _08021A98:\n\ + bl DynamicPlaceholderTextUtil_Reset\n\ + ldr r0, [sp, 0x10]\n\ + cmp r0, 0x1\n\ + beq _08021B48\n\ + cmp r0, 0x1\n\ + bgt _08021AC0\n\ + cmp r0, 0\n\ + beq _08021ADE\n\ + ldr r4, [sp, 0x14]\n\ + subs r4, 0x4\n\ + lsls r1, r6, 24\n\ + mov r10, r1\n\ + ldr r2, [sp, 0x1C]\n\ + adds r2, 0xA2\n\ + mov r9, r2\n\ + ldr r3, [sp, 0x18]\n\ + lsls r3, 5\n\ + mov r8, r3\n\ + b _08021C5A\n\ + _08021AC0:\n\ + ldr r4, [sp, 0x10]\n\ + cmp r4, 0x2\n\ + bne _08021AC8\n\ + b _08021C1C\n\ + _08021AC8:\n\ + ldr r4, [sp, 0x14]\n\ + subs r4, 0x4\n\ + lsls r0, r6, 24\n\ + mov r10, r0\n\ + ldr r1, [sp, 0x1C]\n\ + adds r1, 0xA2\n\ + mov r9, r1\n\ + ldr r2, [sp, 0x18]\n\ + lsls r2, 5\n\ + mov r8, r2\n\ + b _08021C5A\n\ + _08021ADE:\n\ + ldr r0, [sp, 0x20]\n\ + adds r0, 0x20\n\ + adds r0, r5\n\ + ldrb r0, [r0]\n\ + str r0, [sp, 0x18]\n\ + lsls r3, r5, 1\n\ + ldr r2, [sp, 0x20]\n\ + adds r2, 0xC\n\ + cmp r5, 0\n\ + beq _08021B04\n\ + adds r0, r2, r3\n\ + subs r1, r5, 0x1\n\ + lsls r1, 1\n\ + adds r1, r2, r1\n\ + ldrh r0, [r0]\n\ + ldrh r1, [r1]\n\ + cmp r0, r1\n\ + beq _08021B04\n\ + str r5, [sp, 0x1C]\n\ + _08021B04:\n\ + ldr r4, [sp, 0x24]\n\ + ldr r1, [sp, 0x10]\n\ + adds r0, r4, r1\n\ + lsls r0, 1\n\ + adds r0, r3, r0\n\ + adds r0, r2, r0\n\ + ldrh r1, [r0]\n\ + ldr r0, =gStringVar4\n\ + movs r2, 0x1\n\ + movs r3, 0x4\n\ + bl ConvertIntToDecimalStringN\n\ + ldr r0, =gUnknown_082F43B4\n\ + adds r0, r4, r0\n\ + ldr r1, [r0]\n\ + ldr r0, =gStringVar4\n\ + bl StringAppend\n\ + ldr r4, [sp, 0x14]\n\ + subs r4, 0x4\n\ + lsls r2, r6, 24\n\ + mov r10, r2\n\ + ldr r3, [sp, 0x1C]\n\ + adds r3, 0xA2\n\ + mov r9, r3\n\ + ldr r0, [sp, 0x18]\n\ + lsls r0, 5\n\ + mov r8, r0\n\ + b _08021C5A\n\ + .pool\n\ + _08021B48:\n\ + ldr r1, [sp, 0x20]\n\ + adds r0, r1, r5\n\ + adds r0, 0x28\n\ + ldrb r0, [r0]\n\ + str r0, [sp, 0x18]\n\ + lsls r3, r5, 1\n\ + adds r2, r1, 0\n\ + adds r2, 0xC\n\ + cmp r5, 0\n\ + beq _08021B72\n\ + adds r0, r3, 0\n\ + adds r0, 0xA\n\ + adds r0, r2, r0\n\ + adds r1, r3, 0\n\ + adds r1, 0x8\n\ + adds r1, r2, r1\n\ + ldrh r0, [r0]\n\ + ldrh r1, [r1]\n\ + cmp r0, r1\n\ + beq _08021B72\n\ + str r5, [sp, 0x1C]\n\ + _08021B72:\n\ + ldr r0, [sp, 0x24]\n\ + ldr r1, [sp, 0x10]\n\ + adds r4, r0, r1\n\ + lsls r4, 1\n\ + adds r4, r3, r4\n\ + adds r4, r2, r4\n\ + ldrh r1, [r4]\n\ + lsrs r1, 4\n\ + ldr r0, =gStringVar1\n\ + movs r2, 0x1\n\ + movs r3, 0x3\n\ + bl ConvertIntToDecimalStringN\n\ + movs r7, 0\n\ + ldrb r0, [r4]\n\ + movs r3, 0xF\n\ + ands r3, r0\n\ + movs r2, 0\n\ + ldr r4, [sp, 0x10]\n\ + lsls r4, 2\n\ + str r4, [sp, 0x28]\n\ + ldr r4, [sp, 0x14]\n\ + subs r4, 0x4\n\ + lsls r0, r6, 24\n\ + mov r10, r0\n\ + ldr r1, [sp, 0x1C]\n\ + adds r1, 0xA2\n\ + mov r9, r1\n\ + ldr r0, [sp, 0x18]\n\ + lsls r0, 5\n\ + mov r8, r0\n\ + adds r6, 0xE\n\ + adds r5, 0x1\n\ + ldr r1, =gUnknown_082F334C\n\ + mov r12, r1\n\ + _08021BB8:\n\ + movs r0, 0x3\n\ + subs r1, r0, r2\n\ + adds r0, r3, 0\n\ + asrs r0, r1\n\ + movs r1, 0x1\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08021BD0\n\ + lsls r0, r2, 2\n\ + add r0, r12\n\ + ldr r0, [r0]\n\ + adds r7, r0\n\ + _08021BD0:\n\ + adds r0, r2, 0x1\n\ + lsls r0, 24\n\ + lsrs r2, r0, 24\n\ + cmp r2, 0x3\n\ + bls _08021BB8\n\ + adds r0, r7, 0\n\ + ldr r1, =0x000f4240\n\ + bl __udivsi3\n\ + lsls r0, 24\n\ + lsrs r3, r0, 24\n\ + ldr r0, =gStringVar2\n\ + adds r1, r3, 0\n\ + movs r2, 0x2\n\ + movs r3, 0x2\n\ + bl ConvertIntToDecimalStringN\n\ + ldr r0, =gUnknown_082F43B4\n\ + ldr r2, [sp, 0x28]\n\ + adds r0, r2, r0\n\ + ldr r1, [r0]\n\ + ldr r0, =gStringVar4\n\ + bl StringExpandPlaceholders\n\ + b _08021C5E\n\ + .pool\n\ + _08021C1C:\n\ + str r5, [sp, 0x18]\n\ + str r5, [sp, 0x1C]\n\ + lsls r7, r5, 5\n\ + ldr r3, [sp, 0xC]\n\ + adds r0, r3, r7\n\ + adds r0, 0xA4\n\ + ldrb r2, [r0]\n\ + cmp r2, 0x2B\n\ + bls _08021C30\n\ + movs r2, 0\n\ + _08021C30:\n\ + lsls r1, r2, 3\n\ + subs r1, r2\n\ + lsls r1, 2\n\ + ldr r0, =gBerries\n\ + adds r1, r0\n\ + ldr r0, =gStringVar1\n\ + bl StringCopy\n\ + ldr r0, =gUnknown_082F43B4\n\ + ldr r1, [r0, 0x8]\n\ + ldr r0, =gStringVar4\n\ + bl StringExpandPlaceholders\n\ + ldr r4, [sp, 0x14]\n\ + subs r4, 0x4\n\ + lsls r0, r6, 24\n\ + mov r10, r0\n\ + movs r1, 0xA2\n\ + adds r1, r5\n\ + mov r9, r1\n\ + mov r8, r7\n\ + _08021C5A:\n\ + adds r6, 0xE\n\ + adds r5, 0x1\n\ + _08021C5E:\n\ + movs r0, 0x2\n\ + ldr r1, =gStringVar4\n\ + adds r2, r4, 0\n\ + bl GetStringRightAlignXOffset\n\ + adds r2, r0, 0\n\ + ldr r3, [sp, 0xC]\n\ + movs r4, 0xDD\n\ + lsls r4, 1\n\ + adds r0, r3, r4\n\ + ldrb r0, [r0]\n\ + lsls r2, 24\n\ + lsrs r2, 24\n\ + mov r1, r10\n\ + lsrs r3, r1, 24\n\ + ldr r1, =sBerryCrushTextColors1\n\ + str r1, [sp]\n\ + movs r4, 0\n\ + str r4, [sp, 0x4]\n\ + ldr r1, =gStringVar4\n\ + str r1, [sp, 0x8]\n\ + movs r1, 0x2\n\ + bl AddTextPrinterParameterized3\n\ + ldr r3, [sp, 0x18]\n\ + ldr r2, [sp, 0xC]\n\ + ldrb r2, [r2, 0x8]\n\ + cmp r3, r2\n\ + bne _08021CC0\n\ + ldr r0, =gStringVar3\n\ + ldr r1, =gText_1DotBlueF700\n\ + bl StringCopy\n\ + b _08021CC8\n\ + .pool\n\ + _08021CC0:\n\ + ldr r0, =gStringVar3\n\ + ldr r1, =gText_1DotF700\n\ + bl StringCopy\n\ + _08021CC8:\n\ + ldr r4, =gStringVar3\n\ + mov r3, r9\n\ + strb r3, [r4]\n\ + mov r1, r8\n\ + adds r1, 0x98\n\ + ldr r0, [sp, 0xC]\n\ + adds r1, r0, r1\n\ + movs r0, 0\n\ + bl DynamicPlaceholderTextUtil_SetPlaceholderPtr\n\ + ldr r0, =gStringVar4\n\ + adds r1, r4, 0\n\ + bl DynamicPlaceholderTextUtil_ExpandPlaceholders\n\ + ldr r1, [sp, 0xC]\n\ + movs r2, 0xDD\n\ + lsls r2, 1\n\ + adds r0, r1, r2\n\ + ldrb r0, [r0]\n\ + mov r4, r10\n\ + lsrs r3, r4, 24\n\ + ldr r1, =sBerryCrushTextColors1\n\ + str r1, [sp]\n\ + movs r1, 0\n\ + str r1, [sp, 0x4]\n\ + ldr r2, =gStringVar4\n\ + str r2, [sp, 0x8]\n\ + movs r1, 0x2\n\ + movs r2, 0x4\n\ + bl AddTextPrinterParameterized3\n\ + lsls r0, r5, 24\n\ + lsrs r5, r0, 24\n\ + ldr r3, [sp, 0xC]\n\ + ldrb r3, [r3, 0x9]\n\ + cmp r5, r3\n\ + bcs _08021D14\n\ + b _08021A98\n\ + _08021D14:\n\ + add sp, 0x2C\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n\ + .pool"); +} +#endif + +void sub_8021D34(struct BerryCrushGame *r8) +{ + u8 r10 = 0; + u8 r6 = 0; + u32 sp0C = 0; + struct BerryCrushGame_68 *sp10 = &r8->unk68; + u8 r7 = GetWindowAttribute(r8->unk138.unk82, WINDOW_HEIGHT) * 8 - 42; + + sub_8021944(&r8->unk138, sp10->unk04); + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_TimeColon); + r6 = 176 - (u8)GetStringWidth(2, gText_SpaceSec, -1); + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_SpaceSec); + ConvertIntToDecimalStringN(gStringVar1, r8->unk138.unk6, 2, 2); + ConvertIntToDecimalStringN(gStringVar2, r8->unk138.unk8, 2, 2); + StringExpandPlaceholders(gStringVar4, gText_XDotY2); + r6 -= GetStringWidth(2, gStringVar4, -1); + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); + r6 -= GetStringWidth(2, gText_SpaceMin, -1); + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_SpaceMin); + ConvertIntToDecimalStringN(gStringVar1, r8->unk138.unk4, 2, 1); + StringExpandPlaceholders(gStringVar4, gText_StrVar1); + r6 -= GetStringWidth(2, gStringVar4, -1); + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); + r7 += 14; + AddTextPrinterParameterized3(r8->unk138.unk82, 2, 0, r7, sBerryCrushTextColors1[0], 0, gText_PressingSpeed); + r6 = 176 - (u8)GetStringWidth(2, gText_TimesPerSec, -1); + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_TimesPerSec); + for (; r10 < 8; ++r10) + if (((u8)r8->unk16 >> (7 - r10)) & 1) + sp0C += *(r10 + gUnknown_082F334C); // It's accessed in a different way here for unknown reason + ConvertIntToDecimalStringN(gStringVar1, r8->unk16 >> 8, 1, 3); + ConvertIntToDecimalStringN(gStringVar2, sp0C / 1000000, 2, 2); + StringExpandPlaceholders(gStringVar4, gText_XDotY3); + r6 -= GetStringWidth(2, gStringVar4, -1); + if (r8->unk25_1) + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors4, 0, gStringVar4); + else + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); + r7 += 14; + AddTextPrinterParameterized3(r8->unk138.unk82, 2, 0, r7, sBerryCrushTextColors1[0], 0, gText_Silkiness); + ConvertIntToDecimalStringN(gStringVar1, sp10->unk08, 1, 3); + StringExpandPlaceholders(gStringVar4, gText_Var1Percent); + r6 = 176 - (u8)GetStringWidth(2, gStringVar4, -1); + AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); +} + +bool32 sub_8022070(struct BerryCrushGame *r4, struct BerryCrushGame_138 *r6) +{ + u8 r5; + struct WindowTemplate template; + + switch (r6->unk80) + { + case 0: + r5 = r4->unk9 - 2; + sub_8022554(r6); + memcpy(&template, &gUnknown_082F32CC[r4->unk12], sizeof(struct WindowTemplate)); + if (r4->unk12 == 13) + template.height = gUnknown_082F3344[1][r5]; + else + template.height = gUnknown_082F3344[0][r5]; + r6->unk82 = AddWindow(&template); + break; + case 1: + PutWindowTilemap(r6->unk82); + FillWindowPixelBuffer(r6->unk82, PIXEL_FILL(0)); + break; + case 2: + LoadUserWindowBorderGfx_(r6->unk82, 541, 208); + DrawStdFrameWithCustomTileAndPalette(r6->unk82, 0, 541, 13); + break; + case 3: + r5 = r4->unk9 - 2; + switch (r4->unk12) + { + case 11: + sub_80219C8(r6->unk82, 20, 3, gText_PressesRankings); + sub_8021A28(r4, 0, 0xA0, 8 * gUnknown_082F3344[0][r5]); + r6->unk80 = 5; + return FALSE; + case 12: + sub_80219C8(r6->unk82, 20, 4, gUnknown_082F43B4[r4->unk68.unk1C.separate.player.unk4[7] + 3]); + sub_8021A28(r4, 1, 0xA0, 8 * gUnknown_082F3344[0][r5]); + r6->unk80 = 5; + return FALSE; + case 13: + sub_80219C8(r6->unk82, 22, 3, gText_CrushingResults); + sub_8021A28(r4, 2, 0xB0, 8 * gUnknown_082F3344[1][r5]); + break; + } + break; + case 4: + sub_8021D34(r4); + break; + case 5: + CopyWindowToVram(r6->unk82, 3); + r6->unk80 = 0; + return TRUE; + } + ++r6->unk80; + return FALSE; +} + +void sub_802222C(struct BerryCrushGame *r4) +{ + ClearStdWindowAndFrameToTransparent(r4->unk138.unk82, 1); + RemoveWindow(r4->unk138.unk82); + sub_8022600(r4); +} + +#ifdef NONMATCHING +void sub_8022250(u8 r4) +{ + u8 r9 = 0, r2, r7, r10; + u32 sp0C = 0; + s16 *r6 = gTasks[r4].data; + + switch (r6[0]) + { + case 0: + r6[1] = AddWindow(&gUnknown_082F32EC); + PutWindowTilemap((u8)r6[1]); + FillWindowPixelBuffer((u8)r6[1], PIXEL_FILL(0)); + LoadUserWindowBorderGfx_((u8)r6[1], 541, 208); + DrawStdFrameWithCustomTileAndPalette((u8)r6[1], 0, 541, 13); + break; + case 1: + // r5/r10 register swap + r7 = 96 - GetStringWidth(1, gText_BerryCrush2, -1) / 2u; + AddTextPrinterParameterized3( + (u8)r6[1], + 1, + r7, + 1, + sBerryCrushTextColorTable[0], + 0, + gText_BerryCrush2 + ); + r7 = 96 - GetStringWidth(1, gText_PressingSpeedRankings, -1) / 2u; + AddTextPrinterParameterized3( + (u8)r6[1], + 1, + r7, + 17, + sBerryCrushTextColorTable[0], + 0, + gText_PressingSpeedRankings + ); + + for (r10 = 41; r9 < 4; ++r9) + { + ConvertIntToDecimalStringN(gStringVar1, r9 + 2, 0, 1); + StringExpandPlaceholders(gStringVar4, gText_Var1Players); + AddTextPrinterParameterized3( + (u8)r6[1], + 1, + 0, + r10, + sBerryCrushTextColors1[0], + 0, + gStringVar4 + ); + r7 = 192 - (u8)GetStringWidth(1, gText_TimesPerSec, -1); + AddTextPrinterParameterized3( + (u8)r6[1], + 1, + r7, + r10, + sBerryCrushTextColors1[0], + 0, + gText_TimesPerSec + ); + for (r2 = 0; r2 < 8; ++r2) + if (((u8)r6[r9 + 2] >> (7 - r2)) & 1) + sp0C += gUnknown_082F334C[r2]; + ConvertIntToDecimalStringN(gStringVar1, (u16)r6[r9 + 2] >> 8, 1, 3); + ConvertIntToDecimalStringN(gStringVar2, sp0C / 1000000, 2, 2); + StringExpandPlaceholders(gStringVar4, gText_XDotY3); + r7 -= GetStringWidth(1, gStringVar4, -1); + AddTextPrinterParameterized3( + (u8)r6[1], + 1, + r7, + r10, + sBerryCrushTextColors1[0], + 0, + gStringVar4 + ); + r10 += 16; + sp0C = 0; + } + CopyWindowToVram((u8)r6[1], 3); + break; + case 2: + if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + break; + else + return; + case 3: + ClearStdWindowAndFrameToTransparent((u8)r6[1], 1); + ClearWindowTilemap((u8)r6[1]); + RemoveWindow((u8)r6[1]); + DestroyTask(r4); + EnableBothScriptContexts(); + ScriptContext2_Disable(); + r6[0] = 0; + return; + } + ++r6[0]; +} +#else +NAKED +void sub_8022250(u8 r4) +{ + asm_unified("\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x14\n\ + lsls r0, 24\n\ + lsrs r4, r0, 24\n\ + movs r0, 0\n\ + mov r9, r0\n\ + movs r1, 0\n\ + str r1, [sp, 0xC]\n\ + lsls r0, r4, 2\n\ + adds r0, r4\n\ + lsls r0, 3\n\ + ldr r1, =gTasks + 0x8\n\ + adds r6, r0, r1\n\ + movs r1, 0\n\ + ldrsh r0, [r6, r1]\n\ + cmp r0, 0x1\n\ + beq _080222D0_case_1\n\ + cmp r0, 0x1\n\ + bgt _08022288\n\ + cmp r0, 0\n\ + beq _08022296_case_0\n\ + b _080224BA_case_def\n\ + .pool\n\ + _08022288:\n\ + cmp r0, 0x2\n\ + bne _0802228E\n\ + b _08022480_case_2\n\ + _0802228E:\n\ + cmp r0, 0x3\n\ + bne _08022294\n\ + b _08022494_case_3\n\ + _08022294:\n\ + b _080224BA_case_def\n\ + _08022296_case_0:\n\ + ldr r0, =gUnknown_082F32EC\n\ + bl AddWindow\n\ + strh r0, [r6, 0x2]\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + bl PutWindowTilemap\n\ + ldrb r0, [r6, 0x2]\n\ + movs r1, 0\n\ + bl FillWindowPixelBuffer\n\ + ldrb r0, [r6, 0x2]\n\ + ldr r4, =0x0000021d\n\ + adds r1, r4, 0\n\ + movs r2, 0xD0\n\ + bl LoadUserWindowBorderGfx_\n\ + ldrb r0, [r6, 0x2]\n\ + movs r1, 0\n\ + adds r2, r4, 0\n\ + movs r3, 0xD\n\ + bl DrawStdFrameWithCustomTileAndPalette\n\ + b _080224BA_case_def\n\ + .pool\n\ + _080222D0_case_1:\n\ + ldr r0, =gText_BerryCrush2\n\ + mov r10, r0\n\ + movs r1, 0x1\n\ + negs r1, r1\n\ + mov r8, r1\n\ + movs r0, 0x1\n\ + mov r1, r10\n\ + mov r2, r8\n\ + bl GetStringWidth\n\ + lsrs r0, 1\n\ + movs r4, 0x60\n\ + subs r0, r4, r0\n\ + lsls r0, 24\n\ + lsrs r7, r0, 24\n\ + ldrb r0, [r6, 0x2]\n\ + ldr r5, =sBerryCrushTextColorTable\n\ + str r5, [sp]\n\ + mov r1, r9\n\ + str r1, [sp, 0x4]\n\ + mov r1, r10\n\ + str r1, [sp, 0x8]\n\ + movs r1, 0x1\n\ + adds r2, r7, 0\n\ + movs r3, 0x1\n\ + bl AddTextPrinterParameterized3\n\ + ldr r0, =gText_PressingSpeedRankings\n\ + mov r10, r0\n\ + movs r0, 0x1\n\ + mov r1, r10\n\ + mov r2, r8\n\ + bl GetStringWidth\n\ + lsrs r0, 1\n\ + subs r4, r0\n\ + lsls r4, 24\n\ + lsrs r7, r4, 24\n\ + ldrb r0, [r6, 0x2]\n\ + str r5, [sp]\n\ + mov r1, r9\n\ + str r1, [sp, 0x4]\n\ + mov r1, r10\n\ + str r1, [sp, 0x8]\n\ + movs r1, 0x1\n\ + adds r2, r7, 0\n\ + movs r3, 0x11\n\ + bl AddTextPrinterParameterized3\n\ + movs r0, 0x29\n\ + mov r10, r0\n\ + _08022336:\n\ + mov r1, r9\n\ + adds r1, 0x2\n\ + ldr r0, =gStringVar1\n\ + movs r2, 0\n\ + movs r3, 0x1\n\ + bl ConvertIntToDecimalStringN\n\ + ldr r0, =gStringVar4\n\ + ldr r1, =gText_Var1Players\n\ + bl StringExpandPlaceholders\n\ + ldrb r0, [r6, 0x2]\n\ + ldr r1, =sBerryCrushTextColors1\n\ + str r1, [sp]\n\ + movs r1, 0\n\ + str r1, [sp, 0x4]\n\ + ldr r1, =gStringVar4\n\ + str r1, [sp, 0x8]\n\ + movs r1, 0x1\n\ + movs r2, 0\n\ + mov r3, r10\n\ + bl AddTextPrinterParameterized3\n\ + movs r0, 0x1\n\ + ldr r1, =gText_TimesPerSec\n\ + movs r2, 0x1\n\ + negs r2, r2\n\ + bl GetStringWidth\n\ + movs r1, 0xC0\n\ + subs r1, r0\n\ + lsls r1, 24\n\ + lsrs r7, r1, 24\n\ + ldrb r0, [r6, 0x2]\n\ + ldr r1, =sBerryCrushTextColors1\n\ + str r1, [sp]\n\ + movs r1, 0\n\ + str r1, [sp, 0x4]\n\ + ldr r1, =gText_TimesPerSec\n\ + str r1, [sp, 0x8]\n\ + movs r1, 0x1\n\ + adds r2, r7, 0\n\ + mov r3, r10\n\ + bl AddTextPrinterParameterized3\n\ + movs r2, 0\n\ + mov r0, r9\n\ + lsls r4, r0, 1\n\ + mov r1, r10\n\ + adds r1, 0x10\n\ + str r1, [sp, 0x10]\n\ + movs r0, 0x1\n\ + add r9, r0\n\ + adds r0, r4, r6\n\ + ldrb r3, [r0, 0x4]\n\ + movs r1, 0x7\n\ + mov r12, r1\n\ + movs r0, 0x1\n\ + mov r8, r0\n\ + ldr r5, =gUnknown_082F334C\n\ + _080223AE:\n\ + mov r0, r12\n\ + subs r1, r0, r2\n\ + adds r0, r3, 0\n\ + asrs r0, r1\n\ + mov r1, r8\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _080223CA\n\ + lsls r0, r2, 2\n\ + adds r0, r5\n\ + ldr r0, [r0]\n\ + ldr r1, [sp, 0xC]\n\ + adds r1, r0\n\ + str r1, [sp, 0xC]\n\ + _080223CA:\n\ + adds r0, r2, 0x1\n\ + lsls r0, 24\n\ + lsrs r2, r0, 24\n\ + cmp r2, 0x7\n\ + bls _080223AE\n\ + adds r0, r4, r6\n\ + ldrh r1, [r0, 0x4]\n\ + lsrs r1, 8\n\ + ldr r0, =gStringVar1\n\ + movs r2, 0x1\n\ + movs r3, 0x3\n\ + bl ConvertIntToDecimalStringN\n\ + ldr r0, [sp, 0xC]\n\ + ldr r1, =0x000f4240\n\ + bl __udivsi3\n\ + adds r1, r0, 0\n\ + ldr r0, =gStringVar2\n\ + movs r2, 0x2\n\ + movs r3, 0x2\n\ + bl ConvertIntToDecimalStringN\n\ + ldr r0, =gStringVar4\n\ + ldr r1, =gText_XDotY3\n\ + bl StringExpandPlaceholders\n\ + movs r0, 0x1\n\ + ldr r1, =gStringVar4\n\ + movs r2, 0x1\n\ + negs r2, r2\n\ + bl GetStringWidth\n\ + subs r0, r7, r0\n\ + lsls r0, 24\n\ + lsrs r7, r0, 24\n\ + ldrb r0, [r6, 0x2]\n\ + ldr r1, =sBerryCrushTextColors1\n\ + str r1, [sp]\n\ + movs r1, 0\n\ + str r1, [sp, 0x4]\n\ + ldr r1, =gStringVar4\n\ + str r1, [sp, 0x8]\n\ + movs r1, 0x1\n\ + adds r2, r7, 0\n\ + mov r3, r10\n\ + bl AddTextPrinterParameterized3\n\ + ldr r1, [sp, 0x10]\n\ + lsls r0, r1, 24\n\ + lsrs r0, 24\n\ + mov r10, r0\n\ + movs r0, 0\n\ + str r0, [sp, 0xC]\n\ + mov r1, r9\n\ + lsls r0, r1, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ + cmp r0, 0x3\n\ + bhi _08022444\n\ + b _08022336\n\ + _08022444:\n\ + ldrb r0, [r6, 0x2]\n\ + movs r1, 0x3\n\ + bl CopyWindowToVram\n\ + b _080224BA_case_def\n\ + .pool\n\ + _08022480_case_2:\n\ + ldr r0, =gMain\n\ + ldrh r1, [r0, 0x2E]\n\ + movs r0, 0x3\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _080224BA_case_def\n\ + b _080224C0\n\ + .pool\n\ + _08022494_case_3:\n\ + ldrb r0, [r6, 0x2]\n\ + movs r1, 0x1\n\ + bl ClearStdWindowAndFrameToTransparent\n\ + ldrb r0, [r6, 0x2]\n\ + bl ClearWindowTilemap\n\ + ldrb r0, [r6, 0x2]\n\ + bl RemoveWindow\n\ + adds r0, r4, 0\n\ + bl DestroyTask\n\ + bl EnableBothScriptContexts\n\ + bl ScriptContext2_Disable\n\ + mov r0, r9\n\ + b _080224BE\n\ + _080224BA_case_def:\n\ + ldrh r0, [r6]\n\ + adds r0, 0x1\n\ + _080224BE:\n\ + strh r0, [r6]\n\ + _080224C0:\n\ + add sp, 0x14\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0"); +} +#endif + +void ShowBerryCrushRankings(void) +{ + u8 taskId; + + ScriptContext2_Enable(); + taskId = CreateTask(sub_8022250, 0); + gTasks[taskId].data[2] = gSaveBlock2Ptr->berryCrush.berryCrushResults[0]; + gTasks[taskId].data[3] = gSaveBlock2Ptr->berryCrush.berryCrushResults[1]; + gTasks[taskId].data[4] = gSaveBlock2Ptr->berryCrush.berryCrushResults[2]; + gTasks[taskId].data[5] = gSaveBlock2Ptr->berryCrush.berryCrushResults[3]; +} + +void sub_8022524(struct BerryCrushGame_138 *r4, u16 r1) +{ + sub_8021944(r4, r1); + sub_8035044(0, r4->unk4); + sub_8035044(1, r4->unk6); + sub_8035044(2, r4->unk8); +} + +void sub_8022554(struct BerryCrushGame_138 *r0) +{ + r0->unk78[0]->invisible = TRUE; + r0->unk78[1]->invisible = TRUE; + sub_803547C(2, 1); + sub_803547C(1, 1); + sub_803547C(0, 1); +} + +void sub_8022588(struct BerryCrushGame *r5) +{ + u8 r6; + + for (r6 = 0; r6 < r5->unk9; ++r6) + { + r5->unk138.unkC[r6] = &gUnknown_082F4190[gUnknown_082F417C[r5->unk9 - 2][r6]]; + r5->unk138.unk83[r6] = AddWindow(&gUnknown_082F32F4[r5->unk138.unkC[r6]->unk0]); + PutWindowTilemap(r5->unk138.unk83[r6]); + FillWindowPixelBuffer(r5->unk138.unk83[r6], 0); + } +} + +void sub_8022600(struct BerryCrushGame *r6) +{ + u8 r7, r2; + u8 *r4; + + for (r7 = 0; r7 < r6->unk9; ++r7) + { + PutWindowTilemap(r6->unk138.unk83[r7]); + if (r7 == r6->unk8) + { + AddTextPrinterParameterized4( + r6->unk138.unk83[r7], + 2, + 36 - GetStringWidth(2, PLAYER_UNK14(r6, r7), 0) / 2u, + 1, + 0, + 0, + sBerryCrushTextColors2[0], + 0, + PLAYER_UNK14(r6, r7) + ); + } + else + { + AddTextPrinterParameterized4( + r6->unk138.unk83[r7], + 2, + 36 - GetStringWidth(2, PLAYER_UNK14(r6, r7), 0) / 2u, + 1, + 0, + 0, + sBerryCrushTextColors3[0], + 0, + PLAYER_UNK14(r6, r7) + ); + } + CopyWindowToVram(r6->unk138.unk83[r7], 3); + } + CopyBgTilemapBufferToVram(0); +} + +void sub_80226D0(struct BerryCrushGame *r6) +{ + u8 r5 = 0; + const u32 *r0 = gUnknown_08DE3FD4; +#ifndef NONMATCHING // r4, r5, r6 register roulette + register u8 *r4 asm("r4") = gDecompressionBuffer; + register u32 r0_ asm("r0"); +#else + u8 *r4 = gDecompressionBuffer; + u32 r0_; +#endif + + LZ77UnCompWram(r0, r4); + for (; r5 < r6->unk9; ++r5) + { + r0_ = r6->unk138.unkC[r5]->unk0; + CopyToBgTilemapBufferRect( + 3, + &r4[r0_ * 40], + r6->unk138.unkC[r5]->unk1, + r6->unk138.unkC[r5]->unk2, + 10, + 2 + ); + } + CopyBgTilemapBufferToVram(3); +} + +void sub_8022730(struct BerryCrushGame *r6) +{ + u8 r5 = 0; + u8 r2; + + r6->unk2A = -104; + r6->unk2C = 0; + gSpriteCoordOffsetX = 0; + gSpriteCoordOffsetY = -104; + for (; r5 < 4; ++r5) + LoadCompressedSpriteSheet(&gUnknown_082F41F4[r5]); + LoadSpritePalettes(&gUnknown_082F421C); + r2 = CreateSprite(&gUnknown_082F430C, 120, 88, 5); + r6->unk138.unk20 = &gSprites[r2]; + r6->unk138.unk20->oam.priority = 3; + r6->unk138.unk20->coordOffsetEnabled = TRUE; + r6->unk138.unk20->animPaused = TRUE; + for (r5 = 0; r5 < r6->unk9; ++r5) + { + r2 = CreateSprite( + &gUnknown_082F4324, + r6->unk138.unkC[r5]->unk4 + 120, + r6->unk138.unkC[r5]->unk6 + 32, + 0 + ); + r6->unk138.unk24[r5] = &gSprites[r2]; + r6->unk138.unk24[r5]->oam.priority = 1; + r6->unk138.unk24[r5]->invisible = TRUE; + r6->unk138.unk24[r5]->coordOffsetEnabled = TRUE; + r6->unk138.unk24[r5]->animPaused = TRUE; + } + for (r5 = 0; r5 < ARRAY_COUNT(r6->unk138.unk4C); ++r5) + { + r2 = CreateSprite( + &gUnknown_082F433C, + gUnknown_082F41D2[r5][0] + 120, + gUnknown_082F41D2[r5][1] + 136, + 6 + ); + r6->unk138.unk4C[r5] = &gSprites[r2]; + r6->unk138.unk4C[r5]->oam.priority = 3; + r6->unk138.unk4C[r5]->invisible = TRUE; + r6->unk138.unk4C[r5]->animPaused = TRUE; + r6->unk138.unk4C[r5]->data[0] = r5; + } + for (r5 = 0; r5 < ARRAY_COUNT(r6->unk138.unk78); ++r5) + { + r2 = CreateSprite( + &gUnknown_082F4354, + 24 * r5 + 176, + 8, + 0 + ); + r6->unk138.unk78[r5] = &gSprites[r2]; + r6->unk138.unk78[r5]->oam.priority = 0; + r6->unk138.unk78[r5]->invisible = FALSE; + r6->unk138.unk78[r5]->animPaused = FALSE; + } + sub_8034D14(0, 0, &gUnknown_082F4384[0]); + sub_8034D14(1, 0, &gUnknown_082F4384[1]); + sub_8034D14(2, 0, &gUnknown_082F4384[2]); + if (r6->unk12 == 1) + sub_8022554(&r6->unk138); +} + +void sub_8022960(struct BerryCrushGame *r5) +{ + u8 r4 = 0; + + FreeSpriteTilesByTag(4); + FreeSpriteTilesByTag(3); + FreeSpriteTilesByTag(2); + FreeSpriteTilesByTag(1); + FreeSpritePaletteByTag(4); + FreeSpritePaletteByTag(2); + FreeSpritePaletteByTag(1); + for (; r4 < ARRAY_COUNT(r5->unk138.unk78); ++r4) + DestroySprite(r5->unk138.unk78[r4]); + sub_80353DC(2); + sub_80353DC(1); + sub_80353DC(0); + for (r4 = 0; r4 < ARRAY_COUNT(r5->unk138.unk4C); ++r4) + DestroySprite(r5->unk138.unk4C[r4]); + for (r4 = 0; r4 < r5->unk9; ++r4) + DestroySprite(r5->unk138.unk24[r4]); + if (r5->unk138.unk20->inUse) + DestroySprite(r5->unk138.unk20); +} + +void sub_8022A20(struct Sprite *sprite) +{ + if (sprite->animEnded) + { + sprite->invisible = TRUE; + sprite->animPaused = TRUE; + } +} + +void sub_8022A4C(struct Sprite *sprite) +{ + u8 r1 = 0; + SpriteCallback r5 = SpriteCallbackDummy; + + for (; r1 < ARRAY_COUNT(sprite->data); ++r1) + sprite->data[r1] = 0; + sprite->pos2.x = 0; + sprite->pos2.y = 0; + sprite->invisible = TRUE; + sprite->animPaused = TRUE; + sprite->callback = r5; +} + +void sub_8022A94(struct Sprite *sprite) +{ + s16 *r4 = sprite->data; + + r4[1] += r4[2]; + sprite->pos2.y += r4[1] >> 8; + if (r4[7] & 0x8000) + { + sprite->data[0] += r4[3]; + r4[4] += r4[5]; + sprite->pos2.x = Sin(r4[4] >> 7, r4[6]); + if (r4[7] & 0x8000 && r4[4] >> 7 > 126) + { + sprite->pos2.x = 0; + r4[7] &= 0x7FFF; + } + } + sprite->pos1.x = r4[0] >> 7; + if (sprite->pos1.y + sprite->pos2.y > (r4[7] & 0x7FFF)) + sprite->callback = sub_8022A4C; +} + +void sub_8022B28(struct Sprite *sprite) +{ + s16 *r7 = sprite->data; + s16 r4, r5; + s32 r2; + u32 r8 = 0; + + r7 = sprite->data; + r2 = 640; + r7[1] = r2; + r7[2] = 32; + r7[7] = 168; + r4 = sprite->pos2.x * 128; + r5 = sub_81515D4(7, (168 - sprite->pos1.y) << 7, (r2 + 32) >> 1); + sprite->data[0] = sprite->pos1.x << 7; + r7[3] = sub_81515D4(7, r4, r5); + r2 = sub_8151550(7, r5, 85); + r7[4] = r8; + r7[5] = sub_81515D4(7, 0x3F80, r2); + r7[6] = sprite->pos2.x / 4; + r7[7] |= 0x8000; + sprite->pos2.y = r8; + sprite->pos2.x = r8; + sprite->callback = sub_8022A94; + sprite->animPaused = FALSE; + sprite->invisible = FALSE; +} + +void sub_8022BEC(u16 r5, u8 r4, u8 *r7) +{ + struct BerryCrushGame *r6 = sub_8020C00(); + + if (r5 > 25) + r5 = 0; + switch (r4) + { + case 0: + if (r5 != 0) + gUnknown_082F43CC[r5](r6, r7); + if (r6->unkE > 25) + r6->unkE = r4; + r6->unk4 = gUnknown_082F43CC[r6->unkE]; + break; + case 1: + r6->unk4 = gUnknown_082F43CC[r5]; + break; + } +} + +u32 sub_8022C58(struct BerryCrushGame *r6, u8 *r1) +{ + u16 r4; + u32 r0; +#ifndef NONMATCHING // fake match, nobody can write such code + register u32 r2 asm("r2"); + register u32 r3 asm("r3"); + + r2 = r1[0]; + r3 = r1[1]; + r3 <<= 8; + r2 |= r3; + r3 = r1[2]; + r3 <<= 16; + r2 |= r3; + r3 = r1[3]; + r3 <<= 24; + r0 = r2; + r0 |= r3; +#else + u32 r2; + + r0 = T1_READ_32(r1); +#endif + r2 = r1[9]; + r1[0] = r2; + r4 = r1[8] << 8; + r2 = r1[7]; + r4 |= r2; + gPaletteFade.bufferTransferDisabled = FALSE; + BeginNormalPaletteFade(r0, r1[4], r1[5], r1[6], r4); + UpdatePaletteFade(); + r6->unkE = 2; + return 0; +} + +u32 sub_8022CB0(struct BerryCrushGame *r4, u8 *r5) +{ + switch (r4->unkC) + { + case 0: + if (UpdatePaletteFade()) + return 0; + if(r5[0] != 0) + ++r4->unkC; + else + r4->unkC = 3; + return 0; + case 1: + sub_8010434(); + ++r4->unkC; + return 0; + case 2: + if (IsLinkTaskFinished()) + { + ++r4->unkC; + return 0; + } + return 0; + case 3: + sub_8022BEC(r4->unkF, 1, NULL); + r4->unkC = 0; + return 0; + default: + ++r4->unkC; + return 0; + } +} + +u32 sub_8022D14(struct BerryCrushGame *r7, u8 *r5) +{ + u16 r4 = r5[3]; + + r4 <<= 8; + r4 |= r5[2]; + switch (r7->unkC) + { + case 0: + DrawDialogueFrame(0, 0); + if (r5[1] & 2) + { + StringExpandPlaceholders(gStringVar4, gUnknown_082F32A4[r5[0]]); + AddTextPrinterParameterized2(0, 1, gStringVar4, r7->unkB, 0, 2, 1, 3); + } + else + { + AddTextPrinterParameterized2(0, 1, gUnknown_082F32A4[r5[0]], r7->unkB, 0, 2, 1, 3); + } + CopyWindowToVram(0, 3); + break; + case 1: + if (!IsTextPrinterActive(0)) + { + if (r4 == 0) + ++r7->unkC; + break; + } + return 0; + case 2: + if (!(r4 & gMain.newKeys)) + return 0; + break; + case 3: + if (r5[1] & 1) + ClearDialogWindowAndFrame(0, 1); + sub_8022BEC(r7->unkE, 1, NULL); + r7->unkC = r5[4]; + return 0; + } + ++r7->unkC; + return 0; +} + +u32 sub_8022E1C(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + if (sub_802104C() != 0) + sub_8022BEC(r4->unkE, 0, r4->unk36); + return 0; +} + +u32 sub_8022E3C(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + if (sub_802130C() != 0) + sub_8022BEC(r4->unkE, 0, r4->unk36); + return 0; +} + +u32 sub_8022E5C(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + switch (r4->unkC) + { + case 0: + sub_8010434(); + break; + case 1: + if (IsLinkTaskFinished()) + { + PlayNewMapMusic(MUS_RG_SLOT); + sub_8022BEC(7, 1, NULL); + r4->unk12 = 3; + r4->unkC = 0; + } + return 0; + } + ++r4->unkC; + return 0; +} + +u32 sub_8022EAC(struct BerryCrushGame *r4, u8 *r5) +{ + switch (r4->unkC) + { + default: + ++r4->unkC; + break; + case 0: + sub_8024578(r4); + sub_8024644(r5, 0, 1, 0, 1); + r4->unkE = 7; + sub_8022BEC(3, 1, NULL); + break; + case 1: + r4->unkE = 8; + sub_8022BEC(5, 1, NULL); + r4->unkC = 2; + break; + } + return 0; +} + +u32 sub_8022F04(struct BerryCrushGame *r0, __attribute__((unused)) u8 *r1) +{ + r0->unk4 = NULL; + SetMainCallback2(sub_8020E1C); + return 0; +} From efa1ee1822408638e536361a2f21c0e3c5a03381 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Sat, 14 Dec 2019 13:30:47 +0800 Subject: [PATCH 22/35] sub_8022250 --- src/berry_crush.c | 308 +++------------------------------------------- 1 file changed, 14 insertions(+), 294 deletions(-) diff --git a/src/berry_crush.c b/src/berry_crush.c index 11028b0af..8a88a2a92 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1415,13 +1415,13 @@ void sub_802222C(struct BerryCrushGame *r4) sub_8022600(r4); } -#ifdef NONMATCHING void sub_8022250(u8 r4) { u8 r9 = 0, r2, r7, r10; u32 sp0C = 0; s16 *r6 = gTasks[r4].data; - + const u8 *r10_; // r5/sl register swap + switch (r6[0]) { case 0: @@ -1432,8 +1432,12 @@ void sub_8022250(u8 r4) DrawStdFrameWithCustomTileAndPalette((u8)r6[1], 0, 541, 13); break; case 1: - // r5/r10 register swap - r7 = 96 - GetStringWidth(1, gText_BerryCrush2, -1) / 2u; + r10_ = gText_BerryCrush2; + ++r10_; --r10_; + #ifndef NONMATCHING + asm("":::"r8"); + #endif + r7 = 96 - GetStringWidth(1, r10_, -1) / 2u; AddTextPrinterParameterized3( (u8)r6[1], 1, @@ -1441,9 +1445,10 @@ void sub_8022250(u8 r4) 1, sBerryCrushTextColorTable[0], 0, - gText_BerryCrush2 + r10_ ); - r7 = 96 - GetStringWidth(1, gText_PressingSpeedRankings, -1) / 2u; + r10_ = gText_PressingSpeedRankings; + r7 = 96 - GetStringWidth(1, r10_, -1) / 2u; AddTextPrinterParameterized3( (u8)r6[1], 1, @@ -1451,10 +1456,10 @@ void sub_8022250(u8 r4) 17, sBerryCrushTextColorTable[0], 0, - gText_PressingSpeedRankings + r10_ ); - - for (r10 = 41; r9 < 4; ++r9) + r10 = 41; + for (; r9 < 4; ++r9) { ConvertIntToDecimalStringN(gStringVar1, r9 + 2, 0, 1); StringExpandPlaceholders(gStringVar4, gText_Var1Players); @@ -1515,290 +1520,6 @@ void sub_8022250(u8 r4) } ++r6[0]; } -#else -NAKED -void sub_8022250(u8 r4) -{ - asm_unified("\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x14\n\ - lsls r0, 24\n\ - lsrs r4, r0, 24\n\ - movs r0, 0\n\ - mov r9, r0\n\ - movs r1, 0\n\ - str r1, [sp, 0xC]\n\ - lsls r0, r4, 2\n\ - adds r0, r4\n\ - lsls r0, 3\n\ - ldr r1, =gTasks + 0x8\n\ - adds r6, r0, r1\n\ - movs r1, 0\n\ - ldrsh r0, [r6, r1]\n\ - cmp r0, 0x1\n\ - beq _080222D0_case_1\n\ - cmp r0, 0x1\n\ - bgt _08022288\n\ - cmp r0, 0\n\ - beq _08022296_case_0\n\ - b _080224BA_case_def\n\ - .pool\n\ - _08022288:\n\ - cmp r0, 0x2\n\ - bne _0802228E\n\ - b _08022480_case_2\n\ - _0802228E:\n\ - cmp r0, 0x3\n\ - bne _08022294\n\ - b _08022494_case_3\n\ - _08022294:\n\ - b _080224BA_case_def\n\ - _08022296_case_0:\n\ - ldr r0, =gUnknown_082F32EC\n\ - bl AddWindow\n\ - strh r0, [r6, 0x2]\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - bl PutWindowTilemap\n\ - ldrb r0, [r6, 0x2]\n\ - movs r1, 0\n\ - bl FillWindowPixelBuffer\n\ - ldrb r0, [r6, 0x2]\n\ - ldr r4, =0x0000021d\n\ - adds r1, r4, 0\n\ - movs r2, 0xD0\n\ - bl LoadUserWindowBorderGfx_\n\ - ldrb r0, [r6, 0x2]\n\ - movs r1, 0\n\ - adds r2, r4, 0\n\ - movs r3, 0xD\n\ - bl DrawStdFrameWithCustomTileAndPalette\n\ - b _080224BA_case_def\n\ - .pool\n\ - _080222D0_case_1:\n\ - ldr r0, =gText_BerryCrush2\n\ - mov r10, r0\n\ - movs r1, 0x1\n\ - negs r1, r1\n\ - mov r8, r1\n\ - movs r0, 0x1\n\ - mov r1, r10\n\ - mov r2, r8\n\ - bl GetStringWidth\n\ - lsrs r0, 1\n\ - movs r4, 0x60\n\ - subs r0, r4, r0\n\ - lsls r0, 24\n\ - lsrs r7, r0, 24\n\ - ldrb r0, [r6, 0x2]\n\ - ldr r5, =sBerryCrushTextColorTable\n\ - str r5, [sp]\n\ - mov r1, r9\n\ - str r1, [sp, 0x4]\n\ - mov r1, r10\n\ - str r1, [sp, 0x8]\n\ - movs r1, 0x1\n\ - adds r2, r7, 0\n\ - movs r3, 0x1\n\ - bl AddTextPrinterParameterized3\n\ - ldr r0, =gText_PressingSpeedRankings\n\ - mov r10, r0\n\ - movs r0, 0x1\n\ - mov r1, r10\n\ - mov r2, r8\n\ - bl GetStringWidth\n\ - lsrs r0, 1\n\ - subs r4, r0\n\ - lsls r4, 24\n\ - lsrs r7, r4, 24\n\ - ldrb r0, [r6, 0x2]\n\ - str r5, [sp]\n\ - mov r1, r9\n\ - str r1, [sp, 0x4]\n\ - mov r1, r10\n\ - str r1, [sp, 0x8]\n\ - movs r1, 0x1\n\ - adds r2, r7, 0\n\ - movs r3, 0x11\n\ - bl AddTextPrinterParameterized3\n\ - movs r0, 0x29\n\ - mov r10, r0\n\ - _08022336:\n\ - mov r1, r9\n\ - adds r1, 0x2\n\ - ldr r0, =gStringVar1\n\ - movs r2, 0\n\ - movs r3, 0x1\n\ - bl ConvertIntToDecimalStringN\n\ - ldr r0, =gStringVar4\n\ - ldr r1, =gText_Var1Players\n\ - bl StringExpandPlaceholders\n\ - ldrb r0, [r6, 0x2]\n\ - ldr r1, =sBerryCrushTextColors1\n\ - str r1, [sp]\n\ - movs r1, 0\n\ - str r1, [sp, 0x4]\n\ - ldr r1, =gStringVar4\n\ - str r1, [sp, 0x8]\n\ - movs r1, 0x1\n\ - movs r2, 0\n\ - mov r3, r10\n\ - bl AddTextPrinterParameterized3\n\ - movs r0, 0x1\n\ - ldr r1, =gText_TimesPerSec\n\ - movs r2, 0x1\n\ - negs r2, r2\n\ - bl GetStringWidth\n\ - movs r1, 0xC0\n\ - subs r1, r0\n\ - lsls r1, 24\n\ - lsrs r7, r1, 24\n\ - ldrb r0, [r6, 0x2]\n\ - ldr r1, =sBerryCrushTextColors1\n\ - str r1, [sp]\n\ - movs r1, 0\n\ - str r1, [sp, 0x4]\n\ - ldr r1, =gText_TimesPerSec\n\ - str r1, [sp, 0x8]\n\ - movs r1, 0x1\n\ - adds r2, r7, 0\n\ - mov r3, r10\n\ - bl AddTextPrinterParameterized3\n\ - movs r2, 0\n\ - mov r0, r9\n\ - lsls r4, r0, 1\n\ - mov r1, r10\n\ - adds r1, 0x10\n\ - str r1, [sp, 0x10]\n\ - movs r0, 0x1\n\ - add r9, r0\n\ - adds r0, r4, r6\n\ - ldrb r3, [r0, 0x4]\n\ - movs r1, 0x7\n\ - mov r12, r1\n\ - movs r0, 0x1\n\ - mov r8, r0\n\ - ldr r5, =gUnknown_082F334C\n\ - _080223AE:\n\ - mov r0, r12\n\ - subs r1, r0, r2\n\ - adds r0, r3, 0\n\ - asrs r0, r1\n\ - mov r1, r8\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _080223CA\n\ - lsls r0, r2, 2\n\ - adds r0, r5\n\ - ldr r0, [r0]\n\ - ldr r1, [sp, 0xC]\n\ - adds r1, r0\n\ - str r1, [sp, 0xC]\n\ - _080223CA:\n\ - adds r0, r2, 0x1\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r2, 0x7\n\ - bls _080223AE\n\ - adds r0, r4, r6\n\ - ldrh r1, [r0, 0x4]\n\ - lsrs r1, 8\n\ - ldr r0, =gStringVar1\n\ - movs r2, 0x1\n\ - movs r3, 0x3\n\ - bl ConvertIntToDecimalStringN\n\ - ldr r0, [sp, 0xC]\n\ - ldr r1, =0x000f4240\n\ - bl __udivsi3\n\ - adds r1, r0, 0\n\ - ldr r0, =gStringVar2\n\ - movs r2, 0x2\n\ - movs r3, 0x2\n\ - bl ConvertIntToDecimalStringN\n\ - ldr r0, =gStringVar4\n\ - ldr r1, =gText_XDotY3\n\ - bl StringExpandPlaceholders\n\ - movs r0, 0x1\n\ - ldr r1, =gStringVar4\n\ - movs r2, 0x1\n\ - negs r2, r2\n\ - bl GetStringWidth\n\ - subs r0, r7, r0\n\ - lsls r0, 24\n\ - lsrs r7, r0, 24\n\ - ldrb r0, [r6, 0x2]\n\ - ldr r1, =sBerryCrushTextColors1\n\ - str r1, [sp]\n\ - movs r1, 0\n\ - str r1, [sp, 0x4]\n\ - ldr r1, =gStringVar4\n\ - str r1, [sp, 0x8]\n\ - movs r1, 0x1\n\ - adds r2, r7, 0\n\ - mov r3, r10\n\ - bl AddTextPrinterParameterized3\n\ - ldr r1, [sp, 0x10]\n\ - lsls r0, r1, 24\n\ - lsrs r0, 24\n\ - mov r10, r0\n\ - movs r0, 0\n\ - str r0, [sp, 0xC]\n\ - mov r1, r9\n\ - lsls r0, r1, 24\n\ - lsrs r0, 24\n\ - mov r9, r0\n\ - cmp r0, 0x3\n\ - bhi _08022444\n\ - b _08022336\n\ - _08022444:\n\ - ldrb r0, [r6, 0x2]\n\ - movs r1, 0x3\n\ - bl CopyWindowToVram\n\ - b _080224BA_case_def\n\ - .pool\n\ - _08022480_case_2:\n\ - ldr r0, =gMain\n\ - ldrh r1, [r0, 0x2E]\n\ - movs r0, 0x3\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - bne _080224BA_case_def\n\ - b _080224C0\n\ - .pool\n\ - _08022494_case_3:\n\ - ldrb r0, [r6, 0x2]\n\ - movs r1, 0x1\n\ - bl ClearStdWindowAndFrameToTransparent\n\ - ldrb r0, [r6, 0x2]\n\ - bl ClearWindowTilemap\n\ - ldrb r0, [r6, 0x2]\n\ - bl RemoveWindow\n\ - adds r0, r4, 0\n\ - bl DestroyTask\n\ - bl EnableBothScriptContexts\n\ - bl ScriptContext2_Disable\n\ - mov r0, r9\n\ - b _080224BE\n\ - _080224BA_case_def:\n\ - ldrh r0, [r6]\n\ - adds r0, 0x1\n\ - _080224BE:\n\ - strh r0, [r6]\n\ - _080224C0:\n\ - add sp, 0x14\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0"); -} -#endif void ShowBerryCrushRankings(void) { @@ -2052,7 +1773,6 @@ void sub_8022B28(struct Sprite *sprite) s32 r2; u32 r8 = 0; - r7 = sprite->data; r2 = 640; r7[1] = r2; r7[2] = 32; From 50c48d7ef63ffdb40e3019d25396baedef98a9dc Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Sun, 15 Dec 2019 14:04:15 +0800 Subject: [PATCH 23/35] sub_8023BC0 --- asm/berry_crush.s | 1604 --------------------------------------------- src/berry_crush.c | 694 ++++++++++++++++++-- 2 files changed, 649 insertions(+), 1649 deletions(-) diff --git a/asm/berry_crush.s b/asm/berry_crush.s index ebf819188..247341448 100755 --- a/asm/berry_crush.s +++ b/asm/berry_crush.s @@ -5,1610 +5,6 @@ .text - thumb_func_start sub_8022F1C -sub_8022F1C: @ 8022F1C - push {r4-r7,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r2, r1, 0 - ldrb r0, [r5, 0xC] - cmp r0, 0x5 - bls _08022F2C - b _08023060 -_08022F2C: - lsls r0, 2 - ldr r1, =_08022F3C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08022F3C: - .4byte _08022F54 - .4byte _08022F74 - .4byte _08022F7A - .4byte _08022FAA - .4byte _08022FBA - .4byte _08023044 -_08022F54: - movs r0, 0x1 - str r0, [sp] - adds r0, r2, 0 - movs r1, 0x1 - movs r2, 0 - movs r3, 0 - bl sub_8024644 - movs r0, 0x9 - strb r0, [r5, 0xE] - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - b _08023066 -_08022F74: - bl sub_8010434 - b _08023060 -_08022F7A: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08023066 - adds r4, r5, 0 - adds r4, 0x42 - adds r0, r4, 0 - movs r1, 0 - movs r2, 0xC - bl memset - ldrb r0, [r5, 0x8] - lsls r0, 5 - adds r0, r5, r0 - adds r0, 0xA4 - ldrh r0, [r0] - strh r0, [r4] - movs r0, 0 - adds r1, r4, 0 - movs r2, 0x2 - bl SendBlock - b _08023060 -_08022FAA: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08023066 - movs r0, 0 - strh r0, [r5, 0x10] - b _08023060 -_08022FBA: - bl GetBlockReceivedStatus - ldr r2, =gUnknown_082F4448 - ldrb r4, [r5, 0x9] - subs r1, r4, 0x2 - adds r1, r2 - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bne _08023066 - movs r3, 0 - cmp r3, r4 - bcs _0802301E - ldr r7, =gBlockRecvBuffer - movs r6, 0 - ldr r4, =gUnknown_0858AB24 -_08022FDC: - lsls r0, r3, 5 - adds r0, r5, r0 - lsls r1, r3, 8 - adds r1, r7 - ldrh r1, [r1] - adds r2, r0, 0 - adds r2, 0xA4 - strh r1, [r2] - lsls r1, 16 - lsrs r1, 16 - cmp r1, 0xB0 - bls _08022FF6 - strh r6, [r2] -_08022FF6: - ldrh r1, [r2] - lsls r1, 2 - adds r1, r4 - ldrh r0, [r5, 0x18] - ldrb r1, [r1] - adds r0, r1 - strh r0, [r5, 0x18] - ldrh r0, [r2] - lsls r0, 2 - adds r0, r4 - ldrh r1, [r0, 0x2] - ldr r0, [r5, 0x1C] - adds r0, r1 - str r0, [r5, 0x1C] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - ldrb r0, [r5, 0x9] - cmp r3, r0 - bcc _08022FDC -_0802301E: - movs r0, 0 - strh r0, [r5, 0x10] - bl ResetBlockReceivedFlags - movs r1, 0x18 - ldrsh r0, [r5, r1] - lsls r0, 8 - movs r1, 0x80 - lsls r1, 6 - bl sub_81515FC - str r0, [r5, 0x20] - b _08023060 - .pool -_08023044: - movs r0, 0 - movs r1, 0x1 - bl ClearDialogWindowAndFrame - movs r0, 0xA - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r1, 0 - movs r0, 0x4 - strh r0, [r5, 0x12] - strb r1, [r5, 0xC] - b _08023066 -_08023060: - ldrb r0, [r5, 0xC] - adds r0, 0x1 - strb r0, [r5, 0xC] -_08023066: - movs r0, 0 - add sp, 0x4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8022F1C - - thumb_func_start sub_8023070 -sub_8023070: @ 8023070 - push {r4,lr} - adds r4, r0, 0 - ldrb r0, [r4, 0xC] - cmp r0, 0x6 - bls _0802307C - b _080231A8 -_0802307C: - lsls r0, 2 - ldr r1, =_0802308C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0802308C: - .4byte _080230A8 - .4byte _080230BA - .4byte _080230E8 - .4byte _08023120 - .4byte _08023150 - .4byte _08023172 - .4byte _08023184 -_080230A8: - movs r0, 0x9C - lsls r0, 1 - adds r1, r4, r0 - adds r0, r4, 0 - bl sub_80214A8 - bl sub_8010434 - b _080231A8 -_080230BA: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _080231AE - movs r2, 0x9C - lsls r2, 1 - adds r1, r4, r2 - movs r0, 0 - strb r0, [r1] - ldr r3, =0x00000139 - adds r1, r4, r3 - strb r0, [r1] - adds r2, 0x2 - adds r1, r4, r2 - strb r0, [r1] - adds r3, 0x2 - adds r1, r4, r3 - strb r0, [r1] - b _080231A8 - .pool -_080230E8: - movs r0, 0x9C - lsls r0, 1 - adds r3, r4, r0 - ldrb r0, [r3] - lsls r0, 2 - movs r2, 0xB8 - lsls r2, 1 - adds r1, r4, r2 - adds r0, r1, r0 - ldr r2, [r0] - ldr r0, =sub_8021608 - str r0, [r2, 0x1C] - ldrb r0, [r3] - lsls r0, 2 - adds r1, r0 - ldr r1, [r1] - adds r1, 0x2C - ldrb r2, [r1] - movs r0, 0x7F - ands r0, r2 - strb r0, [r1] - movs r0, 0x3D - bl PlaySE - b _080231A8 - .pool -_08023120: - movs r3, 0x9C - lsls r3, 1 - adds r2, r4, r3 - ldrb r0, [r2] - lsls r0, 2 - adds r3, 0x38 - adds r1, r4, r3 - adds r3, r1, r0 - ldr r0, [r3] - ldr r1, [r0, 0x1C] - ldr r0, =sub_8021608 - cmp r1, r0 - beq _080231AE - movs r0, 0 - str r0, [r3] - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - bl sub_8010434 - b _080231A8 - .pool -_08023150: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _080231AE - movs r0, 0x9C - lsls r0, 1 - adds r1, r4, r0 - ldrb r0, [r1] - ldrb r2, [r4, 0x9] - cmp r0, r2 - bcs _0802316C - movs r0, 0x2 - b _080231AC -_0802316C: - movs r0, 0 - strb r0, [r1] - b _080231A8 -_08023172: - movs r3, 0x9C - lsls r3, 1 - adds r1, r4, r3 - adds r0, r4, 0 - bl sub_80216A8 - bl sub_8010434 - b _080231A8 -_08023184: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _080231AE - movs r0, 0x2B - bl PlaySE - movs r0, 0xB - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r1, 0 - movs r0, 0x5 - strh r0, [r4, 0x12] - strb r1, [r4, 0xC] - b _080231AE -_080231A8: - ldrb r0, [r4, 0xC] - adds r0, 0x1 -_080231AC: - strb r0, [r4, 0xC] -_080231AE: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8023070 - - thumb_func_start sub_80231B8 -sub_80231B8: @ 80231B8 - push {r4-r7,lr} - adds r4, r0, 0 - ldrb r1, [r4, 0xC] - cmp r1, 0x1 - beq _0802321C - cmp r1, 0x1 - bgt _080231CC - cmp r1, 0 - beq _080231D6 - b _080232DC -_080231CC: - cmp r1, 0x2 - beq _0802329C - cmp r1, 0x3 - beq _080232BE - b _080232DC -_080231D6: - ldrh r0, [r4, 0x2A] - adds r0, 0x4 - strh r0, [r4, 0x2A] - lsls r0, 16 - cmp r0, 0 - bge _080231E4 - b _080232E2 -_080231E4: - strh r1, [r4, 0x2A] - ldr r0, =0x00000139 - adds r3, r4, r0 - movs r0, 0x4 - strb r0, [r3] - movs r2, 0x9C - lsls r2, 1 - adds r1, r4, r2 - movs r0, 0 - strb r0, [r1] - ldr r2, =gUnknown_082F326C - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - adds r0, r2 - ldrb r0, [r0] - movs r2, 0x9D - lsls r2, 1 - adds r1, r4, r2 - strb r0, [r1] - movs r0, 0xD6 - bl PlaySE - b _080232DC - .pool -_0802321C: - ldr r7, =gUnknown_082F326C - movs r0, 0x9C - lsls r0, 1 - adds r6, r4, r0 - ldr r1, =0x00000139 - adds r5, r4, r1 - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - ldrb r2, [r6] - adds r0, r2 - adds r0, r7 - movs r1, 0 - ldrsb r1, [r0, r1] - strh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x12 - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1A - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1E - bl SetGpuReg - ldrb r0, [r6] - adds r0, 0x1 - strb r0, [r6] - movs r1, 0x9D - lsls r1, 1 - adds r2, r4, r1 - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r2] - cmp r0, r1 - bcc _080232E2 - ldrb r0, [r5] - cmp r0, 0 - beq _080232DC - subs r0, 0x1 - strb r0, [r5] - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - adds r0, r7 - ldrb r0, [r0] - strb r0, [r2] - movs r0, 0 - strb r0, [r6] - b _080232E2 - .pool -_0802329C: - movs r0, 0 - strh r0, [r4, 0x2C] - movs r0, 0x12 - movs r1, 0 - bl SetGpuReg - movs r0, 0x1A - movs r1, 0 - bl SetGpuReg - movs r0, 0x1E - movs r1, 0 - bl SetGpuReg - bl sub_8010434 - b _080232DC -_080232BE: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _080232E2 - movs r0, 0xC - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r1, 0 - movs r0, 0x6 - strh r0, [r4, 0x12] - strb r1, [r4, 0xC] - b _080232E2 -_080232DC: - ldrb r0, [r4, 0xC] - adds r0, 0x1 - strb r0, [r4, 0xC] -_080232E2: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_80231B8 - - thumb_func_start sub_80232EC -sub_80232EC: @ 80232EC - push {r4,lr} - sub sp, 0x4 - adds r4, r0, 0 - ldrb r0, [r4, 0xC] - cmp r0, 0x1 - beq _0802330C - cmp r0, 0x1 - bgt _08023302 - cmp r0, 0 - beq _08023332 - b _0802338C -_08023302: - cmp r0, 0x2 - beq _0802332A - cmp r0, 0x3 - beq _08023338 - b _0802338C -_0802330C: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08023392 - movs r1, 0x80 - lsls r1, 5 - movs r0, 0 - str r0, [sp] - adds r0, r1, 0 - movs r2, 0x78 - movs r3, 0x50 - bl sub_802EB24 - b _0802338C -_0802332A: - bl sub_802EB84 - cmp r0, 0 - bne _08023392 -_08023332: - bl sub_8010434 - b _0802338C -_08023338: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08023392 - movs r0, 0x9C - lsls r0, 1 - adds r1, r4, r0 - movs r0, 0 - strb r0, [r1] - ldr r2, =0x00000139 - adds r1, r4, r2 - strb r0, [r1] - adds r2, 0x1 - adds r1, r4, r2 - strb r0, [r1] - adds r2, 0x1 - adds r1, r4, r2 - strb r0, [r1] - strh r0, [r4, 0x10] - ldrb r0, [r4, 0x8] - cmp r0, 0 - bne _08023378 - movs r0, 0xD - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - b _08023382 - .pool -_08023378: - movs r0, 0xE - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC -_08023382: - movs r1, 0 - movs r0, 0x7 - strh r0, [r4, 0x12] - strb r1, [r4, 0xC] - b _08023392 -_0802338C: - ldrb r0, [r4, 0xC] - adds r0, 0x1 - strb r0, [r4, 0xC] -_08023392: - movs r0, 0 - add sp, 0x4 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80232EC - - thumb_func_start sub_802339C -sub_802339C: @ 802339C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - adds r4, r0, 0 - movs r0, 0 - mov r8, r0 - movs r2, 0 - adds r7, r2, 0 - ldrb r1, [r4, 0x9] - cmp r7, r1 - bcs _080234AA - movs r2, 0x5E - adds r2, r4 - mov r9, r2 - ldr r3, =gUnknown_082F325C - mov r10, r3 -_080233C0: - lsls r0, r7, 4 - ldr r1, =gRecvCmds - adds r2, r0, r1 - ldrh r1, [r2] - movs r0, 0xFF - lsls r0, 8 - ands r0, r1 - movs r3, 0xBC - lsls r3, 6 - cmp r0, r3 - bne _0802349E - ldrh r0, [r2, 0x2] - cmp r0, 0x2 - bne _0802349E - ldrb r1, [r2, 0x4] - movs r0, 0x4 - ands r0, r1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - beq _08023496 - mov r0, r9 - ldrb r2, [r0] - lsrs r1, r2, 3 - mov r3, r10 - adds r0, r7, r3 - ldrb r0, [r0] - orrs r1, r0 - lsls r1, 3 - movs r0, 0x7 - ands r0, r2 - orrs r0, r1 - mov r1, r9 - strb r0, [r1] - lsls r2, r7, 5 - adds r3, r4, r2 - mov r12, r3 - mov r1, r12 - adds r1, 0xB5 - movs r0, 0x1 - strb r0, [r1] - subs r1, 0x7 - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] - mov r0, r8 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - subs r1, 0x8 - ldrh r0, [r4, 0x28] - ldrh r1, [r1] - subs r0, r1 - lsls r0, 16 - lsrs r3, r0, 16 - mov r5, r12 - adds r5, 0xAA - ldrh r1, [r5] - subs r0, r1, 0x1 - adds r6, r2, 0 - cmp r3, r0 - blt _08023468 - adds r0, r1, 0x1 - cmp r3, r0 - bgt _08023468 - mov r1, r12 - adds r1, 0xA8 - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] - strh r3, [r5] - mov r0, r12 - adds r0, 0xAC - ldrh r1, [r1] - ldrh r2, [r0] - cmp r1, r2 - bls _08023476 - strh r1, [r0] - b _08023476 - .pool -_08023468: - adds r0, r4, r6 - adds r2, r0, 0 - adds r2, 0xA8 - movs r1, 0 - strh r1, [r2] - adds r0, 0xAA - strh r3, [r0] -_08023476: - adds r1, r4, r6 - ldrh r0, [r4, 0x28] - adds r3, r1, 0 - adds r3, 0xA6 - movs r2, 0 - strh r0, [r3] - adds r1, 0xB4 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bls _0802349E - strb r2, [r1] - b _0802349E -_08023496: - lsls r0, r7, 5 - adds r0, r4, r0 - adds r0, 0xB5 - strb r1, [r0] -_0802349E: - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - ldrb r3, [r4, 0x9] - cmp r7, r3 - bcc _080233C0 -_080234AA: - mov r0, r8 - cmp r0, 0x1 - bls _080234E0 - movs r7, 0 - ldrb r1, [r4, 0x9] - cmp r7, r1 - bcs _080234E0 - movs r3, 0x2 -_080234BA: - lsls r0, r7, 5 - adds r1, r4, r0 - adds r2, r1, 0 - adds r2, 0xB5 - ldrb r0, [r2] - cmp r0, 0 - beq _080234D4 - orrs r0, r3 - strb r0, [r2] - adds r1, 0xB0 - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] -_080234D4: - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - ldrb r2, [r4, 0x9] - cmp r7, r2 - bcc _080234BA -_080234E0: - mov r3, r8 - cmp r3, 0 - beq _08023548 - ldrh r0, [r4, 0x2E] - add r0, r8 - strh r0, [r4, 0x2E] - ldr r1, =gUnknown_082F3264 - mov r0, r8 - subs r0, 0x1 - adds r0, r1 - ldrb r0, [r0] - add r0, r8 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldrh r0, [r4, 0x34] - add r0, r8 - strh r0, [r4, 0x34] - ldrh r0, [r4, 0x1A] - add r0, r8 - strh r0, [r4, 0x1A] - movs r1, 0x18 - ldrsh r0, [r4, r1] - movs r3, 0x1A - ldrsh r2, [r4, r3] - subs r0, r2 - cmp r0, 0 - ble _08023534 - lsls r2, 8 - ldr r1, [r4, 0x20] - adds r0, r2, 0 - bl sub_81515FC - adds r2, r0, 0 - asrs r2, 8 - adds r0, r4, 0 - adds r0, 0x24 - strb r2, [r0] - b _08023548 - .pool -_08023534: - adds r1, r4, 0 - adds r1, 0x24 - movs r0, 0x20 - strb r0, [r1] - adds r2, r4, 0 - adds r2, 0x5E - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] -_08023548: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_802339C - - thumb_func_start sub_8023558 -sub_8023558: @ 8023558 - push {r4-r6,lr} - adds r3, r0, 0 - movs r6, 0 - movs r1, 0 - adds r4, r1, 0 - ldrb r0, [r3, 0x9] - cmp r4, r0 - bcs _080235B0 - adds r5, r3, 0 - adds r5, 0x64 -_0802356C: - lsls r0, r4, 5 - adds r1, r3, r0 - adds r0, r1, 0 - adds r0, 0xB5 - ldrb r2, [r0] - cmp r2, 0 - beq _080235A4 - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - adds r0, r1, 0 - adds r0, 0xB4 - ldrb r0, [r0] - adds r1, r0, 0x1 - movs r0, 0x2 - ands r0, r2 - cmp r0, 0 - beq _08023594 - movs r0, 0x4 - orrs r1, r0 -_08023594: - lsls r0, r4, 1 - adds r0, r4 - lsls r1, r0 - lsls r0, r1, 16 - lsrs r1, r0, 16 - ldrh r0, [r5] - orrs r1, r0 - strh r1, [r5] -_080235A4: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r1, [r3, 0x9] - cmp r4, r1 - bcc _0802356C -_080235B0: - adds r0, r3, 0 - adds r0, 0x24 - ldrb r1, [r0] - adds r0, 0x3C - strh r1, [r0] - cmp r6, 0 - bne _080235D4 - ldr r2, =0x0000013b - adds r0, r3, r2 - ldrb r0, [r0] - cmp r0, 0 - beq _080236A0 - movs r4, 0x9C - lsls r4, 1 - adds r1, r3, r4 - b _08023612 - .pool -_080235D4: - ldr r5, =0x0000013b - adds r2, r3, r5 - ldrb r0, [r2] - cmp r0, 0 - beq _0802361A - ldr r0, =0x00000139 - adds r1, r3, r0 - ldrb r2, [r1] - cmp r6, r2 - beq _0802360C - subs r0, r6, 0x1 - strb r0, [r1] - ldr r1, =gUnknown_082F3290 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0] - movs r4, 0x9D - lsls r4, 1 - adds r1, r3, r4 - strb r0, [r1] - b _08023640 - .pool -_0802360C: - movs r5, 0x9C - lsls r5, 1 - adds r1, r3, r5 -_08023612: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08023640 -_0802361A: - movs r0, 0x9C - lsls r0, 1 - adds r1, r3, r0 - movs r0, 0 - strb r0, [r1] - subs r0, r6, 0x1 - ldr r4, =0x00000139 - adds r1, r3, r4 - strb r0, [r1] - ldr r1, =gUnknown_082F3290 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0] - movs r5, 0x9D - lsls r5, 1 - adds r1, r3, r5 - strb r0, [r1] - movs r0, 0x1 - strb r0, [r2] -_08023640: - ldr r0, =0x0000013b - adds r4, r3, r0 - ldrb r0, [r4] - cmp r0, 0 - beq _080236A0 - movs r2, 0x9C - lsls r2, 1 - adds r1, r3, r2 - movs r5, 0x9D - lsls r5, 1 - adds r2, r3, r5 - ldrb r0, [r1] - ldrb r5, [r2] - cmp r0, r5 - bcc _0802367C - movs r0, 0 - strb r0, [r1] - ldr r5, =0x00000139 - adds r1, r3, r5 - strb r0, [r1] - strb r0, [r2] - strb r0, [r4] - movs r1, 0 - b _08023690 - .pool -_0802367C: - ldr r2, =gUnknown_082F3290 - ldrb r1, [r1] - ldr r4, =0x00000139 - adds r0, r3, r4 - ldrb r0, [r0] - lsls r0, 2 - adds r0, 0x1 - adds r1, r0 - adds r1, r2 - ldrb r1, [r1] -_08023690: - adds r0, r3, 0 - adds r0, 0x5F - strb r1, [r0] - b _080236A8 - .pool -_080236A0: - adds r1, r3, 0 - adds r1, 0x5F - movs r0, 0 - strb r0, [r1] -_080236A8: - ldrh r1, [r3, 0x26] - adds r0, r3, 0 - adds r0, 0x62 - strh r1, [r0] - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8023558 - - thumb_func_start sub_80236B8 -sub_80236B8: @ 80236B8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r5, r0, 0 - ldr r3, =gMain - ldrh r1, [r3, 0x2E] - movs r4, 0x1 - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - beq _080236DA - adds r2, r5, 0 - adds r2, 0x5E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] -_080236DA: - ldrh r1, [r3, 0x2C] - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - beq _080236FA - ldrb r0, [r5, 0x8] - lsls r0, 5 - adds r0, r5, r0 - adds r1, r0, 0 - adds r1, 0xB2 - ldrh r0, [r1] - ldrh r2, [r5, 0x28] - cmp r0, r2 - bcs _080236FA - adds r0, 0x1 - strh r0, [r1] -_080236FA: - ldrb r0, [r5, 0x8] - adds r7, r5, 0 - adds r7, 0x5E - cmp r0, 0 - beq _08023710 - ldrb r1, [r7] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - bne _08023710 - b _0802384C -_08023710: - adds r4, r5, 0 - adds r4, 0x5C - movs r0, 0x2 - strh r0, [r4] - ldrh r0, [r5, 0x28] - movs r1, 0x1E - bl __umodsi3 - lsls r0, 16 - mov r8, r4 - adds r6, r5, 0 - adds r6, 0x25 - cmp r0, 0 - bne _08023768 - movs r0, 0x2E - ldrsh r2, [r5, r0] - ldr r1, =gUnknown_082F4444 - ldrb r0, [r5, 0x9] - subs r0, 0x2 - adds r0, r1 - ldrb r0, [r0] - cmp r2, r0 - ble _08023754 - ldrh r0, [r5, 0x30] - adds r0, 0x1 - strh r0, [r5, 0x30] - ldrb r0, [r6] - movs r1, 0x10 - orrs r0, r1 - b _0802375C - .pool -_08023754: - ldrb r1, [r6] - movs r0, 0x11 - negs r0, r0 - ands r0, r1 -_0802375C: - strb r0, [r6] - movs r0, 0 - strh r0, [r5, 0x2E] - ldrh r0, [r5, 0x32] - adds r0, 0x1 - strh r0, [r5, 0x32] -_08023768: - ldrh r0, [r5, 0x28] - movs r1, 0xF - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - bne _080237DE - movs r0, 0x34 - ldrsh r2, [r5, r0] - ldr r3, =gUnknown_082F4434 - ldrb r0, [r5, 0x9] - subs r0, 0x2 - lsls r1, r0, 2 - adds r0, r1, r3 - ldrb r0, [r0] - cmp r2, r0 - bge _08023798 - ldrb r1, [r6] - movs r0, 0x1F - ands r0, r1 - strb r0, [r6] - b _080237D8 - .pool -_08023798: - adds r0, r3, 0x1 - adds r0, r1, r0 - ldrb r0, [r0] - cmp r2, r0 - bge _080237AC - ldrb r0, [r6] - movs r1, 0x1F - ands r1, r0 - movs r0, 0x20 - b _080237D4 -_080237AC: - adds r0, r3, 0x2 - adds r0, r1, r0 - ldrb r0, [r0] - cmp r2, r0 - bge _080237BC - movs r0, 0x2 - strh r0, [r5, 0x34] - b _080237D8 -_080237BC: - adds r0, r3, 0x3 - adds r0, r1, r0 - ldrb r0, [r0] - cmp r2, r0 - bge _080237CC - movs r0, 0x3 - strh r0, [r5, 0x34] - b _080237D8 -_080237CC: - ldrb r0, [r6] - movs r1, 0x1F - ands r1, r0 - movs r0, 0x80 -_080237D4: - orrs r1, r0 - strb r1, [r6] -_080237D8: - movs r0, 0 - strh r0, [r5, 0x34] - b _0802380A -_080237DE: - ldrh r0, [r5, 0x10] - adds r0, 0x1 - strh r0, [r5, 0x10] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x3C - bls _0802380A - cmp r0, 0x46 - bls _080237FA - bl sub_8011AC8 - movs r0, 0 - strh r0, [r5, 0x10] - b _0802380A -_080237FA: - ldrb r0, [r7] - movs r4, 0xF8 - ands r4, r0 - cmp r4, 0 - bne _0802380A - bl sub_8011AC8 - strh r4, [r5, 0x10] -_0802380A: - ldrh r1, [r5, 0x28] - ldr r0, =0x00008c9f - cmp r1, r0 - bls _0802381A - ldrb r0, [r7] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r7] -_0802381A: - ldrb r1, [r6] - lsls r1, 27 - lsrs r1, 31 - lsls r1, 1 - ldrb r2, [r7] - movs r0, 0x3 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r7] - ldrb r0, [r6] - lsrs r0, 5 - adds r2, r5, 0 - adds r2, 0x66 - strh r0, [r2] - adds r4, r5, 0 - adds r4, 0x42 - adds r0, r4, 0 - mov r1, r8 - movs r2, 0xC - bl memcpy - adds r0, r4, 0 - bl sub_800FE50 -_0802384C: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80236B8 - - thumb_func_start sub_802385C -sub_802385C: @ 802385C - push {r4,r5,lr} - adds r5, r0, 0 - movs r4, 0 - ldr r3, =gRecvCmds - ldrb r0, [r5, 0x9] - cmp r4, r0 - bcs _08023880 - movs r1, 0 -_0802386C: - lsls r0, r4, 5 - adds r0, r5, r0 - adds r0, 0xB5 - strb r1, [r0] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r0, [r5, 0x9] - cmp r4, r0 - bcc _0802386C -_08023880: - adds r2, r3, 0 - ldrh r0, [r2] - movs r1, 0xFF - lsls r1, 8 - ands r1, r0 - movs r0, 0xBC - lsls r0, 6 - cmp r1, r0 - bne _08023898 - ldrh r0, [r2, 0x2] - cmp r0, 0x2 - beq _080238AC -_08023898: - adds r2, r5, 0 - adds r2, 0x25 - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - b _080238EA - .pool -_080238AC: - adds r4, r5, 0 - adds r4, 0x4E - adds r0, r4, 0 - adds r1, r3, 0 - movs r2, 0xE - bl memcpy - ldrh r0, [r4, 0x6] - strh r0, [r5, 0x2A] - movs r0, 0x5 - ldrsb r0, [r4, r0] - strh r0, [r5, 0x2C] - ldrh r0, [r4, 0x8] - strh r0, [r5, 0x28] - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - adds r0, r5, 0 - bl sub_80216E0 - ldrb r1, [r4, 0x4] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080238EA - adds r0, r5, 0 - adds r0, 0x25 - ldrb r1, [r0] - movs r2, 0x8 - orrs r1, r2 - strb r1, [r0] -_080238EA: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_802385C - - thumb_func_start sub_80238F0 -sub_80238F0: @ 80238F0 - push {r4,lr} - adds r4, r0, 0 - adds r0, 0x5C - movs r1, 0 - movs r2, 0xC - bl memset - adds r0, r4, 0 - adds r0, 0x4E - movs r1, 0 - movs r2, 0xE - bl memset - adds r0, r4, 0 - bl sub_802385C - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x12 - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1A - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1E - bl SetGpuReg - adds r0, r4, 0 - adds r0, 0x25 - ldrb r1, [r0] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _08023978 - ldrh r1, [r4, 0x28] - ldr r0, =0x00008c9f - cmp r1, r0 - bls _08023964 - adds r0, 0x1 - strh r0, [r4, 0x28] - movs r0, 0x10 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - b _0802396E - .pool -_08023964: - movs r0, 0xF - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC -_0802396E: - movs r1, 0 - movs r0, 0 - strh r0, [r4, 0x10] - strb r1, [r4, 0xC] - b _08023992 -_08023978: - ldrh r0, [r4, 0x26] - adds r0, 0x1 - strh r0, [r4, 0x26] - adds r0, r4, 0 - bl sub_802339C - adds r0, r4, 0 - bl sub_8023558 - adds r0, r4, 0 - bl sub_80236B8 - movs r0, 0 -_08023992: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80238F0 - - thumb_func_start sub_8023998 -sub_8023998: @ 8023998 - push {r4,lr} - adds r4, r0, 0 - adds r0, 0x5C - movs r1, 0 - movs r2, 0xC - bl memset - adds r0, r4, 0 - adds r0, 0x4E - movs r1, 0 - movs r2, 0xE - bl memset - adds r0, r4, 0 - bl sub_802385C - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x12 - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1A - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1E - bl SetGpuReg - adds r0, r4, 0 - adds r0, 0x25 - ldrb r1, [r0] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _08023A20 - ldrh r1, [r4, 0x28] - ldr r0, =0x00008c9f - cmp r1, r0 - bls _08023A0C - adds r0, 0x1 - strh r0, [r4, 0x28] - movs r0, 0x10 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - b _08023A16 - .pool -_08023A0C: - movs r0, 0xF - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC -_08023A16: - movs r1, 0 - movs r0, 0 - strh r0, [r4, 0x10] - strb r1, [r4, 0xC] - b _08023A28 -_08023A20: - adds r0, r4, 0 - bl sub_80236B8 - movs r0, 0 -_08023A28: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8023998 - - thumb_func_start sub_8023A30 -sub_8023A30: @ 8023A30 - push {r4-r7,lr} - adds r4, r0, 0 - ldrb r0, [r4, 0xC] - cmp r0, 0x5 - bls _08023A3C - b _08023BB2 -_08023A3C: - lsls r0, 2 - ldr r1, =_08023A4C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08023A4C: - .4byte _08023A64 - .4byte _08023A8C - .4byte _08023ADC - .4byte _08023B5C - .4byte _08023B7A - .4byte _08023B94 -_08023A64: - movs r0, 0x8 - strh r0, [r4, 0x12] - movs r0, 0xD6 - bl PlaySE - movs r0, 0x1 - negs r0, r0 - ldr r2, =0x000003ff - movs r1, 0x8 - bl BlendPalettes - movs r0, 0x9C - lsls r0, 1 - adds r1, r4, r0 - movs r0, 0x2 - strb r0, [r1] - b _08023BB2 - .pool -_08023A8C: - movs r1, 0x9C - lsls r1, 1 - adds r5, r4, r1 - ldrb r0, [r5] - subs r0, 0x1 - strb r0, [r5] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - beq _08023AA2 - b _08023BB8 -_08023AA2: - movs r0, 0x1 - negs r0, r0 - ldr r2, =0x000003ff - movs r1, 0 - bl BlendPalettes - ldr r2, =0x00000139 - adds r1, r4, r2 - movs r0, 0x4 - strb r0, [r1] - movs r0, 0 - strb r0, [r5] - ldr r2, =gUnknown_082F326C - ldrb r1, [r1] - lsls r0, r1, 3 - subs r0, r1 - adds r0, r2 - ldrb r0, [r0] - movs r2, 0x9D - lsls r2, 1 - adds r1, r4, r2 - strb r0, [r1] - b _08023BB2 - .pool -_08023ADC: - ldr r7, =gUnknown_082F326C - movs r0, 0x9C - lsls r0, 1 - adds r6, r4, r0 - ldr r1, =0x00000139 - adds r5, r4, r1 - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - ldrb r2, [r6] - adds r0, r2 - adds r0, r7 - movs r1, 0 - ldrsb r1, [r0, r1] - strh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x12 - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1A - bl SetGpuReg - ldrh r1, [r4, 0x2C] - negs r1, r1 - lsls r1, 16 - lsrs r1, 16 - movs r0, 0x1E - bl SetGpuReg - ldrb r0, [r6] - adds r0, 0x1 - strb r0, [r6] - movs r1, 0x9D - lsls r1, 1 - adds r2, r4, r1 - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r2] - cmp r0, r1 - bcc _08023BB8 - ldrb r0, [r5] - cmp r0, 0 - beq _08023BB2 - subs r0, 0x1 - strb r0, [r5] - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - adds r0, r7 - ldrb r0, [r0] - strb r0, [r2] - movs r0, 0 - strb r0, [r6] - b _08023BB8 - .pool -_08023B5C: - movs r0, 0 - strh r0, [r4, 0x2C] - movs r0, 0x12 - movs r1, 0 - bl SetGpuReg - movs r0, 0x1A - movs r1, 0 - bl SetGpuReg - movs r0, 0x1E - movs r1, 0 - bl SetGpuReg - b _08023BB2 -_08023B7A: - movs r2, 0x9C - lsls r2, 1 - adds r1, r4, r2 - adds r0, r4, 0 - bl sub_80218D4 - cmp r0, 0 - beq _08023BB8 - bl sub_8010434 - movs r0, 0 - strh r0, [r4, 0x10] - b _08023BB2 -_08023B94: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08023BB8 - movs r0, 0x11 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r1, 0 - movs r0, 0 - strh r0, [r4, 0x10] - strb r1, [r4, 0xC] - b _08023BBA -_08023BB2: - ldrb r0, [r4, 0xC] - adds r0, 0x1 - strb r0, [r4, 0xC] -_08023BB8: - movs r0, 0 -_08023BBA: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8023A30 - thumb_func_start sub_8023BC0 sub_8023BC0: @ 8023BC0 push {r4-r6,lr} diff --git a/src/berry_crush.c b/src/berry_crush.c index 8a88a2a92..fb1e5c7a0 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -18,6 +18,7 @@ #include "menu.h" #include "overworld.h" #include "palette.h" +#include "pokemon_jump.h" #include "rom_8034C54.h" #include "scanline_effect.h" #include "script.h" @@ -37,8 +38,12 @@ struct BerryCrushGame_Player { u16 unk0; - u8 filler2[2]; - u8 unk4[16]; + u16 unk2; + union + { + u8 as_bytes[16]; + u16 as_hwords[8]; + } unk4; u8 unk14[12]; }; @@ -54,6 +59,51 @@ typedef union BerryCrushGame_Players struct BerryCrushGame_PlayersSeparate separate; } BerryCrushGame_Players; +struct __attribute__((packed, aligned(2))) BerryCrushGame_4E +{ + u8 filler0[0x4]; + u8 unk4_0:1; + u8 unk4_1:1; + s8 unk5; + u16 unk6; + u16 unk8; + u16 unkA; + u16 unkC; +}; + +struct __attribute__((packed)) BerryCrushGame_40 +{ + u8 unk0[2]; + u16 unk2[6]; + struct BerryCrushGame_4E unkE; +}; + +struct __attribute__((packed, aligned(2))) BerryCrushGame_5C +{ + u16 unk00; + u8 unk02_0:1; + u8 unk02_1:1; + u8 unk02_2:1; + u8 unk02_3:5; + u8 unk03; + u16 unk04; + u16 unk06; + u16 unk08; + u16 unk0A; +}; + +struct BerryCrushGame_68 +{ + int unk00; + u16 unk04; + u8 filler06[2]; + u16 unk08; + u16 unk0A; + u16 unk0C[8]; // TODO: Resolve the type of the field. + BerryCrushGame_Players unk1C; + u8 fillerBC[20]; +}; + struct BerryCrushGame_138_C { u8 unk0; @@ -68,7 +118,10 @@ struct BerryCrushGame_138_C struct BerryCrushGame_138 { - u8 filler0[0x4]; + u8 unk0; + u8 unk1; + u8 unk2; + u8 unk3; s16 unk4; s16 unk6; s16 unk8; @@ -84,33 +137,6 @@ struct BerryCrushGame_138 u8 unk83[5]; }; -struct BerryCrushGame_4E -{ - u8 filler0[0x4]; - u8 unk4; - u8 filler5[0x5]; - u16 unkA; - u16 unkC; -}; - -struct __attribute__((packed)) BerryCrushGame_40 -{ - u8 filler0[0xE]; - struct BerryCrushGame_4E unkE; -}; - -struct BerryCrushGame_68 -{ - int unk00; - u16 unk04; - u8 filler06[2]; - u16 unk08; - u16 unk0A; - u16 unk0C[8]; // TODO: Resolve the type of the field. - BerryCrushGame_Players unk1C; - u8 fillerBC[20]; -}; - struct BerryCrushGame { MainCallback unk0; @@ -123,24 +149,32 @@ struct BerryCrushGame u8 fillerD[0x1]; u8 unkE; u8 unkF; - u8 filler10[0x2]; + u16 unk10; u16 unk12; u8 filler14[0x2]; u16 unk16; - u8 filler18[0x4]; + s16 unk18; + s16 unk1A; int unk1C; - u8 filler20[0x5]; + s32 unk20; + u8 unk24; u8 unk25_0:1; u8 unk25_1:1; u8 unk25_2:1; - u8 filler26[0x2]; + u8 unk25_3:1; + u8 unk25_4:1; + u8 unk25_5:3; + u16 unk26; u16 unk28; - u16 unk2A; + s16 unk2A; s16 unk2C; - u8 filler2E[0x8]; + s16 unk2E; + u16 unk30; + u16 unk32; + s16 unk34; u8 unk36[0xA]; struct BerryCrushGame_40 unk40; - u8 filler60[0x8]; + struct BerryCrushGame_5C unk5C; struct BerryCrushGame_68 unk68; struct BerryCrushGame_138 unk138; u8 unk1C0[0x1000]; @@ -219,6 +253,13 @@ extern const struct SpriteTemplate gUnknown_082F4354; extern const struct UnkStruct3 gUnknown_082F4384[]; extern u32 (*const gUnknown_082F43CC[])(struct BerryCrushGame *, u8 *); extern const u8 *const gUnknown_082F32A4[]; +extern const u8 gUnknown_082F4448[]; +extern const s8 gUnknown_082F326C[][7]; +extern const u8 gUnknown_082F325C[]; +extern const u8 gUnknown_082F3264[]; +extern const u8 gUnknown_082F3290[][4]; +extern const u8 gUnknown_082F4434[][4]; +extern const u8 gUnknown_082F4444[]; struct BerryCrushGame *sub_8020C00(void) { @@ -686,7 +727,7 @@ void sub_8021608(struct Sprite *sprite) } } -void sub_80216A8(struct BerryCrushGame *arg0) +void sub_80216A8(struct BerryCrushGame *arg0, __attribute__((unused)) struct BerryCrushGame_138 *arg1) { u8 i; for (i = 0; i < arg0->unk9; i++) @@ -741,7 +782,7 @@ void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) arg1->unk4C[i]->pos1.y = gUnknown_082F41D2[i][1] + 136 - (var * 4); arg1->unk4C[i]->pos2.x = gUnknown_082F41D2[i][0] + (gUnknown_082F41D2[i][0] / (var2 * 4)); arg1->unk4C[i]->pos2.y = gUnknown_082F41D2[i][1]; - if (var4E->unk4 & 0x2) + if (var4E->unk4_1) StartSpriteAnim(arg1->unk4C[i], 1); else StartSpriteAnim(arg1->unk4C[i], 0); @@ -850,7 +891,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) ++i; break; case 0: - sp18 = sp20->unk1C.separate.player.unk4[i]; + sp18 = sp20->unk1C.separate.player.unk4.as_bytes[i]; if (i != 0 && sp20->unk0C[i] != sp20->unk0C[i - 1]) sp1C = i; ConvertIntToDecimalStringN( @@ -868,7 +909,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) ++i; break; case 1: - sp18 = sp20->unk1C.separate.player.unk4[i + 8]; + sp18 = sp20->unk1C.separate.player.unk4.as_bytes[i + 8]; if (i != 0 && sp20->unk0C[i + 5] != sp20->unk0C[i + 4]) // damn, access to unk0C is weird again sp1C = i; ConvertIntToDecimalStringN( @@ -1386,7 +1427,7 @@ bool32 sub_8022070(struct BerryCrushGame *r4, struct BerryCrushGame_138 *r6) r6->unk80 = 5; return FALSE; case 12: - sub_80219C8(r6->unk82, 20, 4, gUnknown_082F43B4[r4->unk68.unk1C.separate.player.unk4[7] + 3]); + sub_80219C8(r6->unk82, 20, 4, gUnknown_082F43B4[r4->unk68.unk1C.separate.player.unk4.as_bytes[7] + 3]); sub_8021A28(r4, 1, 0xA0, 8 * gUnknown_082F3344[0][r5]); r6->unk80 = 5; return FALSE; @@ -1420,7 +1461,7 @@ void sub_8022250(u8 r4) u8 r9 = 0, r2, r7, r10; u32 sp0C = 0; s16 *r6 = gTasks[r4].data; - const u8 *r10_; // r5/sl register swap + const u8 *r10_; // turn r5/sl register swap into r8/sl switch (r6[0]) { @@ -1433,9 +1474,9 @@ void sub_8022250(u8 r4) break; case 1: r10_ = gText_BerryCrush2; - ++r10_; --r10_; + ++r10_; --r10_; // swap r9/sl #ifndef NONMATCHING - asm("":::"r8"); + asm("":::"r8"); // turn r8/sl register swap into sb/sl #endif r7 = 96 - GetStringWidth(1, r10_, -1) / 2u; AddTextPrinterParameterized3( @@ -1990,3 +2031,566 @@ u32 sub_8022F04(struct BerryCrushGame *r0, __attribute__((unused)) u8 *r1) SetMainCallback2(sub_8020E1C); return 0; } + +u32 sub_8022F1C(struct BerryCrushGame *r5, u8 *r2) +{ + u8 r3; + + switch (r5->unkC) + { + case 0: + sub_8024644(r2, 1, 0, 0, 1); + r5->unkE = 9; + sub_8022BEC(3, 1, NULL); + return 0; + case 1: + sub_8010434(); + break; + case 2: + if (!IsLinkTaskFinished()) + return 0; + memset(r5->unk40.unk2, 0, sizeof(r5->unk40.unk2)); + r5->unk40.unk2[0] = r5->unk68.unk1C.separate.others[r5->unk8].unk0; + SendBlock(0, r5->unk40.unk2, 2); + break; + case 3: + if (!IsLinkTaskFinished()) + return 0; + r5->unk10 = 0; + break; + case 4: + if (GetBlockReceivedStatus() != gUnknown_082F4448[r5->unk9 - 2]) + return 0; + for (r3 = 0; r3 < r5->unk9; ++r3) + { + r5->unk68.unk1C.separate.others[r3].unk0 = gBlockRecvBuffer[r3][0]; + if (r5->unk68.unk1C.separate.others[r3].unk0 > 0xB0) + r5->unk68.unk1C.separate.others[r3].unk0 = 0; + r5->unk18 += gUnknown_0858AB24[r5->unk68.unk1C.separate.others[r3].unk0].unk0; + r5->unk1C += gUnknown_0858AB24[r5->unk68.unk1C.separate.others[r3].unk0].unk1; + } + r5->unk10 = 0; + ResetBlockReceivedFlags(); + r5->unk20 = sub_81515FC(r5->unk18 << 8, 0x2000); + break; + case 5: + ClearDialogWindowAndFrame(0, 1); + sub_8022BEC(10, 1, NULL); + r5->unk12 = 4; + r5->unkC = 0; + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_8023070(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + switch (r4->unkC) + { + case 0: + sub_80214A8(r4, &r4->unk138); + sub_8010434(); + break; + case 1: + if (!IsLinkTaskFinished()) + return 0; + r4->unk138.unk0 = 0; + r4->unk138.unk1 = 0; + r4->unk138.unk2 = 0; + r4->unk138.unk3 = 0; + break; + case 2: + r4->unk138.unk38[r4->unk138.unk0]->callback = sub_8021608; + r4->unk138.unk38[r4->unk138.unk0]->affineAnimPaused = FALSE; + PlaySE(SE_NAGERU); + break; + case 3: + if (r4->unk138.unk38[r4->unk138.unk0]->callback == sub_8021608) + return 0; + r4->unk138.unk38[r4->unk138.unk0] = NULL; + ++r4->unk138.unk0; + sub_8010434(); + break; + case 4: + if (!IsLinkTaskFinished()) + return 0; + if (r4->unk138.unk0 < r4->unk9) + { + r4->unkC = 2; + return 0; + } + r4->unk138.unk0 = 0; + break; + case 5: + sub_80216A8(r4, &r4->unk138); + sub_8010434(); + break; + case 6: + if (!IsLinkTaskFinished()) + return 0; + PlaySE(SE_RU_HYUU); + sub_8022BEC(11, 1, NULL); + r4->unk12 = 5; + r4->unkC = 0; + return 0; + } + ++r4->unkC; + return 0; +} + +u32 sub_80231B8(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + switch (r4->unkC) + { + case 0: + r4->unk2A += 4; + if (r4->unk2A < 0) + return 0; + r4->unk2A = 0; + r4->unk138.unk1 = 4; + r4->unk138.unk0 = 0; + r4->unk138.unk2 = gUnknown_082F326C[r4->unk138.unk1][0]; + PlaySE(SE_W070); + break; + case 1: + r4->unk2C = gUnknown_082F326C[r4->unk138.unk1][r4->unk138.unk0]; + SetGpuReg(REG_OFFSET_BG0VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG2VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG3VOFS, -r4->unk2C); + ++r4->unk138.unk0; + if (r4->unk138.unk0 < r4->unk138.unk2) + return 0; + if (r4->unk138.unk1 == 0) + break; + --r4->unk138.unk1; + r4->unk138.unk2 = gUnknown_082F326C[r4->unk138.unk1][0]; + r4->unk138.unk0 = 0; + return 0; + case 2: + r4->unk2C = 0; + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + sub_8010434(); + break; + case 3: + if (!IsLinkTaskFinished()) + return 0; + sub_8022BEC(12, 1, NULL); + r4->unk12 = 6; + r4->unkC = 0; + return 0; + } + ++r4->unkC; + return 0; +} + +u32 sub_80232EC(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + switch (r4-> unkC) + { + case 1: + if (!IsLinkTaskFinished()) + return 0; + sub_802EB24(0x1000, 0x1000, 120, 80, 0); + break; + case 2: + if (sub_802EB84()) + return 0; + // fallthrough + case 0: + sub_8010434(); + break; + case 3: + if (!IsLinkTaskFinished()) + return 0; + r4->unk138.unk0 = 0; + r4->unk138.unk1 = 0; + r4->unk138.unk2 = 0; + r4->unk138.unk3 = 0; + r4->unk10 = 0; + if (r4->unk8 == 0) + sub_8022BEC(13, 1, NULL); + else + sub_8022BEC(14, 1, NULL); + r4->unk12 = 7; + r4->unkC = 0; + return 0; + } + ++r4->unkC; + return 0; +} + +void sub_802339C(struct BerryCrushGame *r4) +{ + u8 r8 = 0; + u16 r3; + u16 *r2; + u8 r7 = 0; + s32 r2_ = 0; + s32 r0; + + for (r7 = 0; r7 < r4->unk9; ++r7) + { + r2 = gRecvCmds[r7]; + if ((r2[0] & 0xFF00) == 0x2F00 + && r2[1] == 2) + { + if ((u8)r2[2] & 4) + { + r4->unk5C.unk02_3 |= gUnknown_082F325C[r7]; + r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] = 1; + ++r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[3]; + ++r8; + r3 = r4->unk28 - r4->unk68.unk1C.separate.others[r7].unk2; + if (r3 >= r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] - 1 + && r3 <= r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] + 1) + { + ++r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0]; + r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] = r3; + if (r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0] > r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[2]) + r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[2] = r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0]; + } + else + { + r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0] = 0; + r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] = r3; + } + r4->unk68.unk1C.separate.others[r7].unk2 = r4->unk28; + if (++r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[12] > 2) + r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[12] = 0; + } + else + { + r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] = 0; + } + } + } + if (r8 > 1) + { + for (r7 = 0; r7 < r4->unk9; ++r7) + { + if (r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] != 0) + { + r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] |= 2; + ++r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[4]; + } + } + } + if (r8 != 0) + { + r4->unk2E += r8; + r8 += gUnknown_082F3264[r8 - 1]; + r4->unk34 += r8; + r4->unk1A += r8; + r0 = r4->unk18; + r2_ = r4->unk1A; + if (r0 - r2_ > 0) + { + r2_ <<= 8; + r2_ = sub_81515FC(r2_, r4->unk20); + r2_ >>= 8; + r4->unk24 = r2_; + } + else + { + r4->unk24 = 32; + r4->unk5C.unk02_0 = 1; + } + } +} + +void sub_8023558(struct BerryCrushGame *r3) +{ + u8 r6 = 0; + u16 r1 = 0; + u8 r4 = 0; + + for (r4 = 0; r4 < r3->unk9; ++r4) + { + if (r3->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] != 0) + { + ++r6; + r1 = r3->unk68.unk1C.separate.others[r4].unk4.as_bytes[12] + 1; + if (r3->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] & 2) + r1 |= 4; + r1 <<= 3 * r4; + r3->unk5C.unk08 |= r1; + } + } + r3->unk5C.unk04 = r3->unk24; + if (r6 == 0) + { + if (r3->unk138.unk3 != 0) + ++r3->unk138.unk0; + else + goto SET_UNK5F_0; + } + else + { + if (r3->unk138.unk3 != 0) + { + if (r6 != r3->unk138.unk1) + { + r3->unk138.unk1 = r6 - 1; + r3->unk138.unk2 = gUnknown_082F3290[r6 - 1][0]; + } + else + { + ++r3->unk138.unk0; + } + } + else + { + r3->unk138.unk0 = 0; + r3->unk138.unk1 = r6 - 1; + r3->unk138.unk2 = gUnknown_082F3290[r6 - 1][0]; + r3->unk138.unk3 = 1; + } + } + if (r3->unk138.unk3 != 0) + { + if (r3->unk138.unk0 >= r3->unk138.unk2) + { + r3->unk138.unk0 = 0; + r3->unk138.unk1 = 0; + r3->unk138.unk2 = 0; + r3->unk138.unk3 = 0; + r1 = 0; + } + else + { + r1 = gUnknown_082F3290[r3->unk138.unk1][r3->unk138.unk0 + 1]; + } + r3->unk5C.unk03 = r1; + } + else + { + SET_UNK5F_0: + r3->unk5C.unk03 = 0; + } + r3->unk5C.unk06 = r3->unk26; +} + +void sub_80236B8(struct BerryCrushGame *r5) +{ + if (gMain.newKeys & A_BUTTON) + r5->unk5C.unk02_2 = 1; + if (gMain.heldKeys & A_BUTTON) + { + if (r5->unk68.unk1C.separate.others[r5->unk8].unk4.as_hwords[5] < r5->unk28) + ++r5->unk68.unk1C.separate.others[r5->unk8].unk4.as_hwords[5]; + } + if (r5->unk8 != 0 && r5->unk5C.unk02_2 == 0) + return; + r5->unk5C.unk00 = 2; + if (r5->unk28 % 30 == 0) + { + if (r5->unk2E > gUnknown_082F4444[r5->unk9 - 2]) + { + ++r5->unk30; + r5->unk25_4 = 1; + } + else + { + r5->unk25_4 = 0; + } + r5->unk2E = 0; + ++r5->unk32; + } + if (r5->unk28 % 15 == 0) + { + if (r5->unk34 < gUnknown_082F4434[r5->unk9 - 2][0]) + r5->unk25_5 = 0; + else if (r5->unk34 < gUnknown_082F4434[r5->unk9 - 2][1]) + r5->unk25_5 = 1; + else if (r5->unk34 < gUnknown_082F4434[r5->unk9 - 2][2]) + r5->unk34 = 2; // typo since r5->unk34 will be reset? + else if (r5->unk34 < gUnknown_082F4434[r5->unk9 - 2][3]) + r5->unk34 = 3; // typo since r5->unk34 will be reset? + else + r5->unk25_5 = 4; + r5->unk34 = 0; + } + else + { + ++r5->unk10; + if (r5->unk10 > 60) + { + if (r5->unk10 > 70) + { + sub_8011AC8(); + r5->unk10 = 0; + } + else if (r5->unk5C.unk02_3 == 0) + { + sub_8011AC8(); + r5->unk10 = 0; + } + } + + } + if (r5->unk28 >= 36000) + r5->unk5C.unk02_0 = 1; + r5->unk5C.unk02_1 = r5->unk25_4; + r5->unk5C.unk0A = r5->unk25_5; + memcpy(r5->unk40.unk2, &r5->unk5C, sizeof(r5->unk40.unk2)); + sub_800FE50(r5->unk40.unk2); +} + +void sub_802385C(struct BerryCrushGame *r5) +{ + struct BerryCrushGame_4E *r4_; +#ifndef NONMATCHING + register u32 r4 asm("r4"); + register u32 r0 asm("r0"); + + for (r4 = 0; r4 < r5->unk9; r4 = (u8)r0) + { + r5->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] = 0; + r0 = r4 + 1; + } +#else + u8 r4; + + for (r4 = 0; r4 < r5->unk9; ++r4) + r5->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] = 0; +#endif + if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00 + || gRecvCmds[0][1] != 2) + { + r5->unk25_2 = 0; + } + else + { + r4_ = &r5->unk40.unkE; + memcpy(r4_, gRecvCmds, sizeof(struct BerryCrushGame_4E)); + r5->unk2A = r4_->unk6; + r5->unk2C = r4_->unk5; + r5->unk28 = r4_->unk8; + sub_80216E0(r5, &r5->unk138); + if (r4_->unk4_0) + r5->unk25_3 = 1; + } +} + +u32 sub_80238F0(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + memset(&r4->unk5C, 0, sizeof(r4->unk5C)); + memset(&r4->unk40.unkE, 0, sizeof(r4->unk40.unkE)); + sub_802385C(r4); + SetGpuReg(REG_OFFSET_BG0VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG2VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG3VOFS, -r4->unk2C); + if (r4->unk25_3) + { + if (r4->unk28 >= 36000) + { + r4->unk28 = 36000; + sub_8022BEC(16, 1, NULL); + } + else + { + sub_8022BEC(15, 1, NULL); + } + r4->unk10 = 0; + r4->unkC = 0; + return 0; + } + else + { + ++r4->unk26; + sub_802339C(r4); + sub_8023558(r4); + sub_80236B8(r4); + return 0; + } +} + +u32 sub_8023998(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + memset(&r4->unk5C, 0, sizeof(r4->unk5C)); + memset(&r4->unk40.unkE, 0, sizeof(r4->unk40.unkE)); + sub_802385C(r4); + SetGpuReg(REG_OFFSET_BG0VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG2VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG3VOFS, -r4->unk2C); + if (r4->unk25_3) + { + if (r4->unk28 >= 36000) + { + r4->unk28 = 36000; + sub_8022BEC(16, 1, NULL); + } + else + { + sub_8022BEC(15, 1, NULL); + } + r4->unk10 = 0; + r4->unkC = 0; + return 0; + } + else + { + sub_80236B8(r4); + return 0; + } +} + +u32 sub_8023A30(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + switch (r4->unkC) + { + case 0: + r4->unk12 = 8; + PlaySE(SE_W070); + BlendPalettes(0xFFFFFFFF, 8, RGB(31, 31, 0)); + r4->unk138.unk0 = 2; + break; + case 1: + if (--r4->unk138.unk0 != 255) + return 0; + BlendPalettes(0xFFFFFFFF, 0, RGB(31, 31, 0)); + r4->unk138.unk1 = 4; + r4->unk138.unk0 = 0; + r4->unk138.unk2 = gUnknown_082F326C[r4->unk138.unk1][0]; + break; + case 2: + r4->unk2C = gUnknown_082F326C[r4->unk138.unk1][r4->unk138.unk0]; + SetGpuReg(REG_OFFSET_BG0VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG2VOFS, -r4->unk2C); + SetGpuReg(REG_OFFSET_BG3VOFS, -r4->unk2C); + if (++r4->unk138.unk0 < r4->unk138.unk2) + return 0; + if (r4->unk138.unk1 != 0) + { + --r4->unk138.unk1; + r4->unk138.unk2 = gUnknown_082F326C[r4->unk138.unk1][0]; + r4->unk138.unk0 = 0; + return 0; + } + break; + case 3: + r4->unk2C = 0; + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + break; + case 4: + if (!sub_80218D4(r4, &r4->unk138)) + return 0; + sub_8010434(); + r4->unk10 = 0; + break; + case 5: + if (!IsLinkTaskFinished()) + return 0; + sub_8022BEC(17, 1, NULL); + r4->unk10 = 0; + r4->unkC = 0; + return 0; + } + ++r4->unkC; + return 0; +} From d1cf9006fb4b29e63302c69c912e431a873626c0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 17 Dec 2019 03:24:44 -0500 Subject: [PATCH 24/35] Document some warp/field screen effect --- asm/macros/event.inc | 2 +- data/maps/SootopolisCity/scripts.inc | 4 +- data/script_cmd_table.inc | 2 +- data/scripts/cable_club.inc | 10 +- data/specials.inc | 2 +- ...{unknown_33.png => lavaridge_gym_warp.png} | Bin include/constants/field_specials.h | 2 +- include/field_effect.h | 12 +- include/field_player_avatar.h | 2 +- include/field_screen_effect.h | 48 ++- include/field_special_scene.h | 2 +- include/overworld.h | 2 +- include/start_menu.h | 2 +- spritesheet_rules.mk | 2 +- .../field_event_obj/event_object_graphics.h | 2 +- .../field_effect_object_template_pointers.h | 4 +- .../field_event_obj/field_effect_objects.h | 40 ++- src/decoration.c | 10 +- src/egg_hatch.c | 2 +- src/event_obj_lock.c | 8 +- src/field_control_avatar.c | 8 +- src/field_effect.c | 280 +++++++++--------- src/field_player_avatar.c | 6 +- src/field_screen_effect.c | 257 ++++++++-------- src/field_special_scene.c | 14 +- src/field_specials.c | 2 +- src/item_use.c | 2 +- src/move_relearner.c | 2 +- src/overworld.c | 22 +- src/party_menu.c | 6 +- src/player_pc.c | 6 +- src/pokeblock.c | 2 +- src/pokemon_storage_system.c | 2 +- src/record_mixing.c | 2 +- src/region_map.c | 2 +- src/roulette.c | 2 +- src/scrcmd.c | 6 +- src/secret_base.c | 6 +- src/shop.c | 2 +- src/start_menu.c | 44 ++- src/trade.c | 2 +- src/union_room.c | 6 +- src/walda_phrase.c | 2 +- 43 files changed, 428 insertions(+), 413 deletions(-) rename graphics/event_objects/pics/effects/{unknown_33.png => lavaridge_gym_warp.png} (100%) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 96971b583..7aa4a19c9 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1539,7 +1539,7 @@ .4byte \pointer .endm - .macro warp8 map:req, byte:req, word1:req, word2:req + .macro warpsootopolislegend map:req, byte:req, word1:req, word2:req .byte 0xe0 map \map .byte \byte diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index faec31717..2c8d1609d 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -547,7 +547,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: @ 81E5C1E fadenewbgm MUS_RUNECITY delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warp8 MAP_SOOTOPOLIS_CITY, 255, 43, 32 + warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 43, 32 waitstate end @@ -600,7 +600,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: @ 81E5CCE fadenewbgm MUS_NAMINORI delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warp8 MAP_SOOTOPOLIS_CITY, 255, 29, 53 + warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 29, 53 waitstate end diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 006167443..f447d5f25 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -224,7 +224,7 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_buffertrainerclassname .4byte ScrCmd_buffertrainername .4byte ScrCmd_pokenavcall - .4byte ScrCmd_warpE0 + .4byte ScrCmd_warpsootopolislegend .4byte ScrCmd_buffercontesttype .4byte ScrCmd_bufferitemnameplural diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index f37596961..8b4259151 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -391,7 +391,7 @@ CableClub_EventScript_EnterColosseum:: @ 8276FBD goto_if_eq CableClub_EventScript_WarpTo4PColosseum special SetCableClubWarp warp MAP_BATTLE_COLOSSEUM_2P, 255, 6, 8 - special sub_80AF948 + special DoCableClubWarp waitstate end @@ -404,7 +404,7 @@ CableClub_EventScript_PlayerApproachLinkRoomRight:: @ 827702B CableClub_EventScript_WarpTo4PColosseum:: @ 8277036 special SetCableClubWarp warp MAP_BATTLE_COLOSSEUM_4P, 255, 5, 8 - special sub_80AF948 + special DoCableClubWarp waitstate end @@ -494,7 +494,7 @@ CableClub_EventScript_EnterTradeCenter:: @ 827713A release special SetCableClubWarp setwarp MAP_TRADE_CENTER, 255, 5, 8 - special sub_80AF948 + special DoCableClubWarp waitstate end @@ -569,7 +569,7 @@ CableClub_EventScript_EnterRecordCorner:: @ 827724C release special SetCableClubWarp setwarp MAP_RECORD_CORNER, 255, 8, 9 - special sub_80AF948 + special DoCableClubWarp waitstate end @@ -618,7 +618,7 @@ MossdeepCity_GameCorner_1F_EventScript_AbortMinigame:: @ 82772F9 @ Unused CableClub_EventScript_CableClubWarp:: @ 8277306 special SetCableClubWarp - special sub_80AF948 + special DoCableClubWarp waitstate end diff --git a/data/specials.inc b/data/specials.inc index fef21fe99..55a4ca656 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -10,7 +10,7 @@ gSpecials:: @ 81DBA64 def_special HealPlayerParty def_special SetCableClubWarp - def_special sub_80AF948 + def_special DoCableClubWarp def_special ReturnFromLinkRoom def_special CleanupLinkRoomState def_special ExitLinkRoom diff --git a/graphics/event_objects/pics/effects/unknown_33.png b/graphics/event_objects/pics/effects/lavaridge_gym_warp.png similarity index 100% rename from graphics/event_objects/pics/effects/unknown_33.png rename to graphics/event_objects/pics/effects/lavaridge_gym_warp.png diff --git a/include/constants/field_specials.h b/include/constants/field_specials.h index 5dde18058..a2dc117e4 100644 --- a/include/constants/field_specials.h +++ b/include/constants/field_specials.h @@ -7,7 +7,7 @@ #define PC_LOCATION_MAYS_HOUSE 2 // SS Tidal Locations -#define SS_TIDAL_LOCATION_OTHER 0 +#define SS_TIDAL_LOCATION_CURRENTS 0 #define SS_TIDAL_LOCATION_SLATEPORT 1 #define SS_TIDAL_LOCATION_LILYCOVE 2 #define SS_TIDAL_LOCATION_ROUTE124 3 diff --git a/include/field_effect.h b/include/field_effect.h index 0a99938d7..59f99ad93 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -34,17 +34,17 @@ bool8 FieldEffectCmd_end(u8 **script, u32 *val); bool8 FieldEffectCmd_loadgfx_callnative(u8 **script, u32 *val); bool8 FieldEffectCmd_loadtiles_callnative(u8 **script, u32 *val); bool8 FieldEffectCmd_loadfadedpal_callnative(u8 **script, u32 *val); -void sub_80B6B68(void); -void sub_80B6E4C(u8 a0, u8 priority); -void sub_80B75D8(u8 priority); -void sub_80B7A74(u8 priority); +void FieldCB_FallWarpExit(void); +void StartEscalatorWarp(u8 metatileBehavior, u8 priority); +void StartLavaridgeGymB1FWarp(u8 priority); +void StartLavaridgeGym1FWarp(u8 priority); void sub_80B9C28(s16*, u8); void sub_80B9C54(s16*, u8); void sub_80B9CDC(s16*, u8); -void sub_80B7CAC(struct Sprite*); -void sub_80B7A58(struct Sprite*); +void SpriteCB_PopOutOfAsh(struct Sprite*); +void SpriteCB_LavaridgeGymWarp(struct Sprite*); void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b); void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId); diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 8d87779e6..804bb5d6e 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -61,7 +61,7 @@ void sub_808D194(void); void sub_808D1C8(void); bool32 sub_808D1B4(void); bool32 sub_808D1E8(void); -void sub_808C0A8(u8 a); +void SetPlayerInvisibility(bool8 invisible); u8 player_get_pos_including_state_based_drift(s16 *x, s16 *y); #endif // GUARD_FIELD_PLAYER_AVATAR_H diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index 02a927d4b..e05e30378 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -1,37 +1,35 @@ #ifndef GUARD_FIELD_SCREEN_EFFECT_H #define GUARD_FIELD_SCREEN_EFFECT_H -void pal_fill_for_maplights(void); -void pal_fill_black(void); -void WarpFadeScreen(void); -void sub_80AF128(void); -void FieldCallback_ReturnToEventScript2(void); -void sub_80AF188(void); -void sub_80AF214(void); -void sub_80AF2B4(u8 taskId); -void sub_80AF314(void); -void mapldr_default(void); -void sub_80AF3B0(void); -void sub_80AF3C8(void); -void sub_80AF3E8(void); -void sub_80AF40C(void); -void sub_80AF688(void); -bool8 sub_80AF6A4(void); +void WarpFadeInScreen(void); +void WarpFadeOutScreen(void); +void FadeInFromBlack(void); +void FadeInFromWhite(void); +void FieldCB_ContinueScriptUnionRoom(void); +void FieldCB_ContinueScriptHandleMusic(void); +void FieldCB_ContinueScript(void); +void Task_ReturnToFieldRecordMixing(u8 taskId); +void FieldCB_ReturnToFieldCableLink(void); +void FieldCB_ReturnToFieldWirelessLink(void); +void FieldCB_DefaultWarpExit(void); +void FieldCB_WarpExitFadeFromBlack(void); +void FieldCB_WarpExitFadeFromWhite(void); +bool8 FieldCB_ReturnToFieldOpenStartMenu(void); +void ReturnToFieldOpenStartMenu(void); void sub_80AF6D4(void); void sub_80AF6F0(void); void DoWarp(void); void DoDiveWarp(void); -void sub_80AF79C(void); +void DoSootopolisLegendWarp(void); void DoDoorWarp(void); void DoFallWarp(void); -void sub_80AF80C(u8 metatileBehavior); -void sub_80AF828(void); -void sub_80AF838(void); -void sub_80AF848(void); +void DoEscalatorWarp(u8 metatileBehavior); +void DoLavaridgeGymB1FWarp(void); +void DoLavaridgeGym1FWarp(void); +void DoTeleportWarp(void); void DoMossdeepGymWarp(void); -void sub_80AF8B8(void); -void sub_80AF948(void); -void sub_80AF9F8(void); +void DoPortholeWarp(void); +void DoCableClubWarp(void); void DoContestHallWarp(void); void AnimateFlash(u8 flashLevel); void WriteBattlePyramidViewScanlineEffectBuffer(void); @@ -41,6 +39,6 @@ void DoOrbEffect(void); void FadeOutOrbEffect(void); void sub_80B05B4(void); void WriteFlashScanlineEffectBuffer(u8 flashLevel); -bool8 walkrun_is_standing_still(void); +bool8 IsPlayerStandingStill(void); #endif // GUARD_FIELD_SCREEN_EFFECT_H diff --git a/include/field_special_scene.h b/include/field_special_scene.h index 2219c9433..a54b344d9 100644 --- a/include/field_special_scene.h +++ b/include/field_special_scene.h @@ -10,6 +10,6 @@ void Task_HandleTruckSequence(u8 taskId); void ExecuteTruckSequence(void); void EndTruckSequence(u8); void sub_80C791C(void); -void sub_80FB768(void); +void FieldCB_ShowPortholeView(void); #endif // GUARD_FIELD_SPECIAL_SCENE_H diff --git a/include/overworld.h b/include/overworld.h index b86067701..ac916feb1 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -136,7 +136,7 @@ void CB2_NewGame(void); void CB2_WhiteOut(void); void CB2_LoadMap(void); void sub_8086024(void); -void sub_8086074(void); +void CB2_ReturnToFieldCableClub(void); void CB2_ReturnToField(void); void CB2_ReturnToFieldLocal(void); void CB2_ReturnToFieldLink(void); diff --git a/include/start_menu.h b/include/start_menu.h index eca9f0837..df2a290a2 100644 --- a/include/start_menu.h +++ b/include/start_menu.h @@ -3,7 +3,7 @@ extern bool8 (*gMenuCallback)(void); -void sub_809FA18(void); +void ShowReturnToFieldStartMenu(void); void Task_ShowStartMenu(u8 taskId); void ShowStartMenu(void); void ShowBattlePyramidStartMenu(void); diff --git a/spritesheet_rules.mk b/spritesheet_rules.mk index 6e49a0a66..57a2b1ea9 100644 --- a/spritesheet_rules.mk +++ b/spritesheet_rules.mk @@ -653,7 +653,7 @@ $(EVENTOBJGFXDIR)/effects/unknown_20.4bpp: %.4bpp: %.png $(EVENTOBJGFXDIR)/effects/unknown_29.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 1 -$(EVENTOBJGFXDIR)/effects/unknown_33.4bpp: %.4bpp: %.png +$(EVENTOBJGFXDIR)/effects/lavaridge_gym_warp.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 2 $(EVENTOBJGFXDIR)/effects/unknown_35.4bpp: %.4bpp: %.png diff --git a/src/data/field_event_obj/event_object_graphics.h b/src/data/field_event_obj/event_object_graphics.h index f7f1f33ba..1702392ca 100755 --- a/src/data/field_event_obj/event_object_graphics.h +++ b/src/data/field_event_obj/event_object_graphics.h @@ -326,7 +326,7 @@ const u32 gFieldEffectObjectPic_SandDisguisePlaceholder[] = INCBIN_U32("graphics const u32 gFieldEffectObjectPic_HotSpringsWater[] = INCBIN_U32("graphics/event_objects/pics/effects/hot_springs_water.4bpp"); const u16 gFieldEffectObjectPalette2[] = INCBIN_U16("graphics/event_objects/palettes/field_effect_object_palette_02.gbapal"); const u32 gFieldEffectObjectPic_JumpOutOfAsh[] = INCBIN_U32("graphics/event_objects/pics/effects/jump_out_of_ash.4bpp"); -const u32 gFieldEffectObjectPic_Unknown33[] = INCBIN_U32("graphics/event_objects/pics/effects/unknown_33.4bpp"); +const u32 gFieldEffectObjectPic_LavaridgeGymWarp[] = INCBIN_U32("graphics/event_objects/pics/effects/lavaridge_gym_warp.4bpp"); const u32 gFieldEffectObjectPic_Bubbles[] = INCBIN_U32("graphics/event_objects/pics/effects/bubbles.4bpp"); const u32 gFieldEffectObjectPic_Unknown35[] = INCBIN_U32("graphics/event_objects/pics/effects/unknown_35.4bpp"); const u16 gFieldEffectObjectPalette3[] = INCBIN_U16("graphics/event_objects/palettes/field_effect_object_palette_03.gbapal"); diff --git a/src/data/field_event_obj/field_effect_object_template_pointers.h b/src/data/field_event_obj/field_effect_object_template_pointers.h index 32d2b069a..de39e6db3 100755 --- a/src/data/field_event_obj/field_effect_object_template_pointers.h +++ b/src/data/field_event_obj/field_effect_object_template_pointers.h @@ -31,7 +31,7 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown29; const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass; const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater; const struct SpriteTemplate gFieldEffectObjectTemplate_JumpOutOfAsh; -const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown33; +const struct SpriteTemplate gFieldEffectObjectTemplate_LavaridgeGymWarp; const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles; const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown35; const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza; @@ -70,7 +70,7 @@ const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[] = { &gFieldEffectObjectTemplate_ShortGrass, &gFieldEffectObjectTemplate_HotSpringsWater, &gFieldEffectObjectTemplate_JumpOutOfAsh, - &gFieldEffectObjectTemplate_Unknown33, + &gFieldEffectObjectTemplate_LavaridgeGymWarp, &gFieldEffectObjectTemplate_Bubbles, &gFieldEffectObjectTemplate_Unknown35, &gFieldEffectObjectTemplate_Rayquaza, diff --git a/src/data/field_event_obj/field_effect_objects.h b/src/data/field_event_obj/field_effect_objects.h index a3944de36..d28357765 100755 --- a/src/data/field_event_obj/field_effect_objects.h +++ b/src/data/field_event_obj/field_effect_objects.h @@ -892,19 +892,28 @@ const union AnimCmd *const gFieldEffectObjectImageAnimTable_JumpOutOfAsh[] = gFieldEffectObjectImageAnim_850D54C, }; -const struct SpriteTemplate gFieldEffectObjectTemplate_JumpOutOfAsh = {0xFFFF, 0x100D, &gEventObjectBaseOam_16x16, gFieldEffectObjectImageAnimTable_JumpOutOfAsh, gFieldEffectObjectPicTable_JumpOutOfAsh, gDummySpriteAffineAnimTable, sub_80B7CAC}; +const struct SpriteTemplate gFieldEffectObjectTemplate_JumpOutOfAsh = +{ + .tileTag = 0xFFFF, + .paletteTag = 0x100D, + .oam = &gEventObjectBaseOam_16x16, + .anims = gFieldEffectObjectImageAnimTable_JumpOutOfAsh, + .images = gFieldEffectObjectPicTable_JumpOutOfAsh, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_PopOutOfAsh +}; const struct SpritePalette gFieldEffectObjectPaletteInfo2 = {gFieldEffectObjectPalette2, 0x100D}; -const struct SpriteFrameImage gFieldEffectObjectPicTable_Unknown33[] = { - overworld_frame(gFieldEffectObjectPic_Unknown33, 2, 2, 0), - overworld_frame(gFieldEffectObjectPic_Unknown33, 2, 2, 1), - overworld_frame(gFieldEffectObjectPic_Unknown33, 2, 2, 2), - overworld_frame(gFieldEffectObjectPic_Unknown33, 2, 2, 3), - overworld_frame(gFieldEffectObjectPic_Unknown33, 2, 2, 4), +const struct SpriteFrameImage gFieldEffectObjectPicTable_LavaridgeGymWarp[] = { + overworld_frame(gFieldEffectObjectPic_LavaridgeGymWarp, 2, 2, 0), + overworld_frame(gFieldEffectObjectPic_LavaridgeGymWarp, 2, 2, 1), + overworld_frame(gFieldEffectObjectPic_LavaridgeGymWarp, 2, 2, 2), + overworld_frame(gFieldEffectObjectPic_LavaridgeGymWarp, 2, 2, 3), + overworld_frame(gFieldEffectObjectPic_LavaridgeGymWarp, 2, 2, 4), }; -const union AnimCmd gFieldEffectObjectImageAnim_850D5B0[] = +const union AnimCmd gFieldEffectObjectImageAnim_LavaridgeGymWarp[] = { ANIMCMD_FRAME(0, 6), ANIMCMD_FRAME(1, 6), @@ -914,12 +923,21 @@ const union AnimCmd gFieldEffectObjectImageAnim_850D5B0[] = ANIMCMD_END, }; -const union AnimCmd *const gFieldEffectObjectImageAnimTable_Unknown33[] = +const union AnimCmd *const gFieldEffectObjectImageAnimTable_LavaridgeGymWarp[] = { - gFieldEffectObjectImageAnim_850D5B0, + gFieldEffectObjectImageAnim_LavaridgeGymWarp, }; -const struct SpriteTemplate gFieldEffectObjectTemplate_Unknown33 = {0xFFFF, 0x100D, &gEventObjectBaseOam_16x16, gFieldEffectObjectImageAnimTable_Unknown33, gFieldEffectObjectPicTable_Unknown33, gDummySpriteAffineAnimTable, sub_80B7A58}; +const struct SpriteTemplate gFieldEffectObjectTemplate_LavaridgeGymWarp = +{ + .tileTag = 0xFFFF, + .paletteTag = 0x100D, + .oam = &gEventObjectBaseOam_16x16, + .anims = gFieldEffectObjectImageAnimTable_LavaridgeGymWarp, + .images = gFieldEffectObjectPicTable_LavaridgeGymWarp, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_LavaridgeGymWarp +}; const struct SpriteFrameImage gFieldEffectObjectPicTable_Bubbles[] = { overworld_frame(gFieldEffectObjectPic_Bubbles, 2, 4, 0), diff --git a/src/decoration.c b/src/decoration.c index 2a47dd553..b9d799d3c 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1332,7 +1332,7 @@ void sub_8128060(u8 taskId) ConfigureCameraObjectForPlacingDecoration(&sPlaceDecorationGraphicsDataBuffer, gCurDecorationItems[gCurDecorationIndex]); sub_812826C(taskId); SetUpPlacingDecorationPlayerAvatar(taskId, &sPlaceDecorationGraphicsDataBuffer); - pal_fill_black(); + FadeInFromBlack(); gPaletteFade.bufferTransferDisabled = FALSE; gTasks[taskId].data[2] = 2; break; @@ -1738,7 +1738,7 @@ void sub_8128CD4(void) u8 taskId; ScriptContext2_Enable(); - pal_fill_black(); + FadeInFromBlack(); taskId = CreateTask(sub_8128C64, 8); sub_8127580(taskId); gTasks[taskId].data[2] = 0; @@ -2215,7 +2215,7 @@ void sub_81298EC(u8 taskId) case 2: ScriptContext2_Enable(); IdentifyOwnedDecorationsCurrentlyInUseInternal(taskId); - pal_fill_black(); + FadeInFromBlack(); gTasks[taskId].data[2] = 3; break; case 3: @@ -2278,7 +2278,7 @@ void sub_8129ABC(u8 taskId) break; case 1: SetUpPuttingAwayDecorationPlayerAvatar(); - pal_fill_black(); + FadeInFromBlack(); data[2] = 2; break; case 2: @@ -2623,7 +2623,7 @@ void sub_812A334(void) { u8 taskId; - pal_fill_black(); + FadeInFromBlack(); DrawDialogueFrame(0, 1); InitDecorationActionsWindow(); taskId = CreateTask(sub_812A2C4, 8); diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 2ce2c04bb..a82a06427 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -470,7 +470,7 @@ static void Task_EggHatch(u8 taskID) { CleanupOverworldWindowsAndTilemaps(); SetMainCallback2(CB2_EggHatch_0); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; DestroyTask(taskID); } } diff --git a/src/event_obj_lock.c b/src/event_obj_lock.c index c64a2ab22..817276694 100644 --- a/src/event_obj_lock.c +++ b/src/event_obj_lock.c @@ -8,7 +8,7 @@ #include "trainer_see.h" #include "constants/event_objects.h" -bool8 walkrun_is_standing_still(void) +bool8 IsPlayerStandingStill(void) { if (gPlayerAvatar.tileTransitionState == T_TILE_TRANSITION) return FALSE; @@ -18,7 +18,7 @@ bool8 walkrun_is_standing_still(void) static void sub_80983A4(u8 taskId) { - if (walkrun_is_standing_still()) + if (IsPlayerStandingStill()) { sub_808B864(); DestroyTask(taskId); @@ -49,7 +49,7 @@ static void sub_8098400(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (!task->data[0] && walkrun_is_standing_still() == TRUE) + if (!task->data[0] && IsPlayerStandingStill() == TRUE) { sub_808B864(); task->data[0] = 1; @@ -123,7 +123,7 @@ static void sub_80985BC(u8 taskId) struct Task *task = &gTasks[taskId]; u8 eventObjectId = task->data[2]; - if (!task->data[0] && walkrun_is_standing_still() == TRUE) + if (!task->data[0] && IsPlayerStandingStill() == TRUE) { sub_808B864(); task->data[0] = 1; diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 5b2d26b3c..424b85d62 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -710,22 +710,22 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB SetupWarp(&gMapHeader, warpEventId, position); if (MetatileBehavior_IsEscalator(metatileBehavior) == TRUE) { - sub_80AF80C(metatileBehavior); + DoEscalatorWarp(metatileBehavior); return TRUE; } if (MetatileBehavior_IsLavaridgeB1FWarp(metatileBehavior) == TRUE) { - sub_80AF828(); + DoLavaridgeGymB1FWarp(); return TRUE; } if (MetatileBehavior_IsLavaridge1FWarp(metatileBehavior) == TRUE) { - sub_80AF838(); + DoLavaridgeGym1FWarp(); return TRUE; } if (MetatileBehavior_IsAquaHideoutWarp(metatileBehavior) == TRUE) { - sub_80AF848(); + DoTeleportWarp(); return TRUE; } if (MetatileBehavior_IsWarpOrBridge(metatileBehavior) == TRUE) diff --git a/src/field_effect.c b/src/field_effect.c index f7667597c..6bbd1df3c 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -28,6 +28,7 @@ #include "util.h" #include "constants/field_effects.h" #include "constants/event_object_movement_constants.h" +#include "constants/metatile_behaviors.h" #include "constants/rgb.h" #include "constants/songs.h" @@ -68,22 +69,22 @@ static void task00_8084310(u8); static void mapldr_08084390(void); static void c3_080843F8(u8); -static void sub_80B6B94(u8); -static bool8 sub_80B6BCC(struct Task *); -static bool8 sub_80B6C74(struct Task *); -static bool8 sub_80B6C90(struct Task *); -static bool8 sub_80B6D04(struct Task *); -static bool8 sub_80B6DBC(struct Task *); -static bool8 sub_80B6DD8(struct Task *); -static bool8 sub_80B6E18(struct Task *); +static void Task_FallWarpFieldEffect(u8); +static bool8 FallWarpEffect_1(struct Task *); +static bool8 FallWarpEffect_2(struct Task *); +static bool8 FallWarpEffect_3(struct Task *); +static bool8 FallWarpEffect_4(struct Task *); +static bool8 FallWarpEffect_5(struct Task *); +static bool8 FallWarpEffect_6(struct Task *); +static bool8 FallWarpEffect_7(struct Task *); -static void sub_80B6E88(u8); -static bool8 sub_80B6EC0(struct Task *); -static bool8 sub_80B6EE0(struct Task *); -static bool8 sub_80B6F50(struct Task *); -static bool8 sub_80B6F74(struct Task *); -static bool8 sub_80B6F84(struct Task *); -static bool8 sub_80B6FA8(struct Task *); +static void Task_EscalatorWarpFieldEffect(u8); +static bool8 EscalatorWarpEffect_1(struct Task *); +static bool8 EscalatorWarpEffect_2(struct Task *); +static bool8 EscalatorWarpEffect_3(struct Task *); +static bool8 EscalatorWarpEffect_4(struct Task *); +static bool8 EscalatorWarpEffect_5(struct Task *); +static bool8 EscalatorWarpEffect_6(struct Task *); static void sub_80B6FB8(struct Task *); static void sub_80B7004(struct Task *); @@ -112,29 +113,27 @@ static bool8 dive_1_lock(struct Task *); static bool8 dive_2_unknown(struct Task *); static bool8 dive_3_unknown(struct Task *); -static void sub_80B75F0(u8); -static bool8 sub_80B764C(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7684(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B76B8(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7704(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B77F8(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7814(struct Task *, struct EventObject *, struct Sprite *); +static void Task_LavaridgeGymB1FWarp(u8); +static bool8 LavaridgeGymB1FWarpEffect_1(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpEffect_2(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpEffect_3(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpEffect_4(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpEffect_5(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpEffect_6(struct Task *, struct EventObject *, struct Sprite *); -static void mapldr_080851BC(void); -static void sub_80B7890(u8); +static void FieldCB_LavaridgeGymB1FWarpExit(void); +static void Task_LavaridgeGymB1FWarpExit(u8); +static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B78EC(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B791C(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7968(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B79BC(struct Task *, struct EventObject *, struct Sprite *); - -static void sub_80B7A8C(u8); - -static bool8 sub_80B7AE8(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7B18(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7B94(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7BCC(struct Task *, struct EventObject *, struct Sprite *); -static bool8 sub_80B7BF4(struct Task *, struct EventObject *, struct Sprite *); +static void Task_LavaridgeGym1FWarp(u8); +static bool8 LavaridgeGym1FWarpEffect_1(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGym1FWarpEffect_2(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGym1FWarpEffect_3(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGym1FWarpEffect_4(struct Task *, struct EventObject *, struct Sprite *); +static bool8 LavaridgeGym1FWarpEffect_5(struct Task *, struct EventObject *, struct Sprite *); static void DoEscapeRopeFieldEffect(u8); static void EscapeRopeFieldEffect_Step0(struct Task *); @@ -596,25 +595,25 @@ const u8 gUnknown_0855C3BC[] = {16, 12, 8, 0}; const u8 gUnknown_0855C3C0[] = {16, 12, 8, 0}; const u8 gUnknown_0855C3C4[] = { 0, 0, 0, 0}; -bool8 (*const gUnknown_0855C3C8[])(struct Task *) = +bool8 (*const sFallWarpFieldEffectFuncs[])(struct Task *) = { - sub_80B6BCC, - sub_80B6C74, - sub_80B6C90, - sub_80B6D04, - sub_80B6DBC, - sub_80B6DD8, - sub_80B6E18, + FallWarpEffect_1, + FallWarpEffect_2, + FallWarpEffect_3, + FallWarpEffect_4, + FallWarpEffect_5, + FallWarpEffect_6, + FallWarpEffect_7, }; -bool8 (*const gUnknown_0855C3E4[])(struct Task *) = +bool8 (*const sEscalatorWarpFieldEffectFuncs[])(struct Task *) = { - sub_80B6EC0, - sub_80B6EE0, - sub_80B6F50, - sub_80B6F74, - sub_80B6F84, - sub_80B6FA8, + EscalatorWarpEffect_1, + EscalatorWarpEffect_2, + EscalatorWarpEffect_3, + EscalatorWarpEffect_4, + EscalatorWarpEffect_5, + EscalatorWarpEffect_6, }; bool8 (*const gUnknown_0855C3FC[])(struct Task *) = @@ -644,31 +643,31 @@ bool8 (*const gUnknown_0855C42C[])(struct Task *) = dive_3_unknown, }; -bool8 (*const gUnknown_0855C438[])(struct Task *, struct EventObject *, struct Sprite *) = +bool8 (*const sLavaridgeGymB1FWarpEffectFuncs[])(struct Task *, struct EventObject *, struct Sprite *) = { - sub_80B764C, - sub_80B7684, - sub_80B76B8, - sub_80B7704, - sub_80B77F8, - sub_80B7814, + LavaridgeGymB1FWarpEffect_1, + LavaridgeGymB1FWarpEffect_2, + LavaridgeGymB1FWarpEffect_3, + LavaridgeGymB1FWarpEffect_4, + LavaridgeGymB1FWarpEffect_5, + LavaridgeGymB1FWarpEffect_6, }; -bool8 (*const gUnknown_0855C450[])(struct Task *, struct EventObject *, struct Sprite *) = +bool8 (*const sLavaridgeGymB1FWarpExitEffectFuncs[])(struct Task *, struct EventObject *, struct Sprite *) = { - sub_80B78EC, - sub_80B791C, - sub_80B7968, - sub_80B79BC, + LavaridgeGymB1FWarpExitEffect_1, + LavaridgeGymB1FWarpExitEffect_2, + LavaridgeGymB1FWarpExitEffect_3, + LavaridgeGymB1FWarpExitEffect_4, }; -bool8 (*const gUnknown_0855C460[])(struct Task *, struct EventObject *, struct Sprite *) = +bool8 (*const sLavaridgeGym1FWarpEffectFuncs[])(struct Task *, struct EventObject *, struct Sprite *) = { - sub_80B7AE8, - sub_80B7B18, - sub_80B7B94, - sub_80B7BCC, - sub_80B7BF4, + LavaridgeGym1FWarpEffect_1, + LavaridgeGym1FWarpEffect_2, + LavaridgeGym1FWarpEffect_3, + LavaridgeGym1FWarpEffect_4, + LavaridgeGym1FWarpEffect_5, }; void (*const gEscapeRopeFieldEffectFuncs[])(struct Task *) = @@ -1428,7 +1427,7 @@ void ReturnToFieldFromFlyMapSelect(void) static void FieldCallback_Fly(void) { - pal_fill_black(); + FadeInFromBlack(); CreateTask(task00_8084310, 0); ScriptContext2_Enable(); FreezeEventObjects(); @@ -1466,7 +1465,7 @@ static void task00_8084310(u8 taskId) static void mapldr_08084390(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_black(); + FadeInFromBlack(); CreateTask(c3_080843F8, 0); gEventObjects[gPlayerAvatar.eventObjectId].invisible = TRUE; if (gPlayerAvatar.flags & 0x08) @@ -1499,24 +1498,24 @@ static void c3_080843F8(u8 taskId) } } -void sub_80B6B68(void) +void FieldCB_FallWarpExit(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); + WarpFadeInScreen(); ScriptContext2_Enable(); FreezeEventObjects(); - CreateTask(sub_80B6B94, 0); + CreateTask(Task_FallWarpFieldEffect, 0); gFieldCallback = NULL; } -static void sub_80B6B94(u8 taskId) +static void Task_FallWarpFieldEffect(u8 taskId) { struct Task *task; task = &gTasks[taskId]; - while (gUnknown_0855C3C8[task->data[0]](task)); // return code signifies whether to continue blocking here + while (sFallWarpFieldEffectFuncs[task->data[0]](task)); // return code signifies whether to continue blocking here } -static bool8 sub_80B6BCC(struct Task *task) // gUnknown_0855C3C8[0] +static bool8 FallWarpEffect_1(struct Task *task) { struct EventObject *playerObject; struct Sprite *playerSprite; @@ -1534,7 +1533,7 @@ static bool8 sub_80B6BCC(struct Task *task) // gUnknown_0855C3C8[0] return TRUE; } -static bool8 sub_80B6C74(struct Task *task) // gUnknown_0855C3C8[1] +static bool8 FallWarpEffect_2(struct Task *task) { if (IsWeatherNotFadingIn()) { @@ -1543,7 +1542,7 @@ static bool8 sub_80B6C74(struct Task *task) // gUnknown_0855C3C8[1] return FALSE; } -static bool8 sub_80B6C90(struct Task *task) // gUnknown_0855C3C8[2] +static bool8 FallWarpEffect_3(struct Task *task) { struct Sprite *sprite; s16 centerToCornerVecY; @@ -1558,7 +1557,7 @@ static bool8 sub_80B6C90(struct Task *task) // gUnknown_0855C3C8[2] return FALSE; } -static bool8 sub_80B6D04(struct Task *task) +static bool8 FallWarpEffect_4(struct Task *task) { struct EventObject *eventObject; struct Sprite *sprite; @@ -1592,7 +1591,7 @@ static bool8 sub_80B6D04(struct Task *task) return FALSE; } -static bool8 sub_80B6DBC(struct Task *task) +static bool8 FallWarpEffect_5(struct Task *task) { task->data[0]++; task->data[1] = 4; @@ -1601,7 +1600,7 @@ static bool8 sub_80B6DBC(struct Task *task) return TRUE; } -static bool8 sub_80B6DD8(struct Task *task) +static bool8 FallWarpEffect_6(struct Task *task) { SetCameraPanning(0, task->data[1]); task->data[1] = -task->data[1]; @@ -1617,36 +1616,36 @@ static bool8 sub_80B6DD8(struct Task *task) return FALSE; } -static bool8 sub_80B6E18(struct Task *task) +static bool8 FallWarpEffect_7(struct Task *task) { gPlayerAvatar.preventStep = FALSE; ScriptContext2_Disable(); CameraObjectReset1(); UnfreezeEventObjects(); InstallCameraPanAheadCallback(); - DestroyTask(FindTaskIdByFunc(sub_80B6B94)); + DestroyTask(FindTaskIdByFunc(Task_FallWarpFieldEffect)); return FALSE; } -void sub_80B6E4C(u8 a0, u8 priority) +void StartEscalatorWarp(u8 metatileBehavior, u8 priority) { u8 taskId; - taskId = CreateTask(sub_80B6E88, priority); + taskId = CreateTask(Task_EscalatorWarpFieldEffect, priority); gTasks[taskId].data[1] = 0; - if (a0 == 0x6a) + if (metatileBehavior == MB_UP_ESCALATOR) { gTasks[taskId].data[1] = 1; } } -static void sub_80B6E88(u8 taskId) +static void Task_EscalatorWarpFieldEffect(u8 taskId) { struct Task *task; task = &gTasks[taskId]; - while (gUnknown_0855C3E4[task->data[0]](task)); + while (sEscalatorWarpFieldEffectFuncs[task->data[0]](task)); } -static bool8 sub_80B6EC0(struct Task *task) +static bool8 EscalatorWarpEffect_1(struct Task *task) { FreezeEventObjects(); CameraObjectReset2(); @@ -1655,7 +1654,7 @@ static bool8 sub_80B6EC0(struct Task *task) return FALSE; } -static bool8 sub_80B6EE0(struct Task *task) +static bool8 EscalatorWarpEffect_2(struct Task *task) { struct EventObject *eventObject; eventObject = &gEventObjects[gPlayerAvatar.eventObjectId]; @@ -1674,7 +1673,7 @@ static bool8 sub_80B6EE0(struct Task *task) return FALSE; } -static bool8 sub_80B6F50(struct Task *task) +static bool8 EscalatorWarpEffect_3(struct Task *task) { sub_80B6FB8(task); if (task->data[2] > 3) @@ -1685,14 +1684,14 @@ static bool8 sub_80B6F50(struct Task *task) return FALSE; } -static bool8 sub_80B6F74(struct Task *task) +static bool8 EscalatorWarpEffect_4(struct Task *task) { sub_80B6FB8(task); sub_80B7060(); return FALSE; } -static bool8 sub_80B6F84(struct Task *task) +static bool8 EscalatorWarpEffect_5(struct Task *task) { sub_80B7004(task); if (task->data[2] > 3) @@ -1703,7 +1702,7 @@ static bool8 sub_80B6F84(struct Task *task) return FALSE; } -static bool8 sub_80B6FA8(struct Task *task) +static bool8 EscalatorWarpEffect_6(struct Task *task) { sub_80B7004(task); sub_80B7060(); @@ -1739,7 +1738,7 @@ static void sub_80B7004(struct Task *task) static void sub_80B7050(void) { TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); } static void sub_80B7060(void) @@ -1750,14 +1749,14 @@ static void sub_80B7060(void) WarpIntoMap(); gFieldCallback = sub_80B70B4; SetMainCallback2(CB2_LoadMap); - DestroyTask(FindTaskIdByFunc(sub_80B6E88)); + DestroyTask(FindTaskIdByFunc(Task_EscalatorWarpFieldEffect)); } } static void sub_80B70B4(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); + WarpFadeInScreen(); ScriptContext2_Enable(); CreateTask(sub_80B70DC, 0); gFieldCallback = NULL; @@ -1994,17 +1993,17 @@ static bool8 dive_3_unknown(struct Task *task) return FALSE; } -void sub_80B75D8(u8 priority) +void StartLavaridgeGymB1FWarp(u8 priority) { - CreateTask(sub_80B75F0, priority); + CreateTask(Task_LavaridgeGymB1FWarp, priority); } -static void sub_80B75F0(u8 taskId) +static void Task_LavaridgeGymB1FWarp(u8 taskId) { - while (gUnknown_0855C438[gTasks[taskId].data[0]](&gTasks[taskId], &gEventObjects[gPlayerAvatar.eventObjectId], &gSprites[gPlayerAvatar.spriteId])); + while (sLavaridgeGymB1FWarpEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gEventObjects[gPlayerAvatar.eventObjectId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 sub_80B764C(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_1(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { FreezeEventObjects(); CameraObjectReset2(); @@ -2016,7 +2015,7 @@ static bool8 sub_80B764C(struct Task *task, struct EventObject *eventObject, str return TRUE; } -static bool8 sub_80B7684(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_2(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { SetCameraPanning(0, task->data[1]); task->data[1] = -task->data[1]; @@ -2029,7 +2028,7 @@ static bool8 sub_80B7684(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B76B8(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_3(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { sprite->pos2.y = 0; task->data[3] = 1; @@ -2043,7 +2042,7 @@ static bool8 sub_80B76B8(struct Task *task, struct EventObject *eventObject, str return TRUE; } -static bool8 sub_80B7704(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_4(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { s16 centerToCornerVecY; SetCameraPanning(0, task->data[1]); @@ -2086,41 +2085,41 @@ static bool8 sub_80B7704(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B77F8(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_5(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); task->data[0]++; return FALSE; } -static bool8 sub_80B7814(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_6(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { if (!gPaletteFade.active && BGMusicStopped() == TRUE) { WarpIntoMap(); - gFieldCallback = mapldr_080851BC; + gFieldCallback = FieldCB_LavaridgeGymB1FWarpExit; SetMainCallback2(CB2_LoadMap); - DestroyTask(FindTaskIdByFunc(sub_80B75F0)); + DestroyTask(FindTaskIdByFunc(Task_LavaridgeGymB1FWarp)); } return FALSE; } -static void mapldr_080851BC(void) +static void FieldCB_LavaridgeGymB1FWarpExit(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); + WarpFadeInScreen(); ScriptContext2_Enable(); gFieldCallback = NULL; - CreateTask(sub_80B7890, 0); + CreateTask(Task_LavaridgeGymB1FWarpExit, 0); } -static void sub_80B7890(u8 taskId) +static void Task_LavaridgeGymB1FWarpExit(u8 taskId) { - while (gUnknown_0855C450[gTasks[taskId].data[0]](&gTasks[taskId], &gEventObjects[gPlayerAvatar.eventObjectId], &gSprites[gPlayerAvatar.spriteId])); + while (sLavaridgeGymB1FWarpExitEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gEventObjects[gPlayerAvatar.eventObjectId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 sub_80B78EC(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { CameraObjectReset2(); FreezeEventObjects(); @@ -2130,7 +2129,7 @@ static bool8 sub_80B78EC(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B791C(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { if (IsWeatherNotFadingIn()) { @@ -2144,7 +2143,7 @@ static bool8 sub_80B791C(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B7968(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { sprite = &gSprites[task->data[1]]; if (sprite->animCmdIndex > 1) @@ -2158,18 +2157,19 @@ static bool8 sub_80B7968(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B79BC(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { if (EventObjectClearHeldMovementIfFinished(eventObject)) { gPlayerAvatar.preventStep = FALSE; ScriptContext2_Disable(); UnfreezeEventObjects(); - DestroyTask(FindTaskIdByFunc(sub_80B7890)); + DestroyTask(FindTaskIdByFunc(Task_LavaridgeGymB1FWarpExit)); } return FALSE; } +// For the ash puff effect when warping off the B1F ash tiles u8 FldEff_LavaridgeGymWarp(void) { u8 spriteId; @@ -2180,7 +2180,7 @@ u8 FldEff_LavaridgeGymWarp(void) return spriteId; } -void sub_80B7A58(struct Sprite *sprite) +void SpriteCB_LavaridgeGymWarp(struct Sprite *sprite) { if (sprite->animEnded) { @@ -2188,17 +2188,17 @@ void sub_80B7A58(struct Sprite *sprite) } } -void sub_80B7A74(u8 priority) +void StartLavaridgeGym1FWarp(u8 priority) { - CreateTask(sub_80B7A8C, priority); + CreateTask(Task_LavaridgeGym1FWarp, priority); } -static void sub_80B7A8C(u8 taskId) +static void Task_LavaridgeGym1FWarp(u8 taskId) { - while(gUnknown_0855C460[gTasks[taskId].data[0]](&gTasks[taskId], &gEventObjects[gPlayerAvatar.eventObjectId], &gSprites[gPlayerAvatar.spriteId])); + while(sLavaridgeGym1FWarpEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gEventObjects[gPlayerAvatar.eventObjectId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 sub_80B7AE8(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_1(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { FreezeEventObjects(); CameraObjectReset2(); @@ -2208,7 +2208,7 @@ static bool8 sub_80B7AE8(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B7B18(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_2(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { if (EventObjectClearHeldMovementIfFinished(eventObject)) { @@ -2230,7 +2230,7 @@ static bool8 sub_80B7B18(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B7B94(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_3(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { if (gSprites[task->data[1]].animCmdIndex == 2) { @@ -2240,25 +2240,25 @@ static bool8 sub_80B7B94(struct Task *task, struct EventObject *eventObject, str return FALSE; } -static bool8 sub_80B7BCC(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_4(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { if (!FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH)) { TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); task->data[0]++; } return FALSE; } -static bool8 sub_80B7BF4(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_5(struct Task *task, struct EventObject *eventObject, struct Sprite *sprite) { if (!gPaletteFade.active && BGMusicStopped() == TRUE) { WarpIntoMap(); - gFieldCallback = sub_80B6B68; + gFieldCallback = FieldCB_FallWarpExit; SetMainCallback2(CB2_LoadMap); - DestroyTask(FindTaskIdByFunc(sub_80B7A8C)); + DestroyTask(FindTaskIdByFunc(Task_LavaridgeGym1FWarp)); } return FALSE; } @@ -2273,7 +2273,7 @@ u8 FldEff_PopOutOfAsh(void) return spriteId; } -void sub_80B7CAC(struct Sprite *sprite) +void SpriteCB_PopOutOfAsh(struct Sprite *sprite) { if (sprite->animEnded) { @@ -2307,7 +2307,7 @@ static void EscapeRopeFieldEffect_Step1(struct Task *task) if (task->data[14] != 0 && (--task->data[14]) == 0) { TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); } eventObject = &gEventObjects[gPlayerAvatar.eventObjectId]; if (!EventObjectIsMovementOverridden(eventObject) || EventObjectClearHeldMovementIfFinished(eventObject)) @@ -2340,7 +2340,7 @@ void (*const gUnknown_0855C484[])(struct Task *) = { static void mapldr_080859D4(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); + WarpFadeInScreen(); ScriptContext2_Enable(); FreezeEventObjects(); gFieldCallback = NULL; @@ -2460,7 +2460,7 @@ static void TeleportFieldEffectTask3(struct Task *task) { task->data[0]++; TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); } } @@ -2488,7 +2488,7 @@ static void TeleportFieldEffectTask4(struct Task *task) static void mapldr_08085D88(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); + WarpFadeInScreen(); ScriptContext2_Enable(); FreezeEventObjects(); gFieldCallback = NULL; @@ -3268,7 +3268,7 @@ static void sub_80B9474(struct Task *task) { if (sub_80B9508(task->data[1])) { - WarpFadeScreen(); + WarpFadeOutScreen(); task->data[0]++; } } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 20d338e23..3b89c185d 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1396,11 +1396,11 @@ void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender) SetPlayerAvatarStateMask(PLAYER_AVATAR_FLAG_5 | PLAYER_AVATAR_FLAG_ON_FOOT); } -void sub_808C0A8(u8 a) +void SetPlayerInvisibility(bool8 invisible) { - gEventObjects[gPlayerAvatar.eventObjectId].invisible = a; + gEventObjects[gPlayerAvatar.eventObjectId].invisible = invisible; if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) - gSprites[gEventObjects[gPlayerAvatar.eventObjectId].fieldEffectSpriteId].invisible = a; + gSprites[gEventObjects[gPlayerAvatar.eventObjectId].fieldEffectSpriteId].invisible = invisible; } void sub_808C114(void) diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 74bb65b4c..292152b11 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -28,6 +28,7 @@ #include "task.h" #include "text.h" #include "constants/event_object_movement_constants.h" +#include "constants/event_objects.h" #include "constants/songs.h" #include "constants/rgb.h" #include "trainer_hill.h" @@ -38,21 +39,21 @@ extern const u16 gOrbEffectBackgroundLayerFlags[]; // This file's functions. static void sub_8080B9C(u8); -static void task_map_chg_seq_0807E20C(u8); -static void task_map_chg_seq_0807E2CC(u8); +static void Task_ExitNonAnimDoor(u8); +static void Task_ExitNonDoor(u8); static void task0A_fade_n_map_maybe(u8); static void sub_808115C(u8); -static void palette_bg_faded_fill_white(void); -static void sub_80AF438(u8); +static void FillPalBufferWhite(void); +static void Task_ExitDoor(u8); static bool32 WaitForWeatherFadeIn(void); static void task0A_mpl_807E31C(u8 taskId); -static void sub_80AFA0C(u8 taskId); -static void sub_80AFA88(u8 taskId); +static void Task_WarpAndLoadMap(u8 taskId); +static void Task_DoDoorWarp(u8 taskId); static void Task_EnableScriptAfterMusicFade(u8 taskId); // const -const u16 sFlashLevelPixelRadii[] = { 200, 72, 64, 56, 48, 40, 32, 24, 0 }; -const s32 gMaxFlashLevel = 8; +static const u16 sFlashLevelPixelRadii[] = { 200, 72, 64, 56, 48, 40, 32, 24, 0 }; +const s32 gMaxFlashLevel = ARRAY_COUNT(sFlashLevelPixelRadii) - 1; const struct ScanlineEffectParams sFlashEffectParams = { @@ -62,44 +63,44 @@ const struct ScanlineEffectParams sFlashEffectParams = }; // code -static void palette_bg_faded_fill_white(void) +static void FillPalBufferWhite(void) { CpuFastFill16(RGB_WHITE, gPlttBufferFaded, PLTT_SIZE); } -static void palette_bg_faded_fill_black(void) +static void FillPalBufferBlack(void) { CpuFastFill16(RGB_BLACK, gPlttBufferFaded, PLTT_SIZE); } -void pal_fill_for_maplights(void) +void WarpFadeInScreen(void) { u8 previousMapType = GetLastUsedWarpMapType(); switch (GetMapPairFadeFromType(previousMapType, GetCurrentMapType())) { case 0: - palette_bg_faded_fill_black(); + FillPalBufferBlack(); FadeScreen(FADE_FROM_BLACK, 0); break; case 1: - palette_bg_faded_fill_white(); + FillPalBufferWhite(); FadeScreen(FADE_FROM_WHITE, 0); } } -static void sub_80AF08C(void) +void FadeInFromWhite(void) { - palette_bg_faded_fill_white(); + FillPalBufferWhite(); FadeScreen(FADE_FROM_WHITE, 8); } -void pal_fill_black(void) +void FadeInFromBlack(void) { - palette_bg_faded_fill_black(); + FillPalBufferBlack(); FadeScreen(FADE_FROM_BLACK, 0); } -void WarpFadeScreen(void) +void WarpFadeOutScreen(void) { u8 currentMapType = GetCurrentMapType(); switch (GetMapPairFadeToType(currentMapType, GetDestinationWarpMapHeader()->mapType)) @@ -112,26 +113,26 @@ void WarpFadeScreen(void) } } -static void sub_80AF0F4(u8 arg) +static void SetPlayerVisibility(bool8 visible) { - sub_808C0A8(!arg); + SetPlayerInvisibility(!visible); } -static void task0A_nop_for_a_while(u8 taskId) +static void Task_WaitForUnionRoomFade(u8 taskId) { if (WaitForWeatherFadeIn() == TRUE) DestroyTask(taskId); } -void sub_80AF128(void) +void FieldCB_ContinueScriptUnionRoom(void) { ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); - pal_fill_black(); - CreateTask(task0A_nop_for_a_while, 10); + FadeInFromBlack(); + CreateTask(Task_WaitForUnionRoomFade, 10); } -static void task0A_asap_script_env_2_enable_and_set_ctx_running(u8 taskID) +static void Task_WaitForFadeAndEnableScriptCtx(u8 taskID) { if (WaitForWeatherFadeIn() == TRUE) { @@ -140,22 +141,22 @@ static void task0A_asap_script_env_2_enable_and_set_ctx_running(u8 taskID) } } -void FieldCallback_ReturnToEventScript2(void) +void FieldCB_ContinueScriptHandleMusic(void) { ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); - pal_fill_black(); - CreateTask(task0A_asap_script_env_2_enable_and_set_ctx_running, 10); + FadeInFromBlack(); + CreateTask(Task_WaitForFadeAndEnableScriptCtx, 10); } -void sub_80AF188(void) +void FieldCB_ContinueScript(void) { ScriptContext2_Enable(); - pal_fill_black(); - CreateTask(task0A_asap_script_env_2_enable_and_set_ctx_running, 10); + FadeInFromBlack(); + CreateTask(Task_WaitForFadeAndEnableScriptCtx, 10); } -static void task_mpl_807DD60(u8 taskId) +static void Task_ReturnToFieldCableLink(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -168,7 +169,7 @@ static void task_mpl_807DD60(u8 taskId) case 1: if (gTasks[task->data[1]].isActive != TRUE) { - pal_fill_for_maplights(); + WarpFadeInScreen(); task->data[0]++; } break; @@ -182,15 +183,15 @@ static void task_mpl_807DD60(u8 taskId) } } -void sub_80AF214(void) +void FieldCB_ReturnToFieldCableLink(void) { ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); - palette_bg_faded_fill_black(); - CreateTask(task_mpl_807DD60, 10); + FillPalBufferBlack(); + CreateTask(Task_ReturnToFieldCableLink, 10); } -static void sub_80AF234(u8 taskId) +static void Task_ReturnToFieldWirelessLink(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -208,7 +209,7 @@ static void sub_80AF234(u8 taskId) } else { - pal_fill_for_maplights(); + WarpFadeInScreen(); task->data[0]++; } break; @@ -223,7 +224,7 @@ static void sub_80AF234(u8 taskId) } } -void sub_80AF2B4(u8 taskId) +void Task_ReturnToFieldRecordMixing(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -248,15 +249,15 @@ void sub_80AF2B4(u8 taskId) } } -void sub_80AF314(void) +void FieldCB_ReturnToFieldWirelessLink(void) { ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); - palette_bg_faded_fill_black(); - CreateTask(sub_80AF234, 10); + FillPalBufferBlack(); + CreateTask(Task_ReturnToFieldWirelessLink, 10); } -static void sub_80AF334(void) +static void SetUpWarpExitTask(void) { s16 x, y; u8 behavior; @@ -265,59 +266,59 @@ static void sub_80AF334(void) PlayerGetDestCoords(&x, &y); behavior = MapGridGetMetatileBehaviorAt(x, y); if (MetatileBehavior_IsDoor(behavior) == TRUE) - func = sub_80AF438; + func = Task_ExitDoor; else if (MetatileBehavior_IsNonAnimDoor(behavior) == TRUE) - func = task_map_chg_seq_0807E20C; + func = Task_ExitNonAnimDoor; else - func = task_map_chg_seq_0807E2CC; + func = Task_ExitNonDoor; CreateTask(func, 10); } -void mapldr_default(void) +void FieldCB_DefaultWarpExit(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); - sub_80AF334(); + WarpFadeInScreen(); + SetUpWarpExitTask(); ScriptContext2_Enable(); } -void sub_80AF3B0(void) +void FieldCB_WarpExitFadeFromWhite(void) { Overworld_PlaySpecialMapMusic(); - sub_80AF08C(); - sub_80AF334(); + FadeInFromWhite(); + SetUpWarpExitTask(); ScriptContext2_Enable(); } -void sub_80AF3C8(void) +void FieldCB_WarpExitFadeFromBlack(void) { - if (!sub_81D6534()) + if (!sub_81D6534()) // sub_81D6534 always returns false Overworld_PlaySpecialMapMusic(); - pal_fill_black(); - sub_80AF334(); + FadeInFromBlack(); + SetUpWarpExitTask(); ScriptContext2_Enable(); } -void sub_80AF3E8(void) +static void FieldCB_TeleportWarpExit(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); + WarpFadeInScreen(); PlaySE(SE_TK_WARPOUT); CreateTask(task0A_mpl_807E31C, 10); ScriptContext2_Enable(); } -void sub_80AF40C(void) +static void FieldCB_MossdeepGymWarpExit(void) { Overworld_PlaySpecialMapMusic(); - pal_fill_for_maplights(); + WarpFadeInScreen(); PlaySE(SE_TK_WARPOUT); - CreateTask(task_map_chg_seq_0807E2CC, 10); + CreateTask(Task_ExitNonDoor, 10); ScriptContext2_Enable(); sub_8085540(0xE); } -static void sub_80AF438(u8 taskId) +static void Task_ExitDoor(u8 taskId) { struct Task *task = &gTasks[taskId]; s16 *x = &task->data[2]; @@ -326,7 +327,7 @@ static void sub_80AF438(u8 taskId) switch (task->data[0]) { case 0: - sub_80AF0F4(0); + SetPlayerVisibility(FALSE); FreezeEventObjects(); PlayerGetDestCoords(x, y); FieldSetDoorOpened(*x, *y); @@ -336,18 +337,18 @@ static void sub_80AF438(u8 taskId) if (WaitForWeatherFadeIn()) { u8 eventObjId; - sub_80AF0F4(1); - eventObjId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0); + SetPlayerVisibility(TRUE); + eventObjId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0); EventObjectSetHeldMovement(&gEventObjects[eventObjId], MOVEMENT_ACTION_WALK_NORMAL_DOWN); task->data[0] = 2; } break; case 2: - if (walkrun_is_standing_still()) + if (IsPlayerStandingStill()) { u8 eventObjId; task->data[1] = FieldAnimateDoorClose(*x, *y); - eventObjId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0); + eventObjId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0); EventObjectClearHeldMovementIfFinished(&gEventObjects[eventObjId]); task->data[0] = 3; } @@ -366,7 +367,7 @@ static void sub_80AF438(u8 taskId) } } -static void task_map_chg_seq_0807E20C(u8 taskId) +static void Task_ExitNonAnimDoor(u8 taskId) { struct Task *task = &gTasks[taskId]; s16 *x = &task->data[2]; @@ -375,7 +376,7 @@ static void task_map_chg_seq_0807E20C(u8 taskId) switch (task->data[0]) { case 0: - sub_80AF0F4(0); + SetPlayerVisibility(FALSE); FreezeEventObjects(); PlayerGetDestCoords(x, y); task->data[0] = 1; @@ -384,14 +385,14 @@ static void task_map_chg_seq_0807E20C(u8 taskId) if (WaitForWeatherFadeIn()) { u8 eventObjId; - sub_80AF0F4(1); - eventObjId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0); + SetPlayerVisibility(TRUE); + eventObjId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0); EventObjectSetHeldMovement(&gEventObjects[eventObjId], GetWalkNormalMovementAction(GetPlayerFacingDirection())); task->data[0] = 2; } break; case 2: - if (walkrun_is_standing_still()) + if (IsPlayerStandingStill()) { UnfreezeEventObjects(); task->data[0] = 3; @@ -404,7 +405,7 @@ static void task_map_chg_seq_0807E20C(u8 taskId) } } -static void task_map_chg_seq_0807E2CC(u8 taskId) +static void Task_ExitNonDoor(u8 taskId) { switch (gTasks[taskId].data[0]) { @@ -424,7 +425,7 @@ static void task_map_chg_seq_0807E2CC(u8 taskId) } } -static void sub_80AF660(u8 taskId) +static void Task_WaitForFadeShowStartMenu(u8 taskId) { if (WaitForWeatherFadeIn() == TRUE) { @@ -433,16 +434,16 @@ static void sub_80AF660(u8 taskId) } } -void sub_80AF688(void) +void ReturnToFieldOpenStartMenu(void) { - pal_fill_black(); - CreateTask(sub_80AF660, 0x50); + FadeInFromBlack(); + CreateTask(Task_WaitForFadeShowStartMenu, 0x50); ScriptContext2_Enable(); } -bool8 sub_80AF6A4(void) +bool8 FieldCB_ReturnToFieldOpenStartMenu(void) { - sub_809FA18(); + ShowReturnToFieldStartMenu(); return FALSE; } @@ -459,7 +460,7 @@ static void task_mpl_807E3C8(u8 taskId) void sub_80AF6D4(void) { ScriptContext2_Enable(); - pal_fill_black(); + FadeInFromBlack(); CreateTask(task_mpl_807E3C8, 10); } @@ -467,7 +468,7 @@ void sub_80AF6F0(void) { ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); - pal_fill_black(); + FadeInFromBlack(); CreateTask(task_mpl_807E3C8, 10); } @@ -488,72 +489,72 @@ void DoWarp(void) { ScriptContext2_Enable(); TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); PlayRainStoppingSoundEffect(); PlaySE(SE_KAIDAN); - gFieldCallback = mapldr_default; - CreateTask(sub_80AFA0C, 10); + gFieldCallback = FieldCB_DefaultWarpExit; + CreateTask(Task_WarpAndLoadMap, 10); } void DoDiveWarp(void) { ScriptContext2_Enable(); TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); PlayRainStoppingSoundEffect(); - gFieldCallback = mapldr_default; - CreateTask(sub_80AFA0C, 10); + gFieldCallback = FieldCB_DefaultWarpExit; + CreateTask(Task_WarpAndLoadMap, 10); } -void sub_80AF79C(void) +void DoSootopolisLegendWarp(void) { ScriptContext2_Enable(); TryFadeOutOldMapMusic(); FadeScreen(FADE_TO_WHITE, 8); PlayRainStoppingSoundEffect(); - gFieldCallback = sub_80AF3B0; - CreateTask(sub_80AFA0C, 10); + gFieldCallback = FieldCB_WarpExitFadeFromWhite; + CreateTask(Task_WarpAndLoadMap, 10); } void DoDoorWarp(void) { ScriptContext2_Enable(); - gFieldCallback = mapldr_default; - CreateTask(sub_80AFA88, 10); + gFieldCallback = FieldCB_DefaultWarpExit; + CreateTask(Task_DoDoorWarp, 10); } void DoFallWarp(void) { DoDiveWarp(); - gFieldCallback = sub_80B6B68; + gFieldCallback = FieldCB_FallWarpExit; } -void sub_80AF80C(u8 metatileBehavior) +void DoEscalatorWarp(u8 metatileBehavior) { ScriptContext2_Enable(); - sub_80B6E4C(metatileBehavior, 10); + StartEscalatorWarp(metatileBehavior, 10); } -void sub_80AF828(void) +void DoLavaridgeGymB1FWarp(void) { ScriptContext2_Enable(); - sub_80B75D8(10); + StartLavaridgeGymB1FWarp(10); } -void sub_80AF838(void) +void DoLavaridgeGym1FWarp(void) { ScriptContext2_Enable(); - sub_80B7A74(10); + StartLavaridgeGym1FWarp(10); } -void sub_80AF848(void) +void DoTeleportWarp(void) { ScriptContext2_Enable(); TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); PlaySE(SE_TK_WARPIN); - CreateTask(sub_80AFA0C, 10); - gFieldCallback = sub_80AF3E8; + CreateTask(Task_WarpAndLoadMap, 10); + gFieldCallback = FieldCB_TeleportWarpExit; } void DoMossdeepGymWarp(void) @@ -562,18 +563,18 @@ void DoMossdeepGymWarp(void) ScriptContext2_Enable(); SaveEventObjects(); TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); PlaySE(SE_TK_WARPIN); - CreateTask(sub_80AFA0C, 10); - gFieldCallback = sub_80AF40C; + CreateTask(Task_WarpAndLoadMap, 10); + gFieldCallback = FieldCB_MossdeepGymWarpExit; } -void sub_80AF8B8(void) +void DoPortholeWarp(void) { ScriptContext2_Enable(); - WarpFadeScreen(); - CreateTask(sub_80AFA0C, 10); - gFieldCallback = sub_80FB768; + WarpFadeOutScreen(); + CreateTask(Task_WarpAndLoadMap, 10); + gFieldCallback = FieldCB_ShowPortholeView; } static void sub_80AF8E0(u8 taskId) @@ -592,17 +593,17 @@ static void sub_80AF8E0(u8 taskId) break; case 2: WarpIntoMap(); - SetMainCallback2(sub_8086074); + SetMainCallback2(CB2_ReturnToFieldCableClub); DestroyTask(taskId); break; } } -void sub_80AF948(void) +void DoCableClubWarp(void) { ScriptContext2_Enable(); TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); PlaySE(SE_KAIDAN); CreateTask(sub_80AF8E0, 10); } @@ -643,7 +644,7 @@ void ReturnFromLinkRoom(void) CreateTask(Task_ReturnToWorldFromLinkRoom, 10); } -static void sub_80AFA0C(u8 taskId) +static void Task_WarpAndLoadMap(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -674,7 +675,7 @@ static void sub_80AFA0C(u8 taskId) } } -static void sub_80AFA88(u8 taskId) +static void Task_DoDoorWarp(u8 taskId) { struct Task *task = &gTasks[taskId]; s16 *x = &task->data[2]; @@ -693,21 +694,21 @@ static void sub_80AFA88(u8 taskId) if (task->data[1] < 0 || gTasks[task->data[1]].isActive != TRUE) { u8 eventObjId; - eventObjId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0); + eventObjId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0); EventObjectClearHeldMovementIfActive(&gEventObjects[eventObjId]); - eventObjId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0); + eventObjId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0); EventObjectSetHeldMovement(&gEventObjects[eventObjId], MOVEMENT_ACTION_WALK_NORMAL_UP); task->data[0] = 2; } break; case 2: - if (walkrun_is_standing_still()) + if (IsPlayerStandingStill()) { u8 eventObjId; task->data[1] = FieldAnimateDoorClose(*x, *y - 1); - eventObjId = GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0); + eventObjId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0); EventObjectClearHeldMovementIfFinished(&gEventObjects[eventObjId]); - sub_80AF0F4(0); + SetPlayerVisibility(FALSE); task->data[0] = 3; } break; @@ -719,10 +720,10 @@ static void sub_80AFA88(u8 taskId) break; case 4: TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); PlayRainStoppingSoundEffect(); task->data[0] = 0; - task->func = sub_80AFA0C; + task->func = Task_WarpAndLoadMap; break; } } @@ -756,10 +757,10 @@ void DoContestHallWarp(void) { ScriptContext2_Enable(); TryFadeOutOldMapMusic(); - WarpFadeScreen(); + WarpFadeOutScreen(); PlayRainStoppingSoundEffect(); PlaySE(SE_KAIDAN); - gFieldCallback = sub_80AF3C8; + gFieldCallback = FieldCB_WarpExitFadeFromBlack; CreateTask(task0A_fade_n_map_maybe, 10); } @@ -1033,7 +1034,7 @@ static void sub_80B01BC(u8 taskId) case 1: if (!sub_808D1E8()) { - WarpFadeScreen(); + WarpFadeOutScreen(); task->data[0]++; } break; @@ -1052,14 +1053,14 @@ static void sub_80B01BC(u8 taskId) void sub_80B0244(void) { ScriptContext2_Enable(); - CreateTask(sub_80AFA0C, 10); - gFieldCallback = sub_80AF3E8; + CreateTask(Task_WarpAndLoadMap, 10); + gFieldCallback = FieldCB_TeleportWarpExit; } void sub_80B0268(void) { ScriptContext2_Enable(); - gFieldCallback = mapldr_default; + gFieldCallback = FieldCB_DefaultWarpExit; CreateTask(sub_80B01BC, 10); } diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 439b1855a..267198f79 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -179,7 +179,7 @@ void Task_HandleTruckSequence(u8 taskId) data[1]++; if (data[1] == SECONDS(2.5)) { - pal_fill_black(); + FadeInFromBlack(); data[1] = 0; data[0] = 2; } @@ -249,12 +249,12 @@ void EndTruckSequence(u8 taskId) } } -bool8 sub_80FB59C(void) +bool8 TrySetPortholeWarpDestination(void) { s8 mapGroup, mapNum; s16 x, y; - if (GetSSTidalLocation(&mapGroup, &mapNum, &x, &y)) + if (GetSSTidalLocation(&mapGroup, &mapNum, &x, &y) != SS_TIDAL_LOCATION_CURRENTS) { return FALSE; } @@ -336,11 +336,11 @@ static void ShowSSTidalWhileSailing(void) StartSpriteAnim(&gSprites[spriteId], GetFaceDirectionAnimNum(DIR_WEST)); } -void sub_80FB768(void) +void FieldCB_ShowPortholeView(void) { ShowSSTidalWhileSailing(); gEventObjects[gPlayerAvatar.eventObjectId].invisible = TRUE; - pal_fill_black(); + FadeInFromBlack(); CreateTask(Task_HandlePorthole, 80); ScriptContext2_Enable(); } @@ -351,6 +351,6 @@ void LookThroughPorthole(void) FlagSet(FLAG_DONT_TRANSITION_MUSIC); FlagSet(FLAG_HIDE_MAP_NAME_POPUP); SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); - sub_80FB59C(); - sub_80AF8B8(); + TrySetPortholeWarpDestination(); + DoPortholeWarp(); } diff --git a/src/field_specials.c b/src/field_specials.c index bffb9f591..697012c30 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -366,7 +366,7 @@ u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y) } *mapGroup = MAP_GROUP(ROUTE132); *y = 20; - return SS_TIDAL_LOCATION_OTHER; + return SS_TIDAL_LOCATION_CURRENTS; } bool32 ShouldDoWallyCall(void) diff --git a/src/item_use.c b/src/item_use.c index 0b7625054..9d31cabe3 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -138,7 +138,7 @@ void SetUpItemUseOnFieldCallback(u8 taskId) void MapPostLoadHook_UseItem(void) { - pal_fill_black(); + FadeInFromBlack(); CreateTask(Task_CallItemUseOnFieldCallback, 8); } diff --git a/src/move_relearner.c b/src/move_relearner.c index 6d9b5865b..e88008689 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -376,7 +376,7 @@ static void Task_WaitForFadeOut(u8 taskId) if (!gPaletteFade.active) { SetMainCallback2(CB2_InitLearnMove); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; DestroyTask(taskId); } } diff --git a/src/overworld.c b/src/overworld.c index e837ed902..3d7f71f78 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -1526,7 +1526,7 @@ static bool8 map_post_load_hook_exec(void) if (gFieldCallback) gFieldCallback(); else - mapldr_default(); + FieldCB_DefaultWarpExit(); gFieldCallback = NULL; } @@ -1565,7 +1565,7 @@ void CB2_WhiteOut(void) ResetInitialPlayerAvatarState(); ScriptContext1_Init(); ScriptContext2_Disable(); - gFieldCallback = sub_80AF3C8; + gFieldCallback = FieldCB_WarpExitFadeFromBlack; val = 0; do_load_map_stuff_loop(&val); SetFieldVBlankCallback(); @@ -1609,10 +1609,10 @@ void sub_8086024(void) } } -void sub_8086074(void) +void CB2_ReturnToFieldCableClub(void) { FieldClearVBlankHBlankCallbacks(); - gFieldCallback = sub_80AF314; + gFieldCallback = FieldCB_ReturnToFieldWirelessLink; SetMainCallback2(c2_80567AC); } @@ -1663,9 +1663,9 @@ void CB2_ReturnToFieldFromMultiplayer(void) ResetAllMultiplayerState(); if (gWirelessCommType != 0) - gFieldCallback = sub_80AF314; + gFieldCallback = FieldCB_ReturnToFieldWirelessLink; else - gFieldCallback = sub_80AF214; + gFieldCallback = FieldCB_ReturnToFieldCableLink; ScriptContext1_Init(); ScriptContext2_Disable(); @@ -1675,28 +1675,28 @@ void CB2_ReturnToFieldFromMultiplayer(void) void CB2_ReturnToFieldWithOpenMenu(void) { FieldClearVBlankHBlankCallbacks(); - gFieldCallback2 = sub_80AF6A4; + gFieldCallback2 = FieldCB_ReturnToFieldOpenStartMenu; CB2_ReturnToField(); } void CB2_ReturnToFieldContinueScript(void) { FieldClearVBlankHBlankCallbacks(); - gFieldCallback = sub_80AF188; + gFieldCallback = FieldCB_ContinueScript; CB2_ReturnToField(); } void CB2_ReturnToFieldContinueScriptPlayMapMusic(void) { FieldClearVBlankHBlankCallbacks(); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; CB2_ReturnToField(); } void sub_80861E8(void) { FieldClearVBlankHBlankCallbacks(); - gFieldCallback = sub_80AF3C8; + gFieldCallback = FieldCB_WarpExitFadeFromBlack; CB2_ReturnToField(); } @@ -1704,7 +1704,7 @@ static void sub_8086204(void) { if ((gMapHeader.flags & 0xF8) == 8 && SecretBaseMapPopupEnabled() == TRUE) ShowMapNamePopup(); - sub_80AF3C8(); + FieldCB_WarpExitFadeFromBlack(); } void CB2_ContinueSavedGame(void) diff --git a/src/party_menu.c b/src/party_menu.c index e8a019d66..367e84295 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -3745,7 +3745,7 @@ static void Task_HandleFieldMoveExitAreaYesNoInput(u8 taskId) bool8 FieldCallback_PrepareFadeInFromMenu(void) { - pal_fill_black(); + FadeInFromBlack(); CreateTask(Task_FieldMoveWaitForFade, 8); return TRUE; } @@ -6143,7 +6143,7 @@ static void BufferMonSelection(void) bool8 CB2_FadeFromPartyMenu(void) { - pal_fill_black(); + FadeInFromBlack(); CreateTask(Task_PartyMenuWaitForFade, 10); return TRUE; } @@ -6268,7 +6268,7 @@ static void Task_BattlePyramidChooseMonHeldItems(u8 taskId) void MoveDeleterChooseMoveToForget(void) { ShowPokemonSummaryScreen(PSS_MODE_SELECT_MOVE, gPlayerParty, gSpecialVar_0x8004, gPlayerPartyCount - 1, CB2_ReturnToField); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; } void GetNumMovesSelectedMonHas(void) diff --git a/src/player_pc.c b/src/player_pc.c index 94484ab72..4140b02e5 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -508,7 +508,7 @@ void Mailbox_DoRedrawMailboxMenuAfterReturn(void) sub_81973A4(); DrawDialogueFrame(0, 1); InitItemStorageMenu(CreateTask(ItemStorage_HandleReturnToProcessInput, 0), 1); - pal_fill_black(); + FadeInFromBlack(); } static void ItemStorage_HandleReturnToProcessInput(u8 taskId) @@ -745,7 +745,7 @@ static void pal_fill_for_maplights_or_black(void) Mailbox_DrawMailboxMenu(taskId); else DestroyTask(taskId); - pal_fill_black(); + FadeInFromBlack(); } static void Mailbox_HandleReturnToProcessInput(u8 taskId) @@ -852,7 +852,7 @@ static void Mailbox_UpdateMailListAfterDeposit(void) Mailbox_DrawMailboxMenu(taskId); else DestroyTask(taskId); - pal_fill_black(); + FadeInFromBlack(); } static void Mailbox_NoPokemonForMail(u8 taskId) diff --git a/src/pokeblock.c b/src/pokeblock.c index 03d5f4da4..342221880 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -960,7 +960,7 @@ static void Task_FreeDataAndExitPokeblockCase(u8 taskId) if (!gPaletteFade.active) { if (sPokeblockMenu->caseId == PBLOCK_CASE_FEEDER || sPokeblockMenu->caseId == PBLOCK_CASE_GIVE) - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; DestroyListMenuTask(data[0], &sSavedPokeblockData.lastItemPage, &sSavedPokeblockData.lastItemPos); sub_8136418(); diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index fae152bb2..e3d2255ab 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1855,7 +1855,7 @@ static void FieldCb_ReturnToPcMenu(void) gTasks[taskId].data[1] = sPreviousBoxOption; Task_PokemonStorageSystemPC(taskId); SetVBlankCallback(vblankCb); - pal_fill_black(); + FadeInFromBlack(); } static void CreatePCMenu(u8 whichMenu, s16 *windowIdPtr) diff --git a/src/record_mixing.c b/src/record_mixing.c index 00b2cb076..f290c8554 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -369,7 +369,7 @@ static void Task_RecordMixing_Main(u8 taskId) sub_808729C(); if (gWirelessCommType != 0) { - CreateTask(sub_80AF2B4, 10); + CreateTask(Task_ReturnToFieldRecordMixing, 10); } ClearDialogWindowAndFrame(0, 1); DestroyTask(taskId); diff --git a/src/region_map.c b/src/region_map.c index b1ba2795c..75ce60056 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1158,7 +1158,7 @@ static void RegionMap_InitializeStateBasedOnSSTidalLocation(void) gRegionMap->mapSecId = MAPSEC_ROUTE_131; break; default: - case SS_TIDAL_LOCATION_OTHER: + case SS_TIDAL_LOCATION_CURRENTS: mapHeader = Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum); gRegionMap->mapSecId = mapHeader->regionMapSectionId; diff --git a/src/roulette.c b/src/roulette.c index fb0677cbf..e38da31d0 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1727,7 +1727,7 @@ static void sub_8141E7C(u8 taskId) // end roulette ? ResetPaletteFade(); ResetSpriteData(); sub_8140418(); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; SetMainCallback2(CB2_ReturnToField); DestroyTask(taskId); } diff --git a/src/scrcmd.c b/src/scrcmd.c index a9be5c3ef..17d388bc0 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -809,7 +809,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext *ctx) u16 y = VarGet(ScriptReadHalfword(ctx)); SetWarpDestination(mapGroup, mapNum, warpId, x, y); - sub_80AF848(); + DoTeleportWarp(); ResetInitialPlayerAvatarState(); return TRUE; } @@ -2285,7 +2285,7 @@ void SetMovingNpcId(u16 npcId) sMovingNpcId = npcId; } -bool8 ScrCmd_warpE0(struct ScriptContext *ctx) +bool8 ScrCmd_warpsootopolislegend(struct ScriptContext *ctx) { u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); @@ -2294,7 +2294,7 @@ bool8 ScrCmd_warpE0(struct ScriptContext *ctx) u16 y = VarGet(ScriptReadHalfword(ctx)); SetWarpDestination(mapGroup, mapNum, warpId, x, y); - sub_80AF79C(); + DoSootopolisLegendWarp(); ResetInitialPlayerAvatarState(); return TRUE; } diff --git a/src/secret_base.c b/src/secret_base.c index b9826a257..4c929181a 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -413,7 +413,7 @@ static void Task_EnterSecretBase(u8 taskId) SetSecretBaseWarpDestination(); WarpIntoMap(); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; SetMainCallback2(CB2_LoadMap); DestroyTask(taskId); break; @@ -456,7 +456,7 @@ static void EnterNewlyCreatedSecretBase_StartFadeIn(void) y += 7; MapGridSetMetatileIdAt(x, y, 0x220 | METATILE_COLLISION_MASK); CurrentMapDrawMetatileAt(x, y); - pal_fill_black(); + FadeInFromBlack(); CreateTask(EnterNewlyCreatedSecretBase_WaitFadeIn, 0); } @@ -678,7 +678,7 @@ static void Task_WarpOutOfSecretBase(u8 taskId) case 2: SetWarpDestinationToDynamicWarp(0x7e); WarpIntoMap(); - gFieldCallback = mapldr_default; + gFieldCallback = FieldCB_DefaultWarpExit; SetMainCallback2(CB2_LoadMap); ScriptContext2_Disable(); DestroyTask(taskId); diff --git a/src/shop.c b/src/shop.c index 324154d2e..4e0b3640b 100755 --- a/src/shop.c +++ b/src/shop.c @@ -390,7 +390,7 @@ static void Task_GoToBuyOrSellMenu(u8 taskId) static void MapPostLoadHook_ReturnToShopMenu(void) { - pal_fill_black(); + FadeInFromBlack(); CreateTask(Task_ReturnToShopMenu, 8); } diff --git a/src/start_menu.c b/src/start_menu.c index d0e28cf02..da96e1ffd 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -83,7 +83,7 @@ EWRAM_DATA static u8 sBattlePyramidFloorWindowId = 0; EWRAM_DATA static u8 sStartMenuCursorPos = 0; EWRAM_DATA static u8 sNumStartMenuActions = 0; EWRAM_DATA static u8 sCurrentStartMenuActions[9] = {0}; -EWRAM_DATA static u8 sUnknown_02037619[2] = {0}; +EWRAM_DATA static u8 sInitStartMenuData[2] = {0}; EWRAM_DATA static u8 (*sSaveDialogCallback)(void) = NULL; EWRAM_DATA static u8 sSaveDialogTimer = 0; @@ -135,9 +135,7 @@ static void StartMenuTask(u8 taskId); static void SaveGameTask(u8 taskId); static void sub_80A0550(u8 taskId); static void sub_80A08A4(u8 taskId); - -// Some other callback -static bool8 sub_809FA00(void); +static bool8 FieldCB_ReturnToFieldStartMenu(void); static const struct WindowTemplate sSafariBallsWindowTemplate = {0, 1, 1, 9, 4, 0xF, 8}; @@ -440,33 +438,33 @@ static bool32 PrintStartMenuActions(s8 *pIndex, u32 count) static bool32 InitStartMenuStep(void) { - s8 value = sUnknown_02037619[0]; + s8 state = sInitStartMenuData[0]; - switch (value) + switch (state) { case 0: - sUnknown_02037619[0]++; + sInitStartMenuData[0]++; break; case 1: BuildStartMenuActions(); - sUnknown_02037619[0]++; + sInitStartMenuData[0]++; break; case 2: sub_81973A4(); DrawStdWindowFrame(sub_81979C4(sNumStartMenuActions), FALSE); - sUnknown_02037619[1] = 0; - sUnknown_02037619[0]++; + sInitStartMenuData[1] = 0; + sInitStartMenuData[0]++; break; case 3: if (GetSafariZoneFlag()) ShowSafariBallsWindow(); if (InBattlePyramid()) ShowPyramidFloorWindow(); - sUnknown_02037619[0]++; + sInitStartMenuData[0]++; break; case 4: - if (PrintStartMenuActions(&sUnknown_02037619[1], 2)) - sUnknown_02037619[0]++; + if (PrintStartMenuActions(&sInitStartMenuData[1], 2)) + sInitStartMenuData[0]++; break; case 5: sStartMenuCursorPos = sub_81983AC(GetStartMenuWindowId(), 1, 0, 9, 16, sNumStartMenuActions, sStartMenuCursorPos); @@ -479,8 +477,8 @@ static bool32 InitStartMenuStep(void) static void InitStartMenu(void) { - sUnknown_02037619[0] = 0; - sUnknown_02037619[1] = 0; + sInitStartMenuData[0] = 0; + sInitStartMenuData[1] = 0; while (!InitStartMenuStep()) ; } @@ -495,28 +493,28 @@ static void CreateStartMenuTask(TaskFunc followupFunc) { u8 taskId; - sUnknown_02037619[0] = 0; - sUnknown_02037619[1] = 0; + sInitStartMenuData[0] = 0; + sInitStartMenuData[1] = 0; taskId = CreateTask(StartMenuTask, 0x50); SetTaskFuncWithFollowupFunc(taskId, StartMenuTask, followupFunc); } -static bool8 sub_809FA00(void) +static bool8 FieldCB_ReturnToFieldStartMenu(void) { if (InitStartMenuStep() == FALSE) { return FALSE; } - sub_80AF688(); + ReturnToFieldOpenStartMenu(); return TRUE; } -void sub_809FA18(void) +void ShowReturnToFieldStartMenu(void) { - sUnknown_02037619[0] = 0; - sUnknown_02037619[1] = 0; - gFieldCallback2 = sub_809FA00; + sInitStartMenuData[0] = 0; + sInitStartMenuData[1] = 0; + gFieldCallback2 = FieldCB_ReturnToFieldStartMenu; } void Task_ShowStartMenu(u8 taskId) diff --git a/src/trade.c b/src/trade.c index 91b514067..1160c194f 100644 --- a/src/trade.c +++ b/src/trade.c @@ -4942,7 +4942,7 @@ static void Task_InGameTrade(u8 taskId) if (!gPaletteFade.active) { SetMainCallback2(CB2_InGameTrade); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; DestroyTask(taskId); } } diff --git a/src/union_room.c b/src/union_room.c index ba973a7d9..b0f579086 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1424,7 +1424,7 @@ void sub_8014384(void) break; case 1: if (!FuncIsActiveTask(sub_80140E0)) - SetMainCallback2(sub_8086074); + SetMainCallback2(CB2_ReturnToFieldCableClub); break; } @@ -2880,7 +2880,7 @@ void sub_80156E0(u8 taskId) if (!gPaletteFade.active) { sUnionRoomTrade.field_0 = 1; - gFieldCallback = sub_80AF128; + gFieldCallback = FieldCB_ContinueScriptUnionRoom; ChooseMonForTradingBoard(PARTY_MENU_TYPE_UNION_ROOM_REGISTER, CB2_ReturnToField); } break; @@ -2992,7 +2992,7 @@ void sub_80156E0(u8 taskId) memcpy(&gUnknown_02022C38, &data->field_0->arr[taskData[1]].unk.field_0.unk_00, sizeof(gUnknown_02022C38)); gUnionRoomRequestedMonType = data->field_0->arr[taskData[1]].unk.field_0.type; gUnionRoomOfferedSpecies = data->field_0->arr[taskData[1]].unk.field_0.species; - gFieldCallback = sub_80AF128; + gFieldCallback = FieldCB_ContinueScriptUnionRoom; ChooseMonForTradingBoard(PARTY_MENU_TYPE_UNION_ROOM_TRADE, CB2_ReturnToField); sub_80156B0(data); sUnionRoomTrade.field_8 = taskData[1]; diff --git a/src/walda_phrase.c b/src/walda_phrase.c index e8c1e4aed..4b617e3b8 100644 --- a/src/walda_phrase.c +++ b/src/walda_phrase.c @@ -70,7 +70,7 @@ static void CB2_HandleGivenWaldaPhrase(void) } StringCopy(gStringVar1, GetWaldaPhrasePtr()); - gFieldCallback = FieldCallback_ReturnToEventScript2; + gFieldCallback = FieldCB_ContinueScriptHandleMusic; SetMainCallback2(CB2_ReturnToField); } From 67690df65f8e85f590a146d5ec237d849690bb46 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Tue, 17 Dec 2019 15:20:38 +0800 Subject: [PATCH 25/35] sub_8023CAC --- asm/berry_crush.s | 577 ---------------------------------------------- src/berry_crush.c | 392 ++++++++++++++++++++++++------- 2 files changed, 312 insertions(+), 657 deletions(-) diff --git a/asm/berry_crush.s b/asm/berry_crush.s index 247341448..3857a9b90 100755 --- a/asm/berry_crush.s +++ b/asm/berry_crush.s @@ -5,583 +5,6 @@ .text - thumb_func_start sub_8023BC0 -sub_8023BC0: @ 8023BC0 - push {r4-r6,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - ldrb r0, [r5, 0xC] - cmp r0, 0x1 - beq _08023C04 - cmp r0, 0x1 - bgt _08023BD8 - cmp r0, 0 - beq _08023BE2 - b _08023C9C -_08023BD8: - cmp r0, 0x2 - beq _08023C2A - cmp r0, 0x3 - beq _08023C5C - b _08023C9C -_08023BE2: - movs r0, 0x9 - strh r0, [r5, 0x12] - movs r0, 0x20 - bl PlaySE - movs r0, 0x1 - negs r0, r0 - movs r1, 0x8 - movs r2, 0x1F - bl BlendPalettes - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - movs r0, 0x4 - strb r0, [r1] - b _08023C9C -_08023C04: - movs r0, 0x9C - lsls r0, 1 - adds r4, r5, r0 - ldrb r0, [r4] - subs r0, 0x1 - strb r0, [r4] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _08023CA2 - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - movs r2, 0x1F - bl BlendPalettes - movs r0, 0 - strb r0, [r4] - b _08023C9C -_08023C2A: - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - adds r0, r5, 0 - bl sub_80218D4 - cmp r0, 0 - beq _08023CA2 - bl sub_8010434 - movs r0, 0 - strh r0, [r5, 0x10] - movs r0, 0x12 - movs r1, 0 - bl SetGpuReg - movs r0, 0x1A - movs r1, 0 - bl SetGpuReg - movs r0, 0x1E - movs r1, 0 - bl SetGpuReg - b _08023C9C -_08023C5C: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08023CA2 - ldr r0, =gStringVar1 - ldr r1, [r5, 0x1C] - movs r2, 0 - movs r3, 0x6 - bl ConvertIntToDecimalStringN - movs r4, 0 - str r4, [sp] - adds r0, r6, 0 - movs r1, 0x7 - movs r2, 0x1 - movs r3, 0 - bl sub_8024644 - movs r0, 0x13 - strb r0, [r5, 0xE] - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r0, 0 - strh r4, [r5, 0x10] - b _08023CA0 - .pool -_08023C9C: - ldrb r0, [r5, 0xC] - adds r0, 0x1 -_08023CA0: - strb r0, [r5, 0xC] -_08023CA2: - movs r0, 0 - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8023BC0 - - thumb_func_start sub_8023CAC -sub_8023CAC: @ 8023CAC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - adds r7, r0, 0 - ldrb r0, [r7, 0xC] - cmp r0, 0x7 - bls _08023CC2 - b _0802402E -_08023CC2: - lsls r0, 2 - ldr r1, =_08023CD0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08023CD0: - .4byte _08023CF0 - .4byte _08023D2A - .4byte _08023D38 - .4byte _08023DA0 - .4byte _08023F20 - .4byte _08023FD0 - .4byte _08023FDC - .4byte _08024010 -_08023CF0: - adds r4, r7, 0 - adds r4, 0x42 - adds r0, r4, 0 - movs r1, 0 - movs r2, 0x4 - bl memset - ldrb r0, [r7, 0x8] - lsls r0, 5 - adds r0, r7, r0 - adds r2, r0, 0 - adds r2, 0xB2 - ldrh r1, [r7, 0x28] - ldrh r0, [r2] - cmp r0, r1 - bls _08023D12 - strh r1, [r2] -_08023D12: - ldrb r0, [r7, 0x8] - lsls r0, 5 - adds r0, r7, r0 - adds r0, 0xB2 - ldrh r0, [r0] - strh r0, [r4] - movs r0, 0 - adds r1, r4, 0 - movs r2, 0x2 - bl SendBlock - b _0802402E -_08023D2A: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - bne _08023D36 - b _08024034 -_08023D36: - b _08024004 -_08023D38: - bl GetBlockReceivedStatus - ldr r2, =gUnknown_082F4448 - ldrb r3, [r7, 0x9] - subs r1, r3, 0x2 - adds r1, r2 - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - beq _08023D50 - b _08024034 -_08023D50: - movs r0, 0 - mov r8, r0 - adds r4, r7, 0 - adds r4, 0x42 - cmp r8, r3 - bcs _08023D7E - ldr r2, =gBlockRecvBuffer -_08023D5E: - mov r3, r8 - lsls r1, r3, 5 - adds r1, r7, r1 - lsls r0, r3, 8 - adds r0, r2 - ldrh r0, [r0] - adds r1, 0xB2 - strh r0, [r1] - mov r0, r8 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldrb r6, [r7, 0x9] - cmp r8, r6 - bcc _08023D5E -_08023D7E: - movs r0, 0 - strh r0, [r7, 0x10] - strh r0, [r4] - bl ResetBlockReceivedFlags - ldrb r0, [r7, 0x8] - cmp r0, 0 - bne _08023D9C - movs r0, 0x3 - b _08024032 - .pool -_08023D9C: - movs r0, 0x6 - b _08024032 -_08023DA0: - adds r0, r7, 0 - adds r0, 0x68 - movs r1, 0 - movs r2, 0x30 - bl memset - ldrh r1, [r7, 0x28] - adds r0, r7, 0 - adds r0, 0x6C - strh r1, [r0] - movs r0, 0x18 - ldrsh r4, [r7, r0] - ldrh r0, [r7, 0x28] - movs r1, 0x3C - bl __udivsi3 - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - adds r0, r4, 0 - bl __divsi3 - adds r1, r7, 0 - adds r1, 0x6E - strh r0, [r1] - movs r1, 0x30 - ldrsh r0, [r7, r1] - lsls r0, 8 - movs r4, 0xC8 - lsls r4, 6 - adds r1, r4, 0 - bl sub_8151574 - adds r2, r0, 0 - movs r3, 0x32 - ldrsh r1, [r7, r3] - lsls r1, 8 - bl sub_81515FC - adds r2, r0, r4 - asrs r2, 8 - movs r1, 0x7F - adds r0, r2, 0 - ands r0, r1 - adds r1, r7, 0 - adds r1, 0x70 - strh r0, [r1] - lsls r2, 8 - movs r1, 0xC8 - lsls r1, 7 - adds r0, r2, 0 - bl sub_81515FC - adds r2, r0, 0 - ldrb r1, [r7, 0x9] - ldr r0, [r7, 0x1C] - muls r0, r1 - lsls r4, r0, 8 - adds r0, r4, 0 - adds r1, r2, 0 - bl sub_8151574 - adds r4, r0, 0 - asrs r0, r4, 8 - str r0, [r7, 0x68] - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - adds r1, r7, 0 - adds r1, 0x8F - strb r0, [r1] - movs r6, 0 - mov r8, r6 - mov r9, r1 - ldrb r0, [r7, 0x9] - cmp r8, r0 - bcc _08023E44 - b _0802402E -_08023E44: - adds r0, r7, 0 - adds r0, 0x88 - add r0, r8 - mov r1, r8 - strb r1, [r0] - adds r0, r7, 0 - adds r0, 0x90 - add r0, r8 - strb r1, [r0] - mov r3, r8 - lsls r2, r3, 1 - adds r1, r7, 0 - adds r1, 0x74 - adds r1, r2 - lsls r0, r3, 5 - adds r3, r7, r0 - adds r5, r3, 0 - adds r5, 0xAE - ldrh r0, [r5] - strh r0, [r1] - adds r1, r7, 0 - adds r1, 0x72 - ldrh r6, [r1] - adds r0, r6 - strh r0, [r1] - mov r1, r9 - ldrb r0, [r1] - adds r6, r2, 0 - cmp r0, 0x1 - beq _08023EAE - cmp r0, 0x1 - bgt _08023E8A - cmp r0, 0 - beq _08023E90 - b _08023F04 -_08023E8A: - cmp r0, 0x2 - beq _08023ECC - b _08023F04 -_08023E90: - ldrh r0, [r5] - cmp r0, 0 - beq _08023ED2 - adds r0, r3, 0 - adds r0, 0xAC - ldrh r2, [r0] - lsls r2, 8 - adds r0, r2, 0 - movs r1, 0xC8 - lsls r1, 7 - bl sub_8151574 - adds r2, r0, 0 - ldrh r4, [r5] - b _08023EFA -_08023EAE: - ldrh r0, [r5] - cmp r0, 0 - beq _08023ED2 - adds r0, r3, 0 - adds r0, 0xB0 - ldrh r2, [r0] - lsls r2, 8 - adds r0, r2, 0 - movs r1, 0xC8 - lsls r1, 7 - bl sub_8151574 - adds r2, r0, 0 - ldrh r4, [r5] - b _08023EFA -_08023ECC: - ldrh r0, [r5] - cmp r0, 0 - bne _08023ED6 -_08023ED2: - movs r4, 0 - b _08023F04 -_08023ED6: - adds r1, r3, 0 - adds r1, 0xB2 - ldrh r0, [r1] - ldrh r2, [r7, 0x28] - cmp r0, r2 - bcc _08023EE8 - movs r4, 0xC8 - lsls r4, 7 - b _08023F04 -_08023EE8: - ldrh r2, [r1] - lsls r2, 8 - adds r0, r2, 0 - movs r1, 0xC8 - lsls r1, 7 - bl sub_8151574 - adds r2, r0, 0 - ldrh r4, [r7, 0x28] -_08023EFA: - lsls r4, 8 - adds r1, r4, 0 - bl sub_81515FC - adds r4, r0, 0 -_08023F04: - asrs r4, 4 - adds r0, r7, 0 - adds r0, 0x7E - adds r0, r6 - strh r4, [r0] - mov r0, r8 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldrb r3, [r7, 0x9] - cmp r8, r3 - bcc _08023E44 - b _0802402E -_08023F20: - movs r6, 0 - mov r8, r6 - ldrb r0, [r7, 0x9] - subs r0, 0x1 - adds r1, r7, 0 - adds r1, 0x68 - str r1, [sp, 0xC] - cmp r8, r0 - bge _08023FC4 -_08023F32: - ldrb r0, [r7, 0x9] - subs r0, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - mov r2, r8 - adds r2, 0x1 - str r2, [sp, 0x8] - cmp r4, r8 - bls _08023FB4 - adds r3, r7, 0 - adds r3, 0x74 - str r3, [sp] - adds r6, r7, 0 - adds r6, 0x88 - str r6, [sp, 0x4] - movs r0, 0x90 - adds r0, r7 - mov r10, r0 - movs r1, 0x7E - adds r1, r7 - mov r9, r1 -_08023F5C: - subs r2, r4, 0x1 - mov r12, r2 - lsls r6, r2, 1 - ldr r0, [sp] - adds r3, r0, r6 - lsls r5, r4, 1 - adds r1, r0, r5 - ldrh r2, [r3] - ldrh r0, [r1] - cmp r2, r0 - bcs _08023F86 - ldrh r0, [r1] - strh r2, [r1] - strh r0, [r3] - ldr r1, [sp, 0x4] - adds r2, r1, r4 - ldrb r3, [r2] - add r1, r12 - ldrb r0, [r1] - strb r0, [r2] - strb r3, [r1] -_08023F86: - mov r2, r9 - adds r3, r2, r6 - adds r1, r2, r5 - ldrh r2, [r3] - ldrh r6, [r1] - cmp r2, r6 - bcs _08023FAA - ldrh r0, [r1] - strh r2, [r1] - strh r0, [r3] - mov r0, r10 - adds r2, r0, r4 - ldrb r3, [r2] - mov r1, r10 - add r1, r12 - ldrb r0, [r1] - strb r0, [r2] - strb r3, [r1] -_08023FAA: - mov r1, r12 - lsls r0, r1, 24 - lsrs r4, r0, 24 - cmp r4, r8 - bhi _08023F5C -_08023FB4: - ldr r2, [sp, 0x8] - lsls r0, r2, 24 - lsrs r0, 24 - mov r8, r0 - ldrb r0, [r7, 0x9] - subs r0, 0x1 - cmp r8, r0 - blt _08023F32 -_08023FC4: - movs r0, 0 - ldr r1, [sp, 0xC] - movs r2, 0x30 - bl SendBlock - b _0802402E -_08023FD0: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _08024034 - b _08024004 -_08023FDC: - bl GetBlockReceivedStatus - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08024034 - adds r4, r7, 0 - adds r4, 0x68 - adds r0, r4, 0 - movs r1, 0 - movs r2, 0x30 - bl memset - ldr r1, =gBlockRecvBuffer - adds r0, r4, 0 - movs r2, 0x30 - bl memcpy - bl ResetBlockReceivedFlags -_08024004: - movs r0, 0 - strh r0, [r7, 0x10] - b _0802402E - .pool -_08024010: - bl sub_8020E58 - movs r0, 0x12 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r0, 0 - movs r1, 0xB - strh r1, [r7, 0x12] - strb r0, [r7, 0xC] - adds r1, r7, 0 - adds r1, 0x24 - strb r0, [r1] - b _08024034 -_0802402E: - ldrb r0, [r7, 0xC] - adds r0, 0x1 -_08024032: - strb r0, [r7, 0xC] -_08024034: - movs r0, 0 - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8023CAC - thumb_func_start sub_8024048 sub_8024048: @ 8024048 push {r4-r6,lr} diff --git a/src/berry_crush.c b/src/berry_crush.c index fb1e5c7a0..1764d7573 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -19,6 +19,7 @@ #include "overworld.h" #include "palette.h" #include "pokemon_jump.h" +#include "random.h" #include "rom_8034C54.h" #include "scanline_effect.h" #include "script.h" @@ -41,24 +42,12 @@ struct BerryCrushGame_Player u16 unk2; union { - u8 as_bytes[16]; + u8 as_2d_bytes[2][8]; u16 as_hwords[8]; } unk4; u8 unk14[12]; }; -struct BerryCrushGame_PlayersSeparate -{ - struct BerryCrushGame_Player player; - struct BerryCrushGame_Player others[4]; -}; - -typedef union BerryCrushGame_Players -{ - struct BerryCrushGame_Player players[5]; - struct BerryCrushGame_PlayersSeparate separate; -} BerryCrushGame_Players; - struct __attribute__((packed, aligned(2))) BerryCrushGame_4E { u8 filler0[0x4]; @@ -78,7 +67,7 @@ struct __attribute__((packed)) BerryCrushGame_40 struct BerryCrushGame_4E unkE; }; -struct __attribute__((packed, aligned(2))) BerryCrushGame_5C +struct BerryCrushGame_5C { u16 unk00; u8 unk02_0:1; @@ -92,16 +81,30 @@ struct __attribute__((packed, aligned(2))) BerryCrushGame_5C u16 unk0A; }; -struct BerryCrushGame_68 +union BerryCrushGame_68 { - int unk00; - u16 unk04; - u8 filler06[2]; - u16 unk08; - u16 unk0A; - u16 unk0C[8]; // TODO: Resolve the type of the field. - BerryCrushGame_Players unk1C; - u8 fillerBC[20]; + struct BerryCrushGame_68_x + { + struct BerryCrushGame_68_x_SubStruct + { + s32 unk00; + u16 unk04; + s16 unk06; + u16 unk08; + u16 unk0A; + u16 unk0C[2][5]; + u8 filler20[16]; + } unk00; + u8 unk30[12]; + struct BerryCrushGame_Player others[4]; + u8 fillerBC[20]; + } as_four_players; + struct BerryCrushGame_68_y + { + u8 filler00[28]; + struct BerryCrushGame_Player unk1C[5]; + u8 fillerBC[20]; + } as_five_players; }; struct BerryCrushGame_138_C @@ -169,13 +172,13 @@ struct BerryCrushGame s16 unk2A; s16 unk2C; s16 unk2E; - u16 unk30; - u16 unk32; + s16 unk30; + s16 unk32; s16 unk34; u8 unk36[0xA]; struct BerryCrushGame_40 unk40; struct BerryCrushGame_5C unk5C; - struct BerryCrushGame_68 unk68; + union BerryCrushGame_68 unk68; struct BerryCrushGame_138 unk138; u8 unk1C0[0x1000]; u8 unk11C0[0x1000]; @@ -343,7 +346,7 @@ static void sub_8020D8C(void) else RemoveBagItem(gSpecialVar_ItemId, 1); - gUnknown_02022C90->unk68.unk1C.separate.others[gUnknown_02022C90->unk8].unk0 = gSpecialVar_ItemId - FIRST_BERRY_INDEX; + gUnknown_02022C90->unk68.as_four_players.others[gUnknown_02022C90->unk8].unk0 = gSpecialVar_ItemId - FIRST_BERRY_INDEX; gUnknown_02022C90->unkE = 1; gUnknown_02022C90->unkF = 9; sub_8024604(gUnknown_02022C90->unk36, 0, -1, 0, 16, 0, 0); @@ -372,10 +375,10 @@ void sub_8020E58(void) { u32 var0, var1; - var0 = gUnknown_02022C90->unk68.unk04; + var0 = gUnknown_02022C90->unk68.as_four_players.unk00.unk04; var0 <<= 8; var0 = sub_81515FC(var0, 60 << 8); - var1 = gUnknown_02022C90->unk68.unk0A; + var1 = gUnknown_02022C90->unk68.as_four_players.unk00.unk0A; var1 <<= 8; var1 = sub_81515FC(var1, var0) & 0xFFFF; gUnknown_02022C90->unk16 = var1; @@ -411,7 +414,7 @@ void sub_8020E58(void) break; } - gUnknown_02022C90->unk1C = gUnknown_02022C90->unk68.unk00; + gUnknown_02022C90->unk1C = gUnknown_02022C90->unk68.as_four_players.unk00.unk00; if (GiveBerryPowder(gUnknown_02022C90->unk1C)) return; @@ -444,8 +447,7 @@ static void sub_8020FA0(u8 taskId) #define PLAYER_UNK14(game, i) \ ((u8 *)(game) \ + offsetof(struct BerryCrushGame, unk68) \ - + offsetof(struct BerryCrushGame_68, unk1C) \ - + offsetof(struct BerryCrushGame_Player, unk14) \ + + offsetof(struct BerryCrushGame_68_x, unk30) \ + sizeof(struct BerryCrushGame_Player) * (i)) void sub_8020FC4(struct BerryCrushGame *arg0) @@ -457,7 +459,7 @@ void sub_8020FC4(struct BerryCrushGame *arg0) for (; i < 5; i++) { memset(PLAYER_UNK14(arg0, i), 1, PLAYER_NAME_LENGTH); - arg0->unk68.unk1C.players[i].unk14[PLAYER_NAME_LENGTH] = EOS; + arg0->unk68.as_five_players.unk1C[i].unk14[PLAYER_NAME_LENGTH] = EOS; } switch (gSaveBlock2Ptr->optionsTextSpeed) @@ -668,7 +670,7 @@ void sub_80214A8(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) &gUnknown_082F436C, gUnknown_082F41E8[i], gUnknown_082F41E8[i], - arg0->unk68.unk1C.separate.others[i].unk0 + 133); + arg0->unk68.as_four_players.others[i].unk0 + 133); arg1->unk38[i] = &gSprites[spriteId]; arg1->unk38[i]->oam.priority = 3; arg1->unk38[i]->affineAnimPaused = 1; @@ -863,7 +865,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) u8 i, j; u8 sp18 = 0; u8 sp1C = 0; - struct BerryCrushGame_68 *sp20 = &sp0C->unk68; + union BerryCrushGame_68 *sp20 = &sp0C->unk68; u32 xOffset; u32 r8, r9, r4, r7, r3_; u8 r10, r2; @@ -887,16 +889,16 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) r10 = r6; r9 = sp1C + 0xA2; r8 = sp18; - r6 += 14; // should be tail merged, but not + r6 += 14; ++i; break; case 0: - sp18 = sp20->unk1C.separate.player.unk4.as_bytes[i]; - if (i != 0 && sp20->unk0C[i] != sp20->unk0C[i - 1]) + sp18 = sp20->as_five_players.unk1C[0].unk4.as_2d_bytes[0][i]; + if (i != 0 && sp20->as_four_players.unk00.unk0C[0][i] != sp20->as_four_players.unk00.unk0C[0][i - 1]) sp1C = i; ConvertIntToDecimalStringN( gStringVar4, - sp20->unk0C[5 * sp10 + i], // ~ line 145. 2 * i was stored in temp variable + sp20->as_four_players.unk00.unk0C[sp10][i], 1, 4 ); @@ -909,17 +911,17 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) ++i; break; case 1: - sp18 = sp20->unk1C.separate.player.unk4.as_bytes[i + 8]; - if (i != 0 && sp20->unk0C[i + 5] != sp20->unk0C[i + 4]) // damn, access to unk0C is weird again + sp18 = sp20->as_five_players.unk1C[0].unk4.as_2d_bytes[1][i]; + if (i != 0 && sp20->as_four_players.unk00.unk0C[1][i] != sp20->as_four_players.unk00.unk0C[1][i - 1]) sp1C = i; ConvertIntToDecimalStringN( gStringVar1, - sp20->unk0C[5 * sp10 + i] >> 4, + sp20->as_four_players.unk00.unk0C[sp10][i] >> 4, 1, 3 ); j = 0; - r3_ = 15 & (u8)sp20->unk0C[5 * sp10 + i]; + r3_ = 15 & (u8)sp20->as_four_players.unk00.unk0C[sp10][i]; r4 = sp14 - 4; r10 = r6; r9 = sp1C + 0xA2; @@ -940,7 +942,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) case 2: sp18 = i; sp1C = i; - r2 = sp0C->unk68.unk1C.separate.others[i].unk0; + r2 = sp0C->unk68.as_four_players.others[i].unk0; if (r2 > 43) r2 = 0; StringCopy(gStringVar1,gBerries[r2].name); @@ -1351,10 +1353,10 @@ void sub_8021D34(struct BerryCrushGame *r8) u8 r10 = 0; u8 r6 = 0; u32 sp0C = 0; - struct BerryCrushGame_68 *sp10 = &r8->unk68; + union BerryCrushGame_68 *sp10 = &r8->unk68; u8 r7 = GetWindowAttribute(r8->unk138.unk82, WINDOW_HEIGHT) * 8 - 42; - sub_8021944(&r8->unk138, sp10->unk04); + sub_8021944(&r8->unk138, sp10->as_four_players.unk00.unk04); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_TimeColon); r6 = 176 - (u8)GetStringWidth(2, gText_SpaceSec, -1); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_SpaceSec); @@ -1386,7 +1388,7 @@ void sub_8021D34(struct BerryCrushGame *r8) AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); r7 += 14; AddTextPrinterParameterized3(r8->unk138.unk82, 2, 0, r7, sBerryCrushTextColors1[0], 0, gText_Silkiness); - ConvertIntToDecimalStringN(gStringVar1, sp10->unk08, 1, 3); + ConvertIntToDecimalStringN(gStringVar1, sp10->as_four_players.unk00.unk08, 1, 3); StringExpandPlaceholders(gStringVar4, gText_Var1Percent); r6 = 176 - (u8)GetStringWidth(2, gStringVar4, -1); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); @@ -1427,7 +1429,7 @@ bool32 sub_8022070(struct BerryCrushGame *r4, struct BerryCrushGame_138 *r6) r6->unk80 = 5; return FALSE; case 12: - sub_80219C8(r6->unk82, 20, 4, gUnknown_082F43B4[r4->unk68.unk1C.separate.player.unk4.as_bytes[7] + 3]); + sub_80219C8(r6->unk82, 20, 4, gUnknown_082F43B4[r4->unk68.as_five_players.unk1C[0].unk4.as_2d_bytes[0][7] + 3]); sub_8021A28(r4, 1, 0xA0, 8 * gUnknown_082F3344[0][r5]); r6->unk80 = 5; return FALSE; @@ -1474,7 +1476,7 @@ void sub_8022250(u8 r4) break; case 1: r10_ = gText_BerryCrush2; - ++r10_; --r10_; // swap r9/sl + ++r10_; --r10_; // swap sb/sl #ifndef NONMATCHING asm("":::"r8"); // turn r8/sl register swap into sb/sl #endif @@ -2050,7 +2052,7 @@ u32 sub_8022F1C(struct BerryCrushGame *r5, u8 *r2) if (!IsLinkTaskFinished()) return 0; memset(r5->unk40.unk2, 0, sizeof(r5->unk40.unk2)); - r5->unk40.unk2[0] = r5->unk68.unk1C.separate.others[r5->unk8].unk0; + r5->unk40.unk2[0] = r5->unk68.as_four_players.others[r5->unk8].unk0; SendBlock(0, r5->unk40.unk2, 2); break; case 3: @@ -2063,11 +2065,11 @@ u32 sub_8022F1C(struct BerryCrushGame *r5, u8 *r2) return 0; for (r3 = 0; r3 < r5->unk9; ++r3) { - r5->unk68.unk1C.separate.others[r3].unk0 = gBlockRecvBuffer[r3][0]; - if (r5->unk68.unk1C.separate.others[r3].unk0 > 0xB0) - r5->unk68.unk1C.separate.others[r3].unk0 = 0; - r5->unk18 += gUnknown_0858AB24[r5->unk68.unk1C.separate.others[r3].unk0].unk0; - r5->unk1C += gUnknown_0858AB24[r5->unk68.unk1C.separate.others[r3].unk0].unk1; + r5->unk68.as_four_players.others[r3].unk0 = gBlockRecvBuffer[r3][0]; + if (r5->unk68.as_four_players.others[r3].unk0 > 0xB0) + r5->unk68.as_four_players.others[r3].unk0 = 0; + r5->unk18 += gUnknown_0858AB24[r5->unk68.as_four_players.others[r3].unk0].unk0; + r5->unk1C += gUnknown_0858AB24[r5->unk68.as_four_players.others[r3].unk0].unk1; } r5->unk10 = 0; ResetBlockReceivedFlags(); @@ -2240,30 +2242,30 @@ void sub_802339C(struct BerryCrushGame *r4) if ((u8)r2[2] & 4) { r4->unk5C.unk02_3 |= gUnknown_082F325C[r7]; - r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] = 1; - ++r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[3]; + r4->unk68.as_four_players.others[r7].unk4.as_2d_bytes[1][5] = 1; + ++r4->unk68.as_four_players.others[r7].unk4.as_hwords[3]; ++r8; - r3 = r4->unk28 - r4->unk68.unk1C.separate.others[r7].unk2; - if (r3 >= r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] - 1 - && r3 <= r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] + 1) + r3 = r4->unk28 - r4->unk68.as_four_players.others[r7].unk2; + if (r3 >= r4->unk68.as_four_players.others[r7].unk4.as_hwords[1] - 1 + && r3 <= r4->unk68.as_four_players.others[r7].unk4.as_hwords[1] + 1) { - ++r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0]; - r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] = r3; - if (r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0] > r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[2]) - r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[2] = r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0]; + ++r4->unk68.as_four_players.others[r7].unk4.as_hwords[0]; + r4->unk68.as_four_players.others[r7].unk4.as_hwords[1] = r3; + if (r4->unk68.as_four_players.others[r7].unk4.as_hwords[0] > r4->unk68.as_four_players.others[r7].unk4.as_hwords[2]) + r4->unk68.as_four_players.others[r7].unk4.as_hwords[2] = r4->unk68.as_four_players.others[r7].unk4.as_hwords[0]; } else { - r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[0] = 0; - r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[1] = r3; + r4->unk68.as_four_players.others[r7].unk4.as_hwords[0] = 0; + r4->unk68.as_four_players.others[r7].unk4.as_hwords[1] = r3; } - r4->unk68.unk1C.separate.others[r7].unk2 = r4->unk28; - if (++r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[12] > 2) - r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[12] = 0; + r4->unk68.as_four_players.others[r7].unk2 = r4->unk28; + if (++r4->unk68.as_four_players.others[r7].unk4.as_2d_bytes[1][4] > 2) + r4->unk68.as_four_players.others[r7].unk4.as_2d_bytes[1][4] = 0; } else { - r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] = 0; + r4->unk68.as_four_players.others[r7].unk4.as_2d_bytes[1][5] = 0; } } } @@ -2271,10 +2273,10 @@ void sub_802339C(struct BerryCrushGame *r4) { for (r7 = 0; r7 < r4->unk9; ++r7) { - if (r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] != 0) + if (r4->unk68.as_four_players.others[r7].unk4.as_2d_bytes[1][5] != 0) { - r4->unk68.unk1C.separate.others[r7].unk4.as_bytes[13] |= 2; - ++r4->unk68.unk1C.separate.others[r7].unk4.as_hwords[4]; + r4->unk68.as_four_players.others[r7].unk4.as_2d_bytes[1][5] |= 2; + ++r4->unk68.as_four_players.others[r7].unk4.as_hwords[4]; } } } @@ -2309,11 +2311,11 @@ void sub_8023558(struct BerryCrushGame *r3) for (r4 = 0; r4 < r3->unk9; ++r4) { - if (r3->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] != 0) + if (r3->unk68.as_four_players.others[r4].unk4.as_2d_bytes[1][5] != 0) { ++r6; - r1 = r3->unk68.unk1C.separate.others[r4].unk4.as_bytes[12] + 1; - if (r3->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] & 2) + r1 = r3->unk68.as_four_players.others[r4].unk4.as_2d_bytes[1][4] + 1; + if (r3->unk68.as_four_players.others[r4].unk4.as_2d_bytes[1][5] & 2) r1 |= 4; r1 <<= 3 * r4; r3->unk5C.unk08 |= r1; @@ -2379,8 +2381,8 @@ void sub_80236B8(struct BerryCrushGame *r5) r5->unk5C.unk02_2 = 1; if (gMain.heldKeys & A_BUTTON) { - if (r5->unk68.unk1C.separate.others[r5->unk8].unk4.as_hwords[5] < r5->unk28) - ++r5->unk68.unk1C.separate.others[r5->unk8].unk4.as_hwords[5]; + if (r5->unk68.as_four_players.others[r5->unk8].unk4.as_hwords[5] < r5->unk28) + ++r5->unk68.as_four_players.others[r5->unk8].unk4.as_hwords[5]; } if (r5->unk8 != 0 && r5->unk5C.unk02_2 == 0) return; @@ -2448,14 +2450,14 @@ void sub_802385C(struct BerryCrushGame *r5) for (r4 = 0; r4 < r5->unk9; r4 = (u8)r0) { - r5->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] = 0; + r5->unk68.as_four_players.others[r4].unk4.as_2d_bytes[1][5] = 0; r0 = r4 + 1; } #else u8 r4; for (r4 = 0; r4 < r5->unk9; ++r4) - r5->unk68.unk1C.separate.others[r4].unk4.as_bytes[13] = 0; + r5->unk68.as_four_players.others[r4].unk4.as_2d_bytes[1][5] = 0; #endif if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00 || gRecvCmds[0][1] != 2) @@ -2594,3 +2596,233 @@ u32 sub_8023A30(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) ++r4->unkC; return 0; } + +u32 sub_8023BC0(struct BerryCrushGame *r5, u8 *r6) +{ + switch (r5->unkC) + { + case 0: + r5->unk12 = 9; + PlaySE(SE_HAZURE); + BlendPalettes(0xFFFFFFFF, 8, RGB(31, 0, 0)); + r5->unk138.unk0 = 4; + break; + case 1: + if (--r5->unk138.unk0 != 255) + return 0; + BlendPalettes(0xFFFFFFFF, 0, RGB(31, 0, 0)); + r5->unk138.unk0 = 0; + break; + case 2: + if (!sub_80218D4(r5, &r5->unk138)) + return 0; + sub_8010434(); + r5->unk10 = 0; + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + break; + case 3: + if (!IsLinkTaskFinished()) + return 0; + ConvertIntToDecimalStringN(gStringVar1, r5->unk1C, 0, 6); + sub_8024644(r6, 7, 1, 0, 0); + r5->unkE = 19; + sub_8022BEC(3, 1, NULL); + r5->unk10 = 0; + r5->unkC = 0; + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_8023CAC(struct BerryCrushGame *r7, __attribute__((unused)) u8 *r1) +{ + u8 r8, r4_; + s32 r2; + s32 r4; + u8 r6; // ??? + + switch (r7->unkC) + { + case 0: + memset(r7->unk40.unk2, 0, 2 * sizeof(u16)); + if (r7->unk68.as_four_players.others[r7->unk8].unk4.as_hwords[5] > r7->unk28) + r7->unk68.as_four_players.others[r7->unk8].unk4.as_hwords[5] = r7->unk28; + r7->unk40.unk2[0] = r7->unk68.as_four_players.others[r7->unk8].unk4.as_hwords[5]; + SendBlock(0, r7->unk40.unk2, 2); + break; + case 1: + if (!IsLinkTaskFinished()) + return 0; + r7->unk10 = 0; + break; + case 2: + if (GetBlockReceivedStatus() != gUnknown_082F4448[r7->unk9 - 2]) + return 0; + for (r8 = 0; r8 < r7->unk9; ++r8) + r7->unk68.as_four_players.others[r8].unk4.as_hwords[5] = gBlockRecvBuffer[r8][0]; + r7->unk10 = 0; + r7->unk40.unk2[0] = 0; + ResetBlockReceivedFlags(); + if (r7->unk8 == 0) + r7->unkC = 3; + else + r7->unkC = 6; + return 0; + case 3: + memset( + &r7->unk68, + 0, + sizeof(struct BerryCrushGame_68_x_SubStruct) + ); + r7->unk68.as_four_players.unk00.unk04 = r7->unk28; + r7->unk68.as_four_players.unk00.unk06 = r7->unk18 / (r7->unk28 / 60); + r2 = sub_8151574(r7->unk30 << 8, 0x3200); + r2 = sub_81515FC(r2, r7->unk32 << 8) + 0x3200; + r2 >>= 8; + r7->unk68.as_four_players.unk00.unk08 = r2 & 0x7F; + r2 <<= 8; + r2 = sub_81515FC(r2, 0x6400); + r4 = (r7->unk1C * r7->unk9) << 8; + r4 = sub_8151574(r4, r2); + r7->unk68.as_four_players.unk00.unk00 = r4 >> 8; + r7->unk68.as_five_players.unk1C[0].unk4.as_2d_bytes[0][7] = Random() % 3; + for (r6 = 0, r8 = 0; r8 < r7->unk9; ++r8) + { + r7->unk68.as_five_players.unk1C[0].unk4.as_2d_bytes[0][r8] = r8; + r7->unk68.as_five_players.unk1C[0].unk4.as_2d_bytes[1][r8] = r8; + r7->unk68.as_four_players.unk00.unk0C[0][r8] = r7->unk68.as_four_players.others[r8].unk4.as_hwords[3]; + r7->unk68.as_four_players.unk00.unk0A += r7->unk68.as_four_players.unk00.unk0C[0][r8]; + switch (r7->unk68.as_five_players.unk1C[0].unk4.as_2d_bytes[0][7]) + { + case 0: + if (r7->unk68.as_four_players.others[r8].unk4.as_hwords[3] != 0) + { + r2 = r7->unk68.as_four_players.others[r8].unk4.as_hwords[2]; + r2 <<= 8; + r2 = sub_8151574(r2, 0x6400); + r4 = r7->unk68.as_four_players.others[r8].unk4.as_hwords[3]; + r4 <<= 8; + r4 = sub_81515FC(r2, r4); + } + else + { + r4 = 0; + } + break; + case 1: + if (r7->unk68.as_four_players.others[r8].unk4.as_hwords[3] != 0) + { + r2 = r7->unk68.as_four_players.others[r8].unk4.as_hwords[4]; + r2 <<= 8; + r2 = sub_8151574(r2, 0x6400); + r4 = r7->unk68.as_four_players.others[r8].unk4.as_hwords[3]; + r4 <<= 8; + r4 = sub_81515FC(r2, r4); + } + else + { + r4 = 0; + } + break; + case 2: + if (r7->unk68.as_four_players.others[r8].unk4.as_hwords[3] == 0) + { + r4 = 0; + } + else if (r7->unk68.as_four_players.others[r8].unk4.as_hwords[5] >= r7->unk28) + { + r4 = 0x6400; + } + else + { + r2 = r7->unk68.as_four_players.others[r8].unk4.as_hwords[5]; + r2 <<= 8; + r2 = sub_8151574(r2, 0x6400); + r4 = r7->unk28; + r4 <<= 8; + r4 = sub_81515FC(r2, r4); + } + break; + } + r4 >>= 4; + r7->unk68.as_four_players.unk00.unk0C[1][r8] = r4; + } + break; + case 4: + for (r6 = 0, r8 = 0; r8 < r7->unk9 - 1; ++r8) + { + for (r4_ = r7->unk9 - 1; r4_ > r8; --r4_) + { + u16 r0; + u8 r3; + u16 *sp00 = r7->unk68.as_four_players.unk00.unk0C[0]; + u8 *sp04 = r7->unk68.as_five_players.unk1C[0].unk4.as_2d_bytes[0]; + u8 *r10 = r7->unk68.as_five_players.unk1C[0].unk4.as_2d_bytes[1]; + u16 *r9 = r7->unk68.as_four_players.unk00.unk0C[1]; + s32 r12 = r4_ - 1; + u16 *p1 = sp00 + r12; // these have to be here + u16 *p2 = sp00 + r4_; // to swap operands. macro? + + if (*p1 < *p2) + { + r0 = sp00[r4_]; + sp00[r4_] = sp00[r12]; + sp00[r12] = r0; + r3 = sp04[r4_]; + sp04[r4_] = sp04[r12]; + sp04[r12] = r3; + } + p1 = r9 + r12; + p2 = r9 + r4_; + if (*p1 < *p2) + { + r0 = r9[r4_]; + r9[r4_] = r9[r12]; + r9[r12] = r0; + r3 = r10[r4_]; + r10[r4_] = r10[r12]; + r10[r12] = r3; + } + } + } + SendBlock( + 0, + &r7->unk68, + sizeof(struct BerryCrushGame_68_x_SubStruct) + ); + break; + case 5: + if (!IsLinkTaskFinished()) + return 0; + r7->unk10 = 0; + break; + case 6: + if (GetBlockReceivedStatus() != 1) + return 0; + memset( + &r7->unk68, + 0, + sizeof(struct BerryCrushGame_68_x_SubStruct) + ); + memcpy( + &r7->unk68, + gBlockRecvBuffer, + sizeof(struct BerryCrushGame_68_x_SubStruct) + ); + ResetBlockReceivedFlags(); + r7->unk10 = 0; + break; + case 7: + sub_8020E58(); + sub_8022BEC(18, 1, NULL); + r7->unk12 = 11; + r7->unkC = 0; + r7->unk24 = 0; + return 0; + } + ++r7->unkC; + return 0; +} From 5bec27aa345d8d5f893800af8f55825a0e89072e Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Wed, 18 Dec 2019 03:35:41 +0800 Subject: [PATCH 26/35] nonmatch sub_8024604 --- .gitignore | 1 + asm/berry_crush.s | 807 ---------------------------------------------- include/strings.h | 21 ++ ld_script.txt | 1 - src/berry_crush.c | 413 ++++++++++++++++++++++-- 5 files changed, 406 insertions(+), 837 deletions(-) delete mode 100755 asm/berry_crush.s diff --git a/.gitignore b/.gitignore index 15cc865df..93385ea51 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ build/ porymap.project.cfg .vscode/ *.a +.fuse_hidden* diff --git a/asm/berry_crush.s b/asm/berry_crush.s deleted file mode 100755 index 3857a9b90..000000000 --- a/asm/berry_crush.s +++ /dev/null @@ -1,807 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_8024048 -sub_8024048: @ 8024048 - push {r4-r6,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - ldrb r0, [r5, 0xC] - cmp r0, 0x4 - bhi _08024124 - lsls r0, 2 - ldr r1, =_08024064 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08024064: - .4byte _08024078 - .4byte _0802408A - .4byte _0802409C - .4byte _080240CC - .4byte _080240DC -_08024078: - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - adds r0, r5, 0 - bl sub_8022070 - cmp r0, 0 - bne _08024124 - b _0802412A -_0802408A: - movs r0, 0 - bl CopyBgTilemapBufferToVram - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - movs r0, 0x1E - strb r0, [r1] - b _08024124 -_0802409C: - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - ldrb r0, [r1] - cmp r0, 0 - beq _080240AE - subs r0, 0x1 - strb r0, [r1] - b _0802412A -_080240AE: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0802412A - movs r0, 0x5 - bl PlaySE - adds r0, r5, 0 - bl sub_802222C - b _08024124 - .pool -_080240CC: - ldrh r0, [r5, 0x12] - cmp r0, 0xC - bhi _08024124 - adds r0, 0x1 - movs r1, 0 - strh r0, [r5, 0x12] - strb r1, [r5, 0xC] - b _0802412A -_080240DC: - ldr r0, =gStringVar1 - ldr r1, [r5, 0x1C] - movs r2, 0 - movs r3, 0x6 - bl ConvertIntToDecimalStringN - ldr r4, =gStringVar2 - bl GetBerryPowder - adds r1, r0, 0 - adds r0, r4, 0 - movs r2, 0 - movs r3, 0x6 - bl ConvertIntToDecimalStringN - movs r4, 0 - str r4, [sp] - adds r0, r6, 0 - movs r1, 0x2 - movs r2, 0x3 - movs r3, 0 - bl sub_8024644 - movs r0, 0x13 - strb r0, [r5, 0xE] - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - strb r4, [r5, 0xC] - b _0802412A - .pool -_08024124: - ldrb r0, [r5, 0xC] - adds r0, 0x1 - strb r0, [r5, 0xC] -_0802412A: - movs r0, 0 - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8024048 - - thumb_func_start sub_8024134 -sub_8024134: @ 8024134 - push {r4,r5,lr} - sub sp, 0x10 - adds r5, r0, 0 - adds r4, r1, 0 - ldrb r0, [r5, 0xC] - cmp r0, 0x4 - bhi _08024218 - lsls r0, 2 - ldr r1, =_08024150 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08024150: - .4byte _08024164 - .4byte _080241A0 - .4byte _080241A6 - .4byte _080241F0 - .4byte _08024204 -_08024164: - ldrh r1, [r5, 0x28] - ldr r0, =0x00008c9f - cmp r1, r0 - bls _08024176 - movs r1, 0x9C - lsls r1, 1 - adds r0, r5, r1 - bl sub_8022554 -_08024176: - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r1, 0x8 - movs r2, 0 - movs r3, 0 - bl sub_8024644 - movs r4, 0 - movs r0, 0x13 - strb r0, [r5, 0xE] - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - strb r4, [r5, 0xC] - b _0802421E - .pool -_080241A0: - bl sub_8010434 - b _08024218 -_080241A6: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _0802421E - movs r0, 0 - movs r1, 0 - bl DrawDialogueFrame - ldr r2, =gText_SavingDontTurnOffPower - movs r0, 0 - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x1 - movs r3, 0 - bl AddTextPrinterParameterized2 - movs r0, 0 - movs r1, 0x3 - bl CopyWindowToVram - ldr r0, =sub_8153688 - movs r1, 0 - bl CreateTask - b _08024218 - .pool -_080241F0: - ldr r0, =sub_8153688 - bl FuncIsActiveTask - lsls r0, 24 - cmp r0, 0 - beq _08024218 - b _0802421E - .pool -_08024204: - movs r0, 0x14 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r1, 0 - movs r0, 0xF - strh r0, [r5, 0x12] - strb r1, [r5, 0xC] - b _0802421E -_08024218: - ldrb r0, [r5, 0xC] - adds r0, 0x1 - strb r0, [r5, 0xC] -_0802421E: - movs r0, 0 - add sp, 0x10 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8024134 - - thumb_func_start sub_8024228 -sub_8024228: @ 8024228 - push {r4-r6,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - ldrb r0, [r5, 0xC] - cmp r0, 0x1 - beq _0802426A - cmp r0, 0x1 - bgt _08024240 - cmp r0, 0 - beq _08024246 - b _080242D0 -_08024240: - cmp r0, 0x2 - beq _08024270 - b _080242D0 -_08024246: - movs r0, 0x1 - str r0, [sp] - adds r0, r6, 0 - movs r1, 0x4 - movs r2, 0 - movs r3, 0 - bl sub_8024644 - movs r0, 0x14 - strb r0, [r5, 0xE] - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r0, 0 - strb r0, [r5, 0xC] - b _080242D8 -_0802426A: - bl DisplayYesNoMenuDefaultYes - b _080242D0 -_08024270: - bl Menu_ProcessInputNoWrapClearOnChoose - lsls r0, 24 - asrs r4, r0, 24 - movs r0, 0x2 - negs r0, r0 - cmp r4, r0 - beq _080242D6 - adds r0, r5, 0 - adds r0, 0x42 - movs r1, 0 - movs r2, 0xC - bl memset - cmp r4, 0 - bne _080242A2 - bl HasAtLeastOneBerry - lsls r0, 24 - cmp r0, 0 - beq _0802429E - strh r4, [r5, 0x14] - b _080242A6 -_0802429E: - movs r0, 0x3 - b _080242A4 -_080242A2: - movs r0, 0x1 -_080242A4: - strh r0, [r5, 0x14] -_080242A6: - movs r0, 0 - movs r1, 0x1 - bl ClearDialogWindowAndFrame - movs r4, 0 - str r4, [sp] - adds r0, r6, 0 - movs r1, 0x8 - movs r2, 0 - movs r3, 0 - bl sub_8024644 - movs r0, 0x15 - strb r0, [r5, 0xE] - movs r0, 0x3 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - strb r4, [r5, 0xC] - b _080242D6 -_080242D0: - ldrb r0, [r5, 0xC] - adds r0, 0x1 - strb r0, [r5, 0xC] -_080242D6: - movs r0, 0 -_080242D8: - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8024228 - - thumb_func_start sub_80242E0 -sub_80242E0: @ 80242E0 - push {r4-r7,lr} - adds r4, r0, 0 - movs r5, 0 - ldrb r0, [r4, 0xC] - cmp r0, 0x1 - beq _08024306 - cmp r0, 0x1 - bgt _080242F6 - cmp r0, 0 - beq _08024300 - b _080243AC -_080242F6: - cmp r0, 0x2 - beq _08024328 - cmp r0, 0x3 - beq _08024336 - b _080243AC -_08024300: - bl sub_8010434 - b _080243AC -_08024306: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _080243B2 - ldrh r0, [r4, 0x14] - adds r1, r4, 0 - adds r1, 0x42 - strh r0, [r1] - adds r0, r4, 0 - adds r0, 0x4E - strh r5, [r0] - movs r0, 0 - movs r2, 0x2 - bl SendBlock - b _080243AC -_08024328: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _080243B2 - strh r5, [r4, 0x10] - b _080243AC -_08024336: - bl GetBlockReceivedStatus - ldr r2, =gUnknown_082F4448 - ldrb r3, [r4, 0x9] - subs r1, r3, 0x2 - adds r1, r2 - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bne _080243B2 - adds r7, r4, 0 - adds r7, 0x42 - adds r6, r4, 0 - adds r6, 0x4E - cmp r5, r3 - bcs _08024374 - adds r1, r6, 0 - ldr r2, =gBlockRecvBuffer -_0802435C: - lsls r0, r5, 8 - adds r0, r2 - ldrh r0, [r0] - ldrh r3, [r1] - adds r0, r3 - strh r0, [r1] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - ldrb r0, [r4, 0x9] - cmp r5, r0 - bcc _0802435C -_08024374: - ldrh r0, [r6] - cmp r0, 0 - beq _08024390 - movs r0, 0x17 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - b _0802439A - .pool -_08024390: - movs r0, 0x16 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC -_0802439A: - bl ResetBlockReceivedFlags - movs r1, 0 - movs r0, 0 - strh r0, [r7] - strh r0, [r6] - strh r0, [r4, 0x10] - strb r1, [r4, 0xC] - b _080243B4 -_080243AC: - ldrb r0, [r4, 0xC] - adds r0, 0x1 - strb r0, [r4, 0xC] -_080243B2: - movs r0, 0 -_080243B4: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_80242E0 - - thumb_func_start sub_80243BC -sub_80243BC: @ 80243BC - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - ldrb r4, [r5, 0xC] - cmp r4, 0x1 - beq _080243EA - cmp r4, 0x1 - bgt _080243D2 - cmp r4, 0 - beq _080243DC - b _08024434 -_080243D2: - cmp r4, 0x2 - beq _080243F6 - cmp r4, 0x3 - beq _0802441A - b _08024434 -_080243DC: - movs r0, 0x1 - negs r0, r0 - str r4, [sp] - movs r1, 0x1 - movs r2, 0 - movs r3, 0x10 - b _08024410 -_080243EA: - bl UpdatePaletteFade - lsls r0, 24 - cmp r0, 0 - beq _08024434 - b _0802443A -_080243F6: - movs r0, 0 - movs r1, 0x1 - bl ClearDialogWindowAndFrame - adds r0, r5, 0 - bl sub_8021488 - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0x10 - movs r3, 0 -_08024410: - bl BeginNormalPaletteFade - bl UpdatePaletteFade - b _08024434 -_0802441A: - bl UpdatePaletteFade - lsls r0, 24 - cmp r0, 0 - bne _0802443A - movs r0, 0x7 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - movs r0, 0 - strh r4, [r5, 0x12] - b _08024438 -_08024434: - ldrb r0, [r5, 0xC] - adds r0, 0x1 -_08024438: - strb r0, [r5, 0xC] -_0802443A: - movs r0, 0 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80243BC - - thumb_func_start sub_8024444 -sub_8024444: @ 8024444 - push {r4,r5,lr} - sub sp, 0x10 - adds r5, r0, 0 - ldrb r4, [r5, 0xC] - cmp r4, 0x1 - beq _080244BC - cmp r4, 0x1 - bgt _0802445A - cmp r4, 0 - beq _08024460 - b _080244F6 -_0802445A: - cmp r4, 0x2 - beq _080244D4 - b _080244F6 -_08024460: - movs r0, 0 - movs r1, 0 - bl DrawDialogueFrame - ldrh r1, [r5, 0x14] - cmp r1, 0x3 - bne _08024490 - ldr r0, =gUnknown_082F32A4 - ldr r2, [r0, 0x14] - ldrb r3, [r5, 0xB] - str r4, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - str r1, [sp, 0xC] - movs r0, 0 - movs r1, 0x1 - bl AddTextPrinterParameterized2 - b _080244AC - .pool -_08024490: - ldr r0, =gUnknown_082F32A4 - ldr r2, [r0, 0x18] - ldrb r3, [r5, 0xB] - str r4, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x1 - str r0, [sp, 0x8] - movs r0, 0x3 - str r0, [sp, 0xC] - movs r0, 0 - movs r1, 0x1 - bl AddTextPrinterParameterized2 -_080244AC: - movs r0, 0 - movs r1, 0x3 - bl CopyWindowToVram - b _080244F6 - .pool -_080244BC: - movs r0, 0 - bl IsTextPrinterActive - lsls r0, 16 - cmp r0, 0 - bne _080244FC - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - movs r0, 0x78 - strb r0, [r1] - b _080244F6 -_080244D4: - movs r0, 0x9C - lsls r0, 1 - adds r1, r5, r0 - ldrb r0, [r1] - adds r4, r0, 0 - cmp r4, 0 - beq _080244E8 - subs r0, 0x1 - strb r0, [r1] - b _080244FC -_080244E8: - movs r0, 0x18 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - strb r4, [r5, 0xC] - b _080244FC -_080244F6: - ldrb r0, [r5, 0xC] - adds r0, 0x1 - strb r0, [r5, 0xC] -_080244FC: - movs r0, 0 - add sp, 0x10 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8024444 - - thumb_func_start sub_8024508 -sub_8024508: @ 8024508 - push {r4,r5,lr} - adds r5, r0, 0 - ldrb r4, [r5, 0xC] - cmp r4, 0x1 - beq _08024528 - cmp r4, 0x1 - bgt _0802451C - cmp r4, 0 - beq _08024522 - b _08024558 -_0802451C: - cmp r4, 0x2 - beq _08024538 - b _08024558 -_08024522: - bl sub_8010434 - b _08024558 -_08024528: - bl IsLinkTaskFinished - lsls r0, 24 - cmp r0, 0 - beq _0802455E - bl sub_800AC34 - b _08024558 -_08024538: - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - bne _0802455E - movs r0, 0x19 - strb r0, [r5, 0xE] - movs r0, 0x5 - movs r1, 0x1 - movs r2, 0 - bl sub_8022BEC - strb r4, [r5, 0xC] - b _0802455E - .pool -_08024558: - ldrb r0, [r5, 0xC] - adds r0, 0x1 - strb r0, [r5, 0xC] -_0802455E: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8024508 - - thumb_func_start sub_8024568 -sub_8024568: @ 8024568 - push {lr} - movs r0, 0 - bl sub_8020C0C - movs r0, 0 - pop {r1} - bx r1 - thumb_func_end sub_8024568 - - thumb_func_start sub_8024578 -sub_8024578: @ 8024578 - push {r4-r6,lr} - adds r4, r0, 0 - movs r5, 0 - movs r0, 0x33 - bl IncrementGameStat - strb r5, [r4, 0xD] - movs r1, 0 - strh r5, [r4, 0x10] - movs r0, 0x2 - strh r0, [r4, 0x12] - strh r5, [r4, 0x14] - str r5, [r4, 0x1C] - strh r5, [r4, 0x18] - strh r5, [r4, 0x1A] - str r5, [r4, 0x20] - adds r0, r4, 0 - adds r0, 0x24 - strb r1, [r0] - adds r1, r4, 0 - adds r1, 0x25 - movs r0, 0 - strb r0, [r1] - strh r5, [r4, 0x26] - strh r5, [r4, 0x28] - strh r5, [r4, 0x2E] - ldr r0, =0x0000ffff - strh r0, [r4, 0x32] - strh r5, [r4, 0x30] - strh r5, [r4, 0x34] - movs r6, 0 - movs r3, 0 -_080245B8: - lsls r0, r5, 5 - adds r2, r4, r0 - adds r1, r2, 0 - adds r1, 0xA4 - ldr r0, =0x0000ffff - strh r0, [r1] - adds r0, r2, 0 - adds r0, 0xA6 - strh r3, [r0] - adds r0, 0x2 - strh r3, [r0] - adds r1, 0x6 - movs r0, 0x1 - strh r0, [r1] - adds r0, r2, 0 - adds r0, 0xAC - strh r3, [r0] - adds r0, 0x2 - strh r3, [r0] - adds r0, 0x2 - strh r3, [r0] - adds r0, 0x2 - strh r3, [r0] - adds r0, 0x2 - strb r6, [r0] - adds r0, 0x1 - strb r6, [r0] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x4 - bls _080245B8 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8024578 - - thumb_func_start sub_8024604 -sub_8024604: @ 8024604 - push {r4-r6,lr} - sub sp, 0x8 - str r2, [sp, 0x4] - ldr r5, [sp, 0x18] - ldr r6, [sp, 0x1C] - ldr r4, [sp, 0x20] - mov r2, sp - strh r4, [r2] - add r4, sp, 0x4 - ldrb r2, [r4] - strb r2, [r0] - ldrb r2, [r4, 0x1] - strb r2, [r0, 0x1] - ldrb r2, [r4, 0x2] - strb r2, [r0, 0x2] - ldrb r2, [r4, 0x3] - strb r2, [r0, 0x3] - strb r3, [r0, 0x4] - strb r5, [r0, 0x5] - strb r6, [r0, 0x6] - mov r2, sp - ldrb r2, [r2] - strb r2, [r0, 0x7] - mov r2, sp - ldrb r2, [r2, 0x1] - strb r2, [r0, 0x8] - strb r1, [r0, 0x9] - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8024604 - - thumb_func_start sub_8024644 -sub_8024644: @ 8024644 - push {r4,r5,lr} - sub sp, 0x4 - ldr r5, [sp, 0x10] - mov r4, sp - strh r3, [r4] - strb r1, [r0] - strb r2, [r0, 0x1] - mov r1, sp - ldrb r1, [r1] - strb r1, [r0, 0x2] - mov r1, sp - ldrb r1, [r1, 0x1] - strb r1, [r0, 0x3] - strb r5, [r0, 0x4] - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8024644 - - .align 2, 0 @ don't pad with nop diff --git a/include/strings.h b/include/strings.h index d97d435f6..f8d77c73e 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2864,6 +2864,27 @@ extern const u8 gText_JumpsInARow[]; extern const u8 gText_BestScore2[]; extern const u8 gText_ExcellentsInARow[]; +// Berry crush +extern const u8 gText_Var1Berry[]; +extern const u8 gText_XDotY[]; +extern const u8 gText_1DotBlueF700[]; +extern const u8 gText_1DotF700[]; +extern const u8 gText_TimeColon[]; +extern const u8 gText_SpaceSec[]; +extern const u8 gText_XDotY2[]; +extern const u8 gText_SpaceMin[]; +extern const u8 gText_StrVar1[]; +extern const u8 gText_PressingSpeed[]; +extern const u8 gText_TimesPerSec[]; +extern const u8 gText_XDotY3[]; +extern const u8 gText_Silkiness[]; +extern const u8 gText_Var1Percent[]; +extern const u8 gText_PressesRankings[]; +extern const u8 gText_CrushingResults[]; +extern const u8 gText_BerryCrush2[]; +extern const u8 gText_PressingSpeedRankings[]; +extern const u8 gText_Var1Players[]; + // Lilycove Lady extern const u8 gText_ContestLady_Handsome[]; extern const u8 gText_ContestLady_Vinny[]; diff --git a/ld_script.txt b/ld_script.txt index 2f6137773..7e0eeac3d 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -72,7 +72,6 @@ SECTIONS { src/mevent_news.o(.text); src/union_room_chat.o(.text); src/berry_crush.o(.text); - asm/berry_crush.o(.text); src/berry_powder.o(.text); src/dodrio_berry_picking.o(.text); src/pokemon_jump.o(.text); diff --git a/src/berry_crush.c b/src/berry_crush.c index 1764d7573..c61d4eeed 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -21,6 +21,7 @@ #include "pokemon_jump.h" #include "random.h" #include "rom_8034C54.h" +#include "save.h" #include "scanline_effect.h" #include "script.h" #include "sound.h" @@ -50,7 +51,8 @@ struct BerryCrushGame_Player struct __attribute__((packed, aligned(2))) BerryCrushGame_4E { - u8 filler0[0x4]; + u16 unk0; + u16 filler2; u8 unk4_0:1; u8 unk4_1:1; s8 unk5; @@ -112,7 +114,6 @@ struct BerryCrushGame_138_C u8 unk0; u8 unk1; u8 unk2; - u8 filler3; u16 unk4; u16 unk6; s16 unk8; @@ -149,12 +150,12 @@ struct BerryCrushGame u8 unkA; u8 unkB; u8 unkC; - u8 fillerD[0x1]; + u8 unkD; u8 unkE; u8 unkF; u16 unk10; u16 unk12; - u8 filler14[0x2]; + u16 unk14; u16 unk16; s16 unk18; s16 unk1A; @@ -191,7 +192,7 @@ static void sub_8020F88(void); static void sub_8020FA0(u8); void sub_8020FC4(struct BerryCrushGame *); void sub_8022BEC(u16, u8, u8 *); -void sub_8024604(u8 *, u8, s8, u8, u8, u8, u8); +void sub_8024604(u8 *, u32, s32, u32, u32, u32, u32); static int sub_8021450(struct BerryCrushGame *); void sub_8022588(struct BerryCrushGame *); void sub_8022600(struct BerryCrushGame *); @@ -217,30 +218,11 @@ extern const s8 gUnknown_082F41D2[][2]; extern const u32 gUnknown_082F334C[]; extern const u8 sBerryCrushTextColors1[][3]; extern const u8 *gUnknown_082F43B4[]; -extern const u8 gText_Var1Berry[]; -extern const u8 gText_XDotY[]; -extern const u8 gText_1DotBlueF700[]; -extern const u8 gText_1DotF700[]; -extern const u8 gText_TimeColon[]; -extern const u8 gText_SpaceSec[]; -extern const u8 gText_XDotY2[]; -extern const u8 gText_SpaceMin[]; -extern const u8 gText_StrVar1[]; -extern const u8 gText_PressingSpeed[]; -extern const u8 gText_TimesPerSec[]; -extern const u8 gText_XDotY3[]; extern const u8 sBerryCrushTextColors4[]; -extern const u8 gText_Silkiness[]; -extern const u8 gText_Var1Percent[]; extern const struct WindowTemplate gUnknown_082F32CC[]; extern const u8 gUnknown_082F3344[][4]; -extern const u8 gText_PressesRankings[]; -extern const u8 gText_CrushingResults[]; extern const struct WindowTemplate gUnknown_082F32EC; -extern const u8 gText_BerryCrush2[]; extern const u8 sBerryCrushTextColorTable[][3]; -extern const u8 gText_PressingSpeedRankings[]; -extern const u8 gText_Var1Players[]; extern const struct WindowTemplate gUnknown_082F32F4[]; extern const u8 gUnknown_082F417C[][5]; extern const struct BerryCrushGame_138_C gUnknown_082F4190[]; @@ -269,7 +251,7 @@ struct BerryCrushGame *sub_8020C00(void) return gUnknown_02022C90; } -int sub_8020C0C(MainCallback callback) +u32 sub_8020C0C(MainCallback callback) { if (!gUnknown_02022C90) return 2; @@ -282,7 +264,7 @@ int sub_8020C0C(MainCallback callback) SetMainCallback2(callback); if (callback == CB2_ReturnToField) { - gTextFlags.autoScroll = 1; + gTextFlags.autoScroll = TRUE; PlayNewMapMusic(MUS_POKECEN); SetMainCallback1(CB1_Overworld); } @@ -537,7 +519,7 @@ int sub_802104C(void) sub_8197200(); sub_8022588(var0); sub_8022600(var0); - gPaletteFade.bufferTransferDisabled = 1; + gPaletteFade.bufferTransferDisabled = TRUE; break; case 7: LoadPalette(gUnknown_08DE3398, 0, 0x180); @@ -558,7 +540,7 @@ int sub_802104C(void) ChangeBgY(1, 0, 0); break; case 9: - gPaletteFade.bufferTransferDisabled = 0; + gPaletteFade.bufferTransferDisabled = FALSE; BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK); ShowBg(0); ShowBg(1); @@ -904,7 +886,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) ); StringAppend(gStringVar4, gUnknown_082F43B4[sp10]); r4 = sp14 - 4; - r10 = r6; // shift right should happen after the switch + r10 = r6; r9 = sp1C + 0xA2; r8 = sp18; r6 += 14; @@ -2826,3 +2808,376 @@ u32 sub_8023CAC(struct BerryCrushGame *r7, __attribute__((unused)) u8 *r1) ++r7->unkC; return 0; } + +u32 sub_8024048(struct BerryCrushGame *r5, u8 *r6) +{ + switch (r5->unkC) + { + case 0: + if (!sub_8022070(r5, &r5->unk138)) + return 0; + break; + case 1: + CopyBgTilemapBufferToVram(0); + r5->unk138.unk0 = 30; + break; + case 2: + if (r5->unk138.unk0 != 0) + { + --r5->unk138.unk0; + return 0; + } + if (!(gMain.newKeys & A_BUTTON)) + return 0; + PlaySE(SE_SELECT); + sub_802222C(r5); + break; + case 3: + if (r5->unk12 <= 12) + { + ++r5->unk12; + r5->unkC = 0; + return 0; + } + break; + case 4: + ConvertIntToDecimalStringN(gStringVar1, r5->unk1C, 0, 6); + ConvertIntToDecimalStringN(gStringVar2, GetBerryPowder(), 0, 6); + sub_8024644(r6, 2, 3, 0, 0); + r5->unkE = 19; + sub_8022BEC(3, 1, NULL); + r5->unkC = 0; + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_8024134(struct BerryCrushGame *r5, u8 *r4) +{ + switch (r5->unkC) + { + case 0: + if (r5->unk28 >= 36000) + sub_8022554(&r5->unk138); + sub_8024644(r4, 8, 0, 0, 1); + r5->unkE = 19; + sub_8022BEC(3, 1, NULL); + r5->unkC = 0; + return 0; + case 1: + sub_8010434(); + break; + case 2: + if (!IsLinkTaskFinished()) + return 0; + DrawDialogueFrame(0, 0); + AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3); + CopyWindowToVram(0, 3); + CreateTask(sub_8153688, 0); + break; + case 3: + if (FuncIsActiveTask(sub_8153688)) + return 0; + break; + case 4: + sub_8022BEC(20, 1, NULL); + r5->unk12 = 15; + r5->unkC = 0; + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_8024228(struct BerryCrushGame *r5, u8 *r6) +{ + s32 r4; +#ifndef NONMATCHING + register s32 r0 asm("r0"); +#else + s32 r0; +#endif + + switch (r5->unkC) + { + case 0: + sub_8024644(r6, 4, 0, 0, 1); + r5->unkE = 20; + sub_8022BEC(3, 1, NULL); + r0 = 0; + r5->unkC = r0; // dunno what it's doing because it's already in case 0 + return 0; + case 1: + DisplayYesNoMenuDefaultYes(); + break; + case 2: + if ((r4 = Menu_ProcessInputNoWrapClearOnChoose()) != -2) + { + memset(r5->unk40.unk2, 0, sizeof(r5->unk40.unk2)); + if (r4 == 0) + { + if (HasAtLeastOneBerry()) + r5->unk14 = 0; + else + r5->unk14 = 3; + } + else + { + r5->unk14 = 1; + } + ClearDialogWindowAndFrame(0, 1); + sub_8024644(r6, 8, 0, 0, 0); + r5->unkE = 21; + sub_8022BEC(3, 1, NULL); + r5->unkC = 0; + } + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_80242E0(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1) +{ + u8 r5 = 0; + + switch (r4->unkC) + { + case 0: + sub_8010434(); + break; + case 1: + if (!IsLinkTaskFinished()) + return 0; + r4->unk40.unk2[0] = r4->unk14; + r4->unk40.unkE.unk0 = 0; + SendBlock(0, r4->unk40.unk2, sizeof(u16)); + break; + case 2: + if (!IsLinkTaskFinished()) + return 0; + r4->unk10 = 0; + break; + case 3: + if (GetBlockReceivedStatus() != gUnknown_082F4448[r4->unk9 - 2]) + return 0; + for (; r5 < r4->unk9; ++r5) + r4->unk40.unkE.unk0 += gBlockRecvBuffer[r5][0]; + if (r4->unk40.unkE.unk0 != 0) + sub_8022BEC(23, 1, NULL); + else + sub_8022BEC(22, 1, NULL); + ResetBlockReceivedFlags(); + r4->unk40.unk2[0] = 0; + r4->unk40.unkE.unk0 = 0; + r4->unk10 = 0; + r4->unkC = 0; + return 0; + } + ++r4->unkC; + return 0; +} + +u32 sub_80243BC(struct BerryCrushGame *r5, __attribute__((unused)) u8 *r1) +{ + switch (r5->unkC) + { + case 0: + BeginNormalPaletteFade(0xFFFFFFFF, 1, 0, 0x10, RGB_BLACK); + UpdatePaletteFade(); + break; + case 1: + if (UpdatePaletteFade()) + return 0; + break; + case 2: + ClearDialogWindowAndFrame(0, 1); + sub_8021488(r5); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); + UpdatePaletteFade(); + break; + case 3: + if (UpdatePaletteFade()) + return 0; + sub_8022BEC(7, 1, NULL); + r5->unk12 = 3; + r5->unkC = 0; + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_8024444(struct BerryCrushGame *r5, __attribute__((unused)) u8 *r1) +{ + switch (r5->unkC) + { + case 0: + DrawDialogueFrame(0, 0); + if (r5->unk14 == 3) + AddTextPrinterParameterized2(0, 1, gUnknown_082F32A4[5], r5->unkB, 0, 2, 1, 3); + else + AddTextPrinterParameterized2(0, 1, gUnknown_082F32A4[6], r5->unkB, 0, 2, 1, 3); + CopyWindowToVram(0, 3); + break; + case 1: + if (IsTextPrinterActive(0)) + return 0; + r5->unk138.unk0 = 120; + break; + case 2: + if (r5->unk138.unk0 != 0) + --r5->unk138.unk0; + else + { + sub_8022BEC(24, 1, NULL); + r5->unkC = 0; + } + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_8024508(struct BerryCrushGame *r5, __attribute__((unused)) u8 *r1) +{ + switch (r5->unkC) + { + case 0: + sub_8010434(); + break; + case 1: + if (!IsLinkTaskFinished()) + return 0; + sub_800AC34(); + break; + case 2: + if (gReceivedRemoteLinkPlayers != 0) + return 0; + r5->unkE = 25; + sub_8022BEC(5, 1, NULL); + r5->unkC = 2; // ??? + return 0; + } + ++r5->unkC; + return 0; +} + +u32 sub_8024568(__attribute__((unused)) struct BerryCrushGame *r0, __attribute__((unused)) u8 *r1) +{ + sub_8020C0C(NULL); + return 0; +} + +void sub_8024578(struct BerryCrushGame *r4) +{ + u8 r5 = 0; + + IncrementGameStat(GAME_STAT_51); + r4->unkD = 0; + r4->unk10 = 0; + r4->unk12 = 2; + r4->unk14 = 0; + r4->unk1C = 0; + r4->unk18 = 0; + r4->unk1A = 0; + r4->unk20 = 0; + r4->unk24 = 0; + r4->unk25_0 = 0; + r4->unk25_1 = 0; + r4->unk25_2 = 0; + r4->unk25_3 = 0; + r4->unk25_4 = 0; + r4->unk25_5 = 0; + r4->unk26 = 0; + r4->unk28 = 0; + r4->unk2E = 0; + r4->unk32 = -1; + r4->unk30 = 0; + r4->unk34 = 0; + for (; r5 < 5; ++r5) // why is it 5 instead of 4? fillerBC isn't sufficient for one player + { + r4->unk68.as_four_players.others[r5].unk0 = -1; + r4->unk68.as_four_players.others[r5].unk2 = 0; + r4->unk68.as_four_players.others[r5].unk4.as_hwords[0] = 0; + r4->unk68.as_four_players.others[r5].unk4.as_hwords[1] = 1; + r4->unk68.as_four_players.others[r5].unk4.as_hwords[2] = 0; + r4->unk68.as_four_players.others[r5].unk4.as_hwords[3] = 0; + r4->unk68.as_four_players.others[r5].unk4.as_hwords[4] = 0; + r4->unk68.as_four_players.others[r5].unk4.as_hwords[5] = 0; + r4->unk68.as_four_players.others[r5].unk4.as_2d_bytes[1][4] = 0; + r4->unk68.as_four_players.others[r5].unk4.as_2d_bytes[1][5] = 0; + } +} + +#ifdef NONMATCHING +void sub_8024604(u8 *r0, u32 r1, s32 r2, u32 r3, u32 r5, u32 r6, u32 r4) +{ + u8 sp[8]; + u8 *p; + + 1[(u32 *)sp] = r2; + 0[(u16 *)sp] = r4; + p = &sp[4]; + r0[0] = p[0]; + r0[1] = p[1]; + r0[2] = p[2]; + r0[3] = p[3]; + r0[4] = r3; + r0[5] = r5; + r0[6] = r6; + r0[7] = sp[0]; + r0[8] = sp[1]; + r0[9] = r1; +} +#else +NAKED +void sub_8024604(u8 *r0, u32 r1, s32 r2, u32 r3, u32 r5, u32 r6, u32 r4) +{ + asm_unified("\n\ + push {r4-r6,lr}\n\ + sub sp, 0x8\n\ + str r2, [sp, 0x4]\n\ + ldr r5, [sp, 0x18]\n\ + ldr r6, [sp, 0x1C]\n\ + ldr r4, [sp, 0x20]\n\ + mov r2, sp\n\ + strh r4, [r2]\n\ + add r4, sp, 0x4\n\ + ldrb r2, [r4]\n\ + strb r2, [r0]\n\ + ldrb r2, [r4, 0x1]\n\ + strb r2, [r0, 0x1]\n\ + ldrb r2, [r4, 0x2]\n\ + strb r2, [r0, 0x2]\n\ + ldrb r2, [r4, 0x3]\n\ + strb r2, [r0, 0x3]\n\ + strb r3, [r0, 0x4]\n\ + strb r5, [r0, 0x5]\n\ + strb r6, [r0, 0x6]\n\ + mov r2, sp\n\ + ldrb r2, [r2]\n\ + strb r2, [r0, 0x7]\n\ + mov r2, sp\n\ + ldrb r2, [r2, 0x1]\n\ + strb r2, [r0, 0x8]\n\ + strb r1, [r0, 0x9]\n\ + add sp, 0x8\n\ + pop {r4-r6}\n\ + pop {r0}\n\ + bx r0"); +} +#endif + +void sub_8024644(u8 *r0, u32 r1, u32 r2, u32 r3, u32 r5) +{ + u8 sp[4]; + + 0[(u16 *)sp] = r3; + r0[0] = r1; + r0[1] = r2; + r0[2] = sp[0]; + r0[3] = sp[1]; + r0[4] = r5; +} From 420b4b3fea3868e91147c5293a332294fce07008 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Wed, 18 Dec 2019 04:17:10 +0800 Subject: [PATCH 27/35] use STR_CONV_MODE_* constants --- src/berry_crush.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/berry_crush.c b/src/berry_crush.c index c61d4eeed..f0987c953 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -655,7 +655,7 @@ void sub_80214A8(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) arg0->unk68.as_four_players.others[i].unk0 + 133); arg1->unk38[i] = &gSprites[spriteId]; arg1->unk38[i]->oam.priority = 3; - arg1->unk38[i]->affineAnimPaused = 1; + arg1->unk38[i]->affineAnimPaused = TRUE; arg1->unk38[i]->pos1.x = arg1->unkC[i]->unk8 + 120; arg1->unk38[i]->pos1.y = -16; data = arg1->unk38[i]->data; @@ -742,8 +742,8 @@ void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1) else StartSpriteAnim(arg1->unk24[i], 0); - arg1->unk24[i]->invisible = 0; - arg1->unk24[i]->animPaused = 0; + arg1->unk24[i]->invisible = FALSE; + arg1->unk24[i]->animPaused = FALSE; arg1->unk24[i]->pos2.x = gUnknown_082F41CC[(var % 4) - 1][0]; arg1->unk24[i]->pos2.y = gUnknown_082F41CC[(var % 4) - 1][1]; } @@ -881,7 +881,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) ConvertIntToDecimalStringN( gStringVar4, sp20->as_four_players.unk00.unk0C[sp10][i], - 1, + STR_CONV_MODE_RIGHT_ALIGN, 4 ); StringAppend(gStringVar4, gUnknown_082F43B4[sp10]); @@ -899,7 +899,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) ConvertIntToDecimalStringN( gStringVar1, sp20->as_four_players.unk00.unk0C[sp10][i] >> 4, - 1, + STR_CONV_MODE_RIGHT_ALIGN, 3 ); j = 0; @@ -916,7 +916,7 @@ void sub_8021A28(struct BerryCrushGame *sp0C, u8 sp10, u8 sp14, u8 r3) ConvertIntToDecimalStringN( gStringVar2, (u8)(r7 / 1000000), - 2, + STR_CONV_MODE_LEADING_ZEROS, 2 ); StringExpandPlaceholders(gStringVar4, gText_XDotY); @@ -1342,14 +1342,14 @@ void sub_8021D34(struct BerryCrushGame *r8) AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_TimeColon); r6 = 176 - (u8)GetStringWidth(2, gText_SpaceSec, -1); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_SpaceSec); - ConvertIntToDecimalStringN(gStringVar1, r8->unk138.unk6, 2, 2); - ConvertIntToDecimalStringN(gStringVar2, r8->unk138.unk8, 2, 2); + ConvertIntToDecimalStringN(gStringVar1, r8->unk138.unk6, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar2, r8->unk138.unk8, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_XDotY2); r6 -= GetStringWidth(2, gStringVar4, -1); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); r6 -= GetStringWidth(2, gText_SpaceMin, -1); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gText_SpaceMin); - ConvertIntToDecimalStringN(gStringVar1, r8->unk138.unk4, 2, 1); + ConvertIntToDecimalStringN(gStringVar1, r8->unk138.unk4, STR_CONV_MODE_LEADING_ZEROS, 1); StringExpandPlaceholders(gStringVar4, gText_StrVar1); r6 -= GetStringWidth(2, gStringVar4, -1); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); @@ -1360,8 +1360,8 @@ void sub_8021D34(struct BerryCrushGame *r8) for (; r10 < 8; ++r10) if (((u8)r8->unk16 >> (7 - r10)) & 1) sp0C += *(r10 + gUnknown_082F334C); // It's accessed in a different way here for unknown reason - ConvertIntToDecimalStringN(gStringVar1, r8->unk16 >> 8, 1, 3); - ConvertIntToDecimalStringN(gStringVar2, sp0C / 1000000, 2, 2); + ConvertIntToDecimalStringN(gStringVar1, r8->unk16 >> 8, STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar2, sp0C / 1000000, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_XDotY3); r6 -= GetStringWidth(2, gStringVar4, -1); if (r8->unk25_1) @@ -1370,7 +1370,7 @@ void sub_8021D34(struct BerryCrushGame *r8) AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); r7 += 14; AddTextPrinterParameterized3(r8->unk138.unk82, 2, 0, r7, sBerryCrushTextColors1[0], 0, gText_Silkiness); - ConvertIntToDecimalStringN(gStringVar1, sp10->as_four_players.unk00.unk08, 1, 3); + ConvertIntToDecimalStringN(gStringVar1, sp10->as_four_players.unk00.unk08, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_Var1Percent); r6 = 176 - (u8)GetStringWidth(2, gStringVar4, -1); AddTextPrinterParameterized3(r8->unk138.unk82, 2, r6, r7, sBerryCrushTextColors1[0], 0, gStringVar4); @@ -1486,7 +1486,7 @@ void sub_8022250(u8 r4) r10 = 41; for (; r9 < 4; ++r9) { - ConvertIntToDecimalStringN(gStringVar1, r9 + 2, 0, 1); + ConvertIntToDecimalStringN(gStringVar1, r9 + 2, STR_CONV_MODE_LEFT_ALIGN, 1); StringExpandPlaceholders(gStringVar4, gText_Var1Players); AddTextPrinterParameterized3( (u8)r6[1], @@ -1510,8 +1510,8 @@ void sub_8022250(u8 r4) for (r2 = 0; r2 < 8; ++r2) if (((u8)r6[r9 + 2] >> (7 - r2)) & 1) sp0C += gUnknown_082F334C[r2]; - ConvertIntToDecimalStringN(gStringVar1, (u16)r6[r9 + 2] >> 8, 1, 3); - ConvertIntToDecimalStringN(gStringVar2, sp0C / 1000000, 2, 2); + ConvertIntToDecimalStringN(gStringVar1, (u16)r6[r9 + 2] >> 8, STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar2, sp0C / 1000000, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_XDotY3); r7 -= GetStringWidth(1, gStringVar4, -1); AddTextPrinterParameterized3( @@ -2607,7 +2607,7 @@ u32 sub_8023BC0(struct BerryCrushGame *r5, u8 *r6) case 3: if (!IsLinkTaskFinished()) return 0; - ConvertIntToDecimalStringN(gStringVar1, r5->unk1C, 0, 6); + ConvertIntToDecimalStringN(gStringVar1, r5->unk1C, STR_CONV_MODE_LEFT_ALIGN, 6); sub_8024644(r6, 7, 1, 0, 0); r5->unkE = 19; sub_8022BEC(3, 1, NULL); @@ -2841,8 +2841,8 @@ u32 sub_8024048(struct BerryCrushGame *r5, u8 *r6) } break; case 4: - ConvertIntToDecimalStringN(gStringVar1, r5->unk1C, 0, 6); - ConvertIntToDecimalStringN(gStringVar2, GetBerryPowder(), 0, 6); + ConvertIntToDecimalStringN(gStringVar1, r5->unk1C, STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar2, GetBerryPowder(), STR_CONV_MODE_LEFT_ALIGN, 6); sub_8024644(r6, 2, 3, 0, 0); r5->unkE = 19; sub_8022BEC(3, 1, NULL); From 5f1c7c9e93b8d249c0bc5d803b2c235f77e5b68d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 18 Dec 2019 13:03:00 -0500 Subject: [PATCH 28/35] Bump travis to bionic (Ubuntu 18.04 LTS) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1ff0ad2c7..e9964105e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: generic -dist: trusty +dist: bionic sudo: false env: global: From d137a1a0c11737e1cbe9ca9fbeba74913ad63eab Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 18 Dec 2019 19:12:09 -0500 Subject: [PATCH 29/35] Use constants in compare macro --- asm/macros/event.inc | 12 +++++------- include/constants/vars.h | 6 +++++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 8b43d0821..951e295a6 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -233,14 +233,12 @@ .endm @ Generic compare macro which attempts to deduce argument types based on their values - @ Any values between 0x4000 to 0x4FFF and 0x8000 to 0x8FFF are considered event variable identifiers - .macro compare arg1:req, arg2:req - .if ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && ((\arg2 >> 12) == 4 || (\arg2 >> 12) == 8) - compare_var_to_var \arg1, \arg2 - .elseif ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && (\arg2 >= 0 && \arg2 <= 0xFFFF) - compare_var_to_value \arg1, \arg2 + @ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8015 are considered event variable identifiers + .macro compare var:req, arg:req + .if (\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END) + compare_var_to_var \var, \arg .else - .error "Invalid arguments for 'compare'" + compare_var_to_value \var, \arg .endif .endm diff --git a/include/constants/vars.h b/include/constants/vars.h index d2782116f..7f622b6e3 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -273,7 +273,9 @@ #define VAR_UNUSED_0x40FE 0x40FE // Unused Var #define VAR_UNUSED_0x40FF 0x40FF // Unused Var -#define SPECIAL_VARS_START 0x8000 +#define VARS_END 0x40FF + +#define SPECIAL_VARS_START 0x8000 // special vars // They are commonly used as parameters to commands, or return values from commands. #define VAR_0x8000 0x8000 @@ -299,4 +301,6 @@ #define VAR_UNUSED_0x8014 0x8014 #define VAR_TRAINER_BATTLE_OPPONENT_A 0x8015 // Alias of gTrainerBattleOpponent_A +#define SPECIAL_VARS_END 0x8015 + #endif // GUARD_CONSTANTS_VARS_H From 9e08cfe55f632fd749ce64c0e54eb93bd10926dc Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 18 Dec 2019 19:22:39 -0500 Subject: [PATCH 30/35] Remove uses of compare_var_to --- asm/macros/event.inc | 2 +- data/scripts/mevent_altering_cave.inc | 2 +- data/scripts/mevent_aurora_ticket.inc | 4 ++-- data/scripts/mevent_battle_card.inc | 2 +- data/scripts/mevent_mystic_ticket.inc | 4 ++-- data/scripts/mevent_old_sea_map.inc | 4 ++-- data/scripts/mevent_pichu.inc | 12 ++++++------ data/scripts/mevent_trainer.inc | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 951e295a6..764dcf054 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -235,7 +235,7 @@ @ Generic compare macro which attempts to deduce argument types based on their values @ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8015 are considered event variable identifiers .macro compare var:req, arg:req - .if (\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END) + .if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END)) compare_var_to_var \var, \arg .else compare_var_to_value \var, \arg diff --git a/data/scripts/mevent_altering_cave.inc b/data/scripts/mevent_altering_cave.inc index 072005934..499907edd 100644 --- a/data/scripts/mevent_altering_cave.inc +++ b/data/scripts/mevent_altering_cave.inc @@ -1,7 +1,7 @@ MysteryEventScript_AlteringCave:: @ 86756E3 setvaddress MysteryEventScript_AlteringCave addvar VAR_ALTERING_CAVE_WILD_SET, 1 - compare_var_to_value VAR_ALTERING_CAVE_WILD_SET, 10 + compare VAR_ALTERING_CAVE_WILD_SET, 10 vgoto_if_ne MysteryEventScript_AlteringCave_ setvar VAR_ALTERING_CAVE_WILD_SET, 0 MysteryEventScript_AlteringCave_: @ 86756FD diff --git a/data/scripts/mevent_aurora_ticket.inc b/data/scripts/mevent_aurora_ticket.inc index 811c840aa..177d69681 100644 --- a/data/scripts/mevent_aurora_ticket.inc +++ b/data/scripts/mevent_aurora_ticket.inc @@ -7,13 +7,13 @@ MysteryEventScript_AuroraTicket:: @ 867533C checkflag FLAG_BATTLED_DEOXYS vgoto_if_eq AuroraTicket_Obtained checkitem ITEM_AURORA_TICKET, 1 - compare_var_to_value VAR_RESULT, TRUE + compare VAR_RESULT, TRUE vgoto_if_eq AuroraTicket_Obtained vmessage sText_AuroraTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_AURORA_TICKET, 1 - compare_var_to_value VAR_RESULT, FALSE + compare VAR_RESULT, FALSE vgoto_if_eq AuroraTicket_NoBagSpace giveitem_std ITEM_AURORA_TICKET setflag FLAG_ENABLE_SHIP_BIRTH_ISLAND diff --git a/data/scripts/mevent_battle_card.inc b/data/scripts/mevent_battle_card.inc index 8c36ed63a..77f9a9b24 100644 --- a/data/scripts/mevent_battle_card.inc +++ b/data/scripts/mevent_battle_card.inc @@ -4,7 +4,7 @@ MysteryEventScript_BattleCard:: @ 867513C vgoto_if_eq MysteryEventScript_BattleCardInfo setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON specialvar VAR_0x8008, GetMysteryEventCardVal - compare_var_to_value VAR_0x8008, REQUIRED_CARD_BATTLES + compare VAR_0x8008, REQUIRED_CARD_BATTLES vgoto_if_ne MysteryEventScript_BattleCardInfo lock faceplayer diff --git a/data/scripts/mevent_mystic_ticket.inc b/data/scripts/mevent_mystic_ticket.inc index 0264fb77f..9d532b043 100644 --- a/data/scripts/mevent_mystic_ticket.inc +++ b/data/scripts/mevent_mystic_ticket.inc @@ -9,13 +9,13 @@ MysteryEventScript_MysticTicket:: @ 867550B checkflag FLAG_CAUGHT_HO_OH vgoto_if_eq MysticTicket_Obtained checkitem ITEM_MYSTIC_TICKET, 1 - compare_var_to_value VAR_RESULT, TRUE + compare VAR_RESULT, TRUE vgoto_if_eq MysticTicket_Obtained vmessage sText_MysticTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_MYSTIC_TICKET, 1 - compare_var_to_value VAR_RESULT, FALSE + compare VAR_RESULT, FALSE vgoto_if_eq MysticTicket_NoBagSpace giveitem_std ITEM_MYSTIC_TICKET setflag FLAG_ENABLE_SHIP_NAVEL_ROCK diff --git a/data/scripts/mevent_old_sea_map.inc b/data/scripts/mevent_old_sea_map.inc index dffb56caa..45c5f6728 100644 --- a/data/scripts/mevent_old_sea_map.inc +++ b/data/scripts/mevent_old_sea_map.inc @@ -7,13 +7,13 @@ MysteryEventScript_OldSeaMap:: @ 86757F4 checkflag FLAG_CAUGHT_MEW vgoto_if_eq OldSeaMap_Obtained checkitem ITEM_OLD_SEA_MAP, 1 - compare_var_to_value VAR_RESULT, TRUE + compare VAR_RESULT, TRUE vgoto_if_eq OldSeaMap_Obtained vmessage sText_MysteryGiftOldSeaMapForYou waitmessage waitbuttonpress checkitemspace ITEM_OLD_SEA_MAP, 1 - compare_var_to_value VAR_RESULT, FALSE + compare VAR_RESULT, FALSE vgoto_if_eq OldSeaMap_NoBagSpace giveitem_std ITEM_OLD_SEA_MAP setflag FLAG_ENABLE_SHIP_FARAWAY_ISLAND diff --git a/data/scripts/mevent_pichu.inc b/data/scripts/mevent_pichu.inc index 4df317564..4f5c739af 100644 --- a/data/scripts/mevent_pichu.inc +++ b/data/scripts/mevent_pichu.inc @@ -6,7 +6,7 @@ MysteryEventScript_SurfPichu:: @ 8674D3D SurfPichu_GiveIfPossible: @ 8674D4C specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount - compare_var_to_value VAR_EVENT_PICHU_SLOT, PARTY_SIZE + compare VAR_EVENT_PICHU_SLOT, PARTY_SIZE vgoto_if_eq SurfPichu_FullParty setflag FLAG_MYSTERY_EVENT_DONE vcall SurfPichu_GiveEgg @@ -33,15 +33,15 @@ SurfPichu_GiveEgg: @ 8674D7E giveegg SPECIES_PICHU setmonobedient VAR_EVENT_PICHU_SLOT setmonmetlocation VAR_EVENT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER - compare_var_to_value VAR_EVENT_PICHU_SLOT, 1 + compare VAR_EVENT_PICHU_SLOT, 1 vgoto_if_eq SurfPichu_Slot1 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 2 + compare VAR_EVENT_PICHU_SLOT, 2 vgoto_if_eq SurfPichu_Slot2 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 3 + compare VAR_EVENT_PICHU_SLOT, 3 vgoto_if_eq SurfPichu_Slot3 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 4 + compare VAR_EVENT_PICHU_SLOT, 4 vgoto_if_eq SurfPichu_Slot4 - compare_var_to_value VAR_EVENT_PICHU_SLOT, 5 + compare VAR_EVENT_PICHU_SLOT, 5 vgoto_if_eq SurfPichu_Slot5 return diff --git a/data/scripts/mevent_trainer.inc b/data/scripts/mevent_trainer.inc index 1b0117078..4114750d8 100644 --- a/data/scripts/mevent_trainer.inc +++ b/data/scripts/mevent_trainer.inc @@ -1,7 +1,7 @@ MysteryEventScript_VisitingTrainer:: @ 8674EC1 setvaddress MysteryEventScript_VisitingTrainer special ValidateEReaderTrainer - compare_var_to_value VAR_RESULT, 0 + compare VAR_RESULT, 0 vgoto_if_eq MysteryEventScript_VisitingTrainerArrived lock faceplayer From 3a7bb65077058566557ed84360757ae38e741da7 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Thu, 19 Dec 2019 03:42:09 -0500 Subject: [PATCH 31/35] update instrument sample names --- sound/direct_sound_data.inc | 40 +-- ...hhs.aif => classical_choir_voice_ahhs.aif} | Bin ...sh.aif => sc88_orchestra_cymbal_crash.aif} | Bin ...rd_snare2.aif => sc88_orchestra_snare.aif} | Bin ...d_sc88_square.aif => sc88_square_wave.aif} | Bin ...rd_snare1.aif => sc88_standard3_snare.aif} | Bin ...if => sd90_classical_detuned_ep1_high.aif} | Bin ...aif => sd90_classical_detuned_ep1_low.aif} | Bin ...nics.aif => sd90_special_scream_drive.aif} | Bin ...bal_crash.aif => trinity_cymbal_crash.aif} | Bin ...ale_voice.aif => unknown_female_voice.aif} | Bin sound/voice_groups.inc | 254 +++++++++--------- 12 files changed, 147 insertions(+), 147 deletions(-) rename sound/direct_sound_samples/{advanced_orchestra_voice_ahhs.aif => classical_choir_voice_ahhs.aif} (100%) rename sound/direct_sound_samples/{sc88_standard_cymbal_crash.aif => sc88_orchestra_cymbal_crash.aif} (100%) rename sound/direct_sound_samples/{sc88_standard_snare2.aif => sc88_orchestra_snare.aif} (100%) rename sound/direct_sound_samples/{unused_sc88_square.aif => sc88_square_wave.aif} (100%) rename sound/direct_sound_samples/{sc88_standard_snare1.aif => sc88_standard3_snare.aif} (100%) rename sound/direct_sound_samples/{unknown_e_piano_high.aif => sd90_classical_detuned_ep1_high.aif} (100%) rename sound/direct_sound_samples/{unknown_e_piano_low.aif => sd90_classical_detuned_ep1_low.aif} (100%) rename sound/direct_sound_samples/{sd90_classical_guitar_harmonics.aif => sd90_special_scream_drive.aif} (100%) rename sound/direct_sound_samples/{unknown_cymbal_crash.aif => trinity_cymbal_crash.aif} (100%) rename sound/direct_sound_samples/{unused_unknown_female_voice.aif => unknown_female_voice.aif} (100%) diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index f1518ee4b..80f91a01d 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -23,8 +23,8 @@ DirectSoundWaveData_sc88_timpani:: .incbin "sound/direct_sound_samples/sc88_timpani.bin" .align 2 -DirectSoundWaveData_advanced_orchestra_voice_ahhs:: - .incbin "sound/direct_sound_samples/advanced_orchestra_voice_ahhs.bin" +DirectSoundWaveData_classical_choir_voice_ahhs:: + .incbin "sound/direct_sound_samples/classical_choir_voice_ahhs.bin" .align 2 DirectSoundWaveData_sd90_classical_oboe:: @@ -59,16 +59,16 @@ DirectSoundWaveData_sc88_standard_kick:: .incbin "sound/direct_sound_samples/sc88_standard_kick.bin" .align 2 -DirectSoundWaveData_sc88_standard_snare1:: - .incbin "sound/direct_sound_samples/sc88_standard_snare1.bin" +DirectSoundWaveData_sc88_standard3_snare:: + .incbin "sound/direct_sound_samples/sc88_standard3_snare.bin" .align 2 DirectSoundWaveData_sc88_standard_hand_clap:: .incbin "sound/direct_sound_samples/sc88_standard_hand_clap.bin" .align 2 -DirectSoundWaveData_sc88_standard_snare2:: - .incbin "sound/direct_sound_samples/sc88_standard_snare2.bin" +DirectSoundWaveData_sc88_orchestra_snare:: + .incbin "sound/direct_sound_samples/sc88_orchestra_snare.bin" .align 2 DirectSoundWaveData_unknown_tom:: @@ -91,12 +91,12 @@ DirectSoundWaveData_unknown_tambourine:: .incbin "sound/direct_sound_samples/unknown_tambourine.bin" .align 2 -DirectSoundWaveData_unknown_cymbal_crash:: - .incbin "sound/direct_sound_samples/unknown_cymbal_crash.bin" +DirectSoundWaveData_trinity_cymbal_crash:: + .incbin "sound/direct_sound_samples/trinity_cymbal_crash.bin" .align 2 -DirectSoundWaveData_sc88_standard_cymbal_crash:: - .incbin "sound/direct_sound_samples/sc88_standard_cymbal_crash.bin" +DirectSoundWaveData_sc88_orchestra_cymbal_crash:: + .incbin "sound/direct_sound_samples/sc88_orchestra_cymbal_crash.bin" .align 2 DirectSoundWaveData_sc88_bongo:: @@ -251,20 +251,20 @@ DirectSoundWaveData_emu_ii_pipe_organ:: .incbin "sound/direct_sound_samples/emu_ii_pipe_organ.bin" .align 2 -DirectSoundWaveData_unused_unknown_female_voice:: - .incbin "sound/direct_sound_samples/unused_unknown_female_voice.bin" +DirectSoundWaveData_unknown_female_voice:: + .incbin "sound/direct_sound_samples/unknown_female_voice.bin" .align 2 DirectSoundWaveData_unused_unknown_male_voice:: .incbin "sound/direct_sound_samples/unused_unknown_male_voice.bin" .align 2 -DirectSoundWaveData_unknown_e_piano_low:: - .incbin "sound/direct_sound_samples/unknown_e_piano_low.bin" +DirectSoundWaveData_sd90_classical_detuned_ep1_low:: + .incbin "sound/direct_sound_samples/sd90_classical_detuned_ep1_low.bin" .align 2 -DirectSoundWaveData_unknown_e_piano_high:: - .incbin "sound/direct_sound_samples/unknown_e_piano_high.bin" +DirectSoundWaveData_sd90_classical_detuned_ep1_high:: + .incbin "sound/direct_sound_samples/sd90_classical_detuned_ep1_high.bin" .align 2 DirectSoundWaveData_sc88_timpani_with_snare:: @@ -275,8 +275,8 @@ DirectSoundWaveData_unknown_synth_snare:: .incbin "sound/direct_sound_samples/unknown_synth_snare.bin" .align 2 -DirectSoundWaveData_unused_sc88_square:: - .incbin "sound/direct_sound_samples/unused_sc88_square.bin" +DirectSoundWaveData_sc88_square_wave:: + .incbin "sound/direct_sound_samples/sc88_square_wave.bin" .align 2 DirectSoundWaveData_bicycle_bell:: @@ -1951,8 +1951,8 @@ DirectSoundWaveData_sc88_nylon_str_guitar:: .incbin "sound/direct_sound_samples/sc88_nylon_str_guitar.bin" .align 2 -DirectSoundWaveData_sd90_classical_guitar_harmonics:: - .incbin "sound/direct_sound_samples/sd90_classical_guitar_harmonics.bin" +DirectSoundWaveData_sd90_special_scream_drive:: + .incbin "sound/direct_sound_samples/sd90_special_scream_drive.bin" .align 2 DirectSoundWaveData_88DBBC0:: diff --git a/sound/direct_sound_samples/advanced_orchestra_voice_ahhs.aif b/sound/direct_sound_samples/classical_choir_voice_ahhs.aif similarity index 100% rename from sound/direct_sound_samples/advanced_orchestra_voice_ahhs.aif rename to sound/direct_sound_samples/classical_choir_voice_ahhs.aif diff --git a/sound/direct_sound_samples/sc88_standard_cymbal_crash.aif b/sound/direct_sound_samples/sc88_orchestra_cymbal_crash.aif similarity index 100% rename from sound/direct_sound_samples/sc88_standard_cymbal_crash.aif rename to sound/direct_sound_samples/sc88_orchestra_cymbal_crash.aif diff --git a/sound/direct_sound_samples/sc88_standard_snare2.aif b/sound/direct_sound_samples/sc88_orchestra_snare.aif similarity index 100% rename from sound/direct_sound_samples/sc88_standard_snare2.aif rename to sound/direct_sound_samples/sc88_orchestra_snare.aif diff --git a/sound/direct_sound_samples/unused_sc88_square.aif b/sound/direct_sound_samples/sc88_square_wave.aif similarity index 100% rename from sound/direct_sound_samples/unused_sc88_square.aif rename to sound/direct_sound_samples/sc88_square_wave.aif diff --git a/sound/direct_sound_samples/sc88_standard_snare1.aif b/sound/direct_sound_samples/sc88_standard3_snare.aif similarity index 100% rename from sound/direct_sound_samples/sc88_standard_snare1.aif rename to sound/direct_sound_samples/sc88_standard3_snare.aif diff --git a/sound/direct_sound_samples/unknown_e_piano_high.aif b/sound/direct_sound_samples/sd90_classical_detuned_ep1_high.aif similarity index 100% rename from sound/direct_sound_samples/unknown_e_piano_high.aif rename to sound/direct_sound_samples/sd90_classical_detuned_ep1_high.aif diff --git a/sound/direct_sound_samples/unknown_e_piano_low.aif b/sound/direct_sound_samples/sd90_classical_detuned_ep1_low.aif similarity index 100% rename from sound/direct_sound_samples/unknown_e_piano_low.aif rename to sound/direct_sound_samples/sd90_classical_detuned_ep1_low.aif diff --git a/sound/direct_sound_samples/sd90_classical_guitar_harmonics.aif b/sound/direct_sound_samples/sd90_special_scream_drive.aif similarity index 100% rename from sound/direct_sound_samples/sd90_classical_guitar_harmonics.aif rename to sound/direct_sound_samples/sd90_special_scream_drive.aif diff --git a/sound/direct_sound_samples/unknown_cymbal_crash.aif b/sound/direct_sound_samples/trinity_cymbal_crash.aif similarity index 100% rename from sound/direct_sound_samples/unknown_cymbal_crash.aif rename to sound/direct_sound_samples/trinity_cymbal_crash.aif diff --git a/sound/direct_sound_samples/unused_unknown_female_voice.aif b/sound/direct_sound_samples/unknown_female_voice.aif similarity index 100% rename from sound/direct_sound_samples/unused_unknown_female_voice.aif rename to sound/direct_sound_samples/unknown_female_voice.aif diff --git a/sound/voice_groups.inc b/sound/voice_groups.inc index c0f546ccf..4b71845aa 100644 --- a/sound/voice_groups.inc +++ b/sound/voice_groups.inc @@ -93,7 +93,7 @@ voicegroup001:: @ 8675FEC voice_square_1 0, 0, 0, 1, 6, 0 @ 8676118 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676124 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676130 - voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 867613C + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 @ 867613C .align 2 voicegroup002:: @ 8676148 @@ -106,9 +106,9 @@ voicegroup002:: @ 8676148 voice_directsound 60, 0, DirectSoundWaveData_unknown_wood_block_high, 255, 0, 255, 0 @ 8676190 voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_kick, 255, 0, 255, 242 @ 867619C voice_square_1 0, 2, 0, 0, 15, 0 @ 86761A8 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86761B4 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 86761B4 voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 86761C0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86761CC + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 86761CC voice_directsound 48, 44, DirectSoundWaveData_unknown_tom, 255, 210, 77, 204 @ 86761D8 voice_directsound_no_resample 60, 79, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 @ 86761E4 voice_directsound 51, 54, DirectSoundWaveData_unknown_tom, 255, 216, 77, 204 @ 86761F0 @@ -123,12 +123,12 @@ voicegroup002:: @ 8676148 voice_square_1 0, 2, 0, 0, 15, 0 @ 867625C voice_directsound_no_resample 70, 49, DirectSoundWaveData_unknown_bell, 255, 165, 103, 231 @ 8676268 voice_directsound_no_resample 32, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 8676274 - voice_directsound_no_resample 60, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 235, 0, 165 @ 8676280 + voice_directsound_no_resample 60, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 235, 0, 165 @ 8676280 voice_square_1 0, 2, 0, 0, 15, 0 @ 867628C - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 8676298 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 246, 0, 216 @ 8676298 voice_square_1 0, 2, 0, 0, 15, 0 @ 86762A4 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 86762B0 - voice_directsound_no_resample 30, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86762BC + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 246, 0, 216 @ 86762B0 + voice_directsound_no_resample 30, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 8, 0, 255, 216 @ 86762BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86762C8 voice_directsound_no_resample 72, 104, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86762D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86762E0 @@ -137,30 +137,30 @@ voicegroup002:: @ 8676148 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 8676304 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 8676310 voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 867631C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676328 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 8676328 voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676334 - voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676340 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 8676340 voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867634C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8676358 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 8676358 voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676364 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8676370 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 8676370 voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867637C voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676388 - voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676394 + voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 8676394 voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 @ 86763A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86763AC - voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86763B8 + voice_directsound 63, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86763B8 voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 86763C4 .align 2 voicegroup003:: @ 86763D0 voice_directsound_no_resample 64, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86763D0 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86763DC + voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 @ 86763DC voice_directsound_no_resample 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86763E8 - voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86763F4 + voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86763F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676400 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867640C - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 8676418 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 867640C + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 8, 0, 255, 216 @ 8676418 voice_directsound_no_resample 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 8676424 voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 8676430 voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 867643C @@ -194,30 +194,30 @@ voicegroup003:: @ 86763D0 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 867658C voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 8676598 voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 86765A4 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86765B0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 86765B0 voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86765BC - voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86765C8 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 86765C8 voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86765D4 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86765E0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 86765E0 voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86765EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86765F8 voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676604 voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676610 - voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867661C + voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 867661C voice_directsound 64, 104, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 235 @ 8676628 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676634 - voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676640 + voice_directsound 63, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 8676640 voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 867664C .align 2 voicegroup004:: @ 8676658 voice_directsound_no_resample 66, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 8676658 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 8676664 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 @ 8676664 voice_directsound_no_resample 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 8676670 - voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867667C + voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 867667C voice_square_1 0, 2, 0, 0, 15, 0 @ 8676688 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676694 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86766A0 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 8676694 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 8, 0, 255, 216 @ 86766A0 voice_directsound_no_resample 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 86766AC voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86766B8 voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86766C4 @@ -251,27 +251,27 @@ voicegroup004:: @ 8676658 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 8676814 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 8676820 voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 867682C - voice_directsound 65, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676838 + voice_directsound 65, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 8676838 voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676844 - voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8676850 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 8676850 voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867685C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8676868 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 8676868 voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676874 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676880 voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 867688C voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 8676898 - voice_directsound 56, 89, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86768A4 + voice_directsound 56, 89, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86768A4 voice_directsound 64, 104, DirectSoundWaveData_unknown_ethnic_drum, 255, 0, 255, 235 @ 86768B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86768BC - voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86768C8 + voice_directsound 63, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86768C8 voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 86768D4 voice_directsound_no_resample 66, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86768E0 - voice_directsound 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86768EC + voice_directsound 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 @ 86768EC voice_directsound 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86768F8 - voice_directsound 60, 29, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 8676904 + voice_directsound 60, 29, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 8676904 voice_square_1 0, 2, 0, 0, 15, 0 @ 8676910 - voice_directsound 58, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 867691C - voice_directsound 62, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 8676928 + voice_directsound 58, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 867691C + voice_directsound 62, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 8, 0, 255, 216 @ 8676928 voice_directsound 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 8676934 voice_directsound 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 8676940 voice_directsound 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 867694C @@ -1098,9 +1098,9 @@ voicegroup016:: @ 8678C74 voice_noise_alt 0, 0, 1, 0, 1 @ 8678E18 voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_kick, 255, 0, 255, 242 @ 8678E24 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E30 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 8678E3C + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 8678E3C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E48 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 8678E54 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 8678E54 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E60 voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E6C voice_square_1 0, 2, 0, 0, 15, 0 @ 8678E78 @@ -1623,9 +1623,9 @@ voicegroup022:: @ 867A438 voice_square_1_alt 0, 0, 0, 0, 7, 0 @ 867A5DC voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_kick, 255, 0, 255, 242 @ 867A5E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A5F4 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 867A600 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 867A600 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A60C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 867A618 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 867A618 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A624 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A630 voice_square_1 0, 2, 0, 0, 15, 0 @ 867A63C @@ -2420,7 +2420,7 @@ voicegroup031:: @ 867C838 voice_square_1 0, 2, 0, 0, 15, 0 @ 867C9F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA00 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA0C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 867CA18 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 867CA18 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA24 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA30 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CA3C @@ -2437,9 +2437,9 @@ voicegroup031:: @ 867C838 voice_directsound_no_resample 32, 49, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 867CAC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CACC voice_square_1 0, 2, 0, 0, 15, 0 @ 867CAD8 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 867CAE4 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 8, 0, 255, 216 @ 867CAE4 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CAF0 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 867CAFC + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 246, 0, 216 @ 867CAFC voice_square_1 0, 2, 0, 0, 15, 0 @ 867CB08 voice_square_1 0, 2, 0, 0, 15, 0 @ 867CB14 voice_directsound_no_resample 72, 79, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 867CB20 @@ -11583,7 +11583,7 @@ voicegroup107:: @ 8696A70 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CE0 - voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 8696CEC + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 @ 8696CEC voice_square_1 0, 2, 0, 0, 15, 0 @ 8696CF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 8696D10 @@ -12040,7 +12040,7 @@ voicegroup111:: @ 8698054 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981A4 voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 226 @ 86981B0 voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 195 @ 86981BC - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 195 @ 86981C8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 195 @ 86981C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86981EC @@ -12192,8 +12192,8 @@ voicegroup112:: @ 8698654 voice_square_1 0, 2, 0, 0, 15, 0 @ 86988A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86988AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86988B8 - voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 128, 165, 128, 188 @ 86988C4 - voice_directsound 60, 0, DirectSoundWaveData_unused_unknown_female_voice, 128, 165, 128, 204 @ 86988D0 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 128, 165, 128, 188 @ 86988C4 + voice_directsound 60, 0, DirectSoundWaveData_unknown_female_voice, 128, 165, 128, 204 @ 86988D0 voice_directsound 60, 0, DirectSoundWaveData_unused_unknown_male_voice, 128, 165, 128, 188 @ 86988DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86988E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86988F4 @@ -12529,7 +12529,7 @@ voicegroup114:: @ 8699254 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699824 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699830 voice_square_1 0, 2, 0, 0, 15, 0 @ 869983C - voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 8699848 + voice_directsound 60, 0, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 246, 0, 216 @ 8699848 .align 2 voicegroup115:: @ 8699854 @@ -12537,8 +12537,8 @@ voicegroup115:: @ 8699854 voice_keysplit voicegroup005, KeySplitTable1 @ 8699860 voice_square_1 0, 2, 0, 0, 15, 0 @ 869986C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699878 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 128, 249, 0, 188 @ 8699884 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 255, 188, 103, 165 @ 8699890 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 128, 249, 0, 188 @ 8699884 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 188, 103, 165 @ 8699890 voice_square_1 0, 2, 0, 0, 15, 0 @ 869989C voice_square_1 0, 2, 0, 0, 15, 0 @ 86998A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86998B4 @@ -12653,7 +12653,7 @@ voicegroup115:: @ 8699854 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699DD0 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699DDC voice_square_1 0, 2, 0, 0, 15, 0 @ 8699DE8 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 8699DF4 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 8699DF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699E00 voice_square_1 0, 2, 0, 0, 15, 0 @ 8699E0C voice_square_1 0, 2, 0, 0, 15, 0 @ 8699E18 @@ -13465,7 +13465,7 @@ voicegroup123:: @ 869BCF0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C2C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 869C2CC voice_square_1 0, 2, 0, 0, 15, 0 @ 869C2D8 - voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 869C2E4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 246, 0, 216 @ 869C2E4 .align 2 voicegroup124:: @ 869C2F0 @@ -13772,8 +13772,8 @@ voicegroup126:: @ 869CAF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D0B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D0C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D0D0 - voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 216 @ 869D0DC - voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 246, 0, 216 @ 869D0E8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 216 @ 869D0DC + voice_directsound 60, 0, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 246, 0, 216 @ 869D0E8 .align 2 voicegroup127:: @ 869D0F4 @@ -13790,8 +13790,8 @@ voicegroup127:: @ 869D0F4 voice_square_1_alt 0, 2, 2, 0, 15, 0 @ 869D16C voice_square_1_alt 0, 1, 2, 0, 15, 0 @ 869D178 voice_square_1_alt 23, 1, 0, 1, 9, 0 @ 869D184 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 165 @ 869D190 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 226, 0, 165 @ 869D19C + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 0, 255, 165 @ 869D190 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 226, 0, 165 @ 869D19C voice_square_1_alt 0, 2, 0, 6, 0, 1 @ 869D1A8 voice_square_1_alt 36, 0, 0, 2, 0, 0 @ 869D1B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 869D1C0 @@ -13922,17 +13922,17 @@ voicegroup128:: @ 869D6F4 voice_noise_alt 1, 0, 2, 0, 0 @ 869D778 voice_square_1 103, 3, 2, 7, 0, 0 @ 869D784 voice_square_2 3, 2, 7, 0, 0 @ 869D790 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 226, 0, 127 @ 869D79C + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 226, 0, 127 @ 869D79C voice_directsound 60, 0, DirectSoundWaveData_872921C, 255, 0, 255, 0 @ 869D7A8 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 204, 0, 127 @ 869D7B4 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 204, 0, 127 @ 869D7B4 voice_square_1_alt 0, 2, 0, 2, 0, 1 @ 869D7C0 voice_directsound 60, 0, DirectSoundWaveData_872A5D0, 255, 0, 255, 127 @ 869D7CC - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 869D7D8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 0, 255, 127 @ 869D7D8 voice_square_1 103, 0, 0, 7, 0, 0 @ 869D7E4 - voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 127 @ 869D7F0 + voice_directsound 60, 0, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 127 @ 869D7F0 voice_directsound 60, 0, DirectSoundWaveData_sc88_wind, 255, 0, 255, 127 @ 869D7FC voice_directsound 60, 0, DirectSoundWaveData_sc88_bubbles, 255, 0, 255, 127 @ 869D808 - voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 127 @ 869D814 + voice_directsound 60, 0, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 127 @ 869D814 voice_noise_alt 0, 0, 7, 15, 1 @ 869D820 voice_directsound 60, 0, DirectSoundWaveData_872EEA8, 255, 0, 255, 127 @ 869D82C voice_noise_alt 1, 0, 7, 15, 1 @ 869D838 @@ -13960,7 +13960,7 @@ voicegroup128:: @ 869D6F4 voice_square_1 0, 0, 4, 0, 15, 0 @ 869D940 voice_directsound 60, 0, DirectSoundWaveData_sc88_xylophone, 255, 188, 0, 0 @ 869D94C voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 226, 0, 127 @ 869D958 - voice_directsound 60, 0, DirectSoundWaveData_sc88_standard_cymbal_crash, 26, 0, 255, 127 @ 869D964 + voice_directsound 60, 0, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 26, 0, 255, 127 @ 869D964 voice_square_1_alt 0, 2, 0, 1, 0, 0 @ 869D970 voice_directsound 60, 0, DirectSoundWaveData_sc88_glockenspiel, 255, 252, 0, 127 @ 869D97C voice_square_1_alt 0, 1, 0, 2, 0, 0 @ 869D988 @@ -13975,7 +13975,7 @@ voicegroup128:: @ 869D6F4 voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 869D9F4 voice_directsound 60, 0, DirectSoundWaveData_unknown_tom, 255, 0, 255, 165 @ 869DA00 voice_noise_alt 0, 5, 7, 15, 1 @ 869DA0C - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 128, 242, 0, 165 @ 869DA18 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 128, 242, 0, 165 @ 869DA18 voice_directsound 60, 0, DirectSoundWaveData_sc88_string_ensemble_72, 255, 0, 255, 165 @ 869DA24 voice_square_1 0, 0, 1, 5, 0, 0 @ 869DA30 voice_noise_alt 0, 6, 6, 0, 1 @ 869DA3C @@ -14852,7 +14852,7 @@ voicegroup129:: @ 86A0154 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02BC - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A02C8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86A02C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A02EC @@ -14869,7 +14869,7 @@ voicegroup129:: @ 86A0154 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A0370 voice_directsound 60, 0, DirectSoundWaveData_sc88_harp, 255, 252, 0, 204 @ 86A037C voice_directsound 60, 0, DirectSoundWaveData_sc88_accordion, 255, 0, 255, 165 @ 86A0388 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 204, 0, 127 @ 86A0394 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 204, 0, 127 @ 86A0394 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A03A0 voice_square_1_alt 0, 2, 0, 0, 15, 0 @ 86A03AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A03B8 @@ -15435,7 +15435,7 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D68 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D74 voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86A1D80 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86A1D8C + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 0, 255, 127 @ 86A1D8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1D98 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1DA4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A1DB0 @@ -15516,7 +15516,7 @@ voicegroup133:: @ 86A1BB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2134 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2140 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A214C - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A2158 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86A2158 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2164 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2170 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A217C @@ -15841,8 +15841,8 @@ voicegroup137:: @ 86A2FD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2FE0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2FEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A2FF8 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 165, 180, 165 @ 86A3004 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 255, 137, 154, 165 @ 86A3010 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 165, 180, 165 @ 86A3004 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 137, 154, 165 @ 86A3010 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A301C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3028 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3034 @@ -15972,8 +15972,8 @@ voicegroup138:: @ 86A35D4 voice_keysplit voicegroup005, KeySplitTable1 @ 86A35E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A35EC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A35F8 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86A3604 - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86A3610 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86A3604 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 @ 86A3610 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A361C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3628 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A3634 @@ -16721,8 +16721,8 @@ voicegroup145:: @ 86A57F4 voice_keysplit voicegroup005, KeySplitTable1 @ 86A5800 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A580C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5818 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86A5824 - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86A5830 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86A5824 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 @ 86A5830 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A583C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5848 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A5854 @@ -17079,7 +17079,7 @@ voicegroup148:: @ 86A67E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A685C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6868 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6874 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 226, 0, 127 @ 86A6880 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 226, 0, 127 @ 86A6880 voice_directsound 60, 0, DirectSoundWaveData_sc88_tubular_bell, 255, 165, 90, 216 @ 86A688C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6898 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A68A4 @@ -17105,7 +17105,7 @@ voicegroup148:: @ 86A67E4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A6994 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69AC - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86A69B8 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 0, 255, 127 @ 86A69B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A69DC @@ -17781,7 +17781,7 @@ voicegroup154:: @ 86A8860 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A886C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8878 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8884 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A8890 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 @ 86A8890 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A889C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A88A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A88B4 @@ -17877,8 +17877,8 @@ voicegroup155:: @ 86A8CBC voice_keysplit voicegroup005, KeySplitTable1 @ 86A8CC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8CD4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8CE0 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A8CEC - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 255, 188, 103, 165 @ 86A8CF8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 @ 86A8CEC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 188, 103, 165 @ 86A8CF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D10 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A8D1C @@ -17993,7 +17993,7 @@ voicegroup155:: @ 86A8CBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9238 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9250 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A925C + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86A925C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9268 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9274 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9280 @@ -18009,7 +18009,7 @@ voicegroup156:: @ 86A92BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A92D4 voice_programmable_wave_alt ProgrammableWaveData_86B4870, 0, 7, 15, 0 @ 86A92E0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A92EC - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A92F8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 @ 86A92F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9304 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9310 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A931C @@ -18124,7 +18124,7 @@ voicegroup156:: @ 86A92BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9838 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9844 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9850 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86A985C + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86A985C voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9868 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9874 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9880 @@ -18270,7 +18270,7 @@ voicegroup158:: @ 86A9EBC voice_keysplit voicegroup005, KeySplitTable1 @ 86A9EC8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9ED4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9EE0 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86A9EEC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 @ 86A9EEC voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9EF8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F04 voice_square_1 0, 2, 0, 0, 15, 0 @ 86A9F10 @@ -18297,7 +18297,7 @@ voicegroup158:: @ 86A9EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA00C voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86AA018 voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86AA024 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86AA030 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86AA030 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA03C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA048 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA054 @@ -18305,7 +18305,7 @@ voicegroup158:: @ 86A9EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA06C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA078 voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86AA084 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86AA090 + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 0, 255, 127 @ 86AA090 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA09C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA0A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA0B4 @@ -18319,7 +18319,7 @@ voicegroup158:: @ 86A9EBC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA114 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA120 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA12C - voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 86AA138 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 @ 86AA138 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA144 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA150 voice_keysplit voicegroup007, KeySplitTable3 @ 86AA15C @@ -18401,8 +18401,8 @@ voicegroup159:: @ 86AA4BC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA4C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA4D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA4E0 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 64, 249, 0, 188 @ 86AA4EC - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 51, 249, 0, 165 @ 86AA4F8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 64, 249, 0, 188 @ 86AA4EC + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 51, 249, 0, 165 @ 86AA4F8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA504 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA510 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AA51C @@ -18754,7 +18754,7 @@ voicegroup162:: @ 86AB4DC voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB4E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB4F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB500 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_high, 64, 188, 108, 244 @ 86AB50C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 64, 188, 108, 244 @ 86AB50C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB518 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB524 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB530 @@ -18850,8 +18850,8 @@ voicegroup163:: @ 86AB938 voice_keysplit voicegroup005, KeySplitTable1 @ 86AB944 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB950 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB95C - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AB968 - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86AB974 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86AB968 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 @ 86AB974 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB980 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB98C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AB998 @@ -18981,8 +18981,8 @@ voicegroup164:: @ 86ABF38 voice_keysplit voicegroup005, KeySplitTable1 @ 86ABF44 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF50 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF5C - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 128, 180, 108, 209 @ 86ABF68 - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 85, 204, 77, 246 @ 86ABF74 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 128, 180, 108, 209 @ 86ABF68 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 85, 204, 77, 246 @ 86ABF74 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF80 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF8C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ABF98 @@ -19270,7 +19270,7 @@ voicegroup166:: @ 86ACB38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACC88 voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 @ 86ACC94 voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 @ 86ACCA0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86ACCAC + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86ACCAC voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCB8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCC4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCD0 @@ -19278,7 +19278,7 @@ voicegroup166:: @ 86ACB38 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACCF4 voice_directsound 60, 0, DirectSoundWaveData_sc88_synth_bass, 255, 252, 0, 115 @ 86ACD00 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88_square, 255, 0, 255, 127 @ 86ACD0C + voice_directsound 60, 0, DirectSoundWaveData_sc88_square_wave, 255, 0, 255, 127 @ 86ACD0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD24 voice_square_1 0, 2, 0, 0, 15, 0 @ 86ACD30 @@ -19505,8 +19505,8 @@ voicegroup168:: @ 86AD738 voice_keysplit voicegroup005, KeySplitTable1 @ 86AD744 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD750 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD75C - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AD768 - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86AD774 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86AD768 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 @ 86AD774 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD780 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD78C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AD798 @@ -19948,8 +19948,8 @@ voicegroup172:: @ 86AEB6C voice_keysplit voicegroup005, KeySplitTable1 @ 86AEB78 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEB84 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEB90 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AEB9C - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 255, 204, 77, 246 @ 86AEBA8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86AEB9C + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 @ 86AEBA8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEBB4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEBC0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AEBCC @@ -20079,8 +20079,8 @@ voicegroup173:: @ 86AF16C voice_keysplit voicegroup005, KeySplitTable1 @ 86AF178 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF184 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF190 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86AF19C - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 128, 204, 77, 246 @ 86AF1A8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86AF19C + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 @ 86AF1A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF1CC @@ -20211,7 +20211,7 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF784 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF790 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF79C - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86AF7A8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 @ 86AF7A8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF7B4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF7C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AF7CC @@ -20326,7 +20326,7 @@ voicegroup174:: @ 86AF76C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFCE8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFCF4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD00 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86AFD0C + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86AFD0C voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD18 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD24 voice_square_1 0, 2, 0, 0, 15, 0 @ 86AFD30 @@ -20512,27 +20512,27 @@ voicegroup177:: @ 86B0378 voice_directsound_no_resample 67, 71, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 @ 86B0534 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 @ 86B0540 voice_directsound_no_resample 65, 0, DirectSoundWaveData_sc88_standard_hand_clap, 255, 255, 255, 127 @ 86B054C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86B0558 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 86B0558 voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B0564 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0570 voice_directsound 68, 29, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B057C - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86B0588 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 86B0588 voice_directsound 72, 64, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B0594 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B05A0 voice_directsound 76, 39, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B05AC voice_directsound 80, 89, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 @ 86B05B8 - voice_directsound_no_resample 33, 10, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B05C4 + voice_directsound_no_resample 33, 10, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B05C4 voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 @ 86B05D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B05DC - voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B05E8 + voice_directsound 63, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B05E8 voice_directsound_no_resample 64, 64, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 @ 86B05F4 voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86B0600 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86B060C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 @ 86B060C voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86B0618 - voice_directsound_no_resample 64, 118, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B0624 + voice_directsound_no_resample 64, 118, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B0624 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B0630 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B063C - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86B0648 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B063C + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 8, 0, 255, 216 @ 86B0648 voice_directsound_no_resample 64, 64, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 86B0654 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86B0660 voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86B066C @@ -20751,8 +20751,8 @@ voicegroup180:: @ 86B0FF0 voice_keysplit voicegroup005, KeySplitTable1 @ 86B0FFC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1008 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1014 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 64, 249, 0, 188 @ 86B1020 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 249, 0, 165 @ 86B102C + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 64, 249, 0, 188 @ 86B1020 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 @ 86B102C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1038 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1044 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B1050 @@ -21181,7 +21181,7 @@ voicegroup184:: @ 86B2244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2394 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23AC - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86B23B8 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86B23B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B23DC @@ -21235,7 +21235,7 @@ voicegroup184:: @ 86B2244 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B261C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2628 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B2634 - voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 255, 0, 255, 0 @ 86B2640 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 @ 86B2640 .align 2 voicegroup185:: @ 86B264C @@ -21270,7 +21270,7 @@ voicegroup185:: @ 86B264C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B279C voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 0, 255, 214 @ 86B27A8 voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 128, 0, 255, 206 @ 86B27B4 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_guitar_harmonics, 255, 0, 255, 165 @ 86B27C0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 @ 86B27C0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B27CC voice_directsound 60, 0, DirectSoundWaveData_sc88_pick_bass, 255, 253, 0, 149 @ 86B27D8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B27E4 @@ -21292,7 +21292,7 @@ voicegroup185:: @ 86B264C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28A4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28B0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28BC - voice_directsound 60, 0, DirectSoundWaveData_advanced_orchestra_voice_ahhs, 85, 0, 154, 165 @ 86B28C8 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 85, 0, 154, 165 @ 86B28C8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28D4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B28E0 voice_keysplit voicegroup007, KeySplitTable3 @ 86B28EC @@ -21636,8 +21636,8 @@ voicegroup188:: @ 86B384C voice_keysplit voicegroup005, KeySplitTable1 @ 86B3858 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3864 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3870 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86B387C - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 128, 204, 77, 246 @ 86B3888 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86B387C + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 @ 86B3888 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3894 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B38A0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B38AC @@ -21767,8 +21767,8 @@ voicegroup189:: @ 86B3E4C voice_keysplit voicegroup005, KeySplitTable1 @ 86B3E58 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3E64 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3E70 - voice_directsound 60, 0, DirectSoundWaveData_unknown_e_piano_low, 255, 188, 128, 226 @ 86B3E7C - voice_directsound 60, 65, DirectSoundWaveData_unknown_e_piano_high, 128, 204, 77, 246 @ 86B3E88 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 @ 86B3E7C + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 @ 86B3E88 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3E94 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3EA0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B3EAC @@ -21896,29 +21896,29 @@ voicegroup190:: @ 86B429C voice_noise_alt 0, 0, 1, 9, 1 @ 86B4440 voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 @ 86B444C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4458 - voice_directsound_no_resample 64, 52, DirectSoundWaveData_sc88_standard_snare2, 255, 0, 255, 242 @ 86B4464 + voice_directsound_no_resample 64, 52, DirectSoundWaveData_sc88_orchestra_snare, 255, 0, 255, 242 @ 86B4464 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4470 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B447C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4488 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4494 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44A0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard_snare1, 255, 0, 255, 242 @ 86B44AC + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88_standard3_snare, 255, 0, 255, 242 @ 86B44AC voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44B8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44C4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44D0 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44DC - voice_directsound_no_resample 33, 104, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B44E8 + voice_directsound_no_resample 33, 104, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B44E8 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B44F4 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4500 - voice_directsound 63, 64, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B450C + voice_directsound 63, 64, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B450C voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4518 voice_directsound_no_resample 64, 34, DirectSoundWaveData_unknown_tambourine, 255, 127, 77, 204 @ 86B4524 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_unknown_cymbal_crash, 255, 231, 0, 188 @ 86B4530 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 @ 86B4530 voice_directsound_no_resample 64, 89, DirectSoundWaveData_unknown_cowbell, 255, 0, 255, 242 @ 86B453C - voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B4548 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B4548 voice_square_1 0, 2, 0, 0, 15, 0 @ 86B4554 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 255, 235, 0, 231 @ 86B4560 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_standard_cymbal_crash, 8, 0, 255, 216 @ 86B456C + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 255, 235, 0, 231 @ 86B4560 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88_orchestra_cymbal_crash, 8, 0, 255, 216 @ 86B456C voice_directsound_no_resample 64, 94, DirectSoundWaveData_unknown_djembe, 255, 0, 255, 0 @ 86B4578 voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo, 255, 0, 255, 0 @ 86B4584 voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88_bongo_low, 255, 0, 255, 0 @ 86B4590 From 76280199527e9ba6806f1e17d6460f13a132c2e3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 20 Dec 2019 08:47:31 -0500 Subject: [PATCH 32/35] Remove references to LASTRESULT --- asm/macros/event.inc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 8b43d0821..15e74cbb6 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -465,12 +465,12 @@ .2byte \Y .endm - @ Retrieves the number of Pokemon in the player's party, and stores that number in variable 0x800D (LASTRESULT). + @ Retrieves the number of Pokemon in the player's party, and stores that number in VAR_RESULT. .macro getpartysize .byte 0x43 .endm - @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and variable 0x800D (LASTRESULT) will be set to 0x0001; otherwise, LASTRESULT is set to 0x0000. + @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE. .macro giveitem index:req, quantity:req .byte 0x44 .2byte \index @@ -484,21 +484,21 @@ .2byte \quantity .endm - @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets variable 0x800D (LASTRESULT) to 0x0001 if there is room, or 0x0000 is there is no room. + @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room. .macro checkitemspace index:req, quantity:req .byte 0x46 .2byte \index .2byte \quantity .endm - @ Checks if the player has quantity or more of item index in their Bag. Sets variable 0x800D (LASTRESULT) to 0x0001 if the player has enough of the item, or 0x0000 if they have fewer than quantity of the item. + @ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has enough of the item, or FALSE if they have fewer than quantity of the item. .macro checkitem index:req, quantity:req .byte 0x47 .2byte \index .2byte \quantity .endm - @ Checks which Bag pocket the specified (index) item belongs in, and writes the value to variable 0x800D (LASTRESULT). This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE). + @ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE). .macro checkitemtype index:req .byte 0x48 .2byte \index @@ -536,7 +536,7 @@ .2byte \decoration .endm - @ Checks if the player has enough space in their PC to hold decoration. Sets variable 0x800D (LASTRESULT) to 0x0001 if there is room, or 0x0000 is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + @ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.) .macro checkdecorspace decoration:req .byte 0x4e .2byte \decoration @@ -818,7 +818,7 @@ .byte 0x6d .endm - @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in variable 0x800D (LASTRESULT); 0x0000 for "NO" or if the user pressed B, and 0x0001 for "YES". + @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in VAR_RESULT; 0 for "NO" or if the user pressed B, and 1 for "YES". .macro yesnobox x:req, y:req .byte 0x6e .byte \x @@ -925,7 +925,7 @@ .2byte \move .endm - @ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, variable 0x800D (LASTRESULT) is set to the (zero-indexed) slot number of the first Pokemon that knows the move. If not, LASTRESULT is set to 0x0006. Variable 0x8004 is also set to this Pokemon's species. + @ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, VAR_RESULT is set to the (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE. VAR_0x8004 is also set to this Pokemon's species. .macro checkpartymove index:req .byte 0x7c .2byte \index @@ -1045,7 +1045,7 @@ .byte 0x8e .endm - @ Stores a random integer between 0 and limit in variable 0x800D (LASTRESULT). + @ Stores a random integer between 0 and limit in VAR_RESULT. .macro random limit:req .byte 0x8f .2byte \limit @@ -1065,7 +1065,7 @@ .byte \check .endm - @ If check is 0x00, this command will check if the player has value or more money; script variable 0x800D (LASTRESULT) is set to 0x0001 if the player has enough money, or 0x0000 if the do not. + @ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player has enough money, or FALSE if they do not. .macro checkmoney value:req, check:req .byte 0x92 .4byte \value @@ -1154,7 +1154,7 @@ .2byte \heallocation .endm - @ Checks the player's gender. If male, then 0x0000 is stored in variable 0x800D (LASTRESULT). If female, then 0x0001 is stored in LASTRESULT. + @ Checks the player's gender. If male, then MALE (0) is stored in VAR_RESULT. If female, then FEMALE (1) is stored in VAR_RESULT. .macro checkplayergender .byte 0xa0 .endm @@ -1437,7 +1437,7 @@ .2byte \slot .endm - @ Checks if the Pokemon in the specified slot of the player's party is obedient. If the Pokemon is disobedient, 0x0001 is written to script variable 0x800D (LASTRESULT). If the Pokemon is obedient (or if the specified slot is empty or invalid), 0x0000 is written. + @ Checks if the Pokemon in the specified slot of the player's party is obedient. If the Pokemon is disobedient, VAR_RESULT is TRUE. If the Pokemon is obedient (or if the specified slot is empty or invalid), VAR_RESULT is FALSE. .macro checkmonobedience slot:req .byte 0xce .2byte \slot From 681d9298920e9ed7da08a3802568f694d9295237 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Sat, 21 Dec 2019 06:09:59 +0800 Subject: [PATCH 33/35] DrawTradeMenuPartyInfo --- src/data/trade.h | 37 ++++++++++++++++------- src/trade.c | 77 ++++++++++-------------------------------------- 2 files changed, 43 insertions(+), 71 deletions(-) diff --git a/src/data/trade.h b/src/data/trade.h index 4ed39f6cd..8601af2a8 100644 --- a/src/data/trade.h +++ b/src/data/trade.h @@ -276,48 +276,65 @@ static const u8 sTradeMonSpriteCoords[(PARTY_SIZE * 2) + 1][2] = {23, 18} // CANCEL }; -static const u8 sTradeMonLevelCoords[][PARTY_SIZE][2] = +static const u8 sTradeMonLevelCoords[][2][2] = { + // Your party { - // Your party {5, 4}, {12, 4}, + }, + { {5, 9}, {12, 9}, + }, + { {5, 14}, {12, 14}, }, + // Friend's party { - // Friend's party + {20, 4}, {27, 4}, + }, + { {20, 9}, {27, 9}, + }, + { {20, 14}, - {27, 14} - } + {27, 14}, + }, }; -static const u8 sTradeMonBoxCoords[][PARTY_SIZE][2] = +static const u8 sTradeMonBoxCoords[][2][2] = { + // Your party { - // Your party {1, 3}, {8, 3}, + }, + { {1, 8}, {8, 8}, + }, + { {1, 13}, {8, 13}, }, + // Friend's party { - // Friend's party {16, 3}, {23, 3}, + }, + { {16, 8}, {23, 8}, + }, + { {16, 13}, - {23, 13} - } + {23, 13}, + }, }; static const u8 sUnref_0832DE6E[] = diff --git a/src/trade.c b/src/trade.c index 91b514067..40f45a68b 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1988,73 +1988,28 @@ static void DrawTradeMenuPartyMonInfo(u8 whichParty, u8 monIdx, u8 x, u8 y, u8 w sTradeMenuData->tilemapBuffer[(y - 1) * 32 + x + 1] = symbolTile; } -// Very close but loop preamble not working. -#ifdef NONMATCHING static void DrawTradeMenuPartyInfo(u8 whichParty) { - int i; - + s32 i; for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) { - DrawTradeMenuPartyMonInfo(whichParty, i, - sTradeMonLevelCoords[whichParty][i][0], - sTradeMonLevelCoords[whichParty][i][1], - sTradeMonBoxCoords[whichParty][i][0], - sTradeMonBoxCoords[whichParty][i][1]); + const u8 (*r5)[2]; + const u8 (*r4)[2]; + u32 r0 = 3 * whichParty; + const u8 (*r1)[2][2] = sTradeMonLevelCoords; + + r5 = r1[r0]; + r4 = sTradeMonBoxCoords[r0]; + DrawTradeMenuPartyMonInfo( + whichParty, + i, + r5[i][0], + r5[i][1], + r4[i][0], + r4[i][1] + ); } } -#else -NAKED -static void DrawTradeMenuPartyInfo(u8 whichParty) -{ - asm_unified("push {r4-r7,lr}\n\ - sub sp, 0x8\n\ - lsls r0, 24\n\ - lsrs r6, r0, 24\n\ - movs r7, 0\n\ - ldr r0, =sTradeMenuData\n\ - ldr r0, [r0]\n\ - adds r0, 0x36\n\ - adds r0, r6\n\ - ldrb r0, [r0]\n\ - cmp r7, r0\n\ - bge _08079E94\n\ - lsls r0, r6, 1\n\ - adds r0, r6\n\ - ldr r1, =sTradeMonLevelCoords\n\ - lsls r0, 2\n\ - adds r5, r0, r1\n\ - ldr r1, =sTradeMonBoxCoords\n\ - adds r4, r0, r1\n\ -_08079E6A:\n\ - lsls r1, r7, 24\n\ - lsrs r1, 24\n\ - ldrb r2, [r5]\n\ - ldrb r3, [r5, 0x1]\n\ - ldrb r0, [r4]\n\ - str r0, [sp]\n\ - ldrb r0, [r4, 0x1]\n\ - str r0, [sp, 0x4]\n\ - adds r0, r6, 0\n\ - bl DrawTradeMenuPartyMonInfo\n\ - adds r5, 0x2\n\ - adds r4, 0x2\n\ - adds r7, 0x1\n\ - ldr r0, =sTradeMenuData\n\ - ldr r0, [r0]\n\ - adds r0, 0x36\n\ - adds r0, r6\n\ - ldrb r0, [r0]\n\ - cmp r7, r0\n\ - blt _08079E6A\n\ -_08079E94:\n\ - add sp, 0x8\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .pool"); -} -#endif // NONMATCHING static void ResetTradeMenuPartyPositions(u8 whichParty) { From 4d8ea3a2d93f8b08a498cb2afd11721938f6c2e4 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Sat, 21 Dec 2019 06:15:41 +0800 Subject: [PATCH 34/35] CanSpinTradeMon --- src/trade.c | 163 +++------------------------------------------------- 1 file changed, 8 insertions(+), 155 deletions(-) diff --git a/src/trade.c b/src/trade.c index 91b514067..6f5bf3603 100644 --- a/src/trade.c +++ b/src/trade.c @@ -2541,10 +2541,8 @@ int CanRegisterMonForTradingBoard(struct UnkLinkRfuStruct_02022B14Substruct rfuP return CANT_REGISTER_MON; } -// r6/r7 flip. Ugh. // Spin Trade wasnt fully implemented, but this checks if a mon would be valid to Spin Trade // Unlike later generations, this version of Spin Trade isnt only for Eggs -#ifdef NONMATCHING int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) { int i, version, versions, canTradeAnyMon, numMonsLeft; @@ -2560,8 +2558,8 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) } } - canTradeAnyMon = TRUE; versions = 0; + canTradeAnyMon = TRUE; for (i = 0; i < GetLinkPlayerCount(); i++) { version = gLinkPlayers[i].version & 0xFF; @@ -2581,11 +2579,14 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) struct LinkPlayer *player = &gLinkPlayers[i]; // Does player not have National Dex - if (!(player->progressFlags & 0xF)) - canTradeAnyMon = FALSE; + do + { + if (!(player->progressFlags & 0xF)) + canTradeAnyMon = FALSE; - if (versions && (player->progressFlags / 16)) - canTradeAnyMon = FALSE; + if (versions && (player->progressFlags / 16)) + canTradeAnyMon = FALSE; + } while (0); } if (canTradeAnyMon == FALSE) @@ -2611,154 +2612,6 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) else return CAN_TRADE_MON; } -#else -NAKED -int CanSpinTradeMon(struct Pokemon *mon, u16 a1) -{ - asm_unified("push {r4-r7,lr}\n\ - mov r7, r8\n\ - push {r7}\n\ - sub sp, 0x18\n\ - adds r6, r0, 0\n\ - lsls r1, 16\n\ - lsrs r1, 16\n\ - mov r8, r1\n\ - movs r5, 0\n\ - ldr r0, =gPlayerPartyCount\n\ - ldrb r0, [r0]\n\ - cmp r5, r0\n\ - bge _0807A95A\n\ - mov r4, sp\n\ -_0807A934:\n\ - movs r0, 0x64\n\ - muls r0, r5\n\ - adds r0, r6, r0\n\ - movs r1, 0x41\n\ - bl GetMonData\n\ - str r0, [r4]\n\ - movs r1, 0xCE\n\ - lsls r1, 1\n\ - cmp r0, r1\n\ - bne _0807A94E\n\ - movs r0, 0\n\ - str r0, [r4]\n\ -_0807A94E:\n\ - adds r4, 0x4\n\ - adds r5, 0x1\n\ - ldr r0, =gPlayerPartyCount\n\ - ldrb r0, [r0]\n\ - cmp r5, r0\n\ - blt _0807A934\n\ -_0807A95A:\n\ - movs r7, 0\n\ - movs r6, 0x1\n\ - movs r5, 0\n\ - ldr r4, =gLinkPlayers\n\ - b _0807A980\n\ - .pool\n\ -_0807A96C:\n\ - ldrb r0, [r4]\n\ - subs r0, 0x4\n\ - cmp r0, 0x1\n\ - bhi _0807A978\n\ - movs r7, 0\n\ - b _0807A97C\n\ -_0807A978:\n\ - movs r0, 0x1\n\ - orrs r7, r0\n\ -_0807A97C:\n\ - adds r4, 0x1C\n\ - adds r5, 0x1\n\ -_0807A980:\n\ - bl GetLinkPlayerCount\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - cmp r5, r0\n\ - blt _0807A96C\n\ - movs r5, 0\n\ - movs r4, 0\n\ - b _0807A9B4\n\ -_0807A992:\n\ - ldr r0, =gLinkPlayers\n\ - adds r2, r4, r0\n\ - ldrb r1, [r2, 0x10]\n\ - movs r0, 0xF\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - bne _0807A9A2\n\ - movs r6, 0\n\ -_0807A9A2:\n\ - cmp r7, 0\n\ - beq _0807A9B0\n\ - ldrb r0, [r2, 0x10]\n\ - lsrs r0, 4\n\ - cmp r0, 0\n\ - beq _0807A9B0\n\ - movs r6, 0\n\ -_0807A9B0:\n\ - adds r4, 0x1C\n\ - adds r5, 0x1\n\ -_0807A9B4:\n\ - bl GetLinkPlayerCount\n\ - lsls r0, 24\n\ - lsrs r0, 24\n\ - cmp r5, r0\n\ - blt _0807A992\n\ - cmp r6, 0\n\ - bne _0807A9EA\n\ - mov r1, r8\n\ - lsls r0, r1, 2\n\ - mov r1, sp\n\ - adds r4, r1, r0\n\ - ldrh r0, [r4]\n\ - bl IsSpeciesInHoennDex\n\ - cmp r0, 0\n\ - bne _0807A9E0\n\ - movs r0, 0x2\n\ - b _0807AA1A\n\ - .pool\n\ -_0807A9E0:\n\ - ldr r0, [r4]\n\ - cmp r0, 0\n\ - bne _0807A9EA\n\ - movs r0, 0x3\n\ - b _0807AA1A\n\ -_0807A9EA:\n\ - movs r2, 0\n\ - movs r5, 0\n\ - ldr r0, =gPlayerPartyCount\n\ - ldrb r0, [r0]\n\ - cmp r2, r0\n\ - bge _0807AA0A\n\ - adds r3, r0, 0\n\ - mov r1, sp\n\ -_0807A9FA:\n\ - cmp r8, r5\n\ - beq _0807AA02\n\ - ldr r0, [r1]\n\ - adds r2, r0\n\ -_0807AA02:\n\ - adds r1, 0x4\n\ - adds r5, 0x1\n\ - cmp r5, r3\n\ - blt _0807A9FA\n\ -_0807AA0A:\n\ - cmp r2, 0\n\ - beq _0807AA18\n\ - movs r0, 0\n\ - b _0807AA1A\n\ - .pool\n\ -_0807AA18:\n\ - movs r0, 0x1\n\ -_0807AA1A:\n\ - add sp, 0x18\n\ - pop {r3}\n\ - mov r8, r3\n\ - pop {r4-r7}\n\ - pop {r1}\n\ - bx r1"); -} -#endif // NONMATCHING static void sub_807AA28(struct Sprite *sprite) { From 324a81ed5db07985a0f11257bc372043d66ed552 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 20 Dec 2019 18:53:58 -0500 Subject: [PATCH 35/35] Reword yesnobox comment --- asm/macros/event.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 15e74cbb6..14a1447ee 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -818,7 +818,7 @@ .byte 0x6d .endm - @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in VAR_RESULT; 0 for "NO" or if the user pressed B, and 1 for "YES". + @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in VAR_RESULT as NO (0) or YES (1). Pressing B is equivalent to answering NO .macro yesnobox x:req, y:req .byte 0x6e .byte \x