diff options
author | 2025-05-17 01:21:21 +0200 | |
---|---|---|
committer | 2025-05-17 01:21:21 +0200 | |
commit | 87cde6f952917522a1c13524354ac52f2bcb0fbe (patch) | |
tree | 22234ffc7c612103d999eeb9f309e0bb2cbb146a /src/main/game.c | |
parent | e7f81ff8f43b49331c368e3be09326551e0e6213 (diff) | |
download | tris-87cde6f952917522a1c13524354ac52f2bcb0fbe.tar.gz tris-87cde6f952917522a1c13524354ac52f2bcb0fbe.zip |
Draw the game field
Diffstat (limited to 'src/main/game.c')
-rw-r--r-- | src/main/game.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/game.c b/src/main/game.c index bc9e007..ea1a935 100644 --- a/src/main/game.c +++ b/src/main/game.c @@ -17,13 +17,21 @@ * along with Tris Game. If not, see <http://www.gnu.org/licenses/>. */ +#include <GL/gl.h> + #include "engine/engine.h" void -game_field(int box_size, int x, int y) +game_draw_field(int box_size, int x, int y) { + glLineWidth(5.0f); + glBegin(GL_LINES); + glColor3f(1.0f, 1.0f, 0.0f); /* Yellow */ + engine_draw_line(box_size, y, box_size, box_size * 3); engine_draw_line(box_size * 2, y, box_size * 2, box_size * 3); engine_draw_line(x, box_size, box_size * 3, box_size); engine_draw_line(x, box_size * 2, box_size * 3, box_size * 2); + + glEnd(); } |