28 lines
463 B
C++
28 lines
463 B
C++
#include "GameRenderer.hpp"
|
|
#include "Player.hpp"
|
|
#include "Game.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
Game::Game() : renderer("Zombo Shooter", 800, 450), player(&renderer) {}
|
|
|
|
Game::~Game() = default;
|
|
|
|
void Game::run() const
|
|
{
|
|
while (true) {
|
|
SDL_Event e;
|
|
SDL_WaitEvent(&e);
|
|
|
|
if (e.type == SDL_QUIT) {
|
|
break;
|
|
}
|
|
|
|
renderer.clear_screen(0x80, 0x40, 0xFF, 0xFF);
|
|
|
|
player.draw();
|
|
|
|
renderer.flush();
|
|
}
|
|
}
|