Ejemplo n.º 1
0
void draw_apache_upfront_display_on_cockpit (float x_org, float y_org)
{
	if (lock_screen (active_screen))
	{
		display_messages (x_org, y_org);

		unlock_screen (active_screen);
	}
}
Ejemplo n.º 2
0
void draw_apache_upfront_display_on_texture (void)
{
	set_active_screen (texture_screen);

	if (lock_screen (texture_screen))
	{
		set_block (0, 0, 127, 127, clear_colour);

		display_messages (0.0, 0.0);

		flush_screen_texture_graphics (texture_screen);

		unlock_screen (texture_screen);
	}

	set_active_screen (video_screen);
}
Ejemplo n.º 3
0
Archivo: jeu.c Proyecto: BullPaf/Pacman
/*Fonction du jeu*/
void jouer(Pacman *pac, Fantome *ftm, Input in, config *cfg, int level, score_message **msg_list)
{
	int i;
	SDL_Delay(DELAY);
	set_pac_target(pac); //Cherche l'endroit ou aller pour pacman
	//Fonction de déplacement de pacman
	pac->controllerFonction(in, *cfg, pac->controlled_by, &(pac->position), &(pac->cur_direction), &(pac->nb_keys), &(pac->speed), &(pac->num_image), pac->target);
	for(i=0; i<NB_GHOST; i++)
	{
		set_ftm_target(ftm+i, pac->position);
		ftm[i].controllerFonction(in, *cfg, ftm[i].controlled_by, &(ftm[i].position), &(ftm[i].cur_direction), &(ftm[i].nb_keys), &(ftm[i].speed), &(ftm[i].num_image), ftm[i].target);
	}
	updatePacman(pac);
	updateGhosts(ftm);
	SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 0, 0, 0));
	draw_level();
	draw_pac_infos(pac);
	draw_score(pac->score, level);
	affiche_pacman(pac);
	affiche_fantomes(ftm);
	action(pac, ftm, msg_list);
	display_messages(msg_list);
	SDL_Flip(screen);
}