diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2017-07-20 22:42:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 22:42:32 -0500 |
commit | 959f78fe146e75f9ce02b318eb6a8d97652a9996 (patch) | |
tree | c3100c9cb3ac199ced8b28203878fac7c2a76994 /src/field_region_map.c | |
parent | b23014cfa0573e53a104f433cf2d75f350340d60 (diff) | |
parent | 7d960d219fae9d0a14ef1974c11231f8de55b89c (diff) |
Merge branch 'master' into master
Diffstat (limited to 'src/field_region_map.c')
-rw-r--r-- | src/field_region_map.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/field_region_map.c b/src/field_region_map.c index 58b0e37bc..7cb22e5df 100644 --- a/src/field_region_map.c +++ b/src/field_region_map.c @@ -19,11 +19,13 @@ struct UnkStruct { MainCallback callback; u8 filler[4]; + // This should be RegionMap, but I can't do that because it overlaps unk888. struct RegionMapStruct unk8; u16 unk888; }; -extern struct UnkStruct unk_2000000; +extern u8 ewram[]; +#define unk_2000000 (*(struct UnkStruct *)(ewram)) void FieldInitRegionMap(MainCallback callback) { @@ -46,9 +48,10 @@ void CB2_FieldInitRegionMap(void) REG_BG3VOFS = 0; ResetSpriteData(); FreeAllSpritePalettes(); - sub_80FA8EC((u32)&unk_2000000.unk8, 0); - sub_80FBCF0(0, 0); - sub_80FBB3C(1, 1); + // TODO: remove this cast + InitRegionMap((void *)&unk_2000000.unk8, 0); + CreateRegionMapPlayerIcon(0, 0); + CreateRegionMapCursor(1, 1); SetUpWindowConfig(&gWindowConfig_81E709C); InitMenuWindow(&gWindowConfig_81E709C); MenuZeroFillScreen(); @@ -107,7 +110,7 @@ void sub_813EFDC(void) case 4: if (!gPaletteFade.active) { - sub_80FAB10(); + FreeRegionMapIconResources(); SetMainCallback2(unk_2000000.callback); } break; |