diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-10-25 17:01:05 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-10-25 17:01:05 -0400 |
commit | 4b052a204084119ad9302ccdf43b76733447a2df (patch) | |
tree | 5d92ab40515c6080edb10b9b73e43ee5d76b29c1 | |
parent | 52ce0f21c6c05e330c28cb4aa2f0755220723fed (diff) |
Resolve review comments
-rw-r--r-- | data/event_scripts.s | 16 | ||||
-rw-r--r-- | data/maps/BirthIsland_Harbor/scripts.inc | 2 | ||||
-rw-r--r-- | data/maps/NavelRock_Harbor/scripts.inc | 2 | ||||
-rw-r--r-- | data/maps/VermilionCity/scripts.inc | 2 | ||||
-rw-r--r-- | data/specials.inc | 6 | ||||
-rw-r--r-- | include/constants/menu.h | 10 | ||||
-rw-r--r-- | include/seagallop.h | 2 | ||||
-rw-r--r-- | src/quest_log.c | 4 | ||||
-rw-r--r-- | src/script_menu.c | 32 | ||||
-rw-r--r-- | src/seagallop.c | 38 |
10 files changed, 57 insertions, 57 deletions
diff --git a/data/event_scripts.s b/data/event_scripts.s index bfa50b73f..51ae70416 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -4169,7 +4169,7 @@ EventScript_1A8EC5:: @ 81A8EC5 end EventScript_1A8F12:: @ 81A8F12 - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V23, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V23, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FF9 @@ -4192,7 +4192,7 @@ EventScript_1A8F54:: @ 81A8F54 end EventScript_1A8FA1:: @ 81A8FA1 - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V13, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V13, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FEE @@ -4235,7 +4235,7 @@ EventScript_1A900F:: @ 81A900F end EventScript_1A905C:: @ 81A905C - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_V12, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V12, FALSE switch VAR_RESULT case 0, EventScript_1A8FE3 case 1, EventScript_1A8FEE @@ -4271,7 +4271,7 @@ EventScript_1A90DA:: @ 81A90DA goto_if eq, EventScript_1A7AE0 special sub_8112364 fadescreen 1 - special ScrSpecial_SeaGallopFerry + special ScrSpecial_SeagallopFerry waitstate end @@ -4296,9 +4296,9 @@ Movement_1A911C:: @ 81A911C EventScript_1A911E:: @ 81A911E setvar VAR_0x8005, 0 - special Special_DrawSeaGallopDestinationMenu + special Special_DrawSeagallopDestinationMenu waitstate - specialvar VAR_0x8006, Special_GetSelectedSeaGallopDestination + specialvar VAR_0x8006, Special_GetSelectedSeagallopDestination switch VAR_0x8006 case SEAGALLOP_VERMILION_CITY, EventScript_1A91D5 case SEAGALLOP_ONE_ISLAND, EventScript_1A91E0 @@ -4311,9 +4311,9 @@ EventScript_1A911E:: @ 81A911E EventScript_1A917F:: @ 81A917F setvar VAR_0x8005, 1 - special Special_DrawSeaGallopDestinationMenu + special Special_DrawSeagallopDestinationMenu waitstate - specialvar VAR_0x8006, Special_GetSelectedSeaGallopDestination + specialvar VAR_0x8006, Special_GetSelectedSeagallopDestination switch VAR_0x8006 case SEAGALLOP_FOUR_ISLAND, EventScript_1A9201 case SEAGALLOP_FIVE_ISLAND, EventScript_1A920C diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index 774837274..6df635f1a 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -7,7 +7,7 @@ BirthIsland_Harbor_EventScript_1653E7:: @ 81653E7 message Text_181726 waitmessage setvar VAR_0x8004, SEAGALLOP_BIRTH_ISLAND - multichoice 20, 8, MULTICHOICE_SEA_GALLOP_VERMILION, FALSE + multichoice 20, 8, MULTICHOICE_SEAGALLOP_VERMILION, FALSE switch VAR_RESULT case 0, EventScript_1A91D5 case 1, EventScript_1A90F6 diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index a82b30573..60832d168 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -8,7 +8,7 @@ NavelRock_Harbor_EventScript_165421:: @ 8165421 message Text_181726 waitmessage setvar VAR_0x8004, SEAGALLOP_NAVEL_ROCK - multichoice 20, 8, MULTICHOICE_SEA_GALLOP_VERMILION, FALSE + multichoice 20, 8, MULTICHOICE_SEAGALLOP_VERMILION, FALSE switch VAR_RESULT case 0, EventScript_1A91D5 case 1, EventScript_1A90F6 diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc index bf1c38578..fcacff2e3 100644 --- a/data/maps/VermilionCity/scripts.inc +++ b/data/maps/VermilionCity/scripts.inc @@ -175,7 +175,7 @@ EventScript_166B3B:: @ 8166B3B message Text_17FB23 waitmessage setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY - multichoice 19, 5, MULTICHOICE_SEA_GALLOP_123, FALSE + multichoice 19, 5, MULTICHOICE_SEAGALLOP_123, FALSE switch VAR_RESULT case 0, EventScript_1A8FEE case 1, EventScript_1A8FF9 diff --git a/data/specials.inc b/data/specials.inc index 1e38298a2..169ea0182 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -387,7 +387,7 @@ gSpecials:: @ 815FD60 def_special IsThereMonInRoute5Daycare def_special GetNumLevelsGainedForRoute5DaycareMon def_special TakePokemonFromRoute5Daycare - def_special ScrSpecial_SeaGallopFerry + def_special ScrSpecial_SeagallopFerry def_special Special_PlayerPartyContainsSpecies def_special Special_SetSomeVariable def_special HelpSystem_BackupSomeVariable @@ -431,8 +431,8 @@ gSpecials:: @ 815FD60 def_special Special_HasLearnedAllMovesFromCapeBrinkTutor def_special Special_Credits def_special sub_8153810 - def_special Special_DrawSeaGallopDestinationMenu - def_special Special_GetSelectedSeaGallopDestination + def_special Special_DrawSeagallopDestinationMenu + def_special Special_GetSelectedSeagallopDestination def_special sub_8147500 def_special GetPlayerFacingDirection def_special Special_DeoxysSound diff --git a/include/constants/menu.h b/include/constants/menu.h index b873bc296..44df246d9 100644 --- a/include/constants/menu.h +++ b/include/constants/menu.h @@ -61,11 +61,11 @@ #define MULTICHOICE_SEVII_NAVEL 54 #define MULTICHOICE_SEVII_BIRTH 55 #define MULTICHOICE_SEVII_NAVEL_BIRTH 56 -#define MULTICHOICE_SEA_GALLOP_123 57 -#define MULTICHOICE_SEA_GALLOP_V23 58 -#define MULTICHOICE_SEA_GALLOP_V13 59 -#define MULTICHOICE_SEA_GALLOP_V12 60 -#define MULTICHOICE_SEA_GALLOP_VERMILION 61 +#define MULTICHOICE_SEAGALLOP_123 57 +#define MULTICHOICE_SEAGALLOP_V23 58 +#define MULTICHOICE_SEAGALLOP_V13 59 +#define MULTICHOICE_SEAGALLOP_V12 60 +#define MULTICHOICE_SEAGALLOP_VERMILION 61 #define MULTICHOICE_62 62 #define MULTICHOICE_JOIN_OR_LEAD 63 #define MULTICHOICE_TRAINER_TOWER_MODE 64 diff --git a/include/seagallop.h b/include/seagallop.h index a8eaa6c88..50b128185 100644 --- a/include/seagallop.h +++ b/include/seagallop.h @@ -3,6 +3,6 @@ #include "constants/seagallop.h" -void ScrSpecial_SeaGallopFerry(void); +void ScrSpecial_SeagallopFerry(void); #endif //GUARD_SEAGALLOP_H diff --git a/src/quest_log.c b/src/quest_log.c index a51def1b9..14485ca46 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -438,7 +438,7 @@ void sub_811089C(void) memset(gSaveBlock1Ptr->questLog, 0, sizeof(gSaveBlock1Ptr->questLog)); gUnknown_203ADF8 = 0; gUnknown_203ADFA = 0; - sQuestLogCB = 0; + sQuestLogCB = NULL; gUnknown_203AE08 = NULL; gUnknown_203AE04 = NULL; sub_8113BD8(); @@ -458,7 +458,7 @@ void sub_8110920(void) void RunQuestLogCB(void) { - if (sQuestLogCB) + if (sQuestLogCB != NULL) sQuestLogCB(); } diff --git a/src/script_menu.c b/src/script_menu.c index 08baed433..ed2f0aa0a 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -21,11 +21,11 @@ struct MultichoiceListStruct { - const struct MenuAction *list; + const struct MenuAction * list; u8 count; }; -EWRAM_DATA u8 sDelay = 0; +static EWRAM_DATA u8 sDelay = 0; static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpress, u8 initPos); static u8 sub_809CBB4(u8 count); @@ -432,35 +432,35 @@ static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavelBirth[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallop123[] = { +static const struct MenuAction sScriptMultiChoiceMenu_Seagallop123[] = { { gText_OneIsland }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV23[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV23[] = { { gText_Vermilion }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV13[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV13[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopV12[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV12[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeaGallopVermilion[] = { +static const struct MenuAction sScriptMultiChoiceMenu_SeagallopVermilion[] = { { gText_Vermilion }, { gOtherText_Exit } }; @@ -547,11 +547,11 @@ const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = { { sScriptMultiChoiceMenu_SeviiNavel, NELEMS(sScriptMultiChoiceMenu_SeviiNavel) }, { sScriptMultiChoiceMenu_SeviiBirth, NELEMS(sScriptMultiChoiceMenu_SeviiBirth) }, { sScriptMultiChoiceMenu_SeviiNavelBirth, NELEMS(sScriptMultiChoiceMenu_SeviiNavelBirth) }, - { sScriptMultiChoiceMenu_SeaGallop123, NELEMS(sScriptMultiChoiceMenu_SeaGallop123) }, - { sScriptMultiChoiceMenu_SeaGallopV23, NELEMS(sScriptMultiChoiceMenu_SeaGallopV23) }, - { sScriptMultiChoiceMenu_SeaGallopV13, NELEMS(sScriptMultiChoiceMenu_SeaGallopV13) }, - { sScriptMultiChoiceMenu_SeaGallopV12, NELEMS(sScriptMultiChoiceMenu_SeaGallopV12) }, - { sScriptMultiChoiceMenu_SeaGallopVermilion, NELEMS(sScriptMultiChoiceMenu_SeaGallopVermilion) }, + { sScriptMultiChoiceMenu_Seagallop123, NELEMS(sScriptMultiChoiceMenu_Seagallop123) }, + { sScriptMultiChoiceMenu_SeagallopV23, NELEMS(sScriptMultiChoiceMenu_SeagallopV23) }, + { sScriptMultiChoiceMenu_SeagallopV13, NELEMS(sScriptMultiChoiceMenu_SeagallopV13) }, + { sScriptMultiChoiceMenu_SeagallopV12, NELEMS(sScriptMultiChoiceMenu_SeagallopV12) }, + { sScriptMultiChoiceMenu_SeagallopVermilion, NELEMS(sScriptMultiChoiceMenu_SeagallopVermilion) }, { sScriptMultiChoiceMenu_62, NELEMS(sScriptMultiChoiceMenu_62) }, { sScriptMultiChoiceMenu_JoinOrLead, NELEMS(sScriptMultiChoiceMenu_JoinOrLead) }, { sScriptMultiChoiceMenu_TrainerTowerMode, NELEMS(sScriptMultiChoiceMenu_TrainerTowerMode) } @@ -647,7 +647,7 @@ static const struct SpriteSheet sMuseumAerodactylSprSheets[] = { }; -static const u8 *const sSeaGallopDestStrings[] = { +static const u8 *const sSeagallopDestStrings[] = { gText_Vermilion, gText_OneIsland, gText_TwoIsland, @@ -1188,7 +1188,7 @@ void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void) } } -void Special_DrawSeaGallopDestinationMenu(void) +void Special_DrawSeagallopDestinationMenu(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) @@ -1224,7 +1224,7 @@ void Special_DrawSeaGallopDestinationMenu(void) for (i = 0; i < nitems - 2; i++) { if (r4 != gSpecialVar_0x8004) - AddTextPrinterParameterized(windowId, 2, sSeaGallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 2, sSeagallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); else i--; r4++; @@ -1240,7 +1240,7 @@ void Special_DrawSeaGallopDestinationMenu(void) } } -u16 Special_GetSelectedSeaGallopDestination(void) +u16 Special_GetSelectedSeagallopDestination(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) diff --git a/src/seagallop.c b/src/seagallop.c index 006a356e4..cf07f9880 100644 --- a/src/seagallop.c +++ b/src/seagallop.c @@ -25,13 +25,13 @@ static EWRAM_DATA void * sBg3TilemapBuffer = NULL; -static void CB2_SetUpSeaGallopScene(void); +static void CB2_SetUpSeagallopScene(void); static void VBlankCB_SeaGallop(void); static void MainCB2_SeaGallop(void); -static void Task_SeaGallop_0(u8 taskId); -static void Task_SeaGallop_1(u8 taskId); -static void Task_SeaGallop_2(u8 taskId); -static void Task_SeaGallop_3(void); +static void Task_Seagallop_0(u8 taskId); +static void Task_Seagallop_1(u8 taskId); +static void Task_Seagallop_2(u8 taskId); +static void Task_Seagallop_3(void); static void ResetGPU(void); static void ResetAllAssets(void); static void SetDispcnt(void); @@ -64,7 +64,7 @@ static const struct BgTemplate sBGTemplates[] = { } }; -static const s8 sSeaGallopSpawnTable[][4] = { +static const s8 sSeag[][4] = { // Map X Y [SEAGALLOP_VERMILION_CITY] = {MAP(VERMILION_CITY), 0x17, 0x20}, [SEAGALLOP_ONE_ISLAND] = {MAP(ONE_ISLAND_HARBOR), 0x08, 0x05}, @@ -176,14 +176,14 @@ static const struct SpriteTemplate sWakeSpriteTemplate = { SpriteCB_Wake }; -void ScrSpecial_SeaGallopFerry(void) +void ScrSpecial_SeagallopFerry(void) { SetVBlankCallback(NULL); HelpSystem_Disable(); - SetMainCallback2(CB2_SetUpSeaGallopScene); + SetMainCallback2(CB2_SetUpSeagallopScene); } -static void CB2_SetUpSeaGallopScene(void) +static void CB2_SetUpSeagallopScene(void) { void ** ptr; switch (gMain.state) @@ -248,7 +248,7 @@ static void CB2_SetUpSeaGallopScene(void) SetGpuReg(REG_OFFSET_WINOUT, 0x00); SetGpuReg(REG_OFFSET_WIN0H, 0x00F0); SetGpuReg(REG_OFFSET_WIN0V, 0x1888); - CreateTask(Task_SeaGallop_0, 8); + CreateTask(Task_Seagallop_0, 8); SetMainCallback2(MainCB2_SeaGallop); gMain.state = 0; break; @@ -270,9 +270,9 @@ static void MainCB2_SeaGallop(void) UpdatePaletteFade(); } -static void Task_SeaGallop_0(u8 taskId) +static void Task_Seagallop_0(u8 taskId) { - gTasks[taskId].func = Task_SeaGallop_1; + gTasks[taskId].func = Task_Seagallop_1; } static void ScrollBG(void) @@ -287,7 +287,7 @@ static void ScrollBG(void) } } -static void Task_SeaGallop_1(u8 taskId) +static void Task_Seagallop_1(u8 taskId) { struct Task * task = &gTasks[taskId]; @@ -296,29 +296,29 @@ static void Task_SeaGallop_1(u8 taskId) { Overworld_FadeOutMapMusic(); sub_807DC18(); - task->func = Task_SeaGallop_2; + task->func = Task_Seagallop_2; } } -static void Task_SeaGallop_2(u8 taskId) +static void Task_Seagallop_2(u8 taskId) { ScrollBG(); if (sub_8055FC4() && !gPaletteFade.active) { - Task_SeaGallop_3(); + Task_Seagallop_3(); HelpSystem_Enable(); DestroyTask(taskId); } } -static void Task_SeaGallop_3(void) +static void Task_Seagallop_3(void) { const s8 * warpInfo; - if (gSpecialVar_0x8006 >= NELEMS(sSeaGallopSpawnTable)) + if (gSpecialVar_0x8006 >= NELEMS(sSeag)) gSpecialVar_0x8006 = 0; - warpInfo = sSeaGallopSpawnTable[gSpecialVar_0x8006]; + warpInfo = sSeag[gSpecialVar_0x8006]; SetWarpDestination(warpInfo[0], warpInfo[1], -1, warpInfo[2], warpInfo[3]); PlayRainStoppingSoundEffect(); PlaySE(SE_KAIDAN); |