- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
void Mouse(int button, int state, int x, int y)
{
if ((button==GLUT_LEFT_BUTTON) && (state==GLUT_DOWN))
{
y=WIN_HEIGHT-1-y;
if (y<233)
{
if ((field[x/26][y/26]).busy)
{
begin_trace_x=x/26;
begin_trace_y=y/26;
}
else
if ((begin_trace_x!=-1)&&(begin_trace_y!=-1))
{
end_trace_x=x/26;
end_trace_y=y/26;
if (!checkField())
game_over=true;
else
if (findTrace())
{
moveBall();
if (!countScore())
{
throwBalls();
countScore();
}
}
}
}
glutPostRedisplay();
}
}
Вот. Игрушку Lines писал когда-то.
guest 02.07.2009 02:18 # +1
throw balls...:)