void change_bitmap()
{
ptr_remove(inventory_panel->bmap);
inventory_panel->bmap = bmap_create("newfile.bmp");
}
That should do the trick. Your first version crashes because you assign a char array to a bitmap pointer. This can't work...
Your code is in Lite-c, but Thanks that is what I need. I found my answer partially.
Is it possible to use such a code:
inventory_item1.bmap = bmap_create(player.string1);
It should work, but I don't know why engine says, empty porinter!But I already filled the player's string1 with "an_image.bmp" and built the level.
All I want to do is: every entity in my game that can be picked by the player, should have a 2d image. This 2d image is used in inventory.
so I want to use something like:
inventory_item1.bmap = bmap_create(player.string1);
to achieve what I want.
Is it possible?