diff options
Diffstat (limited to 'src/seagallop.c')
-rw-r--r-- | src/seagallop.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/src/seagallop.c b/src/seagallop.c index 001c827e5..7cdd6ebd0 100644 --- a/src/seagallop.c +++ b/src/seagallop.c @@ -322,7 +322,7 @@ static void Task_SeaGallop_3(void) Overworld_SetWarpDestination(warpInfo[0], warpInfo[1], -1, warpInfo[2], warpInfo[3]); PlayRainStoppingSoundEffect(); PlaySE(SE_KAIDAN); - gUnknown_3005020 = sub_807DF64; + gFieldCallback = sub_807DF64; warp_in(); SetMainCallback2(sub_805671C); ResetInitialPlayerAvatarState(); @@ -458,3 +458,42 @@ static bool8 GetDirectionOfTravel(void) } return (sTravelDirectionMatrix[gSpecialVar_0x8004] >> gSpecialVar_0x8006) & 1; } + +u8 sub_8147500(void) +{ + u16 originId, destId; + + originId = gSpecialVar_0x8004; + destId = gSpecialVar_0x8006; + + if (originId == SEAGALLOP_CINNABAR_ISLAND || destId == SEAGALLOP_CINNABAR_ISLAND) + return 1; + + if (originId == SEAGALLOP_VERMILION_CITY || destId == SEAGALLOP_VERMILION_CITY) + return 7; + + if (originId == SEAGALLOP_NAVEL_ROCK || destId == SEAGALLOP_NAVEL_ROCK) + return 10; + + if (originId == SEAGALLOP_BIRTH_ISLAND || destId == SEAGALLOP_BIRTH_ISLAND) + return 12; + + if ((originId == SEAGALLOP_ONE_ISLAND || originId == SEAGALLOP_TWO_ISLAND || originId == SEAGALLOP_THREE_ISLAND) && (destId == SEAGALLOP_ONE_ISLAND || destId == SEAGALLOP_TWO_ISLAND || destId == SEAGALLOP_THREE_ISLAND)) + return 2; + + if ((originId == SEAGALLOP_FOUR_ISLAND || originId == SEAGALLOP_FIVE_ISLAND) && (destId == SEAGALLOP_FOUR_ISLAND || destId == SEAGALLOP_FIVE_ISLAND)) + return 3; + + if ((originId == SEAGALLOP_SIX_ISLAND || originId == SEAGALLOP_SEVEN_ISLAND) && (destId == SEAGALLOP_SIX_ISLAND || destId == SEAGALLOP_SEVEN_ISLAND)) + return 5; + + return 6; +} + +bool8 sub_8147594(void) +{ + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(VERMILIONCITY) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(VERMILIONCITY) && gSaveBlock1Ptr->pos.x < 24) + return TRUE; + + return FALSE; +} |