Quote: "sImageFilename - The filename of the sub image as stored in subimages.txt. Do not use a path before the filename."
That is the ID.
For instance, if you have such subimages text file:
1:0:0:32:32
2:32:32:32:32
And you want to load those two subimages, you do:
imageParent = loadImage("mainImage.png")
subImage1 = loadSubImage(imageParent,"1")
subImage2 = loadSubImage(imageParent,"2")
I believe that you can also name your IDs in different way than giving them numbers.
This should work too:
tree:0:0:32:64
rock:32:0:32:32
imageParent = loadImage("mainImage.png")
subImage1 = loadSubImage(imageParent,"tree")
subImage2 = loadSubImage(imageParent,"rock")
It's just easier to load all subimages when their IDs are 1,2,3... and so on. Consider this example:
imageParent = loadImage("mainImage.png")
dim subImages[10]
for i = 1 to 10
subImages[i-1] = loadSubImage(imageParent,Str(i))
next i
That'd load subimages with id from 1 to 10 inclusive into an array.