breakout/breakout.c

39 lines
951 B
C

#include <stdio.h>
#include <stdbool.h>
#include <math.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include "breakout.h"
#include "vector.h"
#ifndef __nullptr__
#define Nullptr(type) (type *)0
#endif // __nullptr__
int BREAKOUT_BoxWidth, BREAKOUT_BoxHeight;
SDL_Texture * BALL_Texture;
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");
}