Layer IDs work differently than normal Hollywood object IDs. Layer IDs are always consecutively numbered from 1 to n. This ID also represents the layer's position in the stack of layers (1=backmost layer, n=frontmost layer) As per definition, passing 0 to InsertLayer() will insert the layer in the last position, but it won't return its ID, see here: http://www.hollywood-mal.com/docs/html/ ... Layer.html
If you want to get the ID of the last layer, simply query #ATTRLAYERS on the bgpic or display. Thus, the question of a "vacant" layer ID doesn't make much sense. Choosing an ID for a layer depends on where you want your layer to appear.
Say I have a 10 thousand layers, and only 30 of them are actually drawn to screen. How does Hollywood treat the rest 9970 Layers?
By other words, If screens size is 1980x1080, and i draw a layer to position 2500, 1600 (outside of screen), will Hollywood slow down when there are 10 thousand of these, or will it itself understand that there is no actual need to draw anything, and hence it will still stay somewhat fast.
Reason Why I am asking is that I am going to be making something that you can scroll into all dircetions, and since the size of a whole "map" (so to say) can easily be even 10 000 x 10 000, then I wonder do i need to make my own draw function which would only draw those layers that are actually seen on screen on that time, or can i simply keep drawing each layer everytime refresh is made, regardless if they are actually displayed on screen or outside of screen.
If the layer is outside the visible area, nothing will be drawn so there should be no slowdown. However, it you call functions like ScaleLayer() or RotateLayer() on layers outside the visible area, Hollywood will still transform the layers' pixel data although it's currently not visible.
Good, good, very good. This will make it much easier for me. I can simply do the program so that it keeps each layers co-ordinates exactly where they supposedly are, even when out of screen, and then i just simply go through every layer and draw them.
In GetAttribute command at #DISPLAY it doesnt mention the possibility of using #ATTRLAYERS, it only mentions of #ATTLAYERSON. At #BGPIC it does mention the #ATTLAYERS