@Chris
There is no problem in Missile Command game and it uses pointerclass too.
The "pointerclass" places some restrictions on the bitmap you give it:
1. planar format
2. 2 planes (no more, no less)
3. rows padded to closest 16-bit boundary
This last part means that you can't allocate the bitmap with AllocBitMap() because this function isn't guaranteed to give proper alignment. Instead you should create it yourself using InitBitMap() to initialise the struct BitMap and AllocRaster() to allocate the planes.
Quote:
InitBitMap(bm, 2, width, height);
bm->Planes[0] = AllocRaster(width, height);
bm->Planes[1] = AllocRaster(width, height);
if (bm->Planes[0] == NULL || bm->Planes[1] == NULL) {
err = NOTOK;
break;
}
Also if your bitmap is wider than 16-bit pixels you need to use POINTERA_WordWidth. Set this to (BytesPerRow >> 1).
[edit]
Also, you can't free the BitMap until after you have deleted the pointerclass object. That's why I use functions like these:
Quote:
typedef struct {
Object *ptr;
int32 width, height;
struct BitMap bm;
} pointer;
pointer *CreatePointer (char * filename, int32 xoffs, int32 yoffs);
void DeletePointer (pointer *ptr);
If you want I can send you the sources for these. The filename passed to CreatePointer() needs to be a 2-planed IFF-ILBM file.