summaryrefslogtreecommitdiff
path: root/pong.h
diff options
context:
space:
mode:
Diffstat (limited to 'pong.h')
-rw-r--r--pong.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/pong.h b/pong.h
new file mode 100644
index 0000000..cc381bc
--- /dev/null
+++ b/pong.h
@@ -0,0 +1,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