diff options
author | Diegoisawesome <Diegoisawesome@users.noreply.github.com> | 2018-12-08 21:44:12 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-08 21:44:12 -0600 |
commit | 0b91d2948a431a5d44166544897a550061c01a31 (patch) | |
tree | 6e590fbd965b8cd96852ec36474a6841a74dc9b8 /src/overworld.c | |
parent | 88ffb0976571c8782a5e632df79d34b7260882c9 (diff) | |
parent | cceb8ac3314c9ba5a48d0b69bc39c41080335119 (diff) |
Merge pull request #429 from nullableVoidPtr/master
Various fixes and cleanups
Diffstat (limited to 'src/overworld.c')
-rw-r--r-- | src/overworld.c | 56 |
1 files changed, 46 insertions, 10 deletions
diff --git a/src/overworld.c b/src/overworld.c index 3193ec0d3..12e02a9b5 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -27,7 +27,7 @@ #include "link_rfu.h" #include "load_save.h" #include "main.h" -#include "malloc.h" +#include "alloc.h" #include "m4a.h" #include "map_name_popup.h" #include "menu.h" @@ -296,15 +296,51 @@ static const u8 sUnusedData[] = const struct UCoords32 gDirectionToVectors[] = { - { 0, 0}, // DIR_NONE - { 0, 1}, // DIR_SOUTH - { 0, -1}, // DIR_NORTH - {-1, 0}, // DIR_WEST - { 1, 0}, // DIR_EAST - {-1, 1}, // DIR_SOUTHWEST - { 1, 1}, // DIR_SOUTHEAST - {-1, -1}, // DIR_NORTHWEST - { 1, -1}, // DIR_NORTHEAST + [DIR_NONE] = + { + .x = 0, + .y = 0, + }, + [DIR_SOUTH] = + { + .x = 0, + .y = 1, + }, + [DIR_NORTH] = + { + .x = 0, + .y = -1, + }, + [DIR_WEST] = + { + .x = -1, + .y = 0, + }, + [DIR_EAST] = + { + .x = 1, + .y = 0, + }, + [DIR_SOUTHWEST] = + { + .x = -1, + .y = 1, + }, + [DIR_SOUTHEAST] = + { + .x = 1, + .y = 1, + }, + [DIR_NORTHWEST] = + { + .x = -1, + .y = -1, + }, + [DIR_NORTHEAST] = + { + .x = 1, + .y = -1, + }, }; static const struct BgTemplate gUnknown_08339DAC[] = |