www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8987775eefe783f6bdf782dbfbef1ee2939d4043
parent 0d38570ff3b203262c7b767329d39a315a4e5b28
Author: Yoann <yoann.b87@voila.fr>
Date:   Thu,  6 Oct 2011 14:02:08 +0200

Merge de display.h
Merge branch 'master' of
https://github.com/jsmaniac/2011-m2s3-city-builder

Conflicts:
	display.h

Diffstat:
Mdisplay.c | 13+++++++++++--
Mdisplay.h | 9---------
2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/display.c b/display.c @@ -61,8 +61,17 @@ int mainLoop() { case SDLK_d: xCamera+=moveDist; break; + case SDLK_DOWN: + ySight -= moveDist; + break; case SDLK_UP: - xAngle += 16; + ySight += moveDist; + break; + case SDLK_LEFT: + xSight -= moveDist; + break; + case SDLK_RIGHT: + xSight += moveDist; break; default: @@ -107,7 +116,7 @@ void renderScene() { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); //gluLookAt(1024,512,1356,1024,512,0,0,1,0); - gluLookAt(xCamera,yCamera,zCamera,xSight,ySight,zSight,0,1,0); + gluLookAt(xCamera,yCamera,zCamera,xCamera+xSight,yCamera+ySight,zCamera+zSight,0,1,0); //glClearColor(1,1,1,1); // pour un fond blanc glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) ; diff --git a/display.h b/display.h @@ -17,12 +17,3 @@ int *vertices; int windowWidth = 1024; int nbVertex = 0; int windowHeight = 768; -int xCamera = 256; -int yCamera = 100; -int zCamera = 400; -int xSight = 256; -int ySight = 128; -int zSight = 0; -int yAngle = 0; -int xAngle = 0; -int moveDist = 16;