From c456153e902177da27d99fc3baca4fcd89f6de6c Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 10 Aug 2012 18:05:22 +0100 Subject: Correct byte order - is RGBA not ARGB Fix mask offset calculation --- amiga/bitmap.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'amiga/bitmap.c') diff --git a/amiga/bitmap.c b/amiga/bitmap.c index 4d20fb4d1..db5424502 100644 --- a/amiga/bitmap.c +++ b/amiga/bitmap.c @@ -1,5 +1,5 @@ /* - * Copyright 2008, 2009 Chris Young + * Copyright 2008, 2009, 2012 Chris Young * * This file is part of NetSurf, http://www.netsurf-browser.org/ * @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#define AMI_CUSTOM_MASK 1 + #include "amiga/os3support.h" #include "assert.h" @@ -230,7 +232,7 @@ bool bitmap_test_opaque(void *bitmap) for(a=0;anative_mask = AllocRaster(width, height); + for(int i=0; i<(height * (width / 8)); i++) { + bitmap->native_mask[i] = 0; + } + for(y=0; ynative_mask[(y*4) + (x/8)] = - (bitmap->native_mask[(y*4) + (x/8)] << 1) | maskbit; + bitmap->native_mask[(y*(width/8)) + (x/8)] = + (bitmap->native_mask[(y*(width/8)) + (x/8)] << 1) | maskbit; } } -- cgit v1.2.3