From 155007d14989b2a798a15c6be8a00bb926d2c9b7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 26 Jun 2017 08:37:30 -0400 Subject: sub_80697C8 --- src/field_tasks.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src') diff --git a/src/field_tasks.c b/src/field_tasks.c index 6682d01c3..34cbc9796 100755 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -317,3 +317,37 @@ bool8 sub_806972C(s16 x1, s16 y1, s16 x2, s16 y2) } return TRUE; } + +bool8 sub_80697C8(s16 x1, s16 y1, s16 x2, s16 y2) +{ + s8 metatileBehavior = MapGridGetMetatileBehaviorAt(x1, y1); + if (sub_80576A0(metatileBehavior)) + { + if (y1 < y2) + { + return FALSE; + } + } + else if (sub_80576B4(metatileBehavior)) + { + if (y1 > y2) + { + return FALSE; + } + } + else if (sub_80576C8(metatileBehavior)) + { + if (x1 < x2) + { + return FALSE; + } + } + else if (sub_80576DC(metatileBehavior)) + { + if (x1 > x2) + { + return FALSE; + } + } + return TRUE; +} -- cgit v1.2.3