Adapt colors to the general theme of the game
This commit is contained in:
parent
12ce28ec38
commit
4929b44b87
1 changed files with 3 additions and 3 deletions
6
window.c
6
window.c
|
@ -168,7 +168,7 @@ void idle(void) {
|
||||||
|
|
||||||
/*!\brief la fonction appelée à chaque display. */
|
/*!\brief la fonction appelée à chaque display. */
|
||||||
void draw(void) {
|
void draw(void) {
|
||||||
vec4 couleurPlateau = {0.20, 0.20, 0.20, 1}, g = {0, 1, 0, 1}, b = {0, 0, 1, 1};
|
vec4 couleurPlateau = {0.2, 0.2, 0.2, 1} /* Gris */, couleurHerosA = {0.15, 0.5, 0.15, 1} /* Vert */, couleurHerosB = {0.2, 0.2, 0.7, 1} /* Bleu */;
|
||||||
|
|
||||||
/* on va récupérer le delta-temps */
|
/* on va récupérer le delta-temps */
|
||||||
static double t0 = 0.0; // le temps à la frame précédente
|
static double t0 = 0.0; // le temps à la frame précédente
|
||||||
|
@ -217,14 +217,14 @@ void draw(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* on dessine le héros A */
|
/* on dessine le héros A */
|
||||||
_cube->dcolor = g;
|
_cube->dcolor = couleurHerosA;
|
||||||
memcpy(nmv, model_view_matrix, sizeof nmv);
|
memcpy(nmv, model_view_matrix, sizeof nmv);
|
||||||
translate(nmv, _herosA.x, _herosA.y, _herosA.z);
|
translate(nmv, _herosA.x, _herosA.y, _herosA.z);
|
||||||
scale(nmv, _cubeSize / 2.0f, _cubeSize / 2.0f, _cubeSize / 2.0f);
|
scale(nmv, _cubeSize / 2.0f, _cubeSize / 2.0f, _cubeSize / 2.0f);
|
||||||
transform_n_rasterize(_cube, nmv, projection_matrix);
|
transform_n_rasterize(_cube, nmv, projection_matrix);
|
||||||
|
|
||||||
/* on dessine le héros B */
|
/* on dessine le héros B */
|
||||||
_cube->dcolor = b;
|
_cube->dcolor = couleurHerosB;
|
||||||
memcpy(nmv, model_view_matrix, sizeof nmv);
|
memcpy(nmv, model_view_matrix, sizeof nmv);
|
||||||
translate(nmv, _herosB.x, _herosB.y, _herosB.z);
|
translate(nmv, _herosB.x, _herosB.y, _herosB.z);
|
||||||
scale(nmv, _cubeSize / 2.0f, _cubeSize / 2.0f, _cubeSize / 2.0f);
|
scale(nmv, _cubeSize / 2.0f, _cubeSize / 2.0f, _cubeSize / 2.0f);
|
||||||
|
|
Reference in a new issue