Tunneler/Game.h

55 lines
863 B
C
Raw Permalink Normal View History

2023-10-28 12:42:23 +02:00
//
// Created by bruno on 27.10.2023.
//
#ifndef TUNELLERBUTWORSE_GAME_H
#define TUNELLERBUTWORSE_GAME_H
#include <SDL.h>
2023-12-19 17:53:47 +01:00
#include "Player.h"
#include "Sprite.h"
2023-10-28 12:42:23 +02:00
class Game {
public:
int run();
2023-12-19 17:53:47 +01:00
Game();
~Game();
2023-10-28 12:42:23 +02:00
private:
int init();
int processInput();
int render();
int update();
2023-12-19 17:53:47 +01:00
int quit();
std::vector<Player> players;
2023-10-28 12:42:23 +02:00
2023-12-19 17:53:47 +01:00
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;
2023-10-28 12:42:23 +02:00
};
#endif //TUNELLERBUTWORSE_GAME_H