View Single Post
  #16  
Old 08-21-2008, 07:33 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
My god, seriously? You know how long I've been trying to get that?

Just an idea though, I think it would be better if you had like layer[i].tilelayers[x] instead. By default, layer[0].tilelayercount would be 1 and layer[i].tilelayercount for all other i except 1 would be equal to 0.
<snip>
For backwards compatibility, the level.tilelayers array would just be a reference to level.layer[0].tilelayers.

Make sense?
No, Stefan's way is better.

The tilelayer already has alpha, red, green, and blue variables, so adding layer would fit right in.

The layer variable also doesn't work the way you're making it look in your example.
Quote:
Originally Posted by zokemon View Post
I mean, it would be pretty wierd to have tilelayers[0] at layer 0, tilelayers[1] at layer 3 and tilelayers[2] at layer 1, you know?
Its not like you're going to be able to tell, so don't worry about how other people do it.
__________________
Reply With Quote