summaryrefslogtreecommitdiff
path: root/src/overworld.c
diff options
context:
space:
mode:
authorKDSKardabox <bollygame94@gmail.com>2018-12-09 13:44:41 +0530
committerKDSKardabox <bollygame94@gmail.com>2018-12-09 13:44:41 +0530
commit8712757d2454a8ee15680a658ea7df8621954bef (patch)
tree5f0ebfdccc0e22c0e52f8d223ec4889c7597569f /src/overworld.c
parentf8838491f6c46df771c5414f8b6da781294300b7 (diff)
parent0b91d2948a431a5d44166544897a550061c01a31 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/overworld.c')
-rw-r--r--src/overworld.c56
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[] =