Created
August 2, 2022 17:21
-
-
Save ark-tik/5c2b9893b1bd5777b28b60b2bf0073e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
else if(roomOrientation == RoomOrientation::isometric) { | |
int xStart = ((layerWidth * mapTileWidth) / 2) /*Mid x coordinate of the room in pixels*/ | |
- (mapTileWidth / 2) /*Reposition by an offset of half of tileWidth*/ | |
- (currY * (mapTileWidth / 2)); /*Reposition x coordinate depending on the row index or currY*/ | |
int x = xStart + (currX * mapTileWidth / 2); | |
int y = (currY * mapTileHeight / 2) + (currX * mapTileHeight / 2); | |
tile->set_x(x); | |
tile->set_y(y); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment