Quote:
Originally Posted by ZeLpH_MyStiK
although, it's probably better to just use 367 instead of 127 + 15 * 16
[...]
ah, that's what comments are for okiesmoke =p
|
It is not. Ideally you would use a constant like this.TILE_
FOOBAR = 127 + 15 * 16;, or at least a function like getTileFromTileset(x, y) if the tile is not really namable. Putting magic numbers and then commenting them is not exactly elegant, and the foo + bar * 16 form at least adds a lot of editability.
Quote:
Originally Posted by Raeiphon
odd, It works now, but the normal grass code is 2047 for some reason, is there any way to verify that?
|
Mouseover it in the tile selection frame, and you are going to see the coordinates at the bottom of it. The `code' is x + 16 * y, I think.
Alternatively, write a script to output the `code' of the tile below your mouse cursor or something.
Quote:
Originally Posted by xAndrewx
It'd be alot easier, if you ever wanted to add more then just one tile. Future planning
|
Because it is totally cool to go against
generally accepted programming practice for no reason at all.