11-11-2019, 05:56 AM
Hi,
I wanted to create an object that can be spawned dynamically, so I do not know how many of these will be needed at the beginning. So TLN_LoadSpriteset loads my sprite (e.g. a fireball) and I assign it via TLN_SetSpriteSet. So to set the sprite position in the viewport I use TLN_SetSpritePosition. However, this function expects the id of the sprite which are set in TLN_Init via the numsprites parameter. If I understand this correctly and using a fireball as sprite, I am limited with spawning new fireballs by the numsprites parameter. So if I set it to 1 at the beginning I would only be able to create one fireball.
I did not took a lock at the implementation right now. So for me it looks like for every used sprite the sprite needs to be actually loaded in order to be shown in the window. Is this correct?
I was expecting that I load a sprite once and then use it to display as many objects in the window as I would like to. Is this possible?
Cheers,
thacoon
I wanted to create an object that can be spawned dynamically, so I do not know how many of these will be needed at the beginning. So TLN_LoadSpriteset loads my sprite (e.g. a fireball) and I assign it via TLN_SetSpriteSet. So to set the sprite position in the viewport I use TLN_SetSpritePosition. However, this function expects the id of the sprite which are set in TLN_Init via the numsprites parameter. If I understand this correctly and using a fireball as sprite, I am limited with spawning new fireballs by the numsprites parameter. So if I set it to 1 at the beginning I would only be able to create one fireball.
I did not took a lock at the implementation right now. So for me it looks like for every used sprite the sprite needs to be actually loaded in order to be shown in the window. Is this correct?
I was expecting that I load a sprite once and then use it to display as many objects in the window as I would like to. Is this possible?
Cheers,
thacoon