Added escape key

This commit is contained in:
JackCarterSmith 2018-06-27 23:54:21 +02:00
parent 0d3db97ee7
commit 2ab8930c23
2 changed files with 5 additions and 2 deletions

View File

@ -136,6 +136,9 @@ int getKeyEvent()
return -1;
case SDL_KEYUP:
switch(event.key.keysym.sym) { //La valeur de touche
case SDLK_ESCAPE:
printf("ESCAPE KEY\n");
return -1;
case SDLK_UP:
printf("FLECHE DU HAUT\n");
return 1;

View File

@ -11,8 +11,8 @@
/*
* Generator tiles spawn rate (in percent)
*/
#define ROCK_GEN_RATE 30
#define TREE_GEN_RATE 25
#define ROCK_GEN_RATE 28
#define TREE_GEN_RATE 22
#define WATER_GEN_RATE 8
#define GOLD_GEN_RATE 10