예제 #1
0
t_bunny_response	loop(void *data)
{
  t_wolf		*wolf;
  t_bunny_position	pos;

  wolf = (t_wolf*) data;
  if (keys_manager(wolf) == EXIT_ON_SUCCESS)
    return (EXIT_ON_SUCCESS);
  pos.x = 1920 - 1470;
  pos.y = 1080 - 550;
  make_bg(wolf->rendu);
  if (wolf->left_click == 1)
    background_manager(wolf);
  music_manager(wolf);
  walls_manager(wolf);
  minimap_manager(wolf);
  angle_minimap(wolf);
  if (wolf->left_click == 0)
    add_pix_pos(wolf, wolf->weapon, &pos);
  else
    add_pix_pos(wolf, wolf->no_light, &pos);
  viseur_maker(wolf);
  wolf->snow_move = 0;
  bunny_blit(&wolf->win->buffer,
	     &wolf->rendu->clipable, NULL);
  bunny_display(wolf->win);
  return (GO_ON);
}
예제 #2
0
int main(int argc, char *argv[])
{
    Fl_Renderer::system_init();
    Fl::args(argc, argv);

    //////////////////////////////
    // Bouncing ball...
    Fl_Image *bb_bg, *bb;
    bb_bg = make_bg(200,200);
    bb = make_ball(35);

    if(bb_bg && bb) {
        BBWin bwin(bb_bg, bb);
        bwin.resizable(bwin);
        Fl::add_timeout(0.1f, bb_timeout, (void *)&bwin);

        //////////////////////////////

        bwin.show();
        while(bwin.visible()) {
            Fl::wait();
        }

        delete bb_bg;
        delete bb;
    }
    return 0;
}
예제 #3
0
파일: ft_mlx.c 프로젝트: Wouterbeets/wolf32
int		expose_hook(t_data *d)
{
	get_user_pos(d);
	make_bg(d);
	add_walls(d);
	mlx_put_image_to_window(d->mlx, d->win, d->bg->ptr, 0, 0);
	return (0);
}