t_bunny_response refresh_my_game(void *data) { t_lapin *lapin; lapin = data; bunny_set_key_response(&key); bunny_set_click_response(&mouse); mouse_position(lapin); blit_to_window(lapin->window_1, lapin->pixelarray_1); size_bar(lapin->window_1, lapin->font, 50, 0); print_bar(lapin); if (lapin->save == 1) { save_bitmap(lapin->str, lapin->pixelarray_2); return (EXIT_SUCCESS); } else if (lapin->save == 2) { save_file_ftn(lapin->pixelarray_2, lapin->str); return (EXIT_SUCCESS); } return (GO_ON); }
void palette_reset(t_palette *palette) { bunny_set_click_response(on_win_click); bunny_set_loop_main_function((t_bunny_loop)main_loop); palette->win = NULL; }