starting game planning
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
#include "Application.h"
|
||||
#include "Game.h"
|
||||
#include "backend/RaylibInput.h"
|
||||
|
||||
#include <raylib.h>
|
||||
#include <RmlUi/Core.h>
|
||||
#include <RmlUi/Debugger.h>
|
||||
|
||||
Game game;
|
||||
|
||||
bool Application::Init(int width, int height, const char* title, const char* documentPath) {
|
||||
InitWindow(width, height, title);
|
||||
SetTargetFPS(60);
|
||||
@@ -24,6 +27,8 @@ bool Application::Init(int width, int height, const char* title, const char* doc
|
||||
TraceLog(LOG_WARNING, "Failed to load %s", documentPath);
|
||||
}
|
||||
|
||||
game.Init(context);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,10 +41,12 @@ void Application::Frame() {
|
||||
ForwardInputToRml(context);
|
||||
context->Update();
|
||||
|
||||
game.Update();
|
||||
|
||||
BeginDrawing();
|
||||
ClearBackground(DARKGRAY);
|
||||
|
||||
// --- game world rendering goes here, before the UI ---
|
||||
game.Draw2D();
|
||||
|
||||
context->Render();
|
||||
EndDrawing();
|
||||
|
||||
Reference in New Issue
Block a user