Flush multiple sprite assets (and their assigned texture pages) from memory.



Argument Description
array Array with the sprite indices to flush

Returns: N/A


With this function you can remove any number of sprite textures - and the texture pages they are assigned to - from video memory (their texture pages will be reloaded on next use of any sprite from them). You supply an array of sprite asset indices and they will be removed from memory when the function is called. It is worth noting that by default on the Windows platforms (YYC and standard) all textures will always be loaded into memory on start-up. If you are making a cross platform game, then you can leave this function in your code for the Windows target as it will not give any error and just not do anything. However you can also force the Windows target to not load any textures on startup and so use the flush and prefetch functions as you would on all other platforms (the setting can be found in the Windows Global Game Settings window).


spr_a[0] = spr_Player_Aura1;
spr_a[1] = spr_Player_Aura2;
spr_a[2] = spr_Player_Aura3;
spr_a[3] = spr_Player_Aura4;

The above code creates an array where each element holds a sprite index. This array is then used to clear those sprite textures from memory.

Back: Sprites
Next: sprite_prefetch
© Copyright YoYo Games Ltd. 2018 All Rights Reserved