From c557ac61aef788f1630d3960dd2366bf000db8e0 Mon Sep 17 00:00:00 2001 From: Melody Date: Sun, 2 Dec 2018 03:37:46 -0500 Subject: adds constants, cleans up callstd and msgbox code * adds some constants for standard script names and messagebox types * replaces some callstd calls with msgbox calls where equivalent * replaces msgbox and callstd calls using raw digits with versions that use the constants --- data/maps/Route102/scripts.inc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'data/maps/Route102') diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index d25794242..c38d40a7f 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -2,19 +2,19 @@ Route102_MapScripts:: @ 81EC0E0 .byte 0 Route102_EventScript_1EC0E1:: @ 81EC0E1 - msgbox Route102_Text_1EC2C0, 2 + msgbox Route102_Text_1EC2C0, MSGBOX_NPC end Route102_EventScript_1EC0EA:: @ 81EC0EA - msgbox Route102_Text_1EC35B, 3 + msgbox Route102_Text_1EC35B, MSGBOX_SIGN end Route102_EventScript_1EC0F3:: @ 81EC0F3 - msgbox Route102_Text_1EC373, 3 + msgbox Route102_Text_1EC373, MSGBOX_SIGN end Route102_EventScript_1EC0FC:: @ 81EC0FC - msgbox Route102_Text_1EC32E, 2 + msgbox Route102_Text_1EC32E, MSGBOX_NPC end Route102_EventScript_1EC105:: @ 81EC105 @@ -26,7 +26,7 @@ Route102_EventScript_1EC105:: @ 81EC105 specialvar VAR_RESULT, sub_813B4E0 compare VAR_RESULT, 0 goto_eq Route102_EventScript_1EC170 - msgbox Route102_Text_2945AC, 4 + msgbox Route102_Text_2945AC, MSGBOX_DEFAULT release end @@ -39,48 +39,48 @@ Route102_EventScript_1EC146:: @ 81EC146 end Route102_EventScript_1EC157:: @ 81EC157 - msgbox Route102_Text_294668, 4 + msgbox Route102_Text_294668, MSGBOX_DEFAULT setvar VAR_0x8004, 318 special SetMatchCallRegisteredFlag setorcopyvar VAR_0x8000, 318 - callstd 8 + callstd STD_REGISTER_MATCH_CALL release end Route102_EventScript_1EC170:: @ 81EC170 checkflag FLAG_HAS_MATCH_CALL goto_eq Route102_EventScript_1EC183 - msgbox Route102_Text_2945AC, 4 + msgbox Route102_Text_2945AC, MSGBOX_DEFAULT release end Route102_EventScript_1EC183:: @ 81EC183 - msgbox Route102_Text_2945EB, 4 + msgbox Route102_Text_2945EB, MSGBOX_DEFAULT setvar VAR_0x8004, 318 special SetMatchCallRegisteredFlag setorcopyvar VAR_0x8000, 318 - callstd 8 + callstd STD_REGISTER_MATCH_CALL release end Route102_EventScript_1EC19C:: @ 81EC19C trainerbattle 5, TRAINER_CALVIN_1, 0, Route102_Text_2946AE, Route102_Text_29470C - msgbox Route102_Text_29473C, 6 + msgbox Route102_Text_29473C, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1B3:: @ 81EC1B3 trainerbattle 0, TRAINER_RICK, 0, Route102_Text_29480C, Route102_Text_294847 - msgbox Route102_Text_294859, 6 + msgbox Route102_Text_294859, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1CA:: @ 81EC1CA trainerbattle 0, TRAINER_TIANA, 0, Route102_Text_29489E, Route102_Text_2948F3 - msgbox Route102_Text_294916, 6 + msgbox Route102_Text_294916, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1E1:: @ 81EC1E1 trainerbattle 0, TRAINER_ALLEN, 0, Route102_Text_294775, Route102_Text_2947AA - msgbox Route102_Text_2947DB, 6 + msgbox Route102_Text_2947DB, MSGBOX_AUTOCLOSE end PetalburgCity_Text_1EC1F8: @ 81EC1F8 -- cgit v1.2.3 From 862265b73a6eab7d070e628d3cb77663543bc368 Mon Sep 17 00:00:00 2001 From: Melody Date: Sun, 2 Dec 2018 06:04:59 -0500 Subject: defines `register_matchcall` macro --- data/maps/Route102/scripts.inc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'data/maps/Route102') diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index c38d40a7f..ca6de7d9c 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -40,10 +40,7 @@ Route102_EventScript_1EC146:: @ 81EC146 Route102_EventScript_1EC157:: @ 81EC157 msgbox Route102_Text_294668, MSGBOX_DEFAULT - setvar VAR_0x8004, 318 - special SetMatchCallRegisteredFlag - setorcopyvar VAR_0x8000, 318 - callstd STD_REGISTER_MATCH_CALL + register_matchcall TRAINER_CALVIN_1 release end @@ -56,10 +53,7 @@ Route102_EventScript_1EC170:: @ 81EC170 Route102_EventScript_1EC183:: @ 81EC183 msgbox Route102_Text_2945EB, MSGBOX_DEFAULT - setvar VAR_0x8004, 318 - special SetMatchCallRegisteredFlag - setorcopyvar VAR_0x8000, 318 - callstd STD_REGISTER_MATCH_CALL + register_matchcall TRAINER_CALVIN_1 release end -- cgit v1.2.3 From bad5323642a0db0875ca6213370b1947c1fc105a Mon Sep 17 00:00:00 2001 From: Melody Date: Sun, 2 Dec 2018 07:17:54 -0500 Subject: cleans up trainer battle scripts * adds battle type macros * adds `trainerbattle_normal` macro * adds `trainerbattle_double` macro * adds rematch macros * adds no intro macro --- data/maps/Route102/scripts.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'data/maps/Route102') diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index ca6de7d9c..3430c054b 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -18,7 +18,7 @@ Route102_EventScript_1EC0FC:: @ 81EC0FC end Route102_EventScript_1EC105:: @ 81EC105 - trainerbattle 2, TRAINER_CALVIN_1, 0, Route102_Text_294513, Route102_Text_29457C, Route102_EventScript_1EC146 + trainerbattle_normal TRAINER_CALVIN_1, Route102_Text_294513, Route102_Text_29457C, Route102_EventScript_1EC146 specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, 1 goto_eq Route102_EventScript_1EC19C @@ -58,22 +58,22 @@ Route102_EventScript_1EC183:: @ 81EC183 end Route102_EventScript_1EC19C:: @ 81EC19C - trainerbattle 5, TRAINER_CALVIN_1, 0, Route102_Text_2946AE, Route102_Text_29470C + trainerbattle_rematch TRAINER_CALVIN_1, Route102_Text_2946AE, Route102_Text_29470C msgbox Route102_Text_29473C, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1B3:: @ 81EC1B3 - trainerbattle 0, TRAINER_RICK, 0, Route102_Text_29480C, Route102_Text_294847 + trainerbattle_normal TRAINER_RICK, Route102_Text_29480C, Route102_Text_294847 msgbox Route102_Text_294859, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1CA:: @ 81EC1CA - trainerbattle 0, TRAINER_TIANA, 0, Route102_Text_29489E, Route102_Text_2948F3 + trainerbattle_normal TRAINER_TIANA, Route102_Text_29489E, Route102_Text_2948F3 msgbox Route102_Text_294916, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1E1:: @ 81EC1E1 - trainerbattle 0, TRAINER_ALLEN, 0, Route102_Text_294775, Route102_Text_2947AA + trainerbattle_normal TRAINER_ALLEN, Route102_Text_294775, Route102_Text_2947AA msgbox Route102_Text_2947DB, MSGBOX_AUTOCLOSE end -- cgit v1.2.3 From 10725def8e356a6ea9346b1ea3170e1429314db3 Mon Sep 17 00:00:00 2001 From: Melody Date: Sun, 2 Dec 2018 13:54:48 -0500 Subject: =?UTF-8?q?trainerbattle=5Fnormal=20=E2=86=92=20trainerbattle=5Fsi?= =?UTF-8?q?ngle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * trainerbattle_normal → trainerbattle_single * TRAINER_BATTLE_NORMAL → TRAINER_BATTLE_SINGLE * improves the macro documentation a little --- data/maps/Route102/scripts.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'data/maps/Route102') diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index 3430c054b..6eb35c32f 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -18,7 +18,7 @@ Route102_EventScript_1EC0FC:: @ 81EC0FC end Route102_EventScript_1EC105:: @ 81EC105 - trainerbattle_normal TRAINER_CALVIN_1, Route102_Text_294513, Route102_Text_29457C, Route102_EventScript_1EC146 + trainerbattle_single TRAINER_CALVIN_1, Route102_Text_294513, Route102_Text_29457C, Route102_EventScript_1EC146 specialvar VAR_RESULT, ShouldTryRematchBattle compare VAR_RESULT, 1 goto_eq Route102_EventScript_1EC19C @@ -63,17 +63,17 @@ Route102_EventScript_1EC19C:: @ 81EC19C end Route102_EventScript_1EC1B3:: @ 81EC1B3 - trainerbattle_normal TRAINER_RICK, Route102_Text_29480C, Route102_Text_294847 + trainerbattle_single TRAINER_RICK, Route102_Text_29480C, Route102_Text_294847 msgbox Route102_Text_294859, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1CA:: @ 81EC1CA - trainerbattle_normal TRAINER_TIANA, Route102_Text_29489E, Route102_Text_2948F3 + trainerbattle_single TRAINER_TIANA, Route102_Text_29489E, Route102_Text_2948F3 msgbox Route102_Text_294916, MSGBOX_AUTOCLOSE end Route102_EventScript_1EC1E1:: @ 81EC1E1 - trainerbattle_normal TRAINER_ALLEN, Route102_Text_294775, Route102_Text_2947AA + trainerbattle_single TRAINER_ALLEN, Route102_Text_294775, Route102_Text_2947AA msgbox Route102_Text_2947DB, MSGBOX_AUTOCLOSE end -- cgit v1.2.3 From 2615ece23bd9463f3e43fca40eac1adcabeb2813 Mon Sep 17 00:00:00 2001 From: Melody Date: Fri, 7 Dec 2018 10:41:08 -0500 Subject: Use normal apostrophes like adults --- data/maps/Route102/scripts.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'data/maps/Route102') diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index 6eb35c32f..0a2ba36ba 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -80,28 +80,28 @@ Route102_EventScript_1EC1E1:: @ 81EC1E1 PetalburgCity_Text_1EC1F8: @ 81EC1F8 .string "WALLY: {PLAYER}…\n" .string "POKéMON hide in tall grass like this,\l" - .string "don’t they?\p" + .string "don't they?\p" .string "Please watch me and see if I can\n" .string "catch one properly.\p" .string "…Whoa!$" PetalburgCity_Text_1EC271: @ 81EC271 - .string "WALLY: I did it… It’s my…\n" + .string "WALLY: I did it… It's my…\n" .string "My POKéMON!$" PetalburgCity_Text_1EC297: @ 81EC297 .string "{PLAYER}, thank you!\n" - .string "Let’s go back to the GYM!$" + .string "Let's go back to the GYM!$" Route102_Text_1EC2C0: @ 81EC2C0 - .string "I’m…not very tall, so I sink right\n" + .string "I'm…not very tall, so I sink right\n" .string "into tall grass.\p" .string "The grass goes up my nose and…\n" .string "Fwafwafwafwafwa…\p" .string "Fwatchoo!$" Route102_Text_1EC32E: @ 81EC32E - .string "I’m going to catch a whole bunch of\n" + .string "I'm going to catch a whole bunch of\n" .string "POKéMON!$" Route102_Text_1EC35B: @ 81EC35B -- cgit v1.2.3