diff options
author | YamaArashi <shadow962@live.com> | 2016-10-17 23:49:18 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-10-17 23:49:18 -0700 |
commit | cf34b11e46a44d87cd755ae55743f6e9f77defd5 (patch) | |
tree | 7ada55562c3e9debbc5286db6fc178b9aa5817c2 | |
parent | b52494be04c2fd233db5b81bc53ef2f653ac7ff3 (diff) |
put vars in gSaveBlock1
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | include/global.h | 3 | ||||
-rw-r--r-- | shared_syms.txt | 2 | ||||
-rw-r--r-- | src/var.c | 4 |
4 files changed, 4 insertions, 7 deletions
@@ -4,7 +4,7 @@ AS := $(DEVKITARM)/bin/arm-none-eabi-as ASFLAGS := -mcpu=arm7tdmi CC1 := tools/agbcc/bin/agbcc -CFLAGS := -mthumb-interwork -Wimplicit -O2 -g -fhex-asm +CFLAGS := -mthumb-interwork -Wimplicit -O2 -g CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef diff --git a/include/global.h b/include/global.h index 2e48a08bc..d0f160506 100644 --- a/include/global.h +++ b/include/global.h @@ -143,7 +143,8 @@ struct SaveBlock1 u8 unk938[52]; // pokedex related u8 filler_96C[0x2B4]; struct MapObjectTemplate mapObjectTemplates[64]; - u8 filler_1220[0x320]; + u8 filler_1220[0x120]; + u16 vars[0x100]; u32 gameStats[NUM_GAME_STATS]; u8 filler_1608[0x18F4]; struct SB1_2EFC_Struct sb1_2EFC_struct[5]; diff --git a/shared_syms.txt b/shared_syms.txt index 73d91724a..38b13e8fd 100644 --- a/shared_syms.txt +++ b/shared_syms.txt @@ -8,5 +8,3 @@ gSecretBaseRecord = 0x2017000; dword_2017100 = 0x2017100; gHallOfFame = 0x201E000; - -gVars = 0x201EA74; @@ -1,7 +1,5 @@ #include "global.h" -extern u16 gVars[]; - extern u16 *gSpecialVars[]; u16 *GetVarPointer(u16 id) @@ -10,7 +8,7 @@ u16 *GetVarPointer(u16 id) return NULL; if ((s16)id >= 0) - return &gVars[id]; + return &gSaveBlock1.vars[id - 0x4000]; return gSpecialVars[id - 0x8000]; } |