cocos2d-objc
cocos2d-objc copied to clipboard
cc_vertexz=automatic not rendering the tile map layer
Tile map layer does not render and is blank when cc_vertexz is set to automatic in layer properties of an isometric tile map.
AutomaticVertexZ method in CCTiledMapLayer seems to be returning an overflow value, causing an improper setting of z value to tiles in layers with cc_vertexz=automatic layers. To avoid this i converted the z value to int and now proper z values are being set.

Confirmed this problem! Thanks for reporting it. I'm adding tests to the testbed for this issue, I bet a lot of people don't know about the automaticZ functionality.
The problem is the use of unsigned integers:
(lldb) p maxVal
(NSUInteger) $2 = 128
(lldb) p (maxVal - (tileX + tileY))
(unsigned int) $0 = 46
(lldb) p -(maxVal - (tileX + tileY))
(unsigned int) $1 = 4294967250
Problem exists both in develop and develop-v4
@mu1ex Are you still working on your game?