|
|
|
|
@ -57,17 +57,10 @@ int main(){
|
|
|
|
|
camera.rotation = 0.0f;
|
|
|
|
|
camera.zoom = 1.0f;
|
|
|
|
|
|
|
|
|
|
// TODO -> Isometric Map Array for multiple Layers
|
|
|
|
|
// -> Make only most upper layer selectable
|
|
|
|
|
// take selected Tile, if that tile has one above select a tile in the upper layer
|
|
|
|
|
//IsometricMap *map = IsometricMapInit(50, 80, 0);
|
|
|
|
|
//IsometricMap *Layer1 = IsometricMapInit(20, 20, 1);
|
|
|
|
|
//IsometricMap *Layer2 = IsometricMapInit(15, 15, 2);
|
|
|
|
|
//IsometricMap *Layer3 = IsometricMapInit(10, 10, 3);
|
|
|
|
|
//IsometricMap *Layer4 = IsometricMapInit(4, 4, 4);
|
|
|
|
|
|
|
|
|
|
IsometricMap **layers = (IsometricMap **) malloc(10*sizeof(IsometricMap *));
|
|
|
|
|
|
|
|
|
|
// Test Layers ---
|
|
|
|
|
|
|
|
|
|
int n = 0;
|
|
|
|
|
int i = 0;
|
|
|
|
|
int j = 0;
|
|
|
|
|
@ -110,6 +103,16 @@ int main(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// -------
|
|
|
|
|
|
|
|
|
|
// Test of the IsometricMapUnproject Function
|
|
|
|
|
//Vector2 asdf = {500, 600};
|
|
|
|
|
//printf("unprojected %f %f\n",asdf.x, asdf.y);
|
|
|
|
|
//IsometricMapProject(layers[0], &camera, asdf.x, asdf.y, &asdf);
|
|
|
|
|
//printf("projected %f %f\n",asdf.x, asdf.y);
|
|
|
|
|
//IsometricMapUnproject(layers[0], &camera, asdf.x, asdf.y, &asdf);
|
|
|
|
|
//printf("unprojected %f %f\n",asdf.x, asdf.y);
|
|
|
|
|
|
|
|
|
|
// Hides the operating systems own cursor
|
|
|
|
|
HideCursor();
|
|
|
|
|
SetTargetFPS(60);
|
|
|
|
|
|