We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Cocos2d-x V3 - Tilemap Image Source Path
Cocos2d-x V3 - Tilemap Image Source Path
Bug #2492 [Rejected]
- Status changed from New to Closed
- % Done changed from 0 to 100
This bug is in the version 3.0alpha0-pre, and it fixed at the commit:
https://github.com/dumganhar/cocos2d-x/commit/07d357a858ca54517cf95485c80a81512ae7b9a9
Status: | Rejected | |
---|---|---|
Start date: | 2013-08-06 | |
Priority: | Normal | |
Due date: | ||
Assignee: | boyu0 | |
% Done: | 0% |
|
Category: | all, blackberry | |
Target version: | 3.0-alpha0 |
Issue reported by Daniel Bartley here: http://www.cocos2d-x.org/boards/6/topics/32713
The issue is with TMXTiledMap in release 3.0alpha0-pre.
The source image used in the tmx file should be relative to the that file, but in this version CCTMXLayer looks in the main resource folder.
The error occurs in the file CCTMXLayer.cpp, TMXLayer::initWithTilesetInfo(TMXTilesetInfo tilesetInfo, TMXLayerInfolayerInfo, TMXMapInfo *mapInfo)
Version 3:
Version 2 (worked properly):
m_sSourceImage contained the full path to the image file, where _sourceImage only has the file name.
The code to reproduce the problem is simply:
Note: The tmx file and image file have to be in a sub-folder to reproduce the error, if you move the tmx and source image into the main resource folder it works.