Could do with a proper way of destroying all loaded objects, sprites, music and sfx etc etc - doing this by loading an invalid file is a bit inefficient.
I never had a need for this, but i think this is how its done:
LOADSPRITE "myfile.bmp",0
LOADSPRITE "",0
edit:
Reuse the index's to unload and reload something new in its place.
Its how I do it - but having to loop through a large number of items is a bit time consuming. A nice command to do it would be most useful.
In addition, I'm not sure doing a load with an invalid filename actually deletes the sprite/sound etc etc properly.
It does delete it, or at least it USED TO....
im going to test it for you.
brb
This definetly works in windows xp, memory is freed by using LOADSPRITE "",0
And this wont take but a fraction of a second:
for i=0 to 10000
loadsprite "",i
x_loadobj "",i
loadsound "",i
next
I'm not sure about the Mac side - I delete all my objects, change screen size and then re-load, and for some reason two sprites are completely wrong - they end up with a font bitmap :O
Did you check the index numbers?
Check to see what they are LOADSPRITE "NAME", INDEX
what are your index numbers??
If they are too HIGH ..ie 325656 etc...this might happen
Oh yes, its the correct sprite size - and the correct filename is loaded. Just get a totally different image :)
Like i said i ran into this issue before, its due to the indexing numbers.
Post a sample that causes the problem please.