diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-10 23:10:05 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-10 23:10:05 +0000 |
commit | 80558b3116c911f06ae7d482c226865b55feacea (patch) | |
tree | 478d04168b31f3164c5830fce6f4d1251fa82a12 /amiga/bitmap.c | |
parent | 3630d7348de4ddaf5bd01ce2a7eb9dd81b0f6af4 (diff) | |
download | netsurf-80558b3116c911f06ae7d482c226865b55feacea.tar.gz netsurf-80558b3116c911f06ae7d482c226865b55feacea.tar.bz2 |
Use a function to create ready-cleared memory
Diffstat (limited to 'amiga/bitmap.c')
-rw-r--r-- | amiga/bitmap.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c index 90f89e9d3..e7bd72ce4 100644 --- a/amiga/bitmap.c +++ b/amiga/bitmap.c @@ -40,6 +40,7 @@ #include "amiga/gui.h" #include "amiga/bitmap.h" #include "amiga/download.h" +#include "amiga/misc.h" /** * Create a bitmap. @@ -54,13 +55,10 @@ void *bitmap_create(int width, int height, unsigned int state) { struct bitmap *bitmap; - bitmap = AllocVecTags(sizeof(struct bitmap), AVT_ClearWithValue, 0, TAG_DONE); + bitmap = ami_misc_allocvec_clear(sizeof(struct bitmap), 0); if(bitmap) { - bitmap->pixdata = AllocVecTags(width*height*4, - AVT_Type,MEMF_PRIVATE, - AVT_ClearWithValue,0xff, - TAG_DONE); + bitmap->pixdata = ami_misc_allocvec_clear(width*height*4, 0xff); bitmap->width = width; bitmap->height = height; @@ -378,7 +376,7 @@ struct bitmap *ami_bitmap_from_datatype(char *filename) bm_format, bitmap_get_rowstride(bm), 0, 0, bmh->bmh_Width, bmh->bmh_Height); #ifndef __amigaos4__ - ami_bitmap_argb_to_rgba(bitmap); + ami_bitmap_argb_to_rgba(bm); #endif bitmap_set_opaque(bm, bitmap_test_opaque(bm)); } |