int cycling(void) { unsigned int cycles_passed; int win; win = 0; cycles_passed = 0; while (g_vm->cycle_to_die > 0 && check_players_process() > 0 && (g_vm->dump == 0 || g_vm->cycle <= g_vm->d_cycles)) { process(); cycles_passed = check_destruction_process(cycles_passed); if (!check_players_process()) break ; g_vm->cycle++; cycles_passed++; } if (g_vm->dump == 1 && g_vm->cycle > g_vm->d_cycles) ft_dump(); else { if (g_vm->last_live != -1) win = g_vm->last_live; ft_printf("Contestant %d, \"%s\", has won !\n", g_vm->champion[win]->num, g_vm->champion[win]->name); } return (0); }
static int unfwcf(int fd, const char *dir) { char *udata; if ((udata = fwcf_unpack(fd, NULL))) { if (do_dump) ft_dump(udata); else ft_creatm(udata, dir); } return (udata != NULL ? 0 : 1); }