summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/game.c b/src/game.c
new file mode 100644
index 0000000..a30363f
--- /dev/null
+++ b/src/game.c
@@ -0,0 +1,31 @@
+#include "game.h"
+#include "TZR.h"
+#include "cfg.h"
+
+int _white = 0;
+int _my_turn = 0;
+
+void
+game_init(int white)
+{
+ _white = white;
+ _my_turn = white;
+}
+
+void
+game_update(void)
+{
+}
+
+void
+game_draw(void)
+{
+ if (!_my_turn) {
+ TZR_DrawSetColor(1, 1, 1);
+ const TZR_Uint res[2] = {
+ TZR_RES("res/clock0.bmp"),
+ TZR_RES("res/clock1.bmp")
+ };
+ TZR_DrawImage(res[TZR_GetTick() / FPS % 2]);
+ }
+}