public static sprite_list sprite_list_create(int num_sprites, int flags) { sprite[] sprite = new SpriteManager.sprite[num_sprites]; sprite_list sprite_list = new sprite_list(); sprite_list.num_sprites = num_sprites; sprite_list.special_pen = -1; sprite_list.sprite = sprite; sprite_list.flags = flags; /* resource tracking */ sprite_list.next = first_sprite_list; first_sprite_list = sprite_list; return sprite_list; /* warning: no error checking! */ }
public static void sprite_close() { sprite_list sprite_list = first_sprite_list; mask_buffer_dispose(); while (sprite_list != null) { sprite_list next = sprite_list.next; sprite_list.sprite = null; sprite_list = null; sprite_list = next; } first_sprite_list = null; }