summaryrefslogtreecommitdiff
path: root/src/field_tasks.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-06-26 08:35:22 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-06-26 08:35:22 -0400
commitd7ab13d3a9b969b0267786e566595689338ae7c4 (patch)
treef7ae008a49b3111a30905f69986058406abad2e3 /src/field_tasks.c
parent01890a2020676ad2567f21d9f11deeb2e3a0e2db (diff)
sub_806972C
Diffstat (limited to 'src/field_tasks.c')
-rwxr-xr-xsrc/field_tasks.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/field_tasks.c b/src/field_tasks.c
index 11f67c330..6682d01c3 100755
--- a/src/field_tasks.c
+++ b/src/field_tasks.c
@@ -283,3 +283,37 @@ void sub_8069708(s16 x, s16 y, bool32 flag)
{
sub_8069638(gUnknown_083763C4, x, y, flag);
}
+
+bool8 sub_806972C(s16 x1, s16 y1, s16 x2, s16 y2)
+{
+ s8 metatileBehavior = MapGridGetMetatileBehaviorAt(x2, y2);
+ 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;
+}