summaryrefslogtreecommitdiff
path: root/pong.h
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2006-08-04 00:56:19 +0000
committerMatt Turner <mattst88@gmail.com>2006-08-04 00:56:19 +0000
commitf6997ebd1de555916c491dbd603f7a0e9c1d9c58 (patch)
tree23645695bcf2c9ddd154d004dfe09693139ffbf0 /pong.h
parentf2837ef813150240c00741018542dc271213ff5c (diff)
git-svn-id: svn://mattst88.com/svn/sdlpong/trunk@2 e27a58fc-241a-0410-afba-9958544cdf14HEADmaster
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