Breakout
|
#include <chrono>
#include <SDL2/SDL.h>
#include <SDL2_ttf/SDL_ttf.h>
#include <cstdint>
#include <SDL2/SDL_mixer.h>
#include "Ball.h"
#include "Paddle.h"
#include "Contact.h"
#include "PlayerScore.h"
#include "Brick.h"
#include "LTimer.h"
#include <string>
#include <glad/glad.h>
#include "ResourceManager.h"
#include <iostream>
#include <fstream>
Enumerations | |
enum | Buttons { PaddleOneUp = 0 , PaddleOneDown , PaddleTwoUp , PaddleTwoDown } |
Functions | |
bool | init () |
void | loadLevel (int level) |
Method to load the level from the scripts. More... | |
void | setBricks (int level, SDL_Renderer *renderer) |
The method to set bricks. More... | |
int | main (int argc, char *argv[]) |
The main function i.e. More... | |
Variables | |
const int | WINDOW_WIDTH = 1920 |
The Width of the game window. More... | |
const int | WINDOW_HEIGHT = 1080 |
The Height of the game window. More... | |
const int | FPS = 60 |
The target FPS we are aiming for. More... | |
int | levelArray [10][26] |
The 2D array for initializing the bricks. More... | |
Brick | bricks [10][26] |
The 2D array of brick object. More... | |
int | brickCounter |
The counter to keep track of number of bricks on screen. More... | |
int | frameCount |
int | timerFPS |
int | lastFrame |
int | fps |
enum Buttons |
bool init | ( | ) |
void loadLevel | ( | int | level | ) |
Method to load the level from the scripts.
level | the level to be loaded |
int main | ( | int | argc, |
char * | argv[] | ||
) |
The main function i.e.
Entry point to the program
The game loop
void setBricks | ( | int | level, |
SDL_Renderer * | renderer | ||
) |
The method to set bricks.
level | The level to be loaded |
renderer | The renderer of the game loop |
int brickCounter |
The counter to keep track of number of bricks on screen.
Brick bricks[10][26] |
The 2D array of brick object.
const int FPS = 60 |
The target FPS we are aiming for.
int fps |
int frameCount |
int lastFrame |
int levelArray[10][26] |
The 2D array for initializing the bricks.
int timerFPS |
const int WINDOW_HEIGHT = 1080 |
The Height of the game window.
const int WINDOW_WIDTH = 1920 |
The Width of the game window.