Isometric tiles now render the entire screen. Off screen tiles will not be rendered.

This commit is contained in:
Justin Marshall
2020-07-02 21:10:52 -07:00
parent a1687554cc
commit e2fcb059ec
4 changed files with 110 additions and 31 deletions
+2
View File
@@ -1008,10 +1008,12 @@ void CellClass::ConvertCoordsToIsometric(int& x, int& y) {
y = sy;// + (CELL_PIXEL_W / 2);
x = x + (ScreenWidth / 2);
y = y - (ScreenWidth / 4);
}
bool CellClass::ScreenCoordsToIsoTile(int x, int y, int &tileX, int &tileY) {
x = x - (ScreenWidth / 2);
y = y + (ScreenWidth / 4);
float tempPt_x = (2 * y + x) / 2;
float tempPt_y = (2 * y - x) / 2;