bootleg-game-engine/include/engine.h

30 lines
561 B
C
Raw Permalink Normal View History

2024-09-06 12:38:39 +00:00
#include "input.h"
#include "text.h"
#include "sprite.h"
#include "vector.h"
#include <SDL.h>
#include <string>
#include <vector>
2024-09-08 10:53:58 +00:00
#include "sound.h"
2024-09-06 12:38:39 +00:00
class Engine
{
private:
const char* ctitle;
int frameStart = 0;
2024-09-08 10:53:58 +00:00
bool soundInitialized = false;
2024-09-06 12:38:39 +00:00
public:
Input input;
int targetFrameRate = 60;
SDL_Window *window;
SDL_Renderer *renderer;
Engine(std::string title, int width, int height);
2024-09-08 10:53:58 +00:00
void initSound();
2024-09-06 12:38:39 +00:00
void clear(SDL_Color color);
void startFrame();
void render();
void update();
~Engine();
};