From caa56946d017e689f6a883979b6cc28d67cef9d5 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 15 Nov 2022 09:20:13 +0100 Subject: [PATCH] use origin --- includes/plateau.h | 1 - src/plateau.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/plateau.h b/includes/plateau.h index 45619ad..40bbb08 100644 --- a/includes/plateau.h +++ b/includes/plateau.h @@ -17,7 +17,6 @@ typedef struct pos Pos; struct table { GLuint width; GLuint height; - Pos origin; int nb_row; int nb_columns; diff --git a/src/plateau.c b/src/plateau.c index cb45f47..7f1bf8e 100644 --- a/src/plateau.c +++ b/src/plateau.c @@ -6,8 +6,6 @@ Table *generate_table(GLuint width, GLuint height, Pos origin, Uint32 color) { table->width = width; table->height = height; - // TODO: Use origin - table->origin = origin; table->color = color; table->nb_columns = table->nb_row = 7; @@ -23,12 +21,12 @@ Table *generate_table(GLuint width, GLuint height, Pos origin, Uint32 color) { j < table->height - hPas; j += hPas, tmp += 4) { *tmp = table->width; *(tmp + 1) = j; - *(tmp + 2) = 0; + *(tmp + 2) = origin.x; *(tmp + 3) = j; } *tmp = i; - *(tmp + 1) = 0; + *(tmp + 1) = origin.y; *(tmp + 2) = i; *(tmp + 3) = table->height; }