mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
Add missing direction constant usage
This commit is contained in:
parent
eb07617a20
commit
7ddb9cb84c
@ -403,25 +403,25 @@ static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, i
|
|||||||
switch (connection->direction)
|
switch (connection->direction)
|
||||||
{
|
{
|
||||||
// same weird temp variable behavior seen in IsHiddenItemPresentAtCoords
|
// same weird temp variable behavior seen in IsHiddenItemPresentAtCoords
|
||||||
case 2:
|
case CONNECTION_NORTH:
|
||||||
localOffset = connection->offset + MAP_OFFSET;
|
localOffset = connection->offset + MAP_OFFSET;
|
||||||
localX = x - localOffset;
|
localX = x - localOffset;
|
||||||
localLength = mapHeader->mapLayout->height - MAP_OFFSET;
|
localLength = mapHeader->mapLayout->height - MAP_OFFSET;
|
||||||
localY = localLength + y; // additions are reversed for some reason
|
localY = localLength + y; // additions are reversed for some reason
|
||||||
break;
|
break;
|
||||||
case 1:
|
case CONNECTION_SOUTH:
|
||||||
localOffset = connection->offset + MAP_OFFSET;
|
localOffset = connection->offset + MAP_OFFSET;
|
||||||
localX = x - localOffset;
|
localX = x - localOffset;
|
||||||
localLength = gMapHeader.mapLayout->height + MAP_OFFSET;
|
localLength = gMapHeader.mapLayout->height + MAP_OFFSET;
|
||||||
localY = y - localLength;
|
localY = y - localLength;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case CONNECTION_WEST:
|
||||||
localLength = mapHeader->mapLayout->width - MAP_OFFSET;
|
localLength = mapHeader->mapLayout->width - MAP_OFFSET;
|
||||||
localX = localLength + x; // additions are reversed for some reason
|
localX = localLength + x; // additions are reversed for some reason
|
||||||
localOffset = connection->offset + MAP_OFFSET;
|
localOffset = connection->offset + MAP_OFFSET;
|
||||||
localY = y - localOffset;
|
localY = y - localOffset;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case CONNECTION_EAST:
|
||||||
localLength = gMapHeader.mapLayout->width + MAP_OFFSET;
|
localLength = gMapHeader.mapLayout->width + MAP_OFFSET;
|
||||||
localX = x - localLength;
|
localX = x - localLength;
|
||||||
localOffset = connection->offset + MAP_OFFSET;
|
localOffset = connection->offset + MAP_OFFSET;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user