This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
Othello/includes/plateau.h
2022-11-15 13:49:12 +01:00

41 lines
723 B
C

#ifndef OTHELLO_PLATEAU_H
#define OTHELLO_PLATEAU_H 1
#include <stdio.h>
#include <stdlib.h>
#include <GL4D/gl4dp.h>
#include <GL4D/gl4du.h>
// Position d'un point x, y
struct pos {
GLuint x, y;
};
typedef struct pos Pos;
// Plateau
struct table {
GLuint width;
GLuint height;
int nb_row;
int nb_columns;
// TODO: Use Pos ? add center to the struct?
// Need malloc for each struct
int *lines;
Uint32 color;
};
typedef struct table Table;
// Génère une structure de plateau
Table *generate_table(GLuint width, GLuint height, Pos origin, Uint32 color);
// Libère le plateau en mémoire
void free_table(Table *table);
/* Dessine le plateau */
void draw_table(Table *);
#endif