summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'amiga')
-rw-r--r--amiga/bitmap.c18
-rwxr-xr-xamiga/plotters.c5
2 files changed, 14 insertions, 9 deletions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 53de5cf4f..4d20fb4d1 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -125,9 +125,9 @@ void bitmap_destroy(void *bitmap)
if(bm->dto) {
DisposeDTObject(bm->dto);
}
-
+#ifdef AMI_CUSTOM_MASK
if(bm->native_mask) FreeRaster(bm->native_mask, bm->width, bm->height);
-
+#endif
FreeVec(bm->pixdata);
bm->pixdata = NULL;
bm->nativebm = NULL;
@@ -178,8 +178,9 @@ void bitmap_modified(void *bitmap) {
p96FreeBitMap(bm->nativebm);
if(bm->dto) DisposeDTObject(bm->dto);
+#ifdef AMI_CUSTOM_MASK
if(bm->native_mask) FreeRaster(bm->native_mask, bm->width, bm->height);
-
+#endif
bm->nativebm = NULL;
bm->dto = NULL;
bm->native_mask = NULL;
@@ -485,7 +486,7 @@ static PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int width, int height
if(bitmap->native_mask) return bitmap->native_mask;
bitmap->native_mask = AllocRaster(width, height);
-
+
for(y=0; y<height; y++) {
for(x=0; x<width; x++) {
if ((*bmi & 0xff000000U) == 0x00000000U) maskbit = 1;
@@ -535,14 +536,17 @@ static struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap,
GetDTAttrs(bitmap->dto,
PDTA_DestBitMap, &dtbm,
- //PDTA_MaskPlane, &bitmap->native_mask,
+#ifndef AMI_CUSTOM_MASK
+ PDTA_MaskPlane, &bitmap->native_mask,
+#endif
TAG_END);
bitmap->nativebmwidth = width;
bitmap->nativebmheight = height;
-
+
+#ifdef AMI_CUSTOM_MASK
ami_bitmap_get_mask(bitmap, width, height);
-
+#endif
return dtbm;
}
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 721596f02..941587ed0 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -154,10 +154,11 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
gg->tmprasbuf = AllocVec(width * height, MEMF_PRIVATE | MEMF_CLEAR);
if(palette_mapped == true) {
- gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED, friend);
+ gg->bm = AllocBitMap(width, height, depth,
+ BMF_INTERLEAVED | BMF_DISPLAYABLE, friend);
} else {
gg->bm = p96AllocBitMap(width, height, 32,
- BMF_INTERLEAVED, friend, RGBFB_A8R8G8B8);
+ BMF_INTERLEAVED | BMF_DISPLAYABLE, friend, RGBFB_A8R8G8B8);
}
if(!gg->bm) warn_user("NoMemory","");