|
|
|
|
@ -15,14 +15,6 @@ int main(){
|
|
|
|
|
|
|
|
|
|
Game *game = GameInit();
|
|
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
|
@ -46,12 +38,12 @@ int main(){
|
|
|
|
|
DrawSpriteToScreen(game->cursorSprite);
|
|
|
|
|
|
|
|
|
|
// User Input Handling
|
|
|
|
|
mouseInput(game->inputHandler, game->sprites, game->worker+4, game->camera, *game->layers);
|
|
|
|
|
mouseInput(game);
|
|
|
|
|
keyboardInput(game->inputHandler, game->camera);
|
|
|
|
|
|
|
|
|
|
//cursor Positions test
|
|
|
|
|
//printf("Cursor Pos: %f %f\n", inputHandler.cursorPos.x, inputHandler.cursorPos.y);
|
|
|
|
|
//printf("Cursor World Pos: %f %f\n", inputHandler.cursorWorldPos.x, inputHandler.cursorWorldPos.y);
|
|
|
|
|
//printf("Cursor Pos: %f %f\n", game->inputHandler->cursorPos.x, game->inputHandler.cursorPos.y)->
|
|
|
|
|
//printf("Cursor World Pos: %f %f\n", game->inputHandler->cursorWorldPos.x, game->inputHandler->cursorWorldPos.y);
|
|
|
|
|
|
|
|
|
|
// Sprites move towards their destination
|
|
|
|
|
float movementSpeed = 10.0f;
|
|
|
|
|
|