Beispiel #1
0
int main_menu_render()
{
	memcpy(get_program_secondary_buf(),get_background()->color,get_vram_size());
	//draw_cursor(get_program_secondary_buf(),cursor);
	draw_cursor(get_program_secondary_buf(),get_cursor());
	size_t i;
	for(i = 0; i < NUM_MAIN_MENU_BUTTONS-1; i++)
	{
		draw_button_t_centered(main_menu_buttons[i]);
	}
	draw_name_button_t(main_menu_buttons[i]);

	printgr_shade_centered(get_program_secondary_buf(),"O",get_v_res()/2-325, 0.75,0xFFFF,5,5, .1, 10);
	printgr_shade(get_program_secondary_buf(),"2",get_h_res()/2+35, get_v_res()/2-215, 0.75,0xFFFF,5,5, .1,9);
	if(*get_date_str_ptr() != NULL)
		printgr_shade_centered(get_program_secondary_buf(),*get_date_str_ptr(),0, 0.75,0xFFFF,5,5, .1, 1);
	if(darken > 0)
		darken_buf(get_program_secondary_buf(),darken);
	if(darken > 0 && !fade_condition)
	{
		darken-= FADE_RATE;
	}
	if(fade_condition)
	{
		if(darken <= 127)
		{
			darken += FADE_RATE;
		}
		else
		{
			if(function_to_call == NULL)
				continue_condition = false;
			else
			{
				fade_condition = false;
				function_to_call();
				if(main_menu_buttons[3] != NULL)
					free (main_menu_buttons[3]);
				main_menu_buttons[3] = initialize_button_t(to_coord_t(10,get_v_res()-get_line_space(2)),get_program_playername(), get_player_name, 2, 0.9);
				main_menu_buttons[3]->pos.x = 10;
				function_to_call = NULL;
			}
		}
	}
	copy_video_buffer(get_program_video_mem(), get_program_secondary_buf());
	return 0;
}
Beispiel #2
0
  Forall_goto_functions(f_it, goto_functions)
  {
    // don't instrument our internal functions
    if(has_prefix(id2string(f_it->first), CPROVER_PREFIX))
      continue;

    // don't instrument the function to be called,
    // or otherwise this will be recursive
    if(f_it->first==id)
      continue;

    // patch in a call to `id' at the entry point
    goto_programt &body=f_it->second.body;

    goto_programt::targett t=
      body.insert_before(body.instructions.begin());
    t->make_function_call(
      function_to_call(symbol_table, id, f_it->first));
    t->function=f_it->first;
  }