55 lines
863 B
C++
55 lines
863 B
C++
//
|
|
// Created by bruno on 27.10.2023.
|
|
//
|
|
|
|
#ifndef TUNELLERBUTWORSE_GAME_H
|
|
#define TUNELLERBUTWORSE_GAME_H
|
|
|
|
|
|
#include <SDL.h>
|
|
#include "Player.h"
|
|
#include "Sprite.h"
|
|
|
|
|
|
|
|
class Game {
|
|
public:
|
|
|
|
int run();
|
|
|
|
Game();
|
|
~Game();
|
|
|
|
private:
|
|
int init();
|
|
int processInput();
|
|
int render();
|
|
int update();
|
|
int quit();
|
|
|
|
std::vector<Player> players;
|
|
|
|
int playerCount = 1;
|
|
|
|
std::vector<std::string> spritefiles;
|
|
|
|
static SDL_Window* window;
|
|
static SDL_Renderer* renderer;
|
|
static SDL_Surface* windowSurface;
|
|
static SDL_Rect* windowRect;
|
|
// Logical resolution
|
|
static int logicalWidth;
|
|
static int logicalHeight;
|
|
|
|
// Rendering resolution (initial window size)
|
|
static int renderWidth;
|
|
static int renderHeight;
|
|
|
|
static bool isRunning;
|
|
|
|
static SDL_Event event;
|
|
};
|
|
|
|
|
|
#endif //TUNELLERBUTWORSE_GAME_H
|