first commit
This commit is contained in:
59
src/game/Game.hpp
Normal file
59
src/game/Game.hpp
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Game.hpp
|
||||
*
|
||||
* Created on: Feb 9, 2020
|
||||
* Author: ayoungblood
|
||||
*/
|
||||
|
||||
#ifndef GAME_HPP_
|
||||
#define GAME_HPP_
|
||||
#include "SDL2/SDL.h"
|
||||
#include "SDL2/SDL_image.h"
|
||||
#include "SDL2/SDL_mixer.h"
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include "Vector2D.h"
|
||||
#include "../assetmgr/AssetManager.h"
|
||||
|
||||
class ColliderComponent;
|
||||
class AssetManager;
|
||||
|
||||
class Game {
|
||||
public:
|
||||
Game();
|
||||
virtual ~Game();
|
||||
void init(const char* title, int width, int height, bool fullscreen, int globalScale);
|
||||
void handleEvents();
|
||||
void update();
|
||||
void render();
|
||||
void clean();
|
||||
void printDebug(char* debugInfo);
|
||||
void drawLine(Vector2D srcpt, Vector2D destpt, int red, int green, int blue);
|
||||
bool running() { return isRunning; }
|
||||
// static void AddTile(int srcX, int srcY, int xpos, int ypos);
|
||||
static SDL_Renderer *renderer;
|
||||
static SDL_Event event;
|
||||
// static std::vector<ColliderComponent*> colliders;
|
||||
static bool isRunning;
|
||||
static bool debugCollisionBoxes;
|
||||
static SDL_Rect camera;
|
||||
static AssetManager* assets;
|
||||
enum groupLabels : std::size_t
|
||||
{
|
||||
groupMap,
|
||||
groupPlayers,
|
||||
groupEnemies,
|
||||
groupColliders,
|
||||
groupProjectiles,
|
||||
groupObjects,
|
||||
groupUI_Layer0,
|
||||
groupUI_Layer1
|
||||
};
|
||||
private:
|
||||
int counter = 0;
|
||||
// bool isRunning = false;
|
||||
SDL_Window *window;
|
||||
// SDL_Renderer *renderer;
|
||||
};
|
||||
#endif /* GAME_HPP_ */
|
Reference in New Issue
Block a user