2018-01-09 13:22:10 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
#include <SDL2/SDL_image.h>
|
|
|
|
#include <SDL2/SDL_ttf.h>
|
|
|
|
|
2018-01-10 15:37:55 +01:00
|
|
|
#include "breakout.h"
|
2018-01-09 13:22:10 +01:00
|
|
|
#include "vector.h"
|
|
|
|
|
|
|
|
#ifndef __nullptr__
|
|
|
|
#define Nullptr(type) (type *)0
|
|
|
|
#endif // __nullptr__
|
|
|
|
|
2018-01-10 15:37:55 +01:00
|
|
|
int BREAKOUT_BoxWidth, BREAKOUT_BoxHeight;
|
|
|
|
SDL_Texture * BALL_Texture;
|
2018-01-09 13:22:10 +01:00
|
|
|
|
2018-01-10 15:37:55 +01:00
|
|
|
void BREAKOUT_INITIALIZE(SDL_Renderer * renderer, int width, int height){
|
|
|
|
printf("Initializing Game...\n");
|
|
|
|
BREAKOUT_BoxWidth = width;
|
|
|
|
BREAKOUT_BoxHeight = height;
|
|
|
|
BALL_Texture = IMG_LoadTexture(renderer, "assets/images/ball.png");
|
|
|
|
if (!BALL_Texture) printf("Ball texture cannot be loaded!\n");
|
|
|
|
printf("Game initialized!\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void BREAKOUT_GAMELOOP(Uint8 * keystate){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void BALL_DRAW(Ball * ball){
|
|
|
|
}
|
|
|
|
|
|
|
|
void BREAKOUT_DEINITIALIZE(SDL_Renderer * renderer, int width, int height){
|
|
|
|
printf("De-initializing Game...\n");
|
|
|
|
SDL_DestroyTexture(BALL_Texture);
|
|
|
|
printf("Game de-initialized!\n");
|
2018-01-09 13:22:10 +01:00
|
|
|
}
|