conworlds

diff src/game.cc @ 20:782ff06817fb

merged ...
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 26 Aug 2014 18:42:53 +0300
parents e4257df067a1 c814f77d177e
children
line diff
     1.1 --- a/src/game.cc	Tue Aug 26 18:40:23 2014 +0300
     1.2 +++ b/src/game.cc	Tue Aug 26 18:42:53 2014 +0300
     1.3 @@ -176,7 +176,7 @@
     1.4  	setup_rtarg(rtwidth, rtheight);
     1.5  }
     1.6  
     1.7 -void game_keyboard(int key, bool pressed, int x, int y)
     1.8 +void game_keyboard(int key, bool pressed)
     1.9  {
    1.10  	if(pressed) {
    1.11  		switch(key) {
    1.12 @@ -338,12 +338,12 @@
    1.13  }
    1.14  
    1.15  static void draw_pyramid(float basesz, float height)
    1.16 -{
    1.17 -	float hsz = basesz / 2.0;
    1.18 -	float theta = atan(hsz / height);
    1.19 -	float nx = cos(theta);
    1.20 -	float ny = sin(theta);
    1.21 -
    1.22 +{
    1.23 +	float hsz = basesz / 2.0;
    1.24 +	float theta = atan(hsz / height);
    1.25 +	float nx = cos(theta);
    1.26 +	float ny = sin(theta);
    1.27 +
    1.28  	glBegin(GL_TRIANGLES);
    1.29  	glNormal3f(0, ny, nx);
    1.30  	glVertex3f(-hsz, 0, hsz);
    1.31 @@ -362,4 +362,4 @@
    1.32  	glVertex3f(-hsz, 0, hsz);
    1.33  	glVertex3f(0, height, 0);
    1.34  	glEnd();
    1.35 -}
    1.36 \ No newline at end of file
    1.37 +}