Example #1
0
void prueba(pp3d_rob protein, double scale){
//set_required_collisions(949);
test_collision(protein,scale);
//test_latotale(protein,scale);
//simple2(protein,scale);
//testhydrogenbonds(protein, scale);

}
Example #2
0
int nb_obstacles_around_5(Point centre, Board* b, Serpent** tab_serpent, int nb_snakes, Serpent* snake)
{
	int i, j;
	Point p;
	int res = 0;
	for (i = centre.x-2; i <= centre.x+2; i++)
	{
		for (j = centre.y-2; j <= centre.y+2; j++)
		{
			p.x = i;
			p.y = j;
			if (test_collision(b, tab_serpent, nb_snakes, p, snake->id) == 1)
			{
				res++;
			}
		}
	}
	return res;
}
Example #3
0
static void ipobble_DrawScene()
{
	char s[24];
	draw_podzilla(podzilla_bmp_var);
	me_draw(current_angle);
	draw_ball(new_ball_x, new_ball_y, new_ball_type, new_ball_type);
	draw_ball(current_ball_x, current_ball_y, current_ball_type,
						     current_ball_type);
	if(ball_firing){
		/* first 'white' the ball */
		GrSetGCForeground(ipobble_gc, WHITE);
		draw_ball(ball_x,ball_y,ball_type, -1);
		/* now test if bumping */
		if((ball_x + (float)BALL_WIDTH) >= (float)BRD_MAXX ||
				(ball_x - 2) <= (float)BRD_MINX)
			ball_vx=-ball_vx;
		ball_x+=ball_vx;
		ball_y+=ball_vy;
		/* now test if attaching */
			/* if yes set flag to test new 4s... */
		GrSetGCForeground(ipobble_gc, BLACK);
		draw_ball(ball_x,ball_y,ball_type, ball_type);
		if(test_collision()==1){
			boards_ball_draw(0);
			test_connection(level_connection);
		}
	} else {
		fire_counter--;
		if(fire_counter * DELTA_TIME % 100 == 0) {
			sprintf(s, "time: %.3d", fire_counter *
					DELTA_TIME / 100);
			GrText(ipobble_wid,ipobble_gc,
			screen_info.cols - 50, screen_info.rows -
			HEADER_TOPLINE - 15, s, -1, GR_TFASCII);
		}
		if(fire_counter <= 0)
			do_fire();
	}
}
Example #4
0
int main()
{
	test_collision();
	return 0;
}