diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-26 21:48:30 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-26 21:48:30 -0400 |
commit | 9cc199f064aa2f5a8e188dfe805a511c2c92c4fa (patch) | |
tree | db3948ce33fed1ae770bb1b455acfaec204f1a32 /src/field_tasks.c | |
parent | 10f782959283e43cea5219033772778dbaf4a745 (diff) |
stupid sub_8069D34
Diffstat (limited to 'src/field_tasks.c')
-rwxr-xr-x | src/field_tasks.c | 79 |
1 files changed, 52 insertions, 27 deletions
diff --git a/src/field_tasks.c b/src/field_tasks.c index 88dd025cc..92b8d3bb8 100755 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -5,6 +5,8 @@ #include "global.h" #include "task.h" #include "main.h" +#include "vars.h" +#include "event_data.h" #include "rom4.h" #include "clock.h" #include "script.h" @@ -537,35 +539,35 @@ void PerStepCallback_8069AA0(u8 taskId) } const u16 gUnknown_083763E4[] = { - 0, - 0, - 0, - 0, - 0, - 0, - 0x4001, - 0x4002, - 0x4003, - 0x4004, - 0, - 0, - 0x4005, - 0x4006, - 0x4007, - 0, - 0, - 0x4008, - 0x4009, - 0x400A, - 0, - 0, - 0, - 0, - 0, - 0 + 0, + 0, + 0, + 0, + 0, + 0, + VAR_0x4001, + VAR_0x4002, + VAR_0x4003, + VAR_0x4004, + 0, + 0, + VAR_0x4005, + VAR_0x4006, + VAR_0x4007, + 0, + 0, + VAR_0x4008, + VAR_0x4009, + VAR_0x400A, + 0, + 0, + 0, + 0, + 0, + 0 }; -bool8 sub_8069CB8(s16 x, s16 y) +bool32 sub_8069CB8(s16 x, s16 y) { if ((u16)(x - 3) < 11 && (u16)(y - 6) < 14 && gUnknown_083763E4[y]) { @@ -573,3 +575,26 @@ bool8 sub_8069CB8(s16 x, s16 y) } return FALSE; } + +void sub_8069CFC(s16 x, s16 y) +{ + if (sub_8069CB8(x, y)) + { + *GetVarPointer(gUnknown_083763E4[y]) |= (1 << (x - 3)); + } +} + +bool32 sub_8069D34(s16 x, s16 y) +{ + u32 var; + if (!sub_8069CB8(x, y)) + { + return FALSE; + } + var = VarGet(gUnknown_083763E4[y]) << 16; + if (((1 << 16) << (x - 3)) & var) + { + return TRUE; + } + return FALSE; +} |