MorphOS Developer
Posts: 1520 from 2003/2/24
From: Finland
You can use following tags to get icon image with GetIconTagList():
ICONGETA_PNGBitMap 256
ICONGETA_PNGBitMap_Width 257
ICONGETA_PNGBitMap_Height 258
They are semi official (i.e. not found from the SDK) but since Ambient is open source they are public tags.
struct BitMap *bm;
ULONG w, h;
APTR diskobj = GetIconTags("foobargame", ICONGETA_PNGBitMap, &bm,
ICONGETA_PNGBitMap_Width, &w, ICONGETA_PNGBitMap_Height, &h, TAG_DONE);
Icon bitmap is valid until you destroy returned disk object. If retrieved icon is not a PNG icon then bitmap pointer is NULL and you can use old style planar bitmap from returned disk object.
Internally GetIconTagList() is calling GetDiskObject() and it should return something (if icon exists, that is)...
1 + 1 = 3 with very large values of 1