I can't get anything except the original icon to load. I used the 32bit editor from above to change the color to white; just get a garbage pointer.
You can't use PNGs directly like you can with everything else (gadgets, menus, toolbars). It has to be a generic bitmap.
Is there anything wrong with this code that doesn't like editted icons?
Pulling my hair out (what's left of it).
SAK_LoadPointer((STRPTR)"PROGDIR:Images/def_textpointer",ActiveScreen);
struct DiskObject *SAK_MouseDiskObject=NULL;
Object *SAK_MousePointerObject=NULL;
VOID
SAK_LoadPointer(STRPTR name,struct Screen *Scr)
{
uint8 *image=0;
int32 w=0, h=0;
STRPTR xoffset_tool, yoffset_tool;
int32 xoffset=0, yoffset=0;
SAK_MousePointerObject=NULL;
if ((SAK_MouseDiskObject=IIcon->GetIconTags(name,
ICONGETA_FailIfUnavailable, TRUE,
TAG_DONE)))
{
IDOS->Printf("1\n");
IIcon->LayoutIcon(SAK_MouseDiskObject,Scr,TAG_DONE);
IIcon->IconControl(SAK_MouseDiskObject,
ICONCTRLA_GetImageData1, &image,
ICONCTRLA_GetWidth, &w,
ICONCTRLA_GetHeight, &h,
TAG_DONE);
if ((xoffset_tool=IIcon->FindToolType((SAK_MouseDiskObject)->do_ToolTypes,"XOFFSET")))
{
xoffset=atoi(xoffset_tool);
}
if ((yoffset_tool=IIcon->FindToolType((SAK_MouseDiskObject)->do_ToolTypes,"YOFFSET")))
{
yoffset=atoi(yoffset_tool);
}
if (image)
{
IDOS->Printf("2\n");
SAK_MousePointerObject=IIntuition->NewObject(NULL,"pointerclass",
// POINTERA_BitMap, fallbackPointer,
POINTERA_ImageData, image,
POINTERA_Width, w,
POINTERA_Height, h,
POINTERA_XOffset, -xoffset,
POINTERA_YOffset, -yoffset,
// POINTERA_WordWidth, (ULONG)(w+15)/16,
// POINTERA_XResolution, (ULONG)POINTERXRESN_SCREENRES,
// POINTERA_YResolution, (ULONG)POINTERYRESN_SCREENRESASPECT,
TAG_DONE);
}
}
}