Thread: Y-Order
View Single Post
  #38  
Old 09-20-2002, 06:14 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
*reviving the thread*
Quote:
Originally posted by Kaimetsu


I can't make assumptions about how Stefan coded it, but my best guess is that each layer has its own array of images. And sorting lots of small arrays is faster than sorting one big array, which you'd need to do in your scenario.
Nope. If an image would be placed in layer 3.5 you would put it in the array for layer 3. You'd just have to change the function to compare two images (to find out which has to be displayed first).

I have now found a situation where you would need to get around the y-order: if you want to use showimg for displaying something that should look like a gani. When you are placing a sprite in a gani it won't be sorted by the y-axis.
For showimg this could be done by adding a new command "attachimg img,attachtoimg;". So you could display a shadow and then you could attach other images to it, so you could make things hover (like you can do with ganis).
The images attached to the shadow would be sorted directly after the shadow (I know, not easy to do).
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote