typedef struct ITEM
{
int it_id;
BMAP* it_bmap;
} ITEM;
ITEM item_001; //No malloc needed, if you want to keep it, then keep it.. (dont forget malloc returns a POINTER)
item_001.it_id = 1;
item_001.it_bmap = bmap_create("item_001.png");
function give_item(ITEM *pItem)
{
pan_inventory_slot.bmap = pItem.bmap;
}
void main()
{
//Level and Game initalizing
...
give_item(&item_001);
}