コード例 #1
0
ファイル: demo_3.c プロジェクト: bentoonsmurf/IN301
// Affichage d'un balle avec effet d'éclairage
void affiche_balle(struct balle B) 
{
int r,v,b,i;
int nb_step;
int dr,dv,db,dra;
POINT P;
int R;
COULEUR C;
nb_step = B.rayon*0.5;
dr = (255-B.R)/nb_step;
dv = (255-B.V)/nb_step;
db = (255-B.B)/nb_step;
dra = B.rayon/nb_step;
for (i=0;i<nb_step;i++)
	{
	r = B.R + dr*i;
	v = B.V + dv*i;
	b = B.B + db*i;
	P.x = B.centre.x + i;
	P.y = B.centre.y + i;
	R = B.rayon - dra*i;
	C = couleur_RGB(r,v,b);
	draw_fill_circle(P,R,C);
	}
}
コード例 #2
0
ファイル: affichage.c プロジェクト: Mzem/Ski
void afficheBoutonRecommencer()
{
	POINT P1 = {730,530};
	POINT P2 = {860,580};
	draw_fill_rectangle(P1,P2,couleur_RGB(38,196,236));
	draw_rectangle(P1,P2,black);
	P1.x = 737;
	P1.y = 566;
	aff_pol("RECOMMENCER",15,P1,noir);
	affiche_all();
}
コード例 #3
0
ファイル: affichage.c プロジェクト: Mzem/Ski
void afficheBoutonRecommencerSombre()
{
	POINT P1 = {730,530};
	POINT P2 = {860,580};
	draw_fill_rectangle(P1,P2,couleur_RGB(25,180,220));
	draw_rectangle(P1,P2,black);
	P1.x = 737;
	P1.y = 566;
	aff_pol("RECOMMENCER",15,P1,noir);
	affiche_all();
	attendre(150);
}