There is no "Command" per se., but you can create a function like:
Function GetAllSpriteID( SpriteID Ref As Integer[] )
SpriteID.Length = 0 // Reset Array Length
// This checks ALL 4.2 Billion Possible IDs...
// It's going to be SLOW, so only use it when necessary; say after Loading a Level
For ID = 1 To 0xFFFFFFFF
If GetSpriteExists( ID )
SpriteID.Length = SpriteID.Length + 1
SpriteID[SpriteID.Length - 1] = ID
EndIf
Next
EndFunction
Now this will check all 4.2 Billion POSSIBLE IDs that you can use for something., and then it will store it in an Array you pass in.
So, for example you'd use it
SpriteTable As Integer[] : GetAllSpriteID( SpriteTable[] )
Now that Array will contain every Sprite ID when you called that Function., regardless of how they were created.
What's more is it will ONLY contain specifically the number of Elements that equals how many are used...
So say you've created 2000 Sprites between you and say the freely available Particle Plug-In; then it will have a SpriteTable.Length of 2000
And actually we can improve this by creating a Type to also store Flags for the Asset Types that share / use said ID.
In this respect we can essentially use the same loop to store ALL ID Instances.
But I'll let you figure that one out.
Another thing we can do is have an Automatic ID System.
e.g.
Function GetNewID( AssetType As Integer )
Local ID As Integer = 0
Local Check As Integer = 0
Repeat
Inc ID
Select AssetType
Case AssetType_Sprite :
Check = GetSpriteExists( ID )
EndCase
Case AssetType_Image :
Check = GetImageExists( ID )
EndCase
Case AssetType_Text :
Check = GetTextExists( ID )
EndCase
// etc...
EndSelect
Until Check = 0
EndFunction ID
Now you can define the AssetType_<Type> with whatever number you want... I'd argue this is a good reason for AppGameKit to support "Enum" or "Enumeration" Types; which in C/C++ are just a handy way of having automatic numerical assignment.
But you can do this (with less performance overhead than using a variable) by defining these with #Constant
And as noted these can be ANYTHING you want, as long as they're unique and assigned to something memorable for you... I'm just using AssetType_<Type> as an example
In this way it will check all Available IDs from the Lowest Possible., until there is no longer an Asset (of that Type) with that Assigned ID; then you can use it as "Manual" Assignment.
It's actually a pretty clean way of handling ID Assignment, as generally speaking you'll find all the Assets are then numbered in Order (most of the time)... this is fine for "Small" or "Simple" Projects where you're going to be creating / deleting assets in order.
For more complex projects I actually use 2 Additional Functions along with a Global AssetTable (which uses a Type that has an Array for each Asset Type)
In essence these Functions are "NewAsset( )" and "ReleaseAsset( )"
The idea being that these essentially handle Creating a New Asset, Generating an ID (with the above Function) and then Adding them as Entries into said AssetTable...
Release does the same thing., but obviously Deletes the Asset, Removes it's Table Entry and then Sorts the Array ( to ensure IDs are ALWAYS in Ascending Order )
•
This might seem like a lot of extra work., but in essence at the end of the Program all I have to do is have a simple For...Next Loop for each Asset Array; which then Deletes everything that is "In-Flight" at the time.
As a note, this isn't strictly necessary with AppGameKit as it'll do this automatically anyway... still I'm more typically programming in C++., where this doesn't happen; and it's easy to accidentally leave things resident in memory; so it's more a habit at this point.