Correction du conflit du commit précédent.

This commit is contained in:
Georges Dupéron 2012-01-20 10:34:18 +01:00
parent 9bda8b0370
commit 9e4d09581f
2 changed files with 22 additions and 45 deletions

View File

@ -5,10 +5,11 @@ Minimal requirements
* `libsdl-dev`
* `libglew-dev`
* `freeglut3-dev`
* `libsdl-image1.2-dev`
The following command should install the required packages on ubuntu.
sudo apt-get install build-essential libsdl-dev libglew-dev freeglut3-dev
sudo apt-get install build-essential libsdl-dev libglew-dev freeglut3-dev libsdl-image1.2-dev
How to run this program ?
=========================

View File

@ -268,50 +268,26 @@ void Camera::keyboard(const SDL_KeyboardEvent &eventKey) {
break;
default :
switch(SDL_GetKeyName(eventKey.keysym.sym)[0]) {
case 'q':
exit(0);
break;
case 's':
if (eventKey.type != SDL_KEYDOWN) break;
moveSensitivity = std::min(50000,std::max(moveSensitivity+1, moveSensitivity*10/9));
break;
case 'x':
if (eventKey.type != SDL_KEYDOWN) break;
moveSensitivity = std::max(10, moveSensitivity*9/10);
break;
case 'p': // _Print _Position
if (eventKey.type != SDL_KEYDOWN) break;
std::cout << *this << std::endl;
break;
case SDLK_PAGEDOWN:
pageDown = (eventKey.type == SDL_KEYDOWN);
break;
case SDLK_ESCAPE:
exit(0);
break;
default :
switch(SDL_GetKeyName(eventKey.keysym.sym)[0]) {
case 'q':
exit(0);
break;
case 's':
if (eventKey.type != SDL_KEYDOWN) break;
moveSensitivity = std::min(50000,std::max(moveSensitivity+1, moveSensitivity*10/9));
break;
case 'x':
if (eventKey.type != SDL_KEYDOWN) break;
moveSensitivity = std::max(10, moveSensitivity*9/10);
break;
case 'p': // _Print _Position
if (eventKey.type != SDL_KEYDOWN) break;
std::cout << *this << std::endl;
break;
case 't':
takeScreenshot("123.bmp");
break;
default:
break;
}
case 'q':
exit(0);
break;
case 's':
if (eventKey.type != SDL_KEYDOWN) break;
moveSensitivity = std::min(50000,std::max(moveSensitivity+1, moveSensitivity*10/9));
break;
case 'x':
if (eventKey.type != SDL_KEYDOWN) break;
moveSensitivity = std::max(10, moveSensitivity*9/10);
break;
case 'p': // _Print _Position
if (eventKey.type != SDL_KEYDOWN) break;
std::cout << *this << std::endl;
break;
case 't':
takeScreenshot("123.bmp");
break;
default:
break;
}
break;
}