From 55f2ab8c3dfd7fa412261fc46a2ce643b5962257 Mon Sep 17 00:00:00 2001 From: jmcmullan Date: Sat, 16 Feb 2013 00:00:14 +0000 Subject: [PATCH] planarbm: Detab Signed-off-by: Jason S. McMullan git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46615 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/hidds/graphics/planarbm.c | 596 +++++++++++++++++++++--------------------- 1 file changed, 298 insertions(+), 298 deletions(-) diff --git a/rom/hidds/graphics/planarbm.c b/rom/hidds/graphics/planarbm.c index 4a0c701fa9..207ff57c98 100644 --- a/rom/hidds/graphics/planarbm.c +++ b/rom/hidds/graphics/planarbm.c @@ -31,17 +31,17 @@ /***************************************************************************************** NAME - --background_planarbm-- + --background_planarbm-- LOCATION - hidd.graphics.bitmap.planarbm + hidd.graphics.bitmap.planarbm NOTES - This is a class representing a planar Amiga(tm) bitmap in AROS graphics subsystem. + This is a class representing a planar Amiga(tm) bitmap in AROS graphics subsystem. - When you create an object of this class, an associated planar bitmap will be created. - However, it's possible to use this class with pre-existing bitmaps, making them - available to the graphics HIDD subsystem. + When you create an object of this class, an associated planar bitmap will be created. + However, it's possible to use this class with pre-existing bitmaps, making them + available to the graphics HIDD subsystem. *****************************************************************************************/ @@ -57,20 +57,20 @@ hidd.graphics.bitmap.planarbm FUNCTION - Set this attribute to FALSE if you want to create an empty bitmap object containing - no bitmap data. Useful if you want to create an empty object to be associated with - existing bitmap later. + Set this attribute to FALSE if you want to create an empty bitmap object containing + no bitmap data. Useful if you want to create an empty object to be associated with + existing bitmap later. NOTES - This attribute is obsolete. It's equal to supplying aoHidd_PlanarBM_BitMap attribute - with a NULL value. + This attribute is obsolete. It's equal to supplying aoHidd_PlanarBM_BitMap attribute + with a NULL value. EXAMPLE BUGS SEE ALSO - aoHidd_PlanarBM_BitMap + aoHidd_PlanarBM_BitMap INTERNALS @@ -88,19 +88,19 @@ hidd.graphics.bitmap.planarbm FUNCTION - Allows to specify or retrieve a raw planar bitmap structure associated with the object. - Useful for direct access to the bitmap within subclasses, as well as for associating - an object with already existing BitMap structure. + Allows to specify or retrieve a raw planar bitmap structure associated with the object. + Useful for direct access to the bitmap within subclasses, as well as for associating + an object with already existing BitMap structure. - It is valid to pass this attribute with a NULL value. In this case the object becomes - empty and contains no actual bitmap. + It is valid to pass this attribute with a NULL value. In this case the object becomes + empty and contains no actual bitmap. NOTES - If the object was created with own bitmap data (with no aoHidd_PlanarBM_BitMap specified - during creation), this data will be deallocated when you set this attribute. + If the object was created with own bitmap data (with no aoHidd_PlanarBM_BitMap specified + during creation), this data will be deallocated when you set this attribute. - It's up to you to deallocate own bitmaps, set using this attribute. Even if the object - is disposed, it won't deallocate user-supplied bitmap. + It's up to you to deallocate own bitmaps, set using this attribute. Even if the object + is disposed, it won't deallocate user-supplied bitmap. EXAMPLE @@ -125,7 +125,7 @@ OOP_Object *PBM__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *msg) o = (OOP_Object *)OOP_DoSuperMethod(cl, o, &msg->mID); if (NULL == o) - return NULL; + return NULL; data = OOP_INST_DATA(cl, o); @@ -134,71 +134,71 @@ OOP_Object *PBM__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *msg) tag = FindTagItem(aHidd_PlanarBM_BitMap, msg->attrList); if (tag) { - /* It's not our own bitmap */ - data->planes_alloced = FALSE; - /* Remember the bitmap. It can be NULL here. */ - data->bitmap = (struct BitMap *)tag->ti_Data; + /* It's not our own bitmap */ + data->planes_alloced = FALSE; + /* Remember the bitmap. It can be NULL here. */ + data->bitmap = (struct BitMap *)tag->ti_Data; - /* That's all, we are attached to an existing BitMap */ - return o; + /* That's all, we are attached to an existing BitMap */ + return o; } else { - /* Check obsolete attribute now */ - data->planes_alloced = GetTagData(aHidd_PlanarBM_AllocPlanes, TRUE, msg->attrList); + /* Check obsolete attribute now */ + data->planes_alloced = GetTagData(aHidd_PlanarBM_AllocPlanes, TRUE, msg->attrList); - if (!data->planes_alloced) - return o; /* Late initialization */ + if (!data->planes_alloced) + return o; /* Late initialization */ } /* By default we create 1-plane bitmap */ depth = GetTagData(aHidd_BitMap_Depth, 1, msg->attrList); - /* Not late initialization. Get some info on the bitmap */ - OOP_GetAttr(o, aHidd_BitMap_Height, &height); + /* Not late initialization. Get some info on the bitmap */ + OOP_GetAttr(o, aHidd_BitMap_Height, &height); OOP_GetAttr(o, aHidd_BitMap_BytesPerRow, &bytesperrow); OOP_GetAttr(o, aHidd_BitMap_Displayable, &displayable); data->bitmap = AllocMem(sizeof(struct BitMap), MEMF_CLEAR); if (data->bitmap) { - UBYTE i; - - ok = TRUE; - - /* We cache some info */ - data->bitmap->Rows = height; - data->bitmap->BytesPerRow = bytesperrow; - data->bitmap->Depth = depth; - data->bitmap->Flags = BMF_STANDARD|BMF_MINPLANES; /* CHECKME */ - if (displayable) - data->bitmap->Flags |= BMF_DISPLAYABLE; - - /* Allocate memory for all the planes. - * Use chip memory only if BMF_DISPLAYABLE. - */ - for (i = 0; i < depth; i++) - { - data->bitmap->Planes[i] = AllocMem(height * bytesperrow, MEMF_PUBLIC | (displayable ? MEMF_CHIP : 0) | MEMF_CLEAR); - - if (NULL == data->bitmap->Planes[i]) - { - ok = FALSE; - break; - } - } + UBYTE i; + + ok = TRUE; + + /* We cache some info */ + data->bitmap->Rows = height; + data->bitmap->BytesPerRow = bytesperrow; + data->bitmap->Depth = depth; + data->bitmap->Flags = BMF_STANDARD|BMF_MINPLANES; /* CHECKME */ + if (displayable) + data->bitmap->Flags |= BMF_DISPLAYABLE; + + /* Allocate memory for all the planes. + * Use chip memory only if BMF_DISPLAYABLE. + */ + for (i = 0; i < depth; i++) + { + data->bitmap->Planes[i] = AllocMem(height * bytesperrow, MEMF_PUBLIC | (displayable ? MEMF_CHIP : 0) | MEMF_CLEAR); + + if (NULL == data->bitmap->Planes[i]) + { + ok = FALSE; + break; + } + } } if (!ok) { - OOP_MethodID dispose_mid; + OOP_MethodID dispose_mid; - dispose_mid = OOP_GetMethodID(IID_Root, moRoot_Dispose); - OOP_CoerceMethod(cl, o, (OOP_Msg)&dispose_mid); + dispose_mid = OOP_GetMethodID(IID_Root, moRoot_Dispose); + OOP_CoerceMethod(cl, o, (OOP_Msg)&dispose_mid); - o = NULL; + o = NULL; } - + return o; } @@ -208,19 +208,19 @@ static void PBM_FreeBitMap(struct planarbm_data *data) { if (data->planes_alloced) { - if (NULL != data->bitmap) - { - UBYTE i; - - for (i = 0; i < data->bitmap->Depth; i++) - { - if (data->bitmap->Planes[i]) - { - FreeMem(data->bitmap->Planes[i], data->bitmap->Rows * data->bitmap->BytesPerRow); - } - } - FreeMem(data->bitmap, sizeof(struct BitMap)); - } + if (NULL != data->bitmap) + { + UBYTE i; + + for (i = 0; i < data->bitmap->Depth; i++) + { + if (data->bitmap->Planes[i]) + { + FreeMem(data->bitmap->Planes[i], data->bitmap->Rows * data->bitmap->BytesPerRow); + } + } + FreeMem(data->bitmap, sizeof(struct BitMap)); + } } } @@ -241,13 +241,13 @@ VOID PBM__Root__Get(OOP_Class *cl, OOP_Object *obj, struct pRoot_Get *msg) if (msg->attrID == aHidd_BitMap_Depth) { /* Planar bitmaps may have a variable depth. */ - *msg->storage = data->bitmap ? data->bitmap->Depth : 0; - return; + *msg->storage = data->bitmap ? data->bitmap->Depth : 0; + return; } else if (msg->attrID == aHidd_PlanarBM_BitMap) { - *msg->storage = (IPTR)data->bitmap; - return; + *msg->storage = (IPTR)data->bitmap; + return; } OOP_DoSuperMethod(cl, obj, &msg->mID); @@ -259,39 +259,39 @@ static BOOL PBM_SetBitMap(OOP_Class *cl, OOP_Object *o, struct BitMap *bm) { struct TagItem pftags[] = { - { aHidd_PixFmt_Depth , 0UL }, /* 0 */ - { aHidd_PixFmt_BitsPerPixel , 0UL }, /* 1 */ - { aHidd_PixFmt_BytesPerPixel, 1UL }, /* 2 */ - { aHidd_PixFmt_ColorModel , vHidd_ColorModel_Palette }, /* 3 */ - { aHidd_PixFmt_BitMapType , vHidd_BitMapType_Planar }, /* 4 */ - { aHidd_PixFmt_CLUTShift , 0UL }, /* 5 */ - { aHidd_PixFmt_CLUTMask , 0x000000FF }, /* 6 */ - { aHidd_PixFmt_RedMask , 0x00FF0000 }, /* 7 */ - { aHidd_PixFmt_GreenMask , 0x0000FF00 }, /* 8 */ - { aHidd_PixFmt_BlueMask , 0x000000FF }, /* 9 */ - { aHidd_PixFmt_StdPixFmt , vHidd_StdPixFmt_Plane }, - { TAG_DONE , 0UL } + { aHidd_PixFmt_Depth , 0UL }, /* 0 */ + { aHidd_PixFmt_BitsPerPixel , 0UL }, /* 1 */ + { aHidd_PixFmt_BytesPerPixel, 1UL }, /* 2 */ + { aHidd_PixFmt_ColorModel , vHidd_ColorModel_Palette }, /* 3 */ + { aHidd_PixFmt_BitMapType , vHidd_BitMapType_Planar }, /* 4 */ + { aHidd_PixFmt_CLUTShift , 0UL }, /* 5 */ + { aHidd_PixFmt_CLUTMask , 0x000000FF }, /* 6 */ + { aHidd_PixFmt_RedMask , 0x00FF0000 }, /* 7 */ + { aHidd_PixFmt_GreenMask , 0x0000FF00 }, /* 8 */ + { aHidd_PixFmt_BlueMask , 0x000000FF }, /* 9 */ + { aHidd_PixFmt_StdPixFmt , vHidd_StdPixFmt_Plane }, + { TAG_DONE , 0UL } }; - struct TagItem bmtags[] = + struct TagItem bmtags[] = { - { aHidd_BitMap_Width , 0 }, /* 0 */ - { aHidd_BitMap_Height , 0 }, /* 1 */ - { aHidd_BitMap_BytesPerRow , 0 }, /* 2 */ - { TAG_DONE , 0 } + { aHidd_BitMap_Width , 0 }, /* 0 */ + { aHidd_BitMap_Height , 0 }, /* 1 */ + { aHidd_BitMap_BytesPerRow , 0 }, /* 2 */ + { TAG_DONE , 0 } }; struct planarbm_data *data = OOP_INST_DATA(cl, o); OOP_Object *pf; /* First we attempt to register a pixelformat */ - pftags[0].ti_Data = bm->Depth; /* PixFmt_Depth */ - pftags[1].ti_Data = bm->Depth; /* PixFmt_BitsPerPixel */ + pftags[0].ti_Data = bm->Depth; /* PixFmt_Depth */ + pftags[1].ti_Data = bm->Depth; /* PixFmt_BitsPerPixel */ pf = GFX__Hidd_Gfx__RegisterPixFmt(CSD(cl)->gfxhiddclass, pftags); if (!pf) { - /* Fail is pixelformat registration failed */ - return FALSE; + /* Fail is pixelformat registration failed */ + return FALSE; } /* Free old bitmap, if it was ours. */ @@ -319,12 +319,12 @@ VOID PBM__Root__Set(OOP_Class *cl, OOP_Object *obj, struct pRoot_Set *msg) if (tag) { - /* - * TODO: We can't check for failure here. However, since we already - * have Depth attribute for the bitmap, may be we shouldn't register - * 8 pixelformats? In this case we are unable to fail. - */ - PBM_SetBitMap(cl, obj, (struct BitMap *)tag->ti_Data); + /* + * TODO: We can't check for failure here. However, since we already + * have Depth attribute for the bitmap, may be we shouldn't register + * 8 pixelformats? In this case we are unable to fail. + */ + PBM_SetBitMap(cl, obj, (struct BitMap *)tag->ti_Data); } OOP_DoSuperMethod(cl, obj, &msg->mID); @@ -333,19 +333,19 @@ VOID PBM__Root__Set(OOP_Class *cl, OOP_Object *obj, struct pRoot_Set *msg) /****************************************************************************************/ VOID PBM__Hidd_BitMap__PutPixel(OOP_Class *cl, OOP_Object *o, - struct pHidd_BitMap_PutPixel *msg) + struct pHidd_BitMap_PutPixel *msg) { - UBYTE **plane; + UBYTE **plane; struct planarbm_data *data; - ULONG offset; - UWORD mask; - UBYTE pixel, notpixel; - UBYTE i; + ULONG offset; + UWORD mask; + UBYTE pixel, notpixel; + UBYTE i; data = OOP_INST_DATA(cl, o); if (!data->bitmap) - return; + return; /* bitmap in plane-mode */ plane = data->bitmap->Planes; @@ -356,16 +356,16 @@ VOID PBM__Hidd_BitMap__PutPixel(OOP_Class *cl, OOP_Object *o, for (i = 0; i < data->bitmap->Depth; i++, mask <<=1, plane ++) { - if ((*plane != NULL) && (*plane != (UBYTE *)-1)) - { - if(msg->pixel & mask) - { - *(*plane + offset) = *(*plane + offset) | pixel; - } - else - { - *(*plane + offset) = *(*plane + offset) & notpixel; - } + if ((*plane != NULL) && (*plane != (UBYTE *)-1)) + { + if(msg->pixel & mask) + { + *(*plane + offset) = *(*plane + offset) | pixel; + } + else + { + *(*plane + offset) = *(*plane + offset) & notpixel; + } } } } @@ -373,19 +373,19 @@ VOID PBM__Hidd_BitMap__PutPixel(OOP_Class *cl, OOP_Object *o, /****************************************************************************************/ ULONG PBM__Hidd_BitMap__GetPixel(OOP_Class *cl, OOP_Object *o, - struct pHidd_BitMap_GetPixel *msg) + struct pHidd_BitMap_GetPixel *msg) { struct planarbm_data *data; - UBYTE **plane; - ULONG offset; - UWORD i; - UBYTE pixel; - ULONG retval; + UBYTE **plane; + ULONG offset; + UWORD i; + UBYTE pixel; + ULONG retval; data = OOP_INST_DATA(cl, o); if (!data->bitmap) - return 0; + return 0; plane = data->bitmap->Planes; offset = msg->x / 8 + msg->y * data->bitmap->BytesPerRow; @@ -395,16 +395,16 @@ ULONG PBM__Hidd_BitMap__GetPixel(OOP_Class *cl, OOP_Object *o, for (i = 0; i < data->bitmap->Depth; i++, plane ++) { if (*plane == (UBYTE *)-1) - { - retval = retval | (1 << i); - } - else if (*plane != NULL) - { - if(*(*plane + offset) & pixel) - { - retval = retval | (1 << i); - } - } + { + retval = retval | (1 << i); + } + else if (*plane != NULL) + { + if(*(*plane + offset) & pixel) + { + retval = retval | (1 << i); + } + } } return retval; @@ -425,47 +425,47 @@ static void PBM_PutImage_Native(UBYTE *src, ULONG modulo, struct BitMap *data, U for (y = 0; y < height; y++) { - UBYTE **plane = data->Planes; - - for (d = 0; d < data->Depth; d++) - { - UWORD dmask = 1L << d; - UWORD pmask = 0x80 >> startx; - UBYTE *pl = *plane; - - if (pl == (UBYTE *)-1) continue; - if (pl == NULL) continue; - - pl += planeoffset; - - for (x = 0; x < width; x++) - { - if (src[x] & dmask) - { - *pl |= pmask; - } - else - { - *pl &= ~pmask; - } - - if (pmask == 0x1) - { - pmask = 0x80; - pl++; - } - else - { - pmask >>= 1; - } - } /* for (x = 0; x < msg->width; x++) */ - - plane++; - - } /* for (d = 0; d < data->depth; d++) */ - - src += modulo; - planeoffset += data->BytesPerRow; + UBYTE **plane = data->Planes; + + for (d = 0; d < data->Depth; d++) + { + UWORD dmask = 1L << d; + UWORD pmask = 0x80 >> startx; + UBYTE *pl = *plane; + + if (pl == (UBYTE *)-1) continue; + if (pl == NULL) continue; + + pl += planeoffset; + + for (x = 0; x < width; x++) + { + if (src[x] & dmask) + { + *pl |= pmask; + } + else + { + *pl &= ~pmask; + } + + if (pmask == 0x1) + { + pmask = 0x80; + pl++; + } + else + { + pmask >>= 1; + } + } /* for (x = 0; x < msg->width; x++) */ + + plane++; + + } /* for (d = 0; d < data->depth; d++) */ + + src += modulo; + planeoffset += data->BytesPerRow; } /* for (y = 0; y < msg->height; y++) */ } @@ -478,74 +478,74 @@ static void PBM_PutImage_Native32(HIDDT_Pixel *src, ULONG modulo, struct BitMap for (y = 0; y < height; y++) { - UBYTE **plane = data->Planes; - - for (d = 0; d < data->Depth; d++) - { - UWORD dmask = 1L << d; - UWORD pmask = 0x80 >> startx; - UBYTE *pl = *plane; - - if (pl == (UBYTE *)-1) continue; - if (pl == NULL) continue; - - pl += planeoffset; - - for (x = 0; x < width; x++) - { - if (src[x] & dmask) - { - *pl |= pmask; - } - else - { - *pl &= ~pmask; - } - - if (pmask == 0x1) - { - pmask = 0x80; - pl++; - } - else - { - pmask >>= 1; - } - } /* for (x = 0; x < msg->width; x++) */ - - plane++; - - } /* for (d = 0; d < data->depth; d++) */ - - src = ((APTR)src + modulo); - planeoffset += data->BytesPerRow; + UBYTE **plane = data->Planes; + + for (d = 0; d < data->Depth; d++) + { + UWORD dmask = 1L << d; + UWORD pmask = 0x80 >> startx; + UBYTE *pl = *plane; + + if (pl == (UBYTE *)-1) continue; + if (pl == NULL) continue; + + pl += planeoffset; + + for (x = 0; x < width; x++) + { + if (src[x] & dmask) + { + *pl |= pmask; + } + else + { + *pl &= ~pmask; + } + + if (pmask == 0x1) + { + pmask = 0x80; + pl++; + } + else + { + pmask >>= 1; + } + } /* for (x = 0; x < msg->width; x++) */ + + plane++; + + } /* for (d = 0; d < data->depth; d++) */ + + src = ((APTR)src + modulo); + planeoffset += data->BytesPerRow; } /* for (y = 0; y < msg->height; y++) */ } VOID PBM__Hidd_BitMap__PutImage(OOP_Class *cl, OOP_Object *o, - struct pHidd_BitMap_PutImage *msg) + struct pHidd_BitMap_PutImage *msg) { struct planarbm_data *data = OOP_INST_DATA(cl, o); if (!data->bitmap) - return; + return; if ((msg->pixFmt != vHidd_StdPixFmt_Native) && - (msg->pixFmt != vHidd_StdPixFmt_Native32)) + (msg->pixFmt != vHidd_StdPixFmt_Native32)) { - OOP_DoSuperMethod(cl, o, (OOP_Msg)msg); - return; + OOP_DoSuperMethod(cl, o, (OOP_Msg)msg); + return; } switch(msg->pixFmt) { case vHidd_StdPixFmt_Native: - PBM_PutImage_Native(msg->pixels, msg->modulo, data->bitmap, msg->x, msg->y, msg->width, msg->height); - break; + PBM_PutImage_Native(msg->pixels, msg->modulo, data->bitmap, msg->x, msg->y, msg->width, msg->height); + break; case vHidd_StdPixFmt_Native32: - PBM_PutImage_Native32((HIDDT_Pixel *)msg->pixels, msg->modulo, data->bitmap, msg->x, msg->y, msg->width, msg->height); - break; + PBM_PutImage_Native32((HIDDT_Pixel *)msg->pixels, msg->modulo, data->bitmap, msg->x, msg->y, msg->width, msg->height); + break; } } @@ -553,12 +553,12 @@ VOID PBM__Hidd_BitMap__PutImage(OOP_Class *cl, OOP_Object *o, /****************************************************************************************/ VOID PBM__Hidd_BitMap__PutImageLUT(OOP_Class *cl, OOP_Object *o, - struct pHidd_BitMap_PutImageLUT *msg) + struct pHidd_BitMap_PutImageLUT *msg) { struct planarbm_data *data = OOP_INST_DATA(cl, o); if (!data->bitmap) - return; + return; /* This is the same as PutImage() with vHidd_StdPixFmt_Native format */ PBM_PutImage_Native(msg->pixels, msg->modulo, data->bitmap, msg->x, msg->y, msg->width, msg->height); @@ -567,82 +567,82 @@ VOID PBM__Hidd_BitMap__PutImageLUT(OOP_Class *cl, OOP_Object *o, /****************************************************************************************/ VOID PBM__Hidd_BitMap__GetImageLUT(OOP_Class *cl, OOP_Object *o, - struct pHidd_BitMap_GetImageLUT *msg) + struct pHidd_BitMap_GetImageLUT *msg) { - WORD x, y, d; - UBYTE *pixarray = (UBYTE *)msg->pixels; - UBYTE **plane; - ULONG planeoffset; + WORD x, y, d; + UBYTE *pixarray = (UBYTE *)msg->pixels; + UBYTE **plane; + ULONG planeoffset; struct planarbm_data *data; - UBYTE prefill; + UBYTE prefill; data = OOP_INST_DATA(cl, o); if (!data->bitmap) - return; + return; planeoffset = msg->y * data->bitmap->BytesPerRow + msg->x / 8; prefill = 0; for (d = 0; d < data->bitmap->Depth; d++) { - if (data->bitmap->Planes[d] == (UBYTE *)-1) - { - prefill |= (1L << d); - } + if (data->bitmap->Planes[d] == (UBYTE *)-1) + { + prefill |= (1L << d); + } } for (y = 0; y < msg->height; y++) { - UBYTE *dest = pixarray; - - plane = data->bitmap->Planes; - for(x = 0; x < msg->width; x++) - { - dest[x] = prefill; - } - - for (d = 0; d < data->bitmap->Depth; d++) - { - UWORD dmask = 1L << d; - UWORD pmask = 0x80 >> (msg->x & 7); - UBYTE *pl = *plane; - - if (pl == (UBYTE *)-1) continue; - if (pl == NULL) continue; - - pl += planeoffset; - - for (x = 0; x < msg->width; x++) - { - if (*pl & pmask) - { - dest[x] |= dmask; - } - else - { - dest[x] &= ~dmask; - } - - if (pmask == 0x1) - { - pmask = 0x80; - pl++; - } - else - { - pmask >>= 1; - } - - } /* for(x = 0; x < msg->width; x++) */ - - plane++; - - } /* for(d = 0; d < data->depth; d++) */ - - pixarray += msg->modulo; - planeoffset += data->bitmap->BytesPerRow; - + UBYTE *dest = pixarray; + + plane = data->bitmap->Planes; + for(x = 0; x < msg->width; x++) + { + dest[x] = prefill; + } + + for (d = 0; d < data->bitmap->Depth; d++) + { + UWORD dmask = 1L << d; + UWORD pmask = 0x80 >> (msg->x & 7); + UBYTE *pl = *plane; + + if (pl == (UBYTE *)-1) continue; + if (pl == NULL) continue; + + pl += planeoffset; + + for (x = 0; x < msg->width; x++) + { + if (*pl & pmask) + { + dest[x] |= dmask; + } + else + { + dest[x] &= ~dmask; + } + + if (pmask == 0x1) + { + pmask = 0x80; + pl++; + } + else + { + pmask >>= 1; + } + + } /* for(x = 0; x < msg->width; x++) */ + + plane++; + + } /* for(d = 0; d < data->depth; d++) */ + + pixarray += msg->modulo; + planeoffset += data->bitmap->BytesPerRow; + } /* for(y = 0; y < msg->height; y++) */ } @@ -650,7 +650,7 @@ VOID PBM__Hidd_BitMap__GetImageLUT(OOP_Class *cl, OOP_Object *o, /****************************************************************************************/ BOOL PBM__Hidd_PlanarBM__SetBitMap(OOP_Class *cl, OOP_Object *o, - struct pHidd_PlanarBM_SetBitMap *msg) + struct pHidd_PlanarBM_SetBitMap *msg) { return PBM_SetBitMap(cl, o, msg->bitMap); } @@ -658,12 +658,12 @@ BOOL PBM__Hidd_PlanarBM__SetBitMap(OOP_Class *cl, OOP_Object *o, /****************************************************************************************/ BOOL PBM__Hidd_PlanarBM__GetBitMap(OOP_Class *cl, OOP_Object *o, - struct pHidd_PlanarBM_GetBitMap *msg) + struct pHidd_PlanarBM_GetBitMap *msg) { struct planarbm_data *data = OOP_INST_DATA(cl, o); if (!data->bitmap) - return FALSE; + return FALSE; /* * Totally obsolete and deprecated. -- 2.11.4.GIT