summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-05-06 18:31:13 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-05-06 18:31:13 -0400
commit7f63cdfe25fad0761aec347b1260ec3c1d63f109 (patch)
treedc1c225de7d1dc3316cf79b7ed9780eda6229f39 /src
parente9e87a0fe47406b5d2881b9360886842b8731c97 (diff)
Decompile two seagallop-related functions stuck in unk_8147500
Diffstat (limited to 'src')
-rw-r--r--src/seagallop.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/seagallop.c b/src/seagallop.c
index 39fb2b6df..e02b0887b 100644
--- a/src/seagallop.c
+++ b/src/seagallop.c
@@ -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;
+}