diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-06-20 19:54:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 19:54:16 -0500 |
commit | 7b7f4bb7d6f5d29b40e15aa4c6285c6885359e0d (patch) | |
tree | 8da3f8fae8c1c165e3435ee079f48631479b7611 /src/item_use.c | |
parent | c6207577802db057298917089e427a6ab9e6edf9 (diff) | |
parent | 8bf4b1a917786c683ac30278108f74d31961274d (diff) |
Merge pull request #636 from huderlem/assets
Map organization
Diffstat (limited to 'src/item_use.c')
-rw-r--r-- | src/item_use.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/item_use.c b/src/item_use.c index 926ab4876..5037fee88 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -384,23 +384,23 @@ bool8 sub_80C9688(struct MapConnection *connection, int x, int y) case 2: localOffset = connection->offset + 7; localX = x - localOffset; - localLength = mapHeader->mapData->height - 7; + localLength = mapHeader->mapLayout->height - 7; localY = localLength + y; // additions are reversed for some reason break; case 1: localOffset = connection->offset + 7; localX = x - localOffset; - localLength = gMapHeader.mapData->height + 7; + localLength = gMapHeader.mapLayout->height + 7; localY = y - localLength; break; case 3: - localLength = mapHeader->mapData->width - 7; + localLength = mapHeader->mapLayout->width - 7; localX = localLength + x; // additions are reversed for some reason localOffset = connection->offset + 7; localY = y - localOffset; break; case 4: - localLength = gMapHeader.mapData->width + 7; + localLength = gMapHeader.mapLayout->width + 7; localX = x - localLength; localOffset = connection->offset + 7; localY = y - localOffset; @@ -417,8 +417,8 @@ void sub_80C9720(u8 taskId) { s16 x, y; s16 curX, curY; - s16 width = gMapHeader.mapData->width + 7; - s16 height = gMapHeader.mapData->height + 7; + s16 width = gMapHeader.mapLayout->width + 7; + s16 height = gMapHeader.mapLayout->height + 7; PlayerGetDestCoords(&x, &y); |