aboutsummaryrefslogtreecommitdiff
path: root/plot.h
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-01-12 20:41:56 +1300
committerDavid Phillips <dbphillipsnz@gmail.com>2016-01-12 20:41:56 +1300
commit58bef85206c7cce153400e51b247e2476e9e65a4 (patch)
tree9e9856c8c554545c44834c89fe0086f9a36abf22 /plot.h
downloadtetris-58bef85206c7cce153400e51b247e2476e9e65a4.tar.xz
Initial commit of rough-arse Tetris
Diffstat (limited to 'plot.h')
-rw-r--r--plot.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/plot.h b/plot.h
new file mode 100644
index 0000000..836c377
--- /dev/null
+++ b/plot.h
@@ -0,0 +1,14 @@
+void plot_rect(unsigned int x, unsigned int y, unsigned int width, unsigned int height, struct colour *c);
+void plot_cell(unsigned int x, unsigned int y, struct colour *c);
+void plot_cell_borders();
+int plot_init();
+void plot_update();
+
+#define CELL_SIZE 25
+#define BORDER_THICKNESS 2
+#define WIDTH_CELLS 10
+#define HEIGHT_CELLS 20
+
+#define WIDTH_PIXELS (WIDTH_CELLS * CELL_SIZE + BORDER_THICKNESS * (WIDTH_CELLS-1))
+#define HEIGHT_PIXELS (HEIGHT_CELLS * CELL_SIZE + BORDER_THICKNESS * (HEIGHT_CELLS-1))
+