diff options
author | JaceCearK1 <JaceCearK1@users.noreply.github.com> | 2017-07-01 21:04:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-01 21:04:18 +0200 |
commit | 0dd804a99e5455a0eac8ff6ed87d9de16c7380b7 (patch) | |
tree | 7b3567978b63ee6548a7b945e075ea8ba37bef51 /src/var.c | |
parent | f1344efd2aff92292f58f7323bd9297a38fe9b02 (diff) | |
parent | 8d82578d3a101b06f9d2ced31738021007c4e533 (diff) |
Merge pull request #1 from pret/master
Update fork to match main fork.
Diffstat (limited to 'src/var.c')
-rw-r--r-- | src/var.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/var.c b/src/var.c deleted file mode 100644 index 08b109e6f..000000000 --- a/src/var.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "global.h" -#include "var.h" - -extern u16 *gSpecialVars[]; - -u16 *GetVarPointer(u16 id) -{ - if (id < 0x4000) - return NULL; - - if ((s16)id >= 0) - return &gSaveBlock1.vars[id - 0x4000]; - - return gSpecialVars[id - 0x8000]; -} - -u16 VarGet(u16 id) -{ - u16 *ptr = GetVarPointer(id); - if (!ptr) - return id; - return *ptr; -} - -bool8 VarSet(u16 id, u16 value) -{ - u16 *ptr = GetVarPointer(id); - if (!ptr) - return FALSE; - *ptr = value; - return TRUE; -} - -u8 VarGetFieldObjectGraphicsId(u8 id) -{ - return VarGet(0x4010 + id); -} |