예제 #1
0
void initialize_sound_callback(Sprite *) {
   if (initialize_sound()) {
      tt_sound_option = 3; // restore this
   } else {
		tt_sound_option = 0;
	};
};
/**
 * @brief Fills the fields from the existing entity.
 */
void EditEntityDialog::initialize() {

  initialize_simple_booleans();
  initialize_simple_integers();
  initialize_simple_strings();

  initialize_behavior();
  initialize_breed();
  initialize_damage_on_enemies();
  initialize_destination();
  initialize_destination_map();
  initialize_direction();
  initialize_font();
  initialize_ground();
  initialize_layer();
  initialize_maximum_moves();
  initialize_model();
  initialize_name();
  initialize_opening_method();
  initialize_rank();
  initialize_savegame_variable();
  initialize_size();
  initialize_sound();
  initialize_sprite();
  initialize_subtype();
  initialize_transition();
  initialize_treasure();
  initialize_type();
  initialize_weight();
  initialize_xy();

  adjustSize();
}
예제 #3
0
파일: jukebox.c 프로젝트: msikma/ceegee
/**
 * Switches to graphics mode, installs Allegro drivers and initializes
 * variables used by the jukebox.
 */
void initialize_jukebox() {
    // Switch to graphics mode.
    initialize_allegro();
    screen_gfx_mode();
    initialize_sound();
    load_flim_dat();

    // Prepare for the jukebox loop.
    buffer = create_bitmap(SCREEN_W, SCREEN_H);
    RGB *pal = get_starfield_palette();
    add_flim_palette_colors(pal);
    set_palette(pal);
    free(pal);
    font_height = FLIM_HEIGHT;
    help_text_x = SCREEN_W / 2;
    help_text_y1 = SCREEN_H - (font_height * 5) - (font_height / 2);
    help_text_y2 = SCREEN_H - (font_height * 4) - (font_height / 2);
    help_text_y3 = SCREEN_H - (font_height * 3);
    help_text_y4 = SCREEN_H - (font_height * 2);
}