From dba846b5b84533cf940086312db2c596ebe3214e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 3 Oct 2013 16:56:05 +0100 Subject: Remove unused function. --- riscos/bitmap.c | 48 ------------------------------------------------ riscos/bitmap.h | 1 - 2 files changed, 49 deletions(-) (limited to 'riscos') diff --git a/riscos/bitmap.c b/riscos/bitmap.c index 0af01c91e..9e808c7b1 100644 --- a/riscos/bitmap.c +++ b/riscos/bitmap.c @@ -207,54 +207,6 @@ void *bitmap_create(int width, int height, unsigned int state) } -/** - * Create a persistent, opaque bitmap from a file reference. - * - * \param file the file containing the image data - * \return an opaque struct bitmap, or NULL on memory exhaustion - */ - -struct bitmap *bitmap_create_file(char *file) -{ - struct bitmap *bitmap; - char *r; - fileswitch_object_type obj_type; - os_error *error; - - if (file[0] == '\0') - return NULL; - - /* check the file exists */ - sprintf(bitmap_unixname, "%s/%s", TEMP_FILENAME_PREFIX, file); - r = __riscosify(bitmap_unixname, 0, __RISCOSIFY_NO_SUFFIX, - bitmap_filename, 256, 0); - if (r == 0) { - LOG(("__riscosify failed")); - return NULL; - } - error = xosfile_read_stamped_no_path(bitmap_filename, - &obj_type, 0, 0, 0, 0, 0); - if ((error) || (obj_type != fileswitch_IS_FILE)) - return NULL; - - if (!filename_claim(file)) - return NULL; - bitmap = calloc(1, sizeof(struct bitmap)); - if (!bitmap) - return NULL; - bitmap->state = BITMAP_OPAQUE | BITMAP_PERSISTENT | BITMAP_READY; - strcpy(bitmap->filename, file); - - /* link in at the head */ - if (bitmap_head) { - bitmap->next = bitmap_head; - bitmap_head->previous = bitmap; - } - bitmap_head = bitmap; - return bitmap; -} - - /** * Overlay a sprite onto the given bitmap * diff --git a/riscos/bitmap.h b/riscos/bitmap.h index b6fd3ae45..1253830cc 100644 --- a/riscos/bitmap.h +++ b/riscos/bitmap.h @@ -42,7 +42,6 @@ struct bitmap { }; -struct bitmap *bitmap_create_file(char *file); void bitmap_overlay_sprite(struct bitmap *bitmap, const osspriteop_header *s); void bitmap_initialise_memory(void); void bitmap_quit(void); -- cgit v1.2.3