Exemplo n.º 1
0
/* 画像を読み込む */
static bool load_images(void)
{
	const char *file;
	struct image *img;

	/* 背景を読み込んでFOレイヤに描画する */
	file = get_string_param(RETROSPECT_PARAM_BG_FILE);
	img = create_image_from_file(BG_DIR, file);
	if (img == NULL) {
		log_script_exec_footer();
		return false;
	}
	draw_image_to_fo(img);
	destroy_image(img);

	/* 前景を読み込んでFIレイヤに描画する */
	file = get_string_param(MENU_PARAM_FG_FILE);
	img = create_image_from_file(BG_DIR, file);
	if (img == NULL) {
		log_script_exec_footer();
		return false;
	}
	draw_image_to_fi(img);
	destroy_image(img);

	return true;
}
Exemplo n.º 2
0
Texture create_texture_from_file(const std::string &theFileName, bool mipmap, bool compress,
                                 GLfloat anisotropic_filter_lvl)
{
    ImagePtr img = create_image_from_file(theFileName);
    Texture ret = create_texture_from_image(img);
    return ret;
}