summaryrefslogtreecommitdiff
path: root/amiga/plotters.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-20 20:36:14 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-20 20:36:14 +0000
commite3af7f334303b36414c3a7c39dec22ec179dbd09 (patch)
tree43db743d171d374bc5d2ef60147e9e3a0c2e6daf /amiga/plotters.c
parentd0f7247ea67491b4bfae28cb90538b68c6f83d70 (diff)
downloadnetsurf-e3af7f334303b36414c3a7c39dec22ec179dbd09.tar.gz
netsurf-e3af7f334303b36414c3a7c39dec22ec179dbd09.tar.bz2
Abstract P96 functions away so we can decide what to use at run-time.
This allows us to avoid opening P96 on OS4.1FE in future, and not require it to be installed on OS3.
Diffstat (limited to 'amiga/plotters.c')
-rwxr-xr-xamiga/plotters.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c
index eaf775183..58aee5a90 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -18,9 +18,6 @@
#include "amiga/os3support.h"
-#ifdef __amigaos4__
-#include <proto/Picasso96API.h>
-#endif
#include <proto/exec.h>
#include <proto/intuition.h>
@@ -134,10 +131,10 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
gg->bm = AllocBitMap(width, height, depth,
BMF_INTERLEAVED | BMF_DISPLAYABLE, friend);
} else {
- gg->bm = p96AllocBitMap(width, height, 32,
+ gg->bm = ami_rtg_allocbitmap(width, height, 32,
BMF_INTERLEAVED | BMF_DISPLAYABLE, friend, RGBFB_A8R8G8B8);
}
-
+
if(!gg->bm) warn_user("NoMemory","");
gg->rp = AllocVecTagList(sizeof(struct RastPort), NULL);
@@ -167,8 +164,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
void ami_free_layers(struct gui_globals *gg)
{
- if(gg->rp)
- {
+ if(gg->rp) {
DeleteLayer(0,gg->rp->Layer);
FreeVec(gg->rp->TmpRas);
FreeVec(gg->rp->AreaInfo);
@@ -179,7 +175,7 @@ void ami_free_layers(struct gui_globals *gg)
FreeVec(gg->areabuf);
DisposeLayerInfo(gg->layerinfo);
if(palette_mapped == false) {
- p96FreeBitMap(gg->bm);
+ ami_rtg_freebitmap(gg->bm);
} else {
FreeBitMap(gg->bm);
}
@@ -550,9 +546,8 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma
#endif
}
- if((bitmap->dto == NULL) && (tbm != bitmap->nativebm))
- {
- p96FreeBitMap(tbm);
+ if((bitmap->dto == NULL) && (tbm != bitmap->nativebm)) {
+ ami_rtg_freebitmap(tbm);
}
return true;
@@ -654,7 +649,7 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
if((bitmap->dto == NULL) && (tbm != bitmap->nativebm))
{
- p96FreeBitMap(tbm);
+ ami_rtg_freebitmap(tbm);
}
#else
#warning FIXME: bitmap tiling uses backfill hooks