blob: f95d4bcad93347f4a6fe59d5ed484f0cc203ce15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef SDLAPP_HPP
#define SDLAPP_HPP
#include <SDL2/SDL.h>
#include "Particle.hpp"
#include "ParticleEmitter.hpp"
class SDLApp {
public:
SDLApp(int windowWidth, int windowHeight);
~SDLApp();
bool initialize();
void handleEvents(bool& running);
void clearScreen();
void presentScreen();
void drawSquare(int x, int y, int size);
void cleanUp();
void drawParticles(const std::vector<ParticleEmitter>& emitters);
void drawMultipleSquares(const std::vector<SDL_Rect>& squares);
private:
int windowWidth;
int windowHeight;
SDL_Window* window;
SDL_Renderer* renderer;
};
#endif
|