SDL Breakout Engine
0.1.0
An implementation of a Breakout game using sdl, implemented with efficient resource management.
|
#include <SDLGraphicsProgram.hpp>
Public Member Functions | |
SDLGraphicsProgram (int w, int h, std::string level, Language l) | |
creates the program with a certain width/height. More... | |
~SDLGraphicsProgram () | |
cleans up sdl program More... | |
void | update (int lastFPS, float dt, Vector3D speed) |
per frame updating More... | |
void | render () |
Renders shapes to the screen. More... | |
void | loop () |
game loop More... | |
SDL_Window * | getSDLWindow () |
Get Pointer to Window. More... | |
SDL_Renderer * | getSDLRenderer () |
Get Pointer to Renderer. More... | |
A full graphics program which makes use of the LevelManager, ResourceManager, and GameObject abstractions.
SDLGraphicsProgram::SDLGraphicsProgram | ( | int | w, |
int | h, | ||
std::string | level, | ||
Language | l1 | ||
) |
creates the program with a certain width/height.
[in] | w | width of screen |
[in] | h | height of screen |
[in] | level | the level to use |
l1 | the language to use |
SDLGraphicsProgram::~SDLGraphicsProgram | ( | ) |
cleans up sdl program
SDL_Renderer * SDLGraphicsProgram::getSDLRenderer | ( | ) |
Get Pointer to Renderer.
SDL_Window * SDLGraphicsProgram::getSDLWindow | ( | ) |
Get Pointer to Window.
void SDLGraphicsProgram::loop | ( | ) |
game loop
void SDLGraphicsProgram::render | ( | ) |
Renders shapes to the screen.
void SDLGraphicsProgram::update | ( | int | lastFPS, |
float | dt, | ||
Vector3D | paddleMovement | ||
) |
per frame updating
[in] | lastFPS | the last calculated fps |
[in] | dt | time between two updates |
[in] | paddleMovement | multiplier to adjust positions of game objects |