use origin

This commit is contained in:
Mylloon 2022-11-15 09:20:13 +01:00
parent 628ccf948c
commit caa56946d0
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 2 additions and 5 deletions

View file

@ -17,7 +17,6 @@ typedef struct pos Pos;
struct table {
GLuint width;
GLuint height;
Pos origin;
int nb_row;
int nb_columns;

View file

@ -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;
}