Created Capter2 for Test with componentbased objects

This commit is contained in:
2025-10-26 19:41:47 +01:00
parent 9e026c8074
commit f4f9560fa9
5 changed files with 197 additions and 0 deletions

33
Capter2/game.hpp Normal file
View File

@@ -0,0 +1,33 @@
#pragma once
#include "SDL2/SDL.h"
#include <vector>
class game
{
private:
void input(); //Process input
void update(); //update game
void output(); // generate output
SDL_Window *ptr_MainWindow;
SDL_Renderer *ptr_MainRenderer;
Uint32 GameTick;
bool GameIsRunning;
bool UpdateActors;
std::vector<class Actor *> ActorList;
public:
game(); //constructor
~game(); //destructor
bool Init(int x, int y, int w, int h);
void RunLoop();
void Shutdown();
void AddActor(class Actor *ptr_actor);
void RemActor(class Actor *ptr_actor);
};