erebus

diff src/main.cc @ 10:506e114b7ca2

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 17:43:46 +0300
parents d38e13d6063c
children 20d6c05529f1
line diff
     1.1 --- a/src/main.cc	Sat May 24 17:22:53 2014 +0300
     1.2 +++ b/src/main.cc	Sat May 24 17:43:46 2014 +0300
     1.3 @@ -178,42 +178,42 @@
     1.4  		break;
     1.5  	}
     1.6  
     1.7 -	if(erb_input_keyboard(key, true)) {
     1.8 +	if(erb_input_keyboard(erb, key, true)) {
     1.9  		glutPostRedisplay();
    1.10  	}
    1.11  }
    1.12  
    1.13  static void keyb_up(unsigned char key, int x, int y)
    1.14  {
    1.15 -	if(erb_input_keyboard(key, false)) {
    1.16 +	if(erb_input_keyboard(erb, key, false)) {
    1.17  		glutPostRedisplay();
    1.18  	}
    1.19  }
    1.20  
    1.21  static void mouse(int bn, int st, int x, int y)
    1.22  {
    1.23 -	if(erb_input_mouse_button(bn - GLUT_LEFT_BUTTON, st == GLUT_DOWN, x, y)) {
    1.24 +	if(erb_input_mouse_button(erb, bn - GLUT_LEFT_BUTTON, st == GLUT_DOWN, x, y)) {
    1.25  		glutPostRedisplay();
    1.26  	}
    1.27  }
    1.28  
    1.29  static void motion(int x, int y)
    1.30  {
    1.31 -	if(erb_input_mouse_move(x, y)) {
    1.32 +	if(erb_input_mouse_move(erb, x, y)) {
    1.33  		glutPostRedisplay();
    1.34  	}
    1.35  }
    1.36  
    1.37  static void sball_button(int bn, int state)
    1.38  {
    1.39 -	if(erb_input_6dof_button(bn, state == GLUT_DOWN)) {
    1.40 +	if(erb_input_6dof_button(erb, bn, state == GLUT_DOWN)) {
    1.41  		glutPostRedisplay();
    1.42  	}
    1.43  }
    1.44  
    1.45  static void sball_motion(int x, int y, int z)
    1.46  {
    1.47 -	if(erb_input_6dof_motion(x / 65536.0, y / 65536.0, z / 65536.0)) {
    1.48 +	if(erb_input_6dof_motion(erb, x / 65536.0, y / 65536.0, z / 65536.0)) {
    1.49  		glutPostRedisplay();
    1.50  	}
    1.51  }