Might be Intuition, might be Graphics, might be that grey area in between.
I have been fighting with creating pointers using pointerclass, and so far
I'm not having much luck. I'm NOT loading .iff files, nor using icon files in
prefs:system.. I'm trying to create bitmaps with the desired pointer graphics dynamically. Through all my failed attempts, it now looks something like:
Open a window and draw the desired pointer graphics there.
IGraphics->AllocBitMap a bitmap,
BltBitMap from my window to the new bitmap
NewObject("bitmap.image"), copying from the above bitmap (I'll try anything)
NewObject("pointerclass") from either of the above bitmaps
Finally, IIntuition->SetWindowAttr(WA_Pointer) with the pointerclass-created object
At this point, I don't care if the pointers I create are full-color,4 color, or monochrome. Color is nice, but not necessary.
If anyone has source examples that might help, I'd be most appreciative.
Thanks,
Lyle
Why are you creating a bitmap.image at all? As far as I can see, the pointer class does not take a BOOPSI image object as input: the bitmap is referenced directly.
I've never used the pointer class before but I guess you should do something like:
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
Guideline - Mousepointers on OpenAmiga.org (shows how to do a truecolour pointer with 4-colour fallback graphics):
http://openamiga.org/?function=viewpage&pageid=23
Code for creating a 4-colour pointer from an IFF-ILBM file (taken from MissCmd game):
http://dl.dropbox.com/u/26599983/pointer.c
http://dl.dropbox.com/u/26599983/pointer.h
Thank you both!
I don't mind grinding through unfamiliar places, but that was getting a bit extreme.
I'm back on track and proceeding well.
Lyle
LyleHaze
@salass00
It looks like your pointer.c shows much of what I need to use SetWindowPointer() to blank the mouse pointer... but at the moment my attempt isn't working. I am just using AllocBitMap() to allocate a blank bitmap, but I think that should work. Hmmm...
Author of the PortablE programming language.
I love using Amiga OS4.1 on my X1000 & Sam440 :-D
In my experience (don't remember if I tried it on AmigaOS 4.x or only classic AmigaOS) if you want a blank pointer you simply have to create a "pointerclass" object with NewObject() without passing any tags.
If you use AllocBitMap() you should note that it's not cleared by default unless you use the BMF_CLEAR flag.
You might want to take a look at the Pointer.c source of BetterString.mcc. It handles all necessary cases, except loading aribtrary image data from disk.
@ChrisH
I once tried [the confusingly titled] ClearPointer() but then found it actually didn't. ;-)