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

43 lines
739 B
C
Raw Normal View History

2022-11-14 23:55:36 +01:00
#ifndef OTHELLO_PLATEAU_H
#define OTHELLO_PLATEAU_H 1
#include <GL4D/gl4dp.h>
#include <GL4D/gl4du.h>
#include <stdio.h>
#include <stdlib.h>
// Position d'un point x, y
struct pos {
GLuint x, y;
};
typedef struct pos Pos;
// Plateau
struct table {
GLuint width;
GLuint height;
Pos origin;
int nb_row;
int nb_columns;
2022-11-15 00:01:03 +01:00
// TODO: Use Pos ? add center to the struct?
// Need malloc for each struct
2022-11-14 23:55:36 +01:00
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