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.
52 lines
1.3 KiB
52 lines
1.3 KiB
#include "raylib.h"
|
|
#include "string.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "Sprite/sprite.h"
|
|
#include "Input/inputHandler.h"
|
|
#include "Entity/entity.h"
|
|
#include "raymath.h"
|
|
#include "IsometricMap/isometricMap.h"
|
|
#include "game.h"
|
|
#include "Ui/button.h"
|
|
#include "Ui/uiContainer.h"
|
|
#include "Ui/debug.h"
|
|
#include "definitions.h"
|
|
#include "Screen/screen.h"
|
|
|
|
int main(){
|
|
|
|
InitWindow(1280, 720, "basic window");
|
|
|
|
Game *game = GameInit();
|
|
|
|
// Hides the operating systems own cursor
|
|
HideCursor();
|
|
|
|
//SetTargetFPS(60);
|
|
|
|
while(!WindowShouldClose()){
|
|
BeginDrawing(); // Drawing ist grundsätzlich immer aktiviert
|
|
ClearBackground(RAYWHITE); // Screen wird in jedem Frame gecleared
|
|
|
|
game->mouseOnUI = 0;
|
|
game->cursorSprite->x = GetMousePosition().x;
|
|
game->cursorSprite->y = GetMousePosition().y;
|
|
|
|
UiContainerUpdateUiContainer(game->screens[game->currentScreen]->uiContainer, game);
|
|
game->screens[game->currentScreen]->render(game); // Die ganze Game Logik ist hier drin
|
|
UiContainerDrawUiContainer(game->screens[game->currentScreen]->uiContainer);
|
|
|
|
DebugDraw(game);
|
|
DrawSpriteToScreen(game->cursorSprite);
|
|
|
|
EndDrawing();
|
|
if(game->currentScreen == SCREEN_EXIT){
|
|
break;
|
|
}
|
|
}
|
|
|
|
CloseWindow();
|
|
return 0;
|
|
}
|