diff options
author | YamaArashi <shadow962@live.com> | 2017-01-02 00:41:28 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2017-01-02 01:01:13 -0800 |
commit | 145e90483b2a30698f917f62e585aa7fa4794588 (patch) | |
tree | b1410a1bcec3eacaf5623cef33b10bc5a6f2a5d8 /src/flag.c | |
parent | c4af9225bc4e2f30a240e9cabca98fca4d708501 (diff) |
event_data.c
Diffstat (limited to 'src/flag.c')
-rw-r--r-- | src/flag.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/flag.c b/src/flag.c deleted file mode 100644 index e7347ad0d..000000000 --- a/src/flag.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "global.h" -#include "flag.h" - -extern u8 gUnknown_0202E8E2[]; - -u8 *GetFlagPointer(u16 id) -{ - if (id == 0) - return 0; - - if (id < 0x4000) - return &gSaveBlock1.flags[id / 8]; - - return &gUnknown_0202E8E2[(id - 0x4000) / 8]; -} - -u8 FlagSet(u16 id) -{ - u8 *ptr = GetFlagPointer(id); - if (ptr) - *ptr |= 1 << (id & 7); - return 0; -} - -u8 FlagReset(u16 id) -{ - u8 *ptr = GetFlagPointer(id); - if (ptr) - *ptr &= ~(1 << (id & 7)); - return 0; -} - -bool8 FlagGet(u16 id) -{ - u8 *ptr = GetFlagPointer(id); - - if (!ptr) - return FALSE; - - if (!(((*ptr) >> (id & 7)) & 1)) - return FALSE; - - return TRUE; -} |