static void initGame(JNIEnv *env, jclass classz) { real_game.random_seed = time(NULL); /* Load card designs */ read_cards(); /* Load card images */ // done in Java onCreate() //load_images(); /* Read preference file */ read_prefs(); apply_options(); /* Create choice logs for each player */ int i; for (i = 0; i < MAX_PLAYER; i++) { /* Create log */ real_game.p[i].choice_log = (int *)malloc(sizeof(int) * 4096); /* Save original log */ orig_log[i] = real_game.p[i].choice_log; /* Create history of log sizes */ real_game.p[i].choice_history = (int*)malloc(sizeof(int) * 512); /* Save original history */ orig_history[i] = real_game.p[i].choice_history; /* Clear choice log size and position */ real_game.p[i].choice_size = 0; real_game.p[i].choice_pos = 0; } reset_gui(); modify_gui(); // adjust for the number of players /* Start new game */ restart_loop = RESTART_NEW; run_game(); }
static void reset_clocks(struct atyfb_par *par, struct pll_ct *pll, int hsync_enb) { reset_gui(par); aty_st_pll(MCLK_FB_DIV, pll->mclk_fb_div, par); aty_st_pll(SCLK_FB_DIV, pll->sclk_fb_div, par); mdelay(15); init_dll(par); aty_st_8(GEN_TEST_CNTL+1, 0x00, par); mdelay(5); aty_st_8(CRTC_GEN_CNTL+3, 0x04, par); mdelay(6); reset_sdram(par); aty_st_8(CRTC_GEN_CNTL+3, hsync_enb ? 0x00 : 0x04, par); aty_st_pll(SPLL_CNTL2, pll->spll_cntl2, par); aty_st_pll(PLL_GEN_CNTL, pll->pll_gen_cntl, par); aty_st_pll(PLL_VCLK_CNTL, pll->pll_vclk_cntl, par); }
void setup_gui() { reset_gui(); }