/** * load_game_graphics * * Description: * Loads all of the game graphics * * Returns: * TRUE on success FALSE otherwise **/ gboolean load_game_graphics (void) { gchar *themedir, *filename; if (theme_preimage != NULL) { free_game_graphics (); } themedir = g_build_filename (DATA_DIRECTORY, "themes", NULL); filename = games_find_similar_file (properties_theme_name (), themedir); theme_preimage = games_preimage_new_from_file (filename, NULL); g_free (filename); if (theme_preimage == NULL) { filename = games_find_similar_file ("robots", themedir); theme_preimage = games_preimage_new_from_file (filename, NULL); g_free (filename); } g_free (themedir); if (!load_bubble_graphics ()) return FALSE; rerender_needed = TRUE; return TRUE; }
/** * load_game_graphics * * Description: * Loads all of the game graphics * * Returns: * TRUE on success FALSE otherwise **/ gboolean load_game_graphics (void) { gchar *filename; const char *pixmapdir; if (theme_preimage != NULL) { free_game_graphics (); } pixmapdir = games_runtime_get_directory (GAMES_RUNTIME_GAME_PIXMAP_DIRECTORY); filename = games_find_similar_file (properties_theme_name (), pixmapdir); theme_preimage = games_preimage_new_from_file (filename, NULL); g_free (filename); if (theme_preimage == NULL) { filename = games_find_similar_file ("robots", pixmapdir); theme_preimage = games_preimage_new_from_file (filename, NULL); g_free (filename); } if (!load_bubble_graphics ()) return FALSE; rerender_needed = TRUE; return TRUE; }