blob: cc381bcce70f4097b8a0c2a1daca6cd695e441c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef PONG_H
#define PONG_H
#include "SDL.h"
#include "text.h"
#include "paddle.h"
#include "ball.h"
#include "color.h"
void Reset();
void DrawRect(SDL_Rect * rect, Uint32 color);
void UpdateScore(Text_t * Text, Uint8 score);
int Collide(SDL_Rect * a, SDL_Rect * b);
Color_t * white;
Color_t * black;
Ball_t * Ball;
Paddle_t * Left;
Paddle_t * Right;
struct Game {
Uint16 height;
Uint16 width;
Uint8 depth;
Uint8 Speed;
Uint8 Score_Limit;
Sint8 done;
Sint8 play;
Uint8 * keystate;
Uint8 counter;
} Game;
Text_t * Start;
Text_t * Again;
Text_t * Player;
Text_t * Wins;
Text_t * P1Score;
Text_t * P2Score;
Text_t * One;
Text_t * Two;
#endif
|