This commit is contained in:
2024-09-06 13:38:39 +01:00
parent 5813da7e97
commit 4b37c3afb8
5 changed files with 166 additions and 50 deletions

27
include/engine.h Normal file
View File

@@ -0,0 +1,27 @@
#include "input.h"
#include "text.h"
#include "sprite.h"
#include "vector.h"
#include <SDL.h>
#include <string>
#include <vector>
class Engine
{
private:
const char* ctitle;
int frameStart = 0;
public:
Input input;
int targetFrameRate = 60;
SDL_Window *window;
SDL_Renderer *renderer;
Engine(std::string title, int width, int height);
void clear(SDL_Color color);
void startFrame();
void render();
void update();
~Engine();
};