From ea724278b7c9cf44a64ed7969298d4568c11c245 Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 10:32:37 -0400 Subject: Juan text buffer overflow note --- data/maps/SootopolisCity_Gym_1F/scripts.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index 99b9fb2ba..8db708e9c 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -222,6 +222,10 @@ SootopolisCity_Gym_1F_Text_225268: @ 8225268 .string "A grand illusion of water sculpted\n" .string "by POKéMON and myself!$" +@ NOTE: This defeat text actually causes a buffer overflow. It's about 50 bytes too long for +@ the gDisplayedStringBattle buffer that it's put into, and it stomps all over the gBattleTextBuffs +@ after, as well as the otherwise unused array after that. One wonders if that's the reason for +@ the existence of that unused array of ints. SootopolisCity_Gym_1F_Text_225432: @ 8225432 .string "Ahahaha, excellent!\n" .string "Very well, you are the winner.\p" -- cgit v1.2.3 From 6508469259cc7eb37c37814f16b2f3a29e9d9555 Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 10:38:02 -0400 Subject: Rename movobjectoffscreen to copyobjectxytoperm Renaming the command to something that makes more sense as to what the command actually does. The command copies the current xy of the instantiated object back to its template, so that the object remains in the same place if the player walks away and despawns the object, and then comes back. "moveobjectoffscreen" implies that it might be taking the object and moving it physically to an off-screen location somehow. --- asm/macros/event.inc | 3 ++- data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc | 2 +- data/maps/DewfordTown/scripts.inc | 2 +- data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc | 4 ++-- data/maps/FarawayIsland_Interior/scripts.inc | 2 +- data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc | 2 +- data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc | 6 +++--- data/maps/Route104/scripts.inc | 6 +++--- data/maps/Route109/scripts.inc | 2 +- data/maps/Route119_WeatherInstitute_2F/scripts.inc | 2 +- data/maps/RustboroCity/scripts.inc | 2 +- data/maps/RusturfTunnel/scripts.inc | 4 ++-- data/maps/SeafloorCavern_Entrance/scripts.inc | 2 +- data/maps/SlateportCity_Harbor/scripts.inc | 2 +- data/maps/SootopolisCity/scripts.inc | 4 ++-- data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc | 2 +- data/maps/VictoryRoad_1F/scripts.inc | 2 +- data/script_cmd_table.inc | 2 +- src/scrcmd.c | 2 +- 19 files changed, 27 insertions(+), 26 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index e00bdb600..15889b1c6 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -765,7 +765,8 @@ .2byte \y .endm - .macro moveobjectoffscreen index:req + @ Copies a live event object's xy position to its template, so that if the sprite goes off screen, it'll still be there when it comes back on screen. + .macro copyobjectxytoperm index:req .byte 0x64 .2byte \index .endm diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index 0bc74b1bd..f09166f5a 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -63,7 +63,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_243E41:: @ 8243E41 waitmovement 0 applymovement 1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_243E77 waitmovement 0 - moveobjectoffscreen 1 + copyobjectxytoperm 1 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp waitmovement 0 msgbox BattleFrontier_BattleTowerMultiBattleRoom_Text_244056, MSGBOX_DEFAULT diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index f56411104..fa29f4099 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -180,7 +180,7 @@ DewfordTown_EventScript_1E96E7:: @ 81E96E7 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_DEWFORD_TOWN resetobjectpriority 2, MAP_ROUTE109 - moveobjectoffscreen 2 + copyobjectxytoperm 2 release end diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc index 959153d8a..f688918ea 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc @@ -67,8 +67,8 @@ EverGrandeCity_PokemonLeague_1F_EventScript_229636:: @ 8229636 waitmessage waitfanfare closemessage - moveobjectoffscreen 3 - moveobjectoffscreen 4 + copyobjectxytoperm 3 + copyobjectxytoperm 4 setflag FLAG_ENTERED_ELITE_FOUR releaseall end diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index b6a278b03..de6545ec3 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -62,7 +62,7 @@ FarawayIsland_Interior_EventScript_267DA2:: @ 8267DA2 waitmovement 0 applymovement 1, FarawayIsland_Interior_Movement_267DCE waitmovement 0 - moveobjectoffscreen 1 + copyobjectxytoperm 1 setvar VAR_TEMP_1, 1 releaseall end diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index b129e137e..144113d72 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -236,7 +236,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_22321F:: @ 822321F msgbox MossdeepCity_SpaceCenter_1F_Text_223B90, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_23, MossdeepCity_SpaceCenter_1F_Text_223BC2 setflag FLAG_DEFEATED_GRUNT_SPACE_CENTER_1F - moveobjectoffscreen 9 + copyobjectxytoperm 9 switch VAR_FACING case 3, MossdeepCity_SpaceCenter_1F_EventScript_223278 case 3, MossdeepCity_SpaceCenter_1F_EventScript_223289 diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 11abafa0c..8dcc74116 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -70,9 +70,9 @@ MossdeepCity_SpaceCenter_2F_EventScript_223E09:: @ 8223E09 applymovement 7, MossdeepCity_SpaceCenter_2F_Movement_223E89 waitmovement 0 setvar VAR_MOSSDEEP_SPACE_CENTER_STATE_2, 2 - moveobjectoffscreen 5 - moveobjectoffscreen 7 - moveobjectoffscreen 6 + copyobjectxytoperm 5 + copyobjectxytoperm 7 + copyobjectxytoperm 6 releaseall end diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 1a677001d..fd195b973 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -114,7 +114,7 @@ Route104_EventScript_1ECD4B:: @ 81ECD4B waitmovement 0 applymovement 34, Route104_Movement_1ECDCA waitmovement 0 - moveobjectoffscreen 34 + copyobjectxytoperm 34 msgbox Route104_Text_1EDCED, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq Route104_EventScript_1ECDED @@ -203,7 +203,7 @@ Route104_EventScript_1ECE6F:: @ 81ECE6F waitmovement 0 applymovement 34, Route104_Movement_1ECDCA waitmovement 0 - moveobjectoffscreen 34 + copyobjectxytoperm 34 msgbox Route104_Text_1EE009, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq Route104_EventScript_1ECF09 @@ -416,7 +416,7 @@ Route104_EventScript_1ED139:: @ 81ED139 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE104 resetobjectpriority 2, MAP_DEWFORD_TOWN - moveobjectoffscreen 2 + copyobjectxytoperm 2 setvar VAR_BOARD_BRINEY_BOAT_STATE, 0 goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1B4 goto_if_set FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_1ED1BE diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index a036296e3..6447b49c5 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -58,7 +58,7 @@ Route109_EventScript_1EE7D5:: @ 81EE7D5 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 resetobjectpriority EVENT_OBJ_ID_PLAYER, MAP_ROUTE109 resetobjectpriority 2, MAP_DEWFORD_TOWN - moveobjectoffscreen 2 + copyobjectxytoperm 2 release end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index d5a2de5ce..9257b3a64 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -77,7 +77,7 @@ Route119_WeatherInstitute_2F_EventScript_26FFC8:: @ 826FFC8 fadescreen 0 applymovement 5, Route119_WeatherInstitute_2F_Movement_270187 waitmovement 0 - moveobjectoffscreen 5 + copyobjectxytoperm 5 goto Route119_WeatherInstitute_2F_EventScript_27004D end diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index cd5f4c84d..22177c783 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -494,7 +494,7 @@ RustboroCity_EventScript_1E0B2E:: @ 81E0B2E call_if_eq RustboroCity_EventScript_1E0BF3 setflag FLAG_INTERACTED_WITH_DEVON_EMPLOYEE_GOODS_STOLEN setvar VAR_RUSTBORO_CITY_STATE, 3 - moveobjectoffscreen 9 + copyobjectxytoperm 9 msgbox RustboroCity_Text_1E183E, MSGBOX_DEFAULT releaseall end diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc index 8d2a4be80..8cb20e372 100644 --- a/data/maps/RusturfTunnel/scripts.inc +++ b/data/maps/RusturfTunnel/scripts.inc @@ -285,8 +285,8 @@ RusturfTunnel_EventScript_22D083:: @ 822D083 applymovement 6, RusturfTunnel_Movement_22D0AB applymovement 7, RusturfTunnel_Movement_22D0AB waitmovement 0 - moveobjectoffscreen 6 - moveobjectoffscreen 7 + copyobjectxytoperm 6 + copyobjectxytoperm 7 setvar VAR_RUSTURF_TUNNEL_STATE, 3 releaseall end diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc index 1bf570549..bc4f04b7f 100644 --- a/data/maps/SeafloorCavern_Entrance/scripts.inc +++ b/data/maps/SeafloorCavern_Entrance/scripts.inc @@ -26,7 +26,7 @@ SeafloorCavern_Entrance_EventScript_234485:: @ 8234485 call_if_eq SeafloorCavern_Entrance_EventScript_234539 delay 30 setvar VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 - moveobjectoffscreen 1 + copyobjectxytoperm 1 msgbox SeafloorCavern_Entrance_Text_234544, MSGBOX_DEFAULT closemessage applymovement 1, Common_Movement_WalkInPlaceUp diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index 32fa9fa5d..c46923bb0 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -77,7 +77,7 @@ SlateportCity_Harbor_EventScript_20C9F5:: @ 820C9F5 closemessage setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_2_BLOCKING_ENTRANCE - moveobjectoffscreen 4 + copyobjectxytoperm 4 setobjectmovementtype 4, MOVEMENT_TYPE_FACE_RIGHT releaseall end diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 7d2143346..2f3ef0434 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -1366,14 +1366,14 @@ SootopolisCity_EventScript_1E646F:: @ 81E646F SootopolisCity_EventScript_1E64B2:: @ 81E64B2 applymovement 18, SootopolisCity_Movement_1E64EC waitmovement 0 - moveobjectoffscreen 18 + copyobjectxytoperm 18 setvar VAR_SOOTOPOLIS_WALLACE_STATE, 1 return SootopolisCity_EventScript_1E64C5:: @ 81E64C5 applymovement 18, SootopolisCity_Movement_1E64EF waitmovement 0 - moveobjectoffscreen 18 + copyobjectxytoperm 18 setvar VAR_SOOTOPOLIS_WALLACE_STATE, 2 return diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index 5f2352645..78938b7d8 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -36,7 +36,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7:: @ 82279B7 waitmovement 0 applymovement 1, SootopolisCity_MysteryEventsHouse_1F_Movement_227A21 waitmovement 0 - moveobjectoffscreen 1 + copyobjectxytoperm 1 applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceUp waitmovement 0 compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1 diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index 5214edc44..b6983eac0 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -44,7 +44,7 @@ VictoryRoad_1F_EventScript_235DE1:: @ 8235DE1 trainerbattle_no_intro TRAINER_WALLY_1, VictoryRoad_1F_Text_235FFC msgbox VictoryRoad_1F_Text_236020, MSGBOX_DEFAULT clearflag FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY - moveobjectoffscreen 4 + copyobjectxytoperm 4 setflag FLAG_DEFEATED_WALLY_VICTORY_ROAD copyvar VAR_VICTORY_ROAD_1F_STATE, VAR_0x8008 releaseall diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index e9a14437a..910227a92 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -100,7 +100,7 @@ gScriptCmdTable:: @ 81DB67C .4byte ScrCmd_settrainerflag .4byte ScrCmd_cleartrainerflag .4byte ScrCmd_setobjectxyperm - .4byte ScrCmd_moveobjectoffscreen + .4byte ScrCmd_copyobjectxytoperm .4byte ScrCmd_setobjectmovementtype .4byte ScrCmd_waitmessage .4byte ScrCmd_message diff --git a/src/scrcmd.c b/src/scrcmd.c index 57cd3edbe..8746e0cfb 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1102,7 +1102,7 @@ bool8 ScrCmd_setobjectxyperm(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext *ctx) +bool8 ScrCmd_copyobjectxytoperm(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); -- cgit v1.2.3 From 9bcd39d86c06882c1c17909ee72ebc2b2819254b Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 10:38:48 -0400 Subject: Document the braille window id. --- src/scrcmd.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/scrcmd.c b/src/scrcmd.c index 8746e0cfb..aa03181e6 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -62,7 +62,7 @@ static EWRAM_DATA u16 sMovingNpcMapBank = 0; static EWRAM_DATA u16 sMovingNpcMapId = 0; static EWRAM_DATA u16 sFieldEffectScriptId = 0; -static u8 gUnknown_03000F30; +static u8 gBrailleWindowId; extern const SpecialFunc gSpecials[]; extern const u8 *gStdScripts[]; @@ -1515,13 +1515,13 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) yText = (yText - yWindow - 1) * 8; winTemplate = CreateWindowTemplate(0, xWindow, yWindow + 1, width, height, 0xF, 0x1); - gUnknown_03000F30 = AddWindow(&winTemplate); - LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0); - DrawStdWindowFrame(gUnknown_03000F30, 0); - PutWindowTilemap(gUnknown_03000F30); - FillWindowPixelBuffer(gUnknown_03000F30, PIXEL_FILL(1)); - AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0); - CopyWindowToVram(gUnknown_03000F30, 3); + gBrailleWindowId = AddWindow(&winTemplate); + LoadUserWindowBorderGfx(gBrailleWindowId, 0x214, 0xE0); + DrawStdWindowFrame(gBrailleWindowId, 0); + PutWindowTilemap(gBrailleWindowId); + FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1)); + AddTextPrinterParameterized(gBrailleWindowId, 6, gStringVar4, xText, yText, 0xFF, 0x0); + CopyWindowToVram(gBrailleWindowId, 3); return FALSE; } @@ -2254,8 +2254,8 @@ bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx) void sub_809BDB4(void) { - ClearStdWindowAndFrame(gUnknown_03000F30, 1); - RemoveWindow(gUnknown_03000F30); + ClearStdWindowAndFrame(gBrailleWindowId, 1); + RemoveWindow(gBrailleWindowId); } bool8 ScrCmd_buffertrainerclassname(struct ScriptContext *ctx) -- cgit v1.2.3 From f4d4424618b8b357af23978ef543fd033dece7e9 Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 13:25:36 -0400 Subject: Folded nops into hidemoneybox and updatemoneybox The nops are essential to the hidemoneybox and updatemoneybox commands when using vanilla versions of those commands. Even though they're not actually used parameters in the command implementation, they are still consumed, which means if someone were to get rid of the nops (as I did in TriHard) it causes the commands to consume bytecode that are not theirs, resulting in undefined behavior usually leading to softlocks. Folding the extra bytes into the macros means there's no chance of the extra bytes getting losts in scripts. --- asm/macros/event.inc | 3 +++ .../maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc | 5 +---- data/maps/MauvilleCity_GameCorner/scripts.inc | 16 ++-------------- data/maps/MtChimney/scripts.inc | 11 +---------- data/maps/Route109_SeashoreHouse/scripts.inc | 11 +---------- data/maps/Route121_SafariZoneEntrance/scripts.inc | 7 +------ data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc | 11 +---------- 7 files changed, 10 insertions(+), 54 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 15889b1c6..14051999f 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1083,6 +1083,8 @@ @ Hides the secondary box spawned by showmoney. .macro hidemoneybox .byte 0x94 + .byte 0 @ leftovers from ruby/sapphire. x, y params not used + .byte 0 .endm @ Updates the secondary box spawned by showmoney. Consumes but does not use arguments. @@ -1090,6 +1092,7 @@ .byte 0x95 .byte \x .byte \y + .byte 0 @ 1 = don't perform this command. Always 0 in vanilla. Why this is a thing is beyond me. .endm @ Gets the price reduction for the index given. In FireRed, this command is a nop. diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index 42ced50b9..4bd4dc01c 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -143,8 +143,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_220321 compare VAR_TEMP_1, 2 call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_220328 - updatemoneybox 0, 0 - nop + updatemoneybox 0,0 bufferitemname 0, VAR_TEMP_0 playse SE_JIHANKI msgbox LilycoveCity_DepartmentStoreRooftop_Text_2205A1, MSGBOX_DEFAULT @@ -197,8 +196,6 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_220450:: @ 8220450 LilycoveCity_DepartmentStoreRooftop_EventScript_22045E:: @ 822045E hidemoneybox - nop - nop releaseall end diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index 88b1ded16..257479372 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -39,14 +39,11 @@ MauvilleCity_GameCorner_EventScript_20FC33:: @ 820FC33 goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1 givecoins 50 takemoney 0x3e8, 0 - updatemoneybox 0, 0 - nop + updatemoneybox 0,0 updatecoinsbox 1, 6 playse SE_REGI msgbox MauvilleCity_GameCorner_Text_210529, MSGBOX_DEFAULT hidemoneybox - nop - nop hidecoinsbox 0, 5 release end @@ -60,14 +57,11 @@ MauvilleCity_GameCorner_EventScript_20FC75:: @ 820FC75 goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1 givecoins 500 takemoney 0x2710, 0 - updatemoneybox 0, 0 - nop + updatemoneybox 0,0 updatecoinsbox 1, 6 playse SE_REGI msgbox MauvilleCity_GameCorner_Text_210529, MSGBOX_DEFAULT hidemoneybox - nop - nop hidecoinsbox 0, 5 release end @@ -80,8 +74,6 @@ MauvilleCity_GameCorner_EventScript_20FCB7:: @ 820FCB7 MauvilleCity_GameCorner_EventScript_20FCC1:: @ 820FCC1 msgbox MauvilleCity_GameCorner_Text_210553, MSGBOX_DEFAULT hidemoneybox - nop - nop hidecoinsbox 0, 5 release end @@ -89,8 +81,6 @@ MauvilleCity_GameCorner_EventScript_20FCC1:: @ 820FCC1 MauvilleCity_GameCorner_EventScript_20FCD1:: @ 820FCD1 msgbox MauvilleCity_GameCorner_Text_21059A, MSGBOX_DEFAULT hidemoneybox - nop - nop hidecoinsbox 0, 5 release end @@ -98,8 +88,6 @@ MauvilleCity_GameCorner_EventScript_20FCD1:: @ 820FCD1 MauvilleCity_GameCorner_EventScript_20FCE1:: @ 820FCE1 msgbox MauvilleCity_GameCorner_Text_21057E, MSGBOX_DEFAULT hidemoneybox - nop - nop hidecoinsbox 0, 5 release end diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index d770f095c..e89a8b437 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -115,38 +115,29 @@ MtChimney_EventScript_22EEF3:: @ 822EEF3 compare VAR_RESULT, 0 goto_if_eq MtChimney_EventScript_22EF51 hidemoneybox - nop - nop release end MtChimney_EventScript_22EF51:: @ 822EF51 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT hidemoneybox - nop - nop release end MtChimney_EventScript_22EF5E:: @ 822EF5E takemoney 0xc8, 0 - updatemoneybox 0, 0 - nop + updatemoneybox 0,0 return MtChimney_EventScript_22EF69:: @ 822EF69 msgbox MtChimney_Text_22FE9B, MSGBOX_DEFAULT hidemoneybox - nop - nop release end MtChimney_EventScript_22EF76:: @ 822EF76 msgbox MtChimney_Text_22FE5E, MSGBOX_DEFAULT hidemoneybox - nop - nop release end diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc index e52ab08f9..594b17f84 100644 --- a/data/maps/Route109_SeashoreHouse/scripts.inc +++ b/data/maps/Route109_SeashoreHouse/scripts.inc @@ -43,8 +43,6 @@ Route109_SeashoreHouse_EventScript_269460:: @ 8269460 goto_if_eq Route109_SeashoreHouse_EventScript_269484 msgbox Route109_SeashoreHouse_Text_2697EF, MSGBOX_DEFAULT hidemoneybox - nop - nop release end @@ -57,28 +55,21 @@ Route109_SeashoreHouse_EventScript_269484:: @ 8269484 goto_if_eq Route109_SeashoreHouse_EventScript_2694D5 msgbox Route109_SeashoreHouse_Text_2697C8, MSGBOX_DEFAULT takemoney 0x12c, 0 - updatemoneybox 0, 0 - nop + updatemoneybox 0,0 giveitem_std ITEM_SODA_POP hidemoneybox - nop - nop release end Route109_SeashoreHouse_EventScript_2694C8:: @ 82694C8 msgbox Route109_SeashoreHouse_Text_2697D5, MSGBOX_DEFAULT hidemoneybox - nop - nop release end Route109_SeashoreHouse_EventScript_2694D5:: @ 82694D5 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT hidemoneybox - nop - nop release end diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 69f5ea80d..001f80b15 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -67,8 +67,7 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48 playse SE_REGI msgbox Route121_SafariZoneEntrance_Text_2A501B, MSGBOX_DEFAULT takemoney 0x1f4, 0 - updatemoneybox 0, 0 - nop + updatemoneybox 0,0 msgbox Route121_SafariZoneEntrance_Text_2A5036, MSGBOX_DEFAULT playfanfare MUS_FANFA4 message Route121_SafariZoneEntrance_Text_2A5052 @@ -76,8 +75,6 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48 msgbox Route121_SafariZoneEntrance_Text_2A506F, MSGBOX_DEFAULT closemessage hidemoneybox - nop - nop applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD18 waitmovement 0 special EnterSafariMode @@ -114,8 +111,6 @@ Route121_SafariZoneEntrance_EventScript_22BCF8:: @ 822BCF8 Route121_SafariZoneEntrance_EventScript_22BD06:: @ 822BD06 closemessage hidemoneybox - nop - nop applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD16 waitmovement 0 releaseall diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index 5a4947c8a..6dc4f2242 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -26,8 +26,6 @@ SlateportCity_OceanicMuseum_1F_EventScript_20ADC1:: @ 820ADC1 goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20ADE8 closemessage hidemoneybox - nop - nop applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AE4B waitmovement 0 releaseall @@ -39,13 +37,10 @@ SlateportCity_OceanicMuseum_1F_EventScript_20ADE8:: @ 820ADE8 goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AE18 playse SE_REGI takemoney 0x32, 0 - updatemoneybox 0, 0 - nop + updatemoneybox 0,0 msgbox SlateportCity_OceanicMuseum_1F_Text_20B026, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox - nop - nop releaseall end @@ -54,8 +49,6 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AE18:: @ 820AE18 msgbox SlateportCity_OceanicMuseum_1F_Text_20B03D, MSGBOX_DEFAULT closemessage hidemoneybox - nop - nop applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AE4B waitmovement 0 releaseall @@ -65,8 +58,6 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AE39:: @ 820AE39 msgbox SlateportCity_OceanicMuseum_1F_Text_20B075, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox - nop - nop releaseall end -- cgit v1.2.3 From bac8974ce375bc464c6374cfeb4d74e4dc98a20a Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 11:16:54 -0400 Subject: Added note about addvar The contest scripts actually use addvar to add a -1 to a variable instead of using subvar to subtract a positive number. This is fine in vanilla, where addvar script command does NOT support adding the value of a variable to another variable (like subvar supports), but should anyone want to change it, contests will be inexplicably broken. --- src/scrcmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scrcmd.c b/src/scrcmd.c index aa03181e6..e31be848a 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -466,6 +466,9 @@ bool8 ScrCmd_addvar(struct ScriptContext *ctx) { u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx)); *ptr += ScriptReadHalfword(ctx); + // Note: addvar doesn't support adding from a variable in vanilla. If you were to + // add a VarGet() to the above, make sure you change the `addvar VAR_0x8006, 65535` + // in the contest scripts to `subvar VAR_0x8006, 1`, else contests will break. return FALSE; } -- cgit v1.2.3 From d12a8c10ee045baead789f947160fea78913e7e0 Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 12:01:38 -0400 Subject: Documenting credits a bit --- include/credits.h | 2 +- src/credits.c | 475 +++++++++++++++++++++++++++-------------------------- src/hall_of_fame.c | 2 +- 3 files changed, 241 insertions(+), 238 deletions(-) diff --git a/include/credits.h b/include/credits.h index e7e58415b..f7dfa9997 100644 --- a/include/credits.h +++ b/include/credits.h @@ -7,6 +7,6 @@ extern EWRAM_DATA bool8 gHasHallOfFameRecords; // Exported ROM declarations -void sub_8175620(void); +void CB2_StartCreditsSequence(void); #endif // GUARD_CREDITS_H diff --git a/src/credits.c b/src/credits.c index 1e96514b1..99c89dc8f 100644 --- a/src/credits.c +++ b/src/credits.c @@ -143,7 +143,7 @@ struct Unk201C000 struct CreditsEntry { u8 var_0; - u8 var_1; + u8 isTitle; const u8 *text; }; @@ -165,7 +165,7 @@ static const u32 gCreditsCopyrightEnd_Gfx[] = INCBIN_U32("graphics/credits/the_e static void sub_81772B8(struct Sprite *sprite); -static const u8 gUnknown_085E5BAC[] = +static const u8 sTheEnd_LetterTMap[] = { 0, 1, 0, 0xFF, 1, 0xFF, @@ -174,7 +174,7 @@ static const u8 gUnknown_085E5BAC[] = 0xFF, 1, 0xFF, }; -static const u8 gUnknown_085E5BBB[] = +static const u8 sTheEnd_LetterHMap[] = { 1, 0xFF, 1, 1, 0xFF, 1, @@ -183,7 +183,7 @@ static const u8 gUnknown_085E5BBB[] = 1, 0xFF, 1, }; -static const u8 gUnknown_085E5BCA[] = +static const u8 sTheEnd_LetterEMap[] = { 1, 0, 0, 1, 0xFF, 0xFF, @@ -192,7 +192,7 @@ static const u8 gUnknown_085E5BCA[] = 1, 0x80, 0x80, }; -static const u8 gUnknown_085E5BD9[] = +static const u8 sTheEnd_LetterNMap[] = { 1, 3, 1, 1, 4, 1, @@ -201,7 +201,7 @@ static const u8 gUnknown_085E5BD9[] = 1, 0xC3, 1, }; -static const u8 gUnknown_085E5BE8[] = +static const u8 sTheEnd_LetterDMap[] = { 1, 6, 7, 1, 8, 9, @@ -369,165 +369,165 @@ static const u8 gCreditsText_MotoyasuTojima[] = _("Motoyasu Tojima"); static const u8 gCreditsText_NicolaPrattBarlow[] = _("Nicola Pratt-Barlow"); static const u8 gCreditsText_ShellieDow[] = _("Shellie Dow"); static const u8 gCreditsText_ErikJohnson[] = _("Erik Johnson"); -static const struct CreditsEntry gCreditsEntry_EmptyString[] = {0, 0, gCreditsText_EmptyString}; -static const struct CreditsEntry gCreditsEntry_PkmnEmeraldVersion[] = {7, 1, gCreditsText_PkmnEmeraldVersion}; -static const struct CreditsEntry gCreditsEntry_Credits[] = {11, 1, gCreditsText_Credits}; -static const struct CreditsEntry gCreditsEntry_ExecutiveDirector[] = {8, 1, gCreditsText_ExecutiveDirector}; -static const struct CreditsEntry gCreditsEntry_Director[] = {12, 1, gCreditsText_Director}; -static const struct CreditsEntry gCreditsEntry_ArtDirector[] = {10, 1, gCreditsText_ArtDirector}; -static const struct CreditsEntry gCreditsEntry_BattleDirector[] = {10, 1, gCreditsText_BattleDirector}; -static const struct CreditsEntry gCreditsEntry_MainProgrammer[] = {10, 1, gCreditsText_MainProgrammer}; -static const struct CreditsEntry gCreditsEntry_BattleSystemPgrms[] = {8, 1, gCreditsText_BattleSystemPgrms}; -static const struct CreditsEntry gCreditsEntry_FieldSystemPgrms[] = {7, 1, gCreditsText_FieldSystemPgrms}; -static const struct CreditsEntry gCreditsEntry_Programmers[] = {12, 1, gCreditsText_Programmers}; -static const struct CreditsEntry gCreditsEntry_MainGraphicDesigner[] = {7, 1, gCreditsText_MainGraphicDesigner}; -static const struct CreditsEntry gCreditsEntry_GraphicDesigners[] = {9, 1, gCreditsText_GraphicDesigners}; -static const struct CreditsEntry gCreditsEntry_PkmnDesigners[] = {10, 1, gCreditsText_PkmnDesigners}; -static const struct CreditsEntry gCreditsEntry_MusicComposition[] = {13, 1, gCreditsText_MusicComposition}; -static const struct CreditsEntry gCreditsEntry_SoundEffectsAndPkmnVoices[] = {4, 1, gCreditsText_SoundEffectsAndPkmnVoices}; -static const struct CreditsEntry gCreditsEntry_GameDesigners[] = {11, 1, gCreditsText_GameDesigners}; -static const struct CreditsEntry gCreditsEntry_ScenarioPlot[] = {11, 1, gCreditsText_ScenarioPlot}; -static const struct CreditsEntry gCreditsEntry_Scenario[] = {13, 1, gCreditsText_Scenario}; -static const struct CreditsEntry gCreditsEntry_ScriptDesigners[] = {10, 1, gCreditsText_ScriptDesigners}; -static const struct CreditsEntry gCreditsEntry_MapDesigners[] = {11, 1, gCreditsText_MapDesigners}; -static const struct CreditsEntry gCreditsEntry_MapDataDesigners[] = {9, 1, gCreditsText_MapDataDesigners}; -static const struct CreditsEntry gCreditsEntry_ParametricDesigners[] = {9, 1, gCreditsText_ParametricDesigners}; -static const struct CreditsEntry gCreditsEntry_PokedexText[] = {11, 1, gCreditsText_PokedexText}; -static const struct CreditsEntry gCreditsEntry_EnvAndToolPgrms[] = {6, 1, gCreditsText_EnvAndToolPgrms}; -static const struct CreditsEntry gCreditsEntry_NCLProductTesting[] = {11, 1, gCreditsText_NCLProductTesting}; -static const struct CreditsEntry gCreditsEntry_SpecialThanks[] = {10, 1, gCreditsText_SpecialThanks}; -static const struct CreditsEntry gCreditsEntry_Coordinators[] = {11, 1, gCreditsText_Coordinators}; -static const struct CreditsEntry gCreditsEntry_Producers[] = {11, 1, gCreditsText_Producers}; -static const struct CreditsEntry gCreditsEntry_ExecProducers[] = {7, 1, gCreditsText_ExecProducers}; -static const struct CreditsEntry gCreditsEntry_InfoSupervisors[] = {10, 1, gCreditsText_InfoSupervisors}; -static const struct CreditsEntry gCreditsEntry_TaskManagers[] = {8, 1, gCreditsText_TaskManagers}; -static const struct CreditsEntry gCreditsEntry_BrailleCodeCheck[] = {10, 1, gCreditsText_BrailleCodeCheck}; -static const struct CreditsEntry gCreditsEntry_WorldDirector[] = {10, 1, gCreditsText_WorldDirector}; -static const struct CreditsEntry gCreditsEntry_BattleFrontierData[] = {8, 1, gCreditsText_BattleFrontierData}; -static const struct CreditsEntry gCreditsEntry_SupportProgrammers[] = {10, 1, gCreditsText_SupportProgrammers}; -static const struct CreditsEntry gCreditsEntry_Artwork[] = {12, 1, gCreditsText_Artwork}; -static const struct CreditsEntry gCreditsEntry_LeadProgrammer[] = {10, 1, gCreditsText_LeadProgrammer}; -static const struct CreditsEntry gCreditsEntry_LeadGraphicArtist[] = {9, 1, gCreditsText_LeadGraphicArtist}; -static const struct CreditsEntry gCreditsEntry_SatoshiTajiri[] = {11, 0, gCreditsText_SatoshiTajiri}; -static const struct CreditsEntry gCreditsEntry_JunichiMasuda[] = {11, 0, gCreditsText_JunichiMasuda}; -static const struct CreditsEntry gCreditsEntry_KenSugimori[] = {11, 0, gCreditsText_KenSugimori}; -static const struct CreditsEntry gCreditsEntry_ShigekiMorimoto[] = {11, 0, gCreditsText_ShigekiMorimoto}; -static const struct CreditsEntry gCreditsEntry_TetsuyaWatanabe[] = {11, 0, gCreditsText_TetsuyaWatanabe}; -static const struct CreditsEntry gCreditsEntry_HisashiSogabe[] = {11, 0, gCreditsText_HisashiSogabe}; -static const struct CreditsEntry gCreditsEntry_SosukeTamada[] = {11, 0, gCreditsText_SosukeTamada}; -static const struct CreditsEntry gCreditsEntry_AkitoMori[] = {11, 0, gCreditsText_AkitoMori}; -static const struct CreditsEntry gCreditsEntry_KeitaKagaya[] = {11, 0, gCreditsText_KeitaKagaya}; -static const struct CreditsEntry gCreditsEntry_YoshinoriMatsuda[] = {11, 0, gCreditsText_YoshinoriMatsuda}; -static const struct CreditsEntry gCreditsEntry_HiroyukiNakamura[] = {11, 0, gCreditsText_HiroyukiNakamura}; -static const struct CreditsEntry gCreditsEntry_MasaoTaya[] = {11, 0, gCreditsText_MasaoTaya}; -static const struct CreditsEntry gCreditsEntry_SatoshiNohara[] = {11, 0, gCreditsText_SatoshiNohara}; -static const struct CreditsEntry gCreditsEntry_TomomichiOhta[] = {11, 0, gCreditsText_TomomichiOhta}; -static const struct CreditsEntry gCreditsEntry_MiyukiIwasawa[] = {11, 0, gCreditsText_MiyukiIwasawa}; -static const struct CreditsEntry gCreditsEntry_TakenoriOhta[] = {11, 0, gCreditsText_TakenoriOhta}; -static const struct CreditsEntry gCreditsEntry_HironobuYoshida[] = {11, 0, gCreditsText_HironobuYoshida}; -static const struct CreditsEntry gCreditsEntry_MotofumiFujiwara[] = {11, 0, gCreditsText_MotofumiFujiwara}; -static const struct CreditsEntry gCreditsEntry_SatoshiOhta[] = {11, 0, gCreditsText_SatoshiOhta}; -static const struct CreditsEntry gCreditsEntry_AsukaIwashita[] = {11, 0, gCreditsText_AsukaIwashita}; -static const struct CreditsEntry gCreditsEntry_AimiTomita[] = {11, 0, gCreditsText_AimiTomita}; -static const struct CreditsEntry gCreditsEntry_TakaoUnno[] = {11, 0, gCreditsText_TakaoUnno}; -static const struct CreditsEntry gCreditsEntry_KanakoEo[] = {11, 0, gCreditsText_KanakoEo}; -static const struct CreditsEntry gCreditsEntry_JunOkutani[] = {11, 0, gCreditsText_JunOkutani}; -static const struct CreditsEntry gCreditsEntry_AtsukoNishida[] = {11, 0, gCreditsText_AtsukoNishida}; -static const struct CreditsEntry gCreditsEntry_MuneoSaito[] = {11, 0, gCreditsText_MuneoSaito}; -static const struct CreditsEntry gCreditsEntry_RenaYoshikawa[] = {11, 0, gCreditsText_RenaYoshikawa}; -static const struct CreditsEntry gCreditsEntry_GoIchinose[] = {11, 0, gCreditsText_GoIchinose}; -static const struct CreditsEntry gCreditsEntry_MorikazuAoki[] = {11, 0, gCreditsText_MorikazuAoki}; -static const struct CreditsEntry gCreditsEntry_KojiNishino[] = {11, 0, gCreditsText_KojiNishino}; -static const struct CreditsEntry gCreditsEntry_KenjiMatsushima[] = {11, 0, gCreditsText_KenjiMatsushima}; -static const struct CreditsEntry gCreditsEntry_TetsujiOhta[] = {11, 0, gCreditsText_TetsujiOhta}; -static const struct CreditsEntry gCreditsEntry_HitomiSato[] = {11, 0, gCreditsText_HitomiSato}; -static const struct CreditsEntry gCreditsEntry_TakeshiKawachimaru[] = {11, 0, gCreditsText_TakeshiKawachimaru}; -static const struct CreditsEntry gCreditsEntry_TeruyukiShimoyamada[] = {11, 0, gCreditsText_TeruyukiShimoyamada}; -static const struct CreditsEntry gCreditsEntry_ShigeruOhmori[] = {11, 0, gCreditsText_ShigeruOhmori}; -static const struct CreditsEntry gCreditsEntry_TadashiTakahashi[] = {11, 0, gCreditsText_TadashiTakahashi}; -static const struct CreditsEntry gCreditsEntry_ToshinobuMatsumiya[] = {11, 0, gCreditsText_ToshinobuMatsumiya}; -static const struct CreditsEntry gCreditsEntry_AkihitoTomisawa[] = {11, 0, gCreditsText_AkihitoTomisawa}; -static const struct CreditsEntry gCreditsEntry_HirokiEnomoto[] = {11, 0, gCreditsText_HirokiEnomoto}; -static const struct CreditsEntry gCreditsEntry_KazuyukiTerada[] = {11, 0, gCreditsText_KazuyukiTerada}; -static const struct CreditsEntry gCreditsEntry_YuriSakurai[] = {11, 0, gCreditsText_YuriSakurai}; -static const struct CreditsEntry gCreditsEntry_HiromiSagawa[] = {11, 0, gCreditsText_HiromiSagawa}; -static const struct CreditsEntry gCreditsEntry_KenjiTominaga[] = {11, 0, gCreditsText_KenjiTominaga}; -static const struct CreditsEntry gCreditsEntry_YoshioTajiri[] = {11, 0, gCreditsText_YoshioTajiri}; -static const struct CreditsEntry gCreditsEntry_TeikoSasaki[] = {11, 0, gCreditsText_TeikoSasaki}; -static const struct CreditsEntry gCreditsEntry_SachikoHamano[] = {11, 0, gCreditsText_SachikoHamano}; -static const struct CreditsEntry gCreditsEntry_ChieMatsumiya[] = {11, 0, gCreditsText_ChieMatsumiya}; -static const struct CreditsEntry gCreditsEntry_AkikoShinozaki[] = {11, 0, gCreditsText_AkikoShinozaki}; -static const struct CreditsEntry gCreditsEntry_AstukoFujii[] = {11, 0, gCreditsText_AstukoFujii}; -static const struct CreditsEntry gCreditsEntry_NozomuSaito[] = {11, 0, gCreditsText_NozomuSaito}; -static const struct CreditsEntry gCreditsEntry_KenkichiToyama[] = {11, 0, gCreditsText_KenkichiToyama}; -static const struct CreditsEntry gCreditsEntry_SuguruNakatsui[] = {11, 0, gCreditsText_SuguruNakatsui}; -static const struct CreditsEntry gCreditsEntry_YumiFunasaka[] = {11, 0, gCreditsText_YumiFunasaka}; -static const struct CreditsEntry gCreditsEntry_NaokoYanase[] = {11, 0, gCreditsText_NaokoYanase}; -static const struct CreditsEntry gCreditsEntry_NCLSuperMarioClub[] = {11, 0, gCreditsText_NCLSuperMarioClub}; -static const struct CreditsEntry gCreditsEntry_AtsushiTada[] = {11, 0, gCreditsText_AtsushiTada}; -static const struct CreditsEntry gCreditsEntry_TakahiroOhnishi[] = {11, 0, gCreditsText_TakahiroOhnishi}; -static const struct CreditsEntry gCreditsEntry_NorihideOkamura[] = {11, 0, gCreditsText_NorihideOkamura}; -static const struct CreditsEntry gCreditsEntry_HiroNakamura[] = {11, 0, gCreditsText_HiroNakamura}; -static const struct CreditsEntry gCreditsEntry_HiroyukiUesugi[] = {11, 0, gCreditsText_HiroyukiUesugi}; -static const struct CreditsEntry gCreditsEntry_TerukiMurakawa[] = {11, 0, gCreditsText_TerukiMurakawa}; -static const struct CreditsEntry gCreditsEntry_AkiraKinashi[] = {11, 0, gCreditsText_AkiraKinashi}; -static const struct CreditsEntry gCreditsEntry_MichikoTakizawa[] = {11, 0, gCreditsText_MichikoTakizawa}; -static const struct CreditsEntry gCreditsEntry_MakikoTakada[] = {11, 0, gCreditsText_MakikoTakada}; -static const struct CreditsEntry gCreditsEntry_TakanaoKondo[] = {11, 0, gCreditsText_TakanaoKondo}; -static const struct CreditsEntry gCreditsEntry_AiMashima[] = {11, 0, gCreditsText_AiMashima}; -static const struct CreditsEntry gCreditsEntry_GakujiNomoto[] = {11, 0, gCreditsText_GakujiNomoto}; -static const struct CreditsEntry gCreditsEntry_TakehiroIzushi[] = {11, 0, gCreditsText_TakehiroIzushi}; -static const struct CreditsEntry gCreditsEntry_HitoshiYamagami[] = {11, 0, gCreditsText_HitoshiYamagami}; -static const struct CreditsEntry gCreditsEntry_KyokoWatanabe[] = {11, 0, gCreditsText_KyokoWatanabe}; -static const struct CreditsEntry gCreditsEntry_TakaoNakano[] = {11, 0, gCreditsText_TakaoNakano}; -static const struct CreditsEntry gCreditsEntry_HiroyukiJinnai[] = {11, 0, gCreditsText_HiroyukiJinnai}; -static const struct CreditsEntry gCreditsEntry_HiroakiTsuru[] = {11, 0, gCreditsText_HiroakiTsuru}; -static const struct CreditsEntry gCreditsEntry_TsunekazIshihara[] = {11, 0, gCreditsText_TsunekazIshihara}; -static const struct CreditsEntry gCreditsEntry_SatoruIwata[] = {11, 0, gCreditsText_SatoruIwata}; -static const struct CreditsEntry gCreditsEntry_KazuyaSuyama[] = {11, 0, gCreditsText_KazuyaSuyama}; -static const struct CreditsEntry gCreditsEntry_SatoshiMitsuhara[] = {11, 0, gCreditsText_SatoshiMitsuhara}; -static const struct CreditsEntry gCreditsEntry_JapanBrailleLibrary[] = {9, 0, gCreditsText_JapanBrailleLibrary}; -static const struct CreditsEntry gCreditsEntry_TomotakaKomura[] = {11, 0, gCreditsText_TomotakaKomura}; -static const struct CreditsEntry gCreditsEntry_MikikoOhhashi[] = {11, 0, gCreditsText_MikikoOhhashi}; -static const struct CreditsEntry gCreditsEntry_DaisukeHoshino[] = {11, 0, gCreditsText_DaisukeHoshino}; -static const struct CreditsEntry gCreditsEntry_KenjiroIto[] = {11, 0, gCreditsText_KenjiroIto}; -static const struct CreditsEntry gCreditsEntry_RuiKawaguchi[] = {11, 0, gCreditsText_RuiKawaguchi}; -static const struct CreditsEntry gCreditsEntry_ShunsukeKohori[] = {11, 0, gCreditsText_ShunsukeKohori}; -static const struct CreditsEntry gCreditsEntry_SachikoNakamichi[] = {11, 0, gCreditsText_SachikoNakamichi}; -static const struct CreditsEntry gCreditsEntry_FujikoNomura[] = {11, 0, gCreditsText_FujikoNomura}; -static const struct CreditsEntry gCreditsEntry_KazukiYoshihara[] = {11, 0, gCreditsText_KazukiYoshihara}; -static const struct CreditsEntry gCreditsEntry_RetsujiNomoto[] = {11, 0, gCreditsText_RetsujiNomoto}; -static const struct CreditsEntry gCreditsEntry_AzusaTajima[] = {11, 0, gCreditsText_AzusaTajima}; -static const struct CreditsEntry gCreditsEntry_ShusakuEgami[] = {11, 0, gCreditsText_ShusakuEgami}; -static const struct CreditsEntry gCreditsEntry_PackageAndManual[] = {0, 1, gCreditsText_PackageAndManual}; -static const struct CreditsEntry gCreditsEntry_EnglishVersion[] = {0, 1, gCreditsText_EnglishVersion}; -static const struct CreditsEntry gCreditsEntry_Translator[] = {0, 1, gCreditsText_Translator}; -static const struct CreditsEntry gCreditsEntry_TextEditor[] = {0, 1, gCreditsText_TextEditor}; -static const struct CreditsEntry gCreditsEntry_NCLCoordinator[] = {0, 1, gCreditsText_NCLCoordinator}; -static const struct CreditsEntry gCreditsEntry_GraphicDesigner[] = {0, 1, gCreditsText_GraphicDesigner}; -static const struct CreditsEntry gCreditsEntry_NOAProductTesting[] = {0, 1, gCreditsText_NOAProductTesting}; -static const struct CreditsEntry gCreditsEntry_HideyukiNakajima[] = {0, 0, gCreditsText_HideyukiNakajima}; -static const struct CreditsEntry gCreditsEntry_HidenoriSaeki[] = {0, 0, gCreditsText_HidenoriSaeki}; -static const struct CreditsEntry gCreditsEntry_YokoWatanabe[] = {0, 0, gCreditsText_YokoWatanabe}; -static const struct CreditsEntry gCreditsEntry_SakaeKimura[] = {0, 0, gCreditsText_SakaeKimura}; -static const struct CreditsEntry gCreditsEntry_ChiakiShinkai[] = {0, 0, gCreditsText_ChiakiShinkai}; -static const struct CreditsEntry gCreditsEntry_SethMcMahill[] = {0, 0, gCreditsText_SethMcMahill}; -static const struct CreditsEntry gCreditsEntry_NobOgasawara[] = {0, 0, gCreditsText_NobOgasawara}; -static const struct CreditsEntry gCreditsEntry_TeresaLillygren[] = {0, 0, gCreditsText_TeresaLillygren}; -static const struct CreditsEntry gCreditsEntry_KimikoNakamichi[] = {0, 0, gCreditsText_KimikoNakamichi}; -static const struct CreditsEntry gCreditsEntry_SouichiYamamoto[] = {0, 0, gCreditsText_SouichiYamamoto}; -static const struct CreditsEntry gCreditsEntry_YuichiroIto[] = {0, 0, gCreditsText_YuichiroIto}; -static const struct CreditsEntry gCreditsEntry_ThomasHertzog[] = {0, 0, gCreditsText_ThomasHertzog}; -static const struct CreditsEntry gCreditsEntry_MikaKurosawa[] = {0, 0, gCreditsText_MikaKurosawa}; -static const struct CreditsEntry gCreditsEntry_NationalFederationBlind[] = {0, 0, gCreditsText_NationalFederationBlind}; -static const struct CreditsEntry gCreditsEntry_PatriciaAMaurer[] = {0, 0, gCreditsText_PatriciaAMaurer}; -static const struct CreditsEntry gCreditsEntry_EuropeanBlindUnion[] = {0, 0, gCreditsText_EuropeanBlindUnion}; -static const struct CreditsEntry gCreditsEntry_AustralianBrailleAuthority[] = {0, 0, gCreditsText_AustralianBrailleAuthority}; -static const struct CreditsEntry gCreditsEntry_RoyalNewZealandFederationBlind[] = {0, 0, gCreditsText_RoyalNewZealandFederationBlind}; -static const struct CreditsEntry gCreditsEntry_MotoyasuTojima[] = {0, 0, gCreditsText_MotoyasuTojima}; -static const struct CreditsEntry gCreditsEntry_NicolaPrattBarlow[] = {0, 0, gCreditsText_NicolaPrattBarlow}; -static const struct CreditsEntry gCreditsEntry_ShellieDow[] = {0, 0, gCreditsText_ShellieDow}; -static const struct CreditsEntry gCreditsEntry_ErikJohnson[] = {0, 0, gCreditsText_ErikJohnson}; +static const struct CreditsEntry gCreditsEntry_EmptyString[] = {0, FALSE, gCreditsText_EmptyString}; +static const struct CreditsEntry gCreditsEntry_PkmnEmeraldVersion[] = {7, TRUE, gCreditsText_PkmnEmeraldVersion}; +static const struct CreditsEntry gCreditsEntry_Credits[] = {11, TRUE, gCreditsText_Credits}; +static const struct CreditsEntry gCreditsEntry_ExecutiveDirector[] = {8, TRUE, gCreditsText_ExecutiveDirector}; +static const struct CreditsEntry gCreditsEntry_Director[] = {12, TRUE, gCreditsText_Director}; +static const struct CreditsEntry gCreditsEntry_ArtDirector[] = {10, TRUE, gCreditsText_ArtDirector}; +static const struct CreditsEntry gCreditsEntry_BattleDirector[] = {10, TRUE, gCreditsText_BattleDirector}; +static const struct CreditsEntry gCreditsEntry_MainProgrammer[] = {10, TRUE, gCreditsText_MainProgrammer}; +static const struct CreditsEntry gCreditsEntry_BattleSystemPgrms[] = {8, TRUE, gCreditsText_BattleSystemPgrms}; +static const struct CreditsEntry gCreditsEntry_FieldSystemPgrms[] = {7, TRUE, gCreditsText_FieldSystemPgrms}; +static const struct CreditsEntry gCreditsEntry_Programmers[] = {12, TRUE, gCreditsText_Programmers}; +static const struct CreditsEntry gCreditsEntry_MainGraphicDesigner[] = {7, TRUE, gCreditsText_MainGraphicDesigner}; +static const struct CreditsEntry gCreditsEntry_GraphicDesigners[] = {9, TRUE, gCreditsText_GraphicDesigners}; +static const struct CreditsEntry gCreditsEntry_PkmnDesigners[] = {10, TRUE, gCreditsText_PkmnDesigners}; +static const struct CreditsEntry gCreditsEntry_MusicComposition[] = {13, TRUE, gCreditsText_MusicComposition}; +static const struct CreditsEntry gCreditsEntry_SoundEffectsAndPkmnVoices[] = {4, TRUE, gCreditsText_SoundEffectsAndPkmnVoices}; +static const struct CreditsEntry gCreditsEntry_GameDesigners[] = {11, TRUE, gCreditsText_GameDesigners}; +static const struct CreditsEntry gCreditsEntry_ScenarioPlot[] = {11, TRUE, gCreditsText_ScenarioPlot}; +static const struct CreditsEntry gCreditsEntry_Scenario[] = {13, TRUE, gCreditsText_Scenario}; +static const struct CreditsEntry gCreditsEntry_ScriptDesigners[] = {10, TRUE, gCreditsText_ScriptDesigners}; +static const struct CreditsEntry gCreditsEntry_MapDesigners[] = {11, TRUE, gCreditsText_MapDesigners}; +static const struct CreditsEntry gCreditsEntry_MapDataDesigners[] = {9, TRUE, gCreditsText_MapDataDesigners}; +static const struct CreditsEntry gCreditsEntry_ParametricDesigners[] = {9, TRUE, gCreditsText_ParametricDesigners}; +static const struct CreditsEntry gCreditsEntry_PokedexText[] = {11, TRUE, gCreditsText_PokedexText}; +static const struct CreditsEntry gCreditsEntry_EnvAndToolPgrms[] = {6, TRUE, gCreditsText_EnvAndToolPgrms}; +static const struct CreditsEntry gCreditsEntry_NCLProductTesting[] = {11, TRUE, gCreditsText_NCLProductTesting}; +static const struct CreditsEntry gCreditsEntry_SpecialThanks[] = {10, TRUE, gCreditsText_SpecialThanks}; +static const struct CreditsEntry gCreditsEntry_Coordinators[] = {11, TRUE, gCreditsText_Coordinators}; +static const struct CreditsEntry gCreditsEntry_Producers[] = {11, TRUE, gCreditsText_Producers}; +static const struct CreditsEntry gCreditsEntry_ExecProducers[] = {7, TRUE, gCreditsText_ExecProducers}; +static const struct CreditsEntry gCreditsEntry_InfoSupervisors[] = {10, TRUE, gCreditsText_InfoSupervisors}; +static const struct CreditsEntry gCreditsEntry_TaskManagers[] = {8, TRUE, gCreditsText_TaskManagers}; +static const struct CreditsEntry gCreditsEntry_BrailleCodeCheck[] = {10, TRUE, gCreditsText_BrailleCodeCheck}; +static const struct CreditsEntry gCreditsEntry_WorldDirector[] = {10, TRUE, gCreditsText_WorldDirector}; +static const struct CreditsEntry gCreditsEntry_BattleFrontierData[] = {8, TRUE, gCreditsText_BattleFrontierData}; +static const struct CreditsEntry gCreditsEntry_SupportProgrammers[] = {10, TRUE, gCreditsText_SupportProgrammers}; +static const struct CreditsEntry gCreditsEntry_Artwork[] = {12, TRUE, gCreditsText_Artwork}; +static const struct CreditsEntry gCreditsEntry_LeadProgrammer[] = {10, TRUE, gCreditsText_LeadProgrammer}; +static const struct CreditsEntry gCreditsEntry_LeadGraphicArtist[] = {9, TRUE, gCreditsText_LeadGraphicArtist}; +static const struct CreditsEntry gCreditsEntry_SatoshiTajiri[] = {11, FALSE, gCreditsText_SatoshiTajiri}; +static const struct CreditsEntry gCreditsEntry_JunichiMasuda[] = {11, FALSE, gCreditsText_JunichiMasuda}; +static const struct CreditsEntry gCreditsEntry_KenSugimori[] = {11, FALSE, gCreditsText_KenSugimori}; +static const struct CreditsEntry gCreditsEntry_ShigekiMorimoto[] = {11, FALSE, gCreditsText_ShigekiMorimoto}; +static const struct CreditsEntry gCreditsEntry_TetsuyaWatanabe[] = {11, FALSE, gCreditsText_TetsuyaWatanabe}; +static const struct CreditsEntry gCreditsEntry_HisashiSogabe[] = {11, FALSE, gCreditsText_HisashiSogabe}; +static const struct CreditsEntry gCreditsEntry_SosukeTamada[] = {11, FALSE, gCreditsText_SosukeTamada}; +static const struct CreditsEntry gCreditsEntry_AkitoMori[] = {11, FALSE, gCreditsText_AkitoMori}; +static const struct CreditsEntry gCreditsEntry_KeitaKagaya[] = {11, FALSE, gCreditsText_KeitaKagaya}; +static const struct CreditsEntry gCreditsEntry_YoshinoriMatsuda[] = {11, FALSE, gCreditsText_YoshinoriMatsuda}; +static const struct CreditsEntry gCreditsEntry_HiroyukiNakamura[] = {11, FALSE, gCreditsText_HiroyukiNakamura}; +static const struct CreditsEntry gCreditsEntry_MasaoTaya[] = {11, FALSE, gCreditsText_MasaoTaya}; +static const struct CreditsEntry gCreditsEntry_SatoshiNohara[] = {11, FALSE, gCreditsText_SatoshiNohara}; +static const struct CreditsEntry gCreditsEntry_TomomichiOhta[] = {11, FALSE, gCreditsText_TomomichiOhta}; +static const struct CreditsEntry gCreditsEntry_MiyukiIwasawa[] = {11, FALSE, gCreditsText_MiyukiIwasawa}; +static const struct CreditsEntry gCreditsEntry_TakenoriOhta[] = {11, FALSE, gCreditsText_TakenoriOhta}; +static const struct CreditsEntry gCreditsEntry_HironobuYoshida[] = {11, FALSE, gCreditsText_HironobuYoshida}; +static const struct CreditsEntry gCreditsEntry_MotofumiFujiwara[] = {11, FALSE, gCreditsText_MotofumiFujiwara}; +static const struct CreditsEntry gCreditsEntry_SatoshiOhta[] = {11, FALSE, gCreditsText_SatoshiOhta}; +static const struct CreditsEntry gCreditsEntry_AsukaIwashita[] = {11, FALSE, gCreditsText_AsukaIwashita}; +static const struct CreditsEntry gCreditsEntry_AimiTomita[] = {11, FALSE, gCreditsText_AimiTomita}; +static const struct CreditsEntry gCreditsEntry_TakaoUnno[] = {11, FALSE, gCreditsText_TakaoUnno}; +static const struct CreditsEntry gCreditsEntry_KanakoEo[] = {11, FALSE, gCreditsText_KanakoEo}; +static const struct CreditsEntry gCreditsEntry_JunOkutani[] = {11, FALSE, gCreditsText_JunOkutani}; +static const struct CreditsEntry gCreditsEntry_AtsukoNishida[] = {11, FALSE, gCreditsText_AtsukoNishida}; +static const struct CreditsEntry gCreditsEntry_MuneoSaito[] = {11, FALSE, gCreditsText_MuneoSaito}; +static const struct CreditsEntry gCreditsEntry_RenaYoshikawa[] = {11, FALSE, gCreditsText_RenaYoshikawa}; +static const struct CreditsEntry gCreditsEntry_GoIchinose[] = {11, FALSE, gCreditsText_GoIchinose}; +static const struct CreditsEntry gCreditsEntry_MorikazuAoki[] = {11, FALSE, gCreditsText_MorikazuAoki}; +static const struct CreditsEntry gCreditsEntry_KojiNishino[] = {11, FALSE, gCreditsText_KojiNishino}; +static const struct CreditsEntry gCreditsEntry_KenjiMatsushima[] = {11, FALSE, gCreditsText_KenjiMatsushima}; +static const struct CreditsEntry gCreditsEntry_TetsujiOhta[] = {11, FALSE, gCreditsText_TetsujiOhta}; +static const struct CreditsEntry gCreditsEntry_HitomiSato[] = {11, FALSE, gCreditsText_HitomiSato}; +static const struct CreditsEntry gCreditsEntry_TakeshiKawachimaru[] = {11, FALSE, gCreditsText_TakeshiKawachimaru}; +static const struct CreditsEntry gCreditsEntry_TeruyukiShimoyamada[] = {11, FALSE, gCreditsText_TeruyukiShimoyamada}; +static const struct CreditsEntry gCreditsEntry_ShigeruOhmori[] = {11, FALSE, gCreditsText_ShigeruOhmori}; +static const struct CreditsEntry gCreditsEntry_TadashiTakahashi[] = {11, FALSE, gCreditsText_TadashiTakahashi}; +static const struct CreditsEntry gCreditsEntry_ToshinobuMatsumiya[] = {11, FALSE, gCreditsText_ToshinobuMatsumiya}; +static const struct CreditsEntry gCreditsEntry_AkihitoTomisawa[] = {11, FALSE, gCreditsText_AkihitoTomisawa}; +static const struct CreditsEntry gCreditsEntry_HirokiEnomoto[] = {11, FALSE, gCreditsText_HirokiEnomoto}; +static const struct CreditsEntry gCreditsEntry_KazuyukiTerada[] = {11, FALSE, gCreditsText_KazuyukiTerada}; +static const struct CreditsEntry gCreditsEntry_YuriSakurai[] = {11, FALSE, gCreditsText_YuriSakurai}; +static const struct CreditsEntry gCreditsEntry_HiromiSagawa[] = {11, FALSE, gCreditsText_HiromiSagawa}; +static const struct CreditsEntry gCreditsEntry_KenjiTominaga[] = {11, FALSE, gCreditsText_KenjiTominaga}; +static const struct CreditsEntry gCreditsEntry_YoshioTajiri[] = {11, FALSE, gCreditsText_YoshioTajiri}; +static const struct CreditsEntry gCreditsEntry_TeikoSasaki[] = {11, FALSE, gCreditsText_TeikoSasaki}; +static const struct CreditsEntry gCreditsEntry_SachikoHamano[] = {11, FALSE, gCreditsText_SachikoHamano}; +static const struct CreditsEntry gCreditsEntry_ChieMatsumiya[] = {11, FALSE, gCreditsText_ChieMatsumiya}; +static const struct CreditsEntry gCreditsEntry_AkikoShinozaki[] = {11, FALSE, gCreditsText_AkikoShinozaki}; +static const struct CreditsEntry gCreditsEntry_AstukoFujii[] = {11, FALSE, gCreditsText_AstukoFujii}; +static const struct CreditsEntry gCreditsEntry_NozomuSaito[] = {11, FALSE, gCreditsText_NozomuSaito}; +static const struct CreditsEntry gCreditsEntry_KenkichiToyama[] = {11, FALSE, gCreditsText_KenkichiToyama}; +static const struct CreditsEntry gCreditsEntry_SuguruNakatsui[] = {11, FALSE, gCreditsText_SuguruNakatsui}; +static const struct CreditsEntry gCreditsEntry_YumiFunasaka[] = {11, FALSE, gCreditsText_YumiFunasaka}; +static const struct CreditsEntry gCreditsEntry_NaokoYanase[] = {11, FALSE, gCreditsText_NaokoYanase}; +static const struct CreditsEntry gCreditsEntry_NCLSuperMarioClub[] = {11, FALSE, gCreditsText_NCLSuperMarioClub}; +static const struct CreditsEntry gCreditsEntry_AtsushiTada[] = {11, FALSE, gCreditsText_AtsushiTada}; +static const struct CreditsEntry gCreditsEntry_TakahiroOhnishi[] = {11, FALSE, gCreditsText_TakahiroOhnishi}; +static const struct CreditsEntry gCreditsEntry_NorihideOkamura[] = {11, FALSE, gCreditsText_NorihideOkamura}; +static const struct CreditsEntry gCreditsEntry_HiroNakamura[] = {11, FALSE, gCreditsText_HiroNakamura}; +static const struct CreditsEntry gCreditsEntry_HiroyukiUesugi[] = {11, FALSE, gCreditsText_HiroyukiUesugi}; +static const struct CreditsEntry gCreditsEntry_TerukiMurakawa[] = {11, FALSE, gCreditsText_TerukiMurakawa}; +static const struct CreditsEntry gCreditsEntry_AkiraKinashi[] = {11, FALSE, gCreditsText_AkiraKinashi}; +static const struct CreditsEntry gCreditsEntry_MichikoTakizawa[] = {11, FALSE, gCreditsText_MichikoTakizawa}; +static const struct CreditsEntry gCreditsEntry_MakikoTakada[] = {11, FALSE, gCreditsText_MakikoTakada}; +static const struct CreditsEntry gCreditsEntry_TakanaoKondo[] = {11, FALSE, gCreditsText_TakanaoKondo}; +static const struct CreditsEntry gCreditsEntry_AiMashima[] = {11, FALSE, gCreditsText_AiMashima}; +static const struct CreditsEntry gCreditsEntry_GakujiNomoto[] = {11, FALSE, gCreditsText_GakujiNomoto}; +static const struct CreditsEntry gCreditsEntry_TakehiroIzushi[] = {11, FALSE, gCreditsText_TakehiroIzushi}; +static const struct CreditsEntry gCreditsEntry_HitoshiYamagami[] = {11, FALSE, gCreditsText_HitoshiYamagami}; +static const struct CreditsEntry gCreditsEntry_KyokoWatanabe[] = {11, FALSE, gCreditsText_KyokoWatanabe}; +static const struct CreditsEntry gCreditsEntry_TakaoNakano[] = {11, FALSE, gCreditsText_TakaoNakano}; +static const struct CreditsEntry gCreditsEntry_HiroyukiJinnai[] = {11, FALSE, gCreditsText_HiroyukiJinnai}; +static const struct CreditsEntry gCreditsEntry_HiroakiTsuru[] = {11, FALSE, gCreditsText_HiroakiTsuru}; +static const struct CreditsEntry gCreditsEntry_TsunekazIshihara[] = {11, FALSE, gCreditsText_TsunekazIshihara}; +static const struct CreditsEntry gCreditsEntry_SatoruIwata[] = {11, FALSE, gCreditsText_SatoruIwata}; +static const struct CreditsEntry gCreditsEntry_KazuyaSuyama[] = {11, FALSE, gCreditsText_KazuyaSuyama}; +static const struct CreditsEntry gCreditsEntry_SatoshiMitsuhara[] = {11, FALSE, gCreditsText_SatoshiMitsuhara}; +static const struct CreditsEntry gCreditsEntry_JapanBrailleLibrary[] = {9, FALSE, gCreditsText_JapanBrailleLibrary}; +static const struct CreditsEntry gCreditsEntry_TomotakaKomura[] = {11, FALSE, gCreditsText_TomotakaKomura}; +static const struct CreditsEntry gCreditsEntry_MikikoOhhashi[] = {11, FALSE, gCreditsText_MikikoOhhashi}; +static const struct CreditsEntry gCreditsEntry_DaisukeHoshino[] = {11, FALSE, gCreditsText_DaisukeHoshino}; +static const struct CreditsEntry gCreditsEntry_KenjiroIto[] = {11, FALSE, gCreditsText_KenjiroIto}; +static const struct CreditsEntry gCreditsEntry_RuiKawaguchi[] = {11, FALSE, gCreditsText_RuiKawaguchi}; +static const struct CreditsEntry gCreditsEntry_ShunsukeKohori[] = {11, FALSE, gCreditsText_ShunsukeKohori}; +static const struct CreditsEntry gCreditsEntry_SachikoNakamichi[] = {11, FALSE, gCreditsText_SachikoNakamichi}; +static const struct CreditsEntry gCreditsEntry_FujikoNomura[] = {11, FALSE, gCreditsText_FujikoNomura}; +static const struct CreditsEntry gCreditsEntry_KazukiYoshihara[] = {11, FALSE, gCreditsText_KazukiYoshihara}; +static const struct CreditsEntry gCreditsEntry_RetsujiNomoto[] = {11, FALSE, gCreditsText_RetsujiNomoto}; +static const struct CreditsEntry gCreditsEntry_AzusaTajima[] = {11, FALSE, gCreditsText_AzusaTajima}; +static const struct CreditsEntry gCreditsEntry_ShusakuEgami[] = {11, FALSE, gCreditsText_ShusakuEgami}; +static const struct CreditsEntry gCreditsEntry_PackageAndManual[] = {0, TRUE, gCreditsText_PackageAndManual}; +static const struct CreditsEntry gCreditsEntry_EnglishVersion[] = {0, TRUE, gCreditsText_EnglishVersion}; +static const struct CreditsEntry gCreditsEntry_Translator[] = {0, TRUE, gCreditsText_Translator}; +static const struct CreditsEntry gCreditsEntry_TextEditor[] = {0, TRUE, gCreditsText_TextEditor}; +static const struct CreditsEntry gCreditsEntry_NCLCoordinator[] = {0, TRUE, gCreditsText_NCLCoordinator}; +static const struct CreditsEntry gCreditsEntry_GraphicDesigner[] = {0, TRUE, gCreditsText_GraphicDesigner}; +static const struct CreditsEntry gCreditsEntry_NOAProductTesting[] = {0, TRUE, gCreditsText_NOAProductTesting}; +static const struct CreditsEntry gCreditsEntry_HideyukiNakajima[] = {0, FALSE, gCreditsText_HideyukiNakajima}; +static const struct CreditsEntry gCreditsEntry_HidenoriSaeki[] = {0, FALSE, gCreditsText_HidenoriSaeki}; +static const struct CreditsEntry gCreditsEntry_YokoWatanabe[] = {0, FALSE, gCreditsText_YokoWatanabe}; +static const struct CreditsEntry gCreditsEntry_SakaeKimura[] = {0, FALSE, gCreditsText_SakaeKimura}; +static const struct CreditsEntry gCreditsEntry_ChiakiShinkai[] = {0, FALSE, gCreditsText_ChiakiShinkai}; +static const struct CreditsEntry gCreditsEntry_SethMcMahill[] = {0, FALSE, gCreditsText_SethMcMahill}; +static const struct CreditsEntry gCreditsEntry_NobOgasawara[] = {0, FALSE, gCreditsText_NobOgasawara}; +static const struct CreditsEntry gCreditsEntry_TeresaLillygren[] = {0, FALSE, gCreditsText_TeresaLillygren}; +static const struct CreditsEntry gCreditsEntry_KimikoNakamichi[] = {0, FALSE, gCreditsText_KimikoNakamichi}; +static const struct CreditsEntry gCreditsEntry_SouichiYamamoto[] = {0, FALSE, gCreditsText_SouichiYamamoto}; +static const struct CreditsEntry gCreditsEntry_YuichiroIto[] = {0, FALSE, gCreditsText_YuichiroIto}; +static const struct CreditsEntry gCreditsEntry_ThomasHertzog[] = {0, FALSE, gCreditsText_ThomasHertzog}; +static const struct CreditsEntry gCreditsEntry_MikaKurosawa[] = {0, FALSE, gCreditsText_MikaKurosawa}; +static const struct CreditsEntry gCreditsEntry_NationalFederationBlind[] = {0, FALSE, gCreditsText_NationalFederationBlind}; +static const struct CreditsEntry gCreditsEntry_PatriciaAMaurer[] = {0, FALSE, gCreditsText_PatriciaAMaurer}; +static const struct CreditsEntry gCreditsEntry_EuropeanBlindUnion[] = {0, FALSE, gCreditsText_EuropeanBlindUnion}; +static const struct CreditsEntry gCreditsEntry_AustralianBrailleAuthority[] = {0, FALSE, gCreditsText_AustralianBrailleAuthority}; +static const struct CreditsEntry gCreditsEntry_RoyalNewZealandFederationBlind[] = {0, FALSE, gCreditsText_RoyalNewZealandFederationBlind}; +static const struct CreditsEntry gCreditsEntry_MotoyasuTojima[] = {0, FALSE, gCreditsText_MotoyasuTojima}; +static const struct CreditsEntry gCreditsEntry_NicolaPrattBarlow[] = {0, FALSE, gCreditsText_NicolaPrattBarlow}; +static const struct CreditsEntry gCreditsEntry_ShellieDow[] = {0, FALSE, gCreditsText_ShellieDow}; +static const struct CreditsEntry gCreditsEntry_ErikJohnson[] = {0, FALSE, gCreditsText_ErikJohnson}; #define _ gCreditsEntry_EmptyString static const struct CreditsEntry *const gCreditsEntryPointerTable[][5] = @@ -934,7 +934,7 @@ static const struct CreditsEntry *const gCreditsEntryPointerTable[][5] = }; #undef _ -static const struct BgTemplate gUnknown_085E6F68[] = +static const struct BgTemplate sBackgroundTemplates[] = { { .bg = 0, @@ -946,7 +946,7 @@ static const struct BgTemplate gUnknown_085E6F68[] = .baseTile = 0 }, }; -static const struct WindowTemplate gUnknown_085E6F6C[] = +static const struct WindowTemplate sWindowTemplates[] = { { .bg = 0, @@ -1102,51 +1102,51 @@ static const struct SpriteTemplate gUnknown_085E7068 = .callback = sub_81772B8, }; -static void sub_8175744(u8 taskIdA); -static void sub_8175774(u8 taskIdA); +static void Task_WaitPaletteFade(u8 taskIdA); +static void Task_ProgressCreditTasks(u8 taskIdA); static void sub_8175808(u8 taskIdA); static void c2_080C9BFC(u8 taskIdA); -static void sub_81758E4(u8 taskIdA); +static void Task_CreditsLoadGrassScene(u8 taskIdA); static void sub_81758A4(u8 taskIdA); -static void sub_8175A9C(u8 taskIdA); -static void sub_8175AE4(u8 taskIdA); -static void sub_8175B1C(u8 taskIdA); -static void sub_8175B90(u8 taskIdA); -static void sub_8175BD8(u8 taskIdA); -static void sub_8175C34(u8 taskIdA); -static void sub_8175CC8(u8 taskIdA); -static void sub_8175CE4(void); +static void Task_CreditsTheEnd1(u8 taskIdA); +static void Task_CreditsTheEnd2(u8 taskIdA); +static void Task_CreditsTheEnd3(u8 taskIdA); +static void Task_CreditsTheEnd4(u8 taskIdA); +static void Task_CreditsTheEnd5(u8 taskIdA); +static void Task_CreditsTheEnd6(u8 taskIdA); +static void Task_CreditsSoftReset(u8 taskIdA); +static void ResetGpuAndVram(void); static void sub_8175DA0(u8 taskIdB); -static u8 sub_817603C(u8 page, u8 taskIdA); +static u8 CheckChangeScene(u8 page, u8 taskIdA); static void sub_81760FC(u8 taskIdA); static void sub_817651C(u8 taskIdA); static void sub_817624C(u8 taskIdA); static bool8 sub_8176AB0(u8 data, u8 taskIdA); -static void sub_8176CA0(u8 taskIdA); -static void sub_8176D1C(u16, u16, u16); +static void ResetCreditsTasks(u8 taskIdA); +static void LoadTheEndScreen(u16, u16, u16); static void sub_8176E40(u16 arg0, u16 palette); static void sub_8176EE8(struct Sprite *sprite); static void sub_8176F90(struct Sprite *sprite); static u8 sub_8177224(u16 species, s16 x, s16 y, u16 position); static void sub_8177388(void); -static void sub_81754C8(void) +static void CreditsVBlankCallback(void) { LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); } -static void sub_81754DC(void) +static void CB2_RunCreditsSequence(void) { RunTasks(); AnimateSprites(); if ((gMain.heldKeys & B_BUTTON) && gHasHallOfFameRecords != 0 - && gTasks[gUnknown_0203BCE2].func == sub_8175774) + && gTasks[gUnknown_0203BCE2].func == Task_ProgressCreditTasks) { - sub_81754C8(); + CreditsVBlankCallback(); RunTasks(); AnimateSprites(); gUnknown_0203BCE5 = 1; @@ -1158,10 +1158,10 @@ static void sub_81754DC(void) static void sub_8175548(void) { ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, gUnknown_085E6F68, 1); + InitBgsFromTemplates(0, sBackgroundTemplates, 1); SetBgTilemapBuffer(0, AllocZeroed(0x800)); LoadPalette(gUnknown_085E56F0, 0x80, 0x40); - InitWindows(gUnknown_085E6F6C); + InitWindows(sWindowTemplates); DeactivateAllTextPrinters(); PutWindowTilemap(0); CopyWindowToVram(0, 3); @@ -1177,14 +1177,14 @@ static void sub_81755A4(void) Free(ptr); } -static void sub_81755BC(const u8 *string, u8 y, u8 a2) +static void PrintCreditsText(const u8 *string, u8 y, u8 isTitle) { u8 x; u8 color[3]; color[0] = 0; - if (a2 == 1) + if (isTitle == 1) { color[1] = 3; color[2] = 4; @@ -1199,20 +1199,20 @@ static void sub_81755BC(const u8 *string, u8 y, u8 a2) AddTextPrinterParameterized4(0, 1, x, y, 1, 0, color, -1, string); } -void sub_8175620(void) +void CB2_StartCreditsSequence(void) { u8 taskIdA; s16 taskIdC; u8 taskIdB; - sub_8175CE4(); + ResetGpuAndVram(); SetVBlankCallback(NULL); InitHeap(gHeap, HEAP_SIZE); ResetPaletteFade(); ResetTasks(); sub_8175548(); - taskIdA = CreateTask(sub_8175744, 0); + taskIdA = CreateTask(Task_WaitPaletteFade, 0); gTasks[taskIdA].data[TDA_4] = 0; gTasks[taskIdA].data[TDA_7] = 0; @@ -1237,9 +1237,9 @@ void sub_8175620(void) BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK); EnableInterrupts(INTR_FLAG_VBLANK); - SetVBlankCallback(sub_81754C8); + SetVBlankCallback(CreditsVBlankCallback); m4aSongNumStart(MUS_THANKFOR); - SetMainCallback2(sub_81754DC); + SetMainCallback2(CB2_RunCreditsSequence); gUnknown_0203BCE5 = 0; gUnknown_0203BCE8 = AllocZeroed(sizeof(struct Unk201C000)); @@ -1252,13 +1252,13 @@ void sub_8175620(void) gUnknown_0203BCE2 = taskIdA; } -static void sub_8175744(u8 taskIdA) +static void Task_WaitPaletteFade(u8 taskIdA) { if (!gPaletteFade.active) - gTasks[taskIdA].func = sub_8175774; + gTasks[taskIdA].func = Task_ProgressCreditTasks; } -static void sub_8175774(u8 taskIdA) +static void Task_ProgressCreditTasks(u8 taskIdA) { u16 data1; @@ -1270,7 +1270,7 @@ static void sub_8175774(u8 taskIdA) gTasks[taskIdC].data[TDC_0] = 30; gTasks[taskIdA].data[TDA_12] = 0x100; - gTasks[taskIdA].func = sub_8175A9C; + gTasks[taskIdA].func = Task_CreditsTheEnd1; return; } @@ -1298,7 +1298,7 @@ static void sub_8175808(u8 taskIdA) if (!gPaletteFade.active) { SetGpuReg(REG_OFFSET_DISPCNT, 0); - sub_8176CA0(taskIdA); + ResetCreditsTasks(taskIdA); gTasks[taskIdA].func = c2_080C9BFC; } } @@ -1313,8 +1313,8 @@ static void c2_080C9BFC(u8 taskIdA) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK); EnableInterrupts(INTR_FLAG_VBLANK); - SetVBlankCallback(sub_81754C8); - gTasks[taskIdA].func = sub_8175744; + SetVBlankCallback(CreditsVBlankCallback); + gTasks[taskIdA].func = Task_WaitPaletteFade; } } @@ -1323,12 +1323,12 @@ static void sub_81758A4(u8 taskIdA) if (!gPaletteFade.active) { SetGpuReg(REG_OFFSET_DISPCNT, 0); - sub_8176CA0(taskIdA); - gTasks[taskIdA].func = sub_81758E4; + ResetCreditsTasks(taskIdA); + gTasks[taskIdA].func = Task_CreditsLoadGrassScene; } } -static void sub_81758E4(u8 taskIdA) +static void Task_CreditsLoadGrassScene(u8 taskIdA) { switch (gMain.state) { @@ -1387,12 +1387,12 @@ static void sub_81758E4(u8 taskIdA) gMain.state = 0; gUnknown_0203BD28 = 0; - gTasks[taskIdA].func = sub_8175744; + gTasks[taskIdA].func = Task_WaitPaletteFade; break; } } -static void sub_8175A9C(u8 taskIdA) +static void Task_CreditsTheEnd1(u8 taskIdA) { if (gTasks[taskIdA].data[TDA_12]) { @@ -1401,23 +1401,23 @@ static void sub_8175A9C(u8 taskIdA) } BeginNormalPaletteFade(0xFFFFFFFF, 12, 0, 16, RGB_BLACK); - gTasks[taskIdA].func = sub_8175AE4; + gTasks[taskIdA].func = Task_CreditsTheEnd2; } -static void sub_8175AE4(u8 taskIdA) +static void Task_CreditsTheEnd2(u8 taskIdA) { if (!gPaletteFade.active) { - sub_8176CA0(taskIdA); - gTasks[taskIdA].func = sub_8175B1C; + ResetCreditsTasks(taskIdA); + gTasks[taskIdA].func = Task_CreditsTheEnd3; } } -static void sub_8175B1C(u8 taskIdA) +static void Task_CreditsTheEnd3(u8 taskIdA) { - sub_8175CE4(); + ResetGpuAndVram(); ResetPaletteFade(); - sub_8176D1C(0, 0x3800, 0); + LoadTheEndScreen(0, 0x3800, 0); ResetSpriteData(); FreeAllSpritePalettes(); BeginNormalPaletteFade(0xFFFFFFFF, 8, 16, 0, RGB_BLACK); @@ -1432,11 +1432,11 @@ static void sub_8175B1C(u8 taskIdA) | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON); - gTasks[taskIdA].data[TDA_0] = 0xEB; - gTasks[taskIdA].func = sub_8175B90; + gTasks[taskIdA].data[TDA_0] = 235; //set this to 215 to actually show "THE END" in time to the last song beat + gTasks[taskIdA].func = Task_CreditsTheEnd4; } -static void sub_8175B90(u8 taskIdA) +static void Task_CreditsTheEnd4(u8 taskIdA) { if (gTasks[taskIdA].data[TDA_0]) { @@ -1445,10 +1445,10 @@ static void sub_8175B90(u8 taskIdA) } BeginNormalPaletteFade(0xFFFFFFFF, 6, 0, 16, RGB_BLACK); - gTasks[taskIdA].func = sub_8175BD8; + gTasks[taskIdA].func = Task_CreditsTheEnd5; } -static void sub_8175BD8(u8 taskIdA) +static void Task_CreditsTheEnd5(u8 taskIdA) { if (!gPaletteFade.active) { @@ -1456,11 +1456,11 @@ static void sub_8175BD8(u8 taskIdA) BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0, RGB_BLACK); gTasks[taskIdA].data[TDA_0] = 7200; - gTasks[taskIdA].func = sub_8175C34; + gTasks[taskIdA].func = Task_CreditsTheEnd6; } } -static void sub_8175C34(u8 taskIdA) +static void Task_CreditsTheEnd6(u8 taskIdA) { if (!gPaletteFade.active) { @@ -1468,7 +1468,7 @@ static void sub_8175C34(u8 taskIdA) { FadeOutBGM(4); BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 16, RGB_WHITEALPHA); - gTasks[taskIdA].func = sub_8175CC8; + gTasks[taskIdA].func = Task_CreditsSoftReset; return; } @@ -1482,13 +1482,13 @@ static void sub_8175C34(u8 taskIdA) } } -static void sub_8175CC8(u8 taskIdA) +static void Task_CreditsSoftReset(u8 taskIdA) { if (!gPaletteFade.active) SoftReset(0xFF); } -static void sub_8175CE4(void) +static void ResetGpuAndVram(void) { SetGpuReg(REG_OFFSET_DISPCNT, 0); @@ -1539,12 +1539,15 @@ static void sub_8175DA0(u8 taskIdB) gTasks[taskIdB].data[TDB_0] += 1; return; case 2: - if (gTasks[gTasks[taskIdB].data[TDB_TASK_A_ID]].func == sub_8175774) + if (gTasks[gTasks[taskIdB].data[TDB_TASK_A_ID]].func == Task_ProgressCreditTasks) { if (gTasks[taskIdB].data[TDB_CURRENT_PAGE] < PAGE_COUNT) { for (i = 0; i < 5; i++) - sub_81755BC(gCreditsEntryPointerTable[gTasks[taskIdB].data[TDB_CURRENT_PAGE]][i]->text, 5 + i * 16, gCreditsEntryPointerTable[gTasks[taskIdB].data[TDB_CURRENT_PAGE]][i]->var_1); + PrintCreditsText( + gCreditsEntryPointerTable[gTasks[taskIdB].data[TDB_CURRENT_PAGE]][i]->text, + 5 + i * 16, + gCreditsEntryPointerTable[gTasks[taskIdB].data[TDB_CURRENT_PAGE]][i]->isTitle); CopyWindowToVram(0, 2); @@ -1578,7 +1581,7 @@ static void sub_8175DA0(u8 taskIdB) return; } - if (sub_817603C((u8)gTasks[taskIdB].data[TDB_CURRENT_PAGE], (u8)gTasks[taskIdB].data[TDB_TASK_A_ID])) + if (CheckChangeScene((u8)gTasks[taskIdB].data[TDB_CURRENT_PAGE], (u8)gTasks[taskIdB].data[TDB_TASK_A_ID])) { gTasks[taskIdB].data[TDB_0] += 1; return; @@ -1606,7 +1609,7 @@ static void sub_8175DA0(u8 taskIdB) } } -static u8 sub_817603C(u8 page, u8 taskIdA) +static u8 CheckChangeScene(u8 page, u8 taskIdA) { // Starts with bike + ocean + morning @@ -1685,7 +1688,7 @@ static void sub_81760FC(u8 taskIdD) gTasks[taskIdD].data[TDD_STATE]++; break; case 2: - if (gUnknown_0203BCE8->unk8E == 71 || gTasks[gTasks[taskIdD].data[TDD_TASK_A_ID]].func != sub_8175774) + if (gUnknown_0203BCE8->unk8E == 71 || gTasks[gTasks[taskIdD].data[TDD_TASK_A_ID]].func != Task_ProgressCreditTasks) break; r2 = sub_8177224(gUnknown_0203BCE8->unk0[gUnknown_0203BCE8->unk92], gUnknown_085E6F7C[gUnknown_0203BCE8->unk90][0], gUnknown_085E6F7C[gUnknown_0203BCE8->unk90][1], gUnknown_0203BCE8->unk90); if (gUnknown_0203BCE8->unk92 < gUnknown_0203BCE8->unk94 - 1) @@ -2006,7 +2009,7 @@ static bool8 sub_8176AB0(u8 data, u8 taskIdA) return FALSE; } -static void sub_8176CA0(u8 taskIdA) +static void ResetCreditsTasks(u8 taskIdA) { if (gTasks[taskIdA].data[TDA_0] != 0) { @@ -2035,7 +2038,7 @@ static void sub_8176CA0(u8 taskIdA) gUnknown_0203BD28 = 1; } -static void sub_8176D1C(u16 arg0, u16 arg1, u16 arg2) +static void LoadTheEndScreen(u16 arg0, u16 arg1, u16 arg2) { u16 baseTile; u16 i; @@ -2084,12 +2087,12 @@ static void sub_8176E40(u16 arg0, u16 palette) for (pos = 0; pos < 32 * 32; pos++) ((u16 *) (VRAM + arg0))[pos] = baseTile + 1; - sub_8176DBC(gUnknown_085E5BAC, 3, 7, arg0, palette); - sub_8176DBC(gUnknown_085E5BBB, 7, 7, arg0, palette); - sub_8176DBC(gUnknown_085E5BCA, 11, 7, arg0, palette); - sub_8176DBC(gUnknown_085E5BCA, 16, 7, arg0, palette); - sub_8176DBC(gUnknown_085E5BD9, 20, 7, arg0, palette); - sub_8176DBC(gUnknown_085E5BE8, 24, 7, arg0, palette); + sub_8176DBC(sTheEnd_LetterTMap, 3, 7, arg0, palette); + sub_8176DBC(sTheEnd_LetterHMap, 7, 7, arg0, palette); + sub_8176DBC(sTheEnd_LetterEMap, 11, 7, arg0, palette); + sub_8176DBC(sTheEnd_LetterEMap, 16, 7, arg0, palette); + sub_8176DBC(sTheEnd_LetterNMap, 20, 7, arg0, palette); + sub_8176DBC(sTheEnd_LetterDMap, 24, 7, arg0, palette); } static void sub_8176EE8(struct Sprite *sprite) diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index fdf2020ff..ac37b2ece 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -755,7 +755,7 @@ static void Task_Hof_HandleExit(u8 taskId) static void SetCallback2AfterHallOfFameDisplay(void) { - SetMainCallback2(sub_8175620); + SetMainCallback2(CB2_StartCreditsSequence); } #undef tDontSaveData -- cgit v1.2.3 From 1069adae46a4e8eb6fdc953c60d0381c394a8e55 Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 12:08:08 -0400 Subject: Renaming unknown link room ids to be the same as name This descrepency was causing a lot of annoyance when using porymap, because porymap generated the ids in map_groups.h from the name, and mapjson was generating map_groups.h from the id in the json files. So just name them the same already like every other map in the repo. --- data/maps/UnknownLinkContestRoom_25_29/map.json | 2 +- data/maps/UnknownLinkContestRoom_25_30/map.json | 2 +- data/maps/UnknownLinkContestRoom_25_31/map.json | 2 +- data/maps/UnknownLinkContestRoom_25_32/map.json | 2 +- data/maps/UnknownLinkContestRoom_25_33/map.json | 2 +- data/maps/UnknownLinkContestRoom_25_34/map.json | 2 +- include/constants/map_groups.h | 122 ++++++++++++------------ 7 files changed, 67 insertions(+), 67 deletions(-) diff --git a/data/maps/UnknownLinkContestRoom_25_29/map.json b/data/maps/UnknownLinkContestRoom_25_29/map.json index 956a68158..3e4387b6a 100644 --- a/data/maps/UnknownLinkContestRoom_25_29/map.json +++ b/data/maps/UnknownLinkContestRoom_25_29/map.json @@ -1,5 +1,5 @@ { - "id": "MAP_UNKNOWN_MAP_25_29", + "id": "MAP_UNKNOWN_LINK_CONTEST_ROOM_25_29", "name": "UnknownLinkContestRoom_25_29", "layout": "LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_29", "music": "MUS_NIBI", diff --git a/data/maps/UnknownLinkContestRoom_25_30/map.json b/data/maps/UnknownLinkContestRoom_25_30/map.json index 526c6de2a..42a719c17 100644 --- a/data/maps/UnknownLinkContestRoom_25_30/map.json +++ b/data/maps/UnknownLinkContestRoom_25_30/map.json @@ -1,5 +1,5 @@ { - "id": "MAP_UNKNOWN_MAP_25_30", + "id": "MAP_UNKNOWN_LINK_CONTEST_ROOM_25_30", "name": "UnknownLinkContestRoom_25_30", "layout": "LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_30", "music": "MUS_NIBI", diff --git a/data/maps/UnknownLinkContestRoom_25_31/map.json b/data/maps/UnknownLinkContestRoom_25_31/map.json index 9548c1125..ad18b00af 100644 --- a/data/maps/UnknownLinkContestRoom_25_31/map.json +++ b/data/maps/UnknownLinkContestRoom_25_31/map.json @@ -1,5 +1,5 @@ { - "id": "MAP_UNKNOWN_MAP_25_31", + "id": "MAP_UNKNOWN_LINK_CONTEST_ROOM_25_31", "name": "UnknownLinkContestRoom_25_31", "layout": "LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_31", "music": "MUS_NIBI", diff --git a/data/maps/UnknownLinkContestRoom_25_32/map.json b/data/maps/UnknownLinkContestRoom_25_32/map.json index 27411d28e..0e1528e59 100644 --- a/data/maps/UnknownLinkContestRoom_25_32/map.json +++ b/data/maps/UnknownLinkContestRoom_25_32/map.json @@ -1,5 +1,5 @@ { - "id": "MAP_UNKNOWN_MAP_25_32", + "id": "MAP_UNKNOWN_LINK_CONTEST_ROOM_25_32", "name": "UnknownLinkContestRoom_25_32", "layout": "LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_32", "music": "MUS_NIBI", diff --git a/data/maps/UnknownLinkContestRoom_25_33/map.json b/data/maps/UnknownLinkContestRoom_25_33/map.json index 1a15ae6d6..8765e9771 100644 --- a/data/maps/UnknownLinkContestRoom_25_33/map.json +++ b/data/maps/UnknownLinkContestRoom_25_33/map.json @@ -1,5 +1,5 @@ { - "id": "MAP_UNKNOWN_MAP_25_33", + "id": "MAP_UNKNOWN_LINK_CONTEST_ROOM_25_33", "name": "UnknownLinkContestRoom_25_33", "layout": "LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_33", "music": "MUS_NIBI", diff --git a/data/maps/UnknownLinkContestRoom_25_34/map.json b/data/maps/UnknownLinkContestRoom_25_34/map.json index 4c90858b9..c7220897b 100644 --- a/data/maps/UnknownLinkContestRoom_25_34/map.json +++ b/data/maps/UnknownLinkContestRoom_25_34/map.json @@ -1,5 +1,5 @@ { - "id": "MAP_UNKNOWN_MAP_25_34", + "id": "MAP_UNKNOWN_LINK_CONTEST_ROOM_25_34", "name": "UnknownLinkContestRoom_25_34", "layout": "LAYOUT_UNKNOWN_LINK_CONTEST_ROOM_25_34", "music": "MUS_NIBI", diff --git a/include/constants/map_groups.h b/include/constants/map_groups.h index dc2ac2f32..6a3276b44 100755 --- a/include/constants/map_groups.h +++ b/include/constants/map_groups.h @@ -398,67 +398,67 @@ #define MAP_METEOR_FALLS_STEVENS_CAVE (107 | (24 << 8)) // Map Group 25 -#define MAP_SECRET_BASE_RED_CAVE1 (0 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE1 (1 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE1 (2 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE1 (3 | (25 << 8)) -#define MAP_SECRET_BASE_TREE1 (4 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB1 (5 | (25 << 8)) -#define MAP_SECRET_BASE_RED_CAVE2 (6 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE2 (7 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE2 (8 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE2 (9 | (25 << 8)) -#define MAP_SECRET_BASE_TREE2 (10 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB2 (11 | (25 << 8)) -#define MAP_SECRET_BASE_RED_CAVE3 (12 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE3 (13 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE3 (14 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE3 (15 | (25 << 8)) -#define MAP_SECRET_BASE_TREE3 (16 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB3 (17 | (25 << 8)) -#define MAP_SECRET_BASE_RED_CAVE4 (18 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE4 (19 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE4 (20 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE4 (21 | (25 << 8)) -#define MAP_SECRET_BASE_TREE4 (22 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB4 (23 | (25 << 8)) -#define MAP_SINGLE_BATTLE_COLOSSEUM (24 | (25 << 8)) -#define MAP_TRADE_CENTER (25 | (25 << 8)) -#define MAP_RECORD_CORNER (26 | (25 << 8)) -#define MAP_DOUBLE_BATTLE_COLOSSEUM (27 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM1 (28 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_29 (29 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_30 (30 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_31 (31 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_32 (32 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_33 (33 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_34 (34 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM2 (35 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM3 (36 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM4 (37 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM5 (38 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM6 (39 | (25 << 8)) -#define MAP_INSIDE_OF_TRUCK (40 | (25 << 8)) -#define MAP_SS_TIDAL_CORRIDOR (41 | (25 << 8)) -#define MAP_SS_TIDAL_LOWER_DECK (42 | (25 << 8)) -#define MAP_SS_TIDAL_ROOMS (43 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE01 (44 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE02 (45 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE03 (46 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE04 (47 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE05 (48 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE06 (49 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE07 (50 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE08 (51 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE09 (52 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE10 (53 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE11 (54 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE12 (55 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE13 (56 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE14 (57 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE15 (58 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE16 (59 | (25 << 8)) -#define MAP_UNION_ROOM (60 | (25 << 8)) +#define MAP_SECRET_BASE_RED_CAVE1 (0 | (25 << 8)) +#define MAP_SECRET_BASE_BROWN_CAVE1 (1 | (25 << 8)) +#define MAP_SECRET_BASE_BLUE_CAVE1 (2 | (25 << 8)) +#define MAP_SECRET_BASE_YELLOW_CAVE1 (3 | (25 << 8)) +#define MAP_SECRET_BASE_TREE1 (4 | (25 << 8)) +#define MAP_SECRET_BASE_SHRUB1 (5 | (25 << 8)) +#define MAP_SECRET_BASE_RED_CAVE2 (6 | (25 << 8)) +#define MAP_SECRET_BASE_BROWN_CAVE2 (7 | (25 << 8)) +#define MAP_SECRET_BASE_BLUE_CAVE2 (8 | (25 << 8)) +#define MAP_SECRET_BASE_YELLOW_CAVE2 (9 | (25 << 8)) +#define MAP_SECRET_BASE_TREE2 (10 | (25 << 8)) +#define MAP_SECRET_BASE_SHRUB2 (11 | (25 << 8)) +#define MAP_SECRET_BASE_RED_CAVE3 (12 | (25 << 8)) +#define MAP_SECRET_BASE_BROWN_CAVE3 (13 | (25 << 8)) +#define MAP_SECRET_BASE_BLUE_CAVE3 (14 | (25 << 8)) +#define MAP_SECRET_BASE_YELLOW_CAVE3 (15 | (25 << 8)) +#define MAP_SECRET_BASE_TREE3 (16 | (25 << 8)) +#define MAP_SECRET_BASE_SHRUB3 (17 | (25 << 8)) +#define MAP_SECRET_BASE_RED_CAVE4 (18 | (25 << 8)) +#define MAP_SECRET_BASE_BROWN_CAVE4 (19 | (25 << 8)) +#define MAP_SECRET_BASE_BLUE_CAVE4 (20 | (25 << 8)) +#define MAP_SECRET_BASE_YELLOW_CAVE4 (21 | (25 << 8)) +#define MAP_SECRET_BASE_TREE4 (22 | (25 << 8)) +#define MAP_SECRET_BASE_SHRUB4 (23 | (25 << 8)) +#define MAP_SINGLE_BATTLE_COLOSSEUM (24 | (25 << 8)) +#define MAP_TRADE_CENTER (25 | (25 << 8)) +#define MAP_RECORD_CORNER (26 | (25 << 8)) +#define MAP_DOUBLE_BATTLE_COLOSSEUM (27 | (25 << 8)) +#define MAP_LINK_CONTEST_ROOM1 (28 | (25 << 8)) +#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_29 (29 | (25 << 8)) +#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_30 (30 | (25 << 8)) +#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_31 (31 | (25 << 8)) +#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_32 (32 | (25 << 8)) +#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_33 (33 | (25 << 8)) +#define MAP_UNKNOWN_LINK_CONTEST_ROOM_25_34 (34 | (25 << 8)) +#define MAP_LINK_CONTEST_ROOM2 (35 | (25 << 8)) +#define MAP_LINK_CONTEST_ROOM3 (36 | (25 << 8)) +#define MAP_LINK_CONTEST_ROOM4 (37 | (25 << 8)) +#define MAP_LINK_CONTEST_ROOM5 (38 | (25 << 8)) +#define MAP_LINK_CONTEST_ROOM6 (39 | (25 << 8)) +#define MAP_INSIDE_OF_TRUCK (40 | (25 << 8)) +#define MAP_SS_TIDAL_CORRIDOR (41 | (25 << 8)) +#define MAP_SS_TIDAL_LOWER_DECK (42 | (25 << 8)) +#define MAP_SS_TIDAL_ROOMS (43 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE01 (44 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE02 (45 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE03 (46 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE04 (47 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE05 (48 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE06 (49 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE07 (50 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE08 (51 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE09 (52 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE10 (53 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE11 (54 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE12 (55 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE13 (56 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE14 (57 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE15 (58 | (25 << 8)) +#define MAP_BATTLE_PYRAMID_SQUARE16 (59 | (25 << 8)) +#define MAP_UNION_ROOM (60 | (25 << 8)) // Map Group 26 #define MAP_SAFARI_ZONE_NORTHWEST (0 | (26 << 8)) -- cgit v1.2.3 From a708caac6d55aee1f0a6537707db3514d54b499e Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 13:32:26 -0400 Subject: Suggested changes from review --- src/credits.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/credits.c b/src/credits.c index 99c89dc8f..44fa2002c 100644 --- a/src/credits.c +++ b/src/credits.c @@ -143,7 +143,7 @@ struct Unk201C000 struct CreditsEntry { u8 var_0; - u8 isTitle; + bool8 isTitle; const u8 *text; }; @@ -1177,14 +1177,14 @@ static void sub_81755A4(void) Free(ptr); } -static void PrintCreditsText(const u8 *string, u8 y, u8 isTitle) +static void PrintCreditsText(const u8 *string, u8 y, bool8 isTitle) { u8 x; u8 color[3]; color[0] = 0; - if (isTitle == 1) + if (isTitle == TRUE) { color[1] = 3; color[2] = 4; -- cgit v1.2.3 From d63a8ba817e4d3373e06d4ae5cbe5987e9a68cc6 Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 13:38:13 -0400 Subject: Replaced createvobject numbers with EVENT_OBJ_GTX defines Doing this allows someone to renumber the event object graphics and still have working contests. --- data/maps/LinkContestRoom1/scripts.inc | 64 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/data/maps/LinkContestRoom1/scripts.inc b/data/maps/LinkContestRoom1/scripts.inc index e0cd24eff..e58c08c50 100644 --- a/data/maps/LinkContestRoom1/scripts.inc +++ b/data/maps/LinkContestRoom1/scripts.inc @@ -172,131 +172,131 @@ LinkContestRoom1_EventScript_23B8F8:: @ 823B8F8 end LinkContestRoom1_EventScript_23BA6B:: @ 823BA6B - setvar VAR_TEMP_1, 5 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_NINJA_BOY return LinkContestRoom1_EventScript_23BA71:: @ 823BA71 - setvar VAR_TEMP_1, 6 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_TWIN return LinkContestRoom1_EventScript_23BA77:: @ 823BA77 - setvar VAR_TEMP_1, 7 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_BOY_1 return LinkContestRoom1_EventScript_23BA7D:: @ 823BA7D - setvar VAR_TEMP_1, 8 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_GIRL_1 return LinkContestRoom1_EventScript_23BA83:: @ 823BA83 - setvar VAR_TEMP_1, 10 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_GIRL_2 return LinkContestRoom1_EventScript_23BA89:: @ 823BA89 - setvar VAR_TEMP_1, 11 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_LITTLE_BOY return LinkContestRoom1_EventScript_23BA8F:: @ 823BA8F - setvar VAR_TEMP_1, 12 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_LITTLE_GIRL return LinkContestRoom1_EventScript_23BA95:: @ 823BA95 - setvar VAR_TEMP_1, 13 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_BOY_3 return LinkContestRoom1_EventScript_23BA9B:: @ 823BA9B - setvar VAR_TEMP_1, 14 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_GIRL_3 return LinkContestRoom1_EventScript_23BAA1:: @ 823BAA1 - setvar VAR_TEMP_1, 15 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_RICH_BOY return LinkContestRoom1_EventScript_23BAA7:: @ 823BAA7 - setvar VAR_TEMP_1, 17 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_FAT_MAN return LinkContestRoom1_EventScript_23BAAD:: @ 823BAAD - setvar VAR_TEMP_1, 18 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_POKEFAN_F return LinkContestRoom1_EventScript_23BAB3:: @ 823BAB3 - setvar VAR_TEMP_1, 19 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_MAN_1 return LinkContestRoom1_EventScript_23BAB9:: @ 823BAB9 - setvar VAR_TEMP_1, 20 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_WOMAN_2 return LinkContestRoom1_EventScript_23BABF:: @ 823BABF - setvar VAR_TEMP_1, 21 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_EXPERT_M return LinkContestRoom1_EventScript_23BAC5:: @ 823BAC5 - setvar VAR_TEMP_1, 22 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_EXPERT_F return LinkContestRoom1_EventScript_23BACB:: @ 823BACB - setvar VAR_TEMP_1, 25 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_POKEFAN_M return LinkContestRoom1_EventScript_23BAD1:: @ 823BAD1 - setvar VAR_TEMP_1, 26 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_WOMAN_4 return LinkContestRoom1_EventScript_23BAD7:: @ 823BAD7 - setvar VAR_TEMP_1, 27 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_COOK return LinkContestRoom1_EventScript_23BADD:: @ 823BADD - setvar VAR_TEMP_1, 47 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_LASS return LinkContestRoom1_EventScript_23BAE3:: @ 823BAE3 - setvar VAR_TEMP_1, 30 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_OLD_WOMAN return LinkContestRoom1_EventScript_23BAE9:: @ 823BAE9 - setvar VAR_TEMP_1, 31 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_CAMPER return LinkContestRoom1_EventScript_23BAEF:: @ 823BAEF - setvar VAR_TEMP_1, 32 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_PICNICKER return LinkContestRoom1_EventScript_23BAF5:: @ 823BAF5 - setvar VAR_TEMP_1, 33 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_MAN_3 return LinkContestRoom1_EventScript_23BAFB:: @ 823BAFB - setvar VAR_TEMP_1, 34 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_WOMAN_5 return LinkContestRoom1_EventScript_23BB01:: @ 823BB01 - setvar VAR_TEMP_1, 35 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_YOUNGSTER return LinkContestRoom1_EventScript_23BB07:: @ 823BB07 - setvar VAR_TEMP_1, 36 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_BUG_CATCHER return LinkContestRoom1_EventScript_23BB0D:: @ 823BB0D - setvar VAR_TEMP_1, 37 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_PSYCHIC_M return LinkContestRoom1_EventScript_23BB13:: @ 823BB13 - setvar VAR_TEMP_1, 38 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_SCHOOL_KID_M return LinkContestRoom1_EventScript_23BB19:: @ 823BB19 - setvar VAR_TEMP_1, 44 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_BLACK_BELT return LinkContestRoom1_EventScript_23BB1F:: @ 823BB1F - setvar VAR_TEMP_1, 45 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_BEAUTY return LinkContestRoom1_EventScript_23BB25:: @ 823BB25 - setvar VAR_TEMP_1, 46 + setvar VAR_TEMP_1, EVENT_OBJ_GFX_SCIENTIST_1 return LinkContestRoom1_EventScript_23BB2B:: @ 823BB2B -- cgit v1.2.3 From 18dee141704daa10313f27890d0f97a2a083a496 Mon Sep 17 00:00:00 2001 From: Tustin2121 Date: Sat, 17 Aug 2019 23:26:46 -0400 Subject: Review fixes --- asm/macros/event.inc | 2 -- data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc | 4 +++- data/maps/MauvilleCity_GameCorner/scripts.inc | 14 ++++++++++++-- data/maps/MtChimney/scripts.inc | 10 +++++++++- data/maps/Route109_SeashoreHouse/scripts.inc | 10 +++++++++- data/maps/Route121_SafariZoneEntrance/scripts.inc | 6 +++++- data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc | 10 +++++++++- 7 files changed, 47 insertions(+), 9 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 14051999f..bf1b8ce76 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1083,8 +1083,6 @@ @ Hides the secondary box spawned by showmoney. .macro hidemoneybox .byte 0x94 - .byte 0 @ leftovers from ruby/sapphire. x, y params not used - .byte 0 .endm @ Updates the secondary box spawned by showmoney. Consumes but does not use arguments. diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index 4bd4dc01c..b8d0a7c44 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -143,7 +143,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_22032F:: @ 822032F call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_220321 compare VAR_TEMP_1, 2 call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_220328 - updatemoneybox 0,0 + updatemoneybox 0, 0 bufferitemname 0, VAR_TEMP_0 playse SE_JIHANKI msgbox LilycoveCity_DepartmentStoreRooftop_Text_2205A1, MSGBOX_DEFAULT @@ -196,6 +196,8 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_220450:: @ 8220450 LilycoveCity_DepartmentStoreRooftop_EventScript_22045E:: @ 822045E hidemoneybox + nop + nop releaseall end diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index 257479372..0df7afe54 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -39,11 +39,13 @@ MauvilleCity_GameCorner_EventScript_20FC33:: @ 820FC33 goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1 givecoins 50 takemoney 0x3e8, 0 - updatemoneybox 0,0 + updatemoneybox 0, 0 updatecoinsbox 1, 6 playse SE_REGI msgbox MauvilleCity_GameCorner_Text_210529, MSGBOX_DEFAULT hidemoneybox + nop + nop hidecoinsbox 0, 5 release end @@ -57,11 +59,13 @@ MauvilleCity_GameCorner_EventScript_20FC75:: @ 820FC75 goto_if_eq MauvilleCity_GameCorner_EventScript_20FCC1 givecoins 500 takemoney 0x2710, 0 - updatemoneybox 0,0 + updatemoneybox 0, 0 updatecoinsbox 1, 6 playse SE_REGI msgbox MauvilleCity_GameCorner_Text_210529, MSGBOX_DEFAULT hidemoneybox + nop + nop hidecoinsbox 0, 5 release end @@ -74,6 +78,8 @@ MauvilleCity_GameCorner_EventScript_20FCB7:: @ 820FCB7 MauvilleCity_GameCorner_EventScript_20FCC1:: @ 820FCC1 msgbox MauvilleCity_GameCorner_Text_210553, MSGBOX_DEFAULT hidemoneybox + nop + nop hidecoinsbox 0, 5 release end @@ -81,6 +87,8 @@ MauvilleCity_GameCorner_EventScript_20FCC1:: @ 820FCC1 MauvilleCity_GameCorner_EventScript_20FCD1:: @ 820FCD1 msgbox MauvilleCity_GameCorner_Text_21059A, MSGBOX_DEFAULT hidemoneybox + nop + nop hidecoinsbox 0, 5 release end @@ -88,6 +96,8 @@ MauvilleCity_GameCorner_EventScript_20FCD1:: @ 820FCD1 MauvilleCity_GameCorner_EventScript_20FCE1:: @ 820FCE1 msgbox MauvilleCity_GameCorner_Text_21057E, MSGBOX_DEFAULT hidemoneybox + nop + nop hidecoinsbox 0, 5 release end diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index e89a8b437..717973eba 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -115,29 +115,37 @@ MtChimney_EventScript_22EEF3:: @ 822EEF3 compare VAR_RESULT, 0 goto_if_eq MtChimney_EventScript_22EF51 hidemoneybox + nop + nop release end MtChimney_EventScript_22EF51:: @ 822EF51 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT hidemoneybox + nop + nop release end MtChimney_EventScript_22EF5E:: @ 822EF5E takemoney 0xc8, 0 - updatemoneybox 0,0 + updatemoneybox 0, 0 return MtChimney_EventScript_22EF69:: @ 822EF69 msgbox MtChimney_Text_22FE9B, MSGBOX_DEFAULT hidemoneybox + nop + nop release end MtChimney_EventScript_22EF76:: @ 822EF76 msgbox MtChimney_Text_22FE5E, MSGBOX_DEFAULT hidemoneybox + nop + nop release end diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc index 594b17f84..79d021334 100644 --- a/data/maps/Route109_SeashoreHouse/scripts.inc +++ b/data/maps/Route109_SeashoreHouse/scripts.inc @@ -43,6 +43,8 @@ Route109_SeashoreHouse_EventScript_269460:: @ 8269460 goto_if_eq Route109_SeashoreHouse_EventScript_269484 msgbox Route109_SeashoreHouse_Text_2697EF, MSGBOX_DEFAULT hidemoneybox + nop + nop release end @@ -55,21 +57,27 @@ Route109_SeashoreHouse_EventScript_269484:: @ 8269484 goto_if_eq Route109_SeashoreHouse_EventScript_2694D5 msgbox Route109_SeashoreHouse_Text_2697C8, MSGBOX_DEFAULT takemoney 0x12c, 0 - updatemoneybox 0,0 + updatemoneybox 0, 0 giveitem_std ITEM_SODA_POP hidemoneybox + nop + nop release end Route109_SeashoreHouse_EventScript_2694C8:: @ 82694C8 msgbox Route109_SeashoreHouse_Text_2697D5, MSGBOX_DEFAULT hidemoneybox + nop + nop release end Route109_SeashoreHouse_EventScript_2694D5:: @ 82694D5 msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT hidemoneybox + nop + nop release end diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 001f80b15..85b6c6c36 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -67,7 +67,7 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48 playse SE_REGI msgbox Route121_SafariZoneEntrance_Text_2A501B, MSGBOX_DEFAULT takemoney 0x1f4, 0 - updatemoneybox 0,0 + updatemoneybox 0, 0 msgbox Route121_SafariZoneEntrance_Text_2A5036, MSGBOX_DEFAULT playfanfare MUS_FANFA4 message Route121_SafariZoneEntrance_Text_2A5052 @@ -75,6 +75,8 @@ Route121_SafariZoneEntrance_EventScript_22BC48:: @ 822BC48 msgbox Route121_SafariZoneEntrance_Text_2A506F, MSGBOX_DEFAULT closemessage hidemoneybox + nop + nop applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD18 waitmovement 0 special EnterSafariMode @@ -111,6 +113,8 @@ Route121_SafariZoneEntrance_EventScript_22BCF8:: @ 822BCF8 Route121_SafariZoneEntrance_EventScript_22BD06:: @ 822BD06 closemessage hidemoneybox + nop + nop applymovement EVENT_OBJ_ID_PLAYER, Route121_SafariZoneEntrance_Movement_22BD16 waitmovement 0 releaseall diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index 6dc4f2242..90d42ccae 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -26,6 +26,8 @@ SlateportCity_OceanicMuseum_1F_EventScript_20ADC1:: @ 820ADC1 goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20ADE8 closemessage hidemoneybox + nop + nop applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AE4B waitmovement 0 releaseall @@ -37,10 +39,12 @@ SlateportCity_OceanicMuseum_1F_EventScript_20ADE8:: @ 820ADE8 goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_20AE18 playse SE_REGI takemoney 0x32, 0 - updatemoneybox 0,0 + updatemoneybox 0, 0 msgbox SlateportCity_OceanicMuseum_1F_Text_20B026, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox + nop + nop releaseall end @@ -49,6 +53,8 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AE18:: @ 820AE18 msgbox SlateportCity_OceanicMuseum_1F_Text_20B03D, MSGBOX_DEFAULT closemessage hidemoneybox + nop + nop applymovement EVENT_OBJ_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_20AE4B waitmovement 0 releaseall @@ -58,6 +64,8 @@ SlateportCity_OceanicMuseum_1F_EventScript_20AE39:: @ 820AE39 msgbox SlateportCity_OceanicMuseum_1F_Text_20B075, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox + nop + nop releaseall end -- cgit v1.2.3