You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.3 KiB
60 lines
1.3 KiB
#include "raylib.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "sprite.h"
|
|
#include "Input/inputHandler.h"
|
|
#include "raymath.h"
|
|
#include "List/list.h"
|
|
#include "IsometricMap/isometricMap.h"
|
|
#include "game.h"
|
|
#include "DepthSorting/bucket.h"
|
|
|
|
Game *game;
|
|
|
|
int main(){
|
|
|
|
InitWindow(800, 450, "basic window");
|
|
|
|
game = GameInit();
|
|
|
|
// Hides the operating systems own cursor
|
|
HideCursor();
|
|
|
|
//SetTargetFPS(60);
|
|
|
|
// GAME MAIN ROUTINE
|
|
while(!WindowShouldClose()){
|
|
|
|
ListActAllSprites(game);
|
|
|
|
ClearBackground(RAYWHITE);
|
|
BeginDrawing();
|
|
|
|
BeginMode2D(*(game->camera));
|
|
|
|
//IsometricRendererRenderIsometricMap(game);
|
|
//ListDrawAllSprites(game->sprites, game->layers, game->camera);
|
|
IsometricMapDraw(game);
|
|
|
|
EndMode2D();
|
|
|
|
// Moving cursor Sprite to Mouse Pos and drawing it
|
|
game->cursorSprite->x = game->inputHandler->cursorPos.x;
|
|
game->cursorSprite->y = game->inputHandler->cursorPos.y;
|
|
DrawSpriteToScreen(game->cursorSprite);
|
|
|
|
// User Input Handling
|
|
mouseInput(game);
|
|
keyboardInput(game->inputHandler, game->camera);
|
|
|
|
DrawFPS(GetScreenWidth() - 95, 10);
|
|
|
|
EndDrawing();
|
|
|
|
}
|
|
|
|
CloseWindow();
|
|
|
|
return 0;
|
|
|
|
} |