pong/src/pong.h
Pradana AUMARS 20a2065f47 Revert "Revert "Added posX constants of ball and racket to pong struct""
This reverts commit 40a904e100cd57324b008287cc7e9105077b6e57.
2021-06-28 16:02:55 +02:00

34 lines
646 B
C

#ifndef PONG_H
#define PONG_H
#include <SDL.h>
#include "ball.h"
typedef struct Pong {
const int SCREEN_WIDTH;
const int SCREEN_HEIGHT;
SDL_Window* window;
SDL_Surface* screenSurface;
SDL_Renderer* renderer;
//SDL_Texture* texture;
SDL_Event e;
Ball *ball;
const int BALL_POSX;
Racket *racketL;
const int RACKET_POSX;
Racket *racketR;
} Pong;
Pong* Pong_init();
void Pong_free(Pong *p);
void Pong_clear(Pong *p);
void Pong_render(Pong *p);
void Ball_move(Ball *b, Pong *p);
void Pong_run(Pong *p);
void Pong_score(const Pong *p, char c);
void Pong_score_run(const Pong *p);
void Pong_score_end(const Pong *p);
#endif