issue #4039: delete name "converted_x", "converted_y", "converted_width", "converted_height".

This commit is contained in:
boyu0 2014-02-24 20:14:46 +08:00
parent 2bc91c2ce3
commit d15009c510
2 changed files with 16 additions and 16 deletions

View File

@ -494,15 +494,15 @@ void TMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
Point p(x + objectGroup->getPositionOffset().x, _mapSize.height * _tileSize.height - y - objectGroup->getPositionOffset().x - attributeDict["height"].asInt());
p = CC_POINT_PIXELS_TO_POINTS(p);
dict["converted_x"] = Value(p.x);
dict["converted_y"] = Value(p.y);
dict["x"] = Value(p.x);
dict["y"] = Value(p.y);
int width = attributeDict["width"].asInt();
int height = attributeDict["height"].asInt();
Size s(width, height);
s = CC_SIZE_PIXELS_TO_POINTS(s);
dict["converted_width"] = Value(s.width);
dict["converted_height"] = Value(s.height);
dict["width"] = Value(s.width);
dict["height"] = Value(s.height);
// Add the object to the objectGroup
objectGroup->getObjects().push_back(Value(dict));

View File

@ -778,10 +778,10 @@ void TMXOrthoObjectsTest::onDraw()
{
ValueMap& dict = obj.asValueMap();
float x = dict["converted_x"].asFloat();
float y = dict["converted_y"].asFloat();
float width = dict["converted_width"].asFloat();
float height = dict["converted_height"].asFloat();
float x = dict["x"].asFloat();
float y = dict["y"].asFloat();
float width = dict["width"].asFloat();
float height = dict["height"].asFloat();
glLineWidth(3);
@ -850,10 +850,10 @@ void TMXIsoObjectsTest::onDraw()
for (auto& obj : objects)
{
ValueMap& dict = obj.asValueMap();
float x = dict["converted_x"].asFloat();
float y = dict["converted_y"].asFloat();
float width = dict["converted_width"].asFloat();
float height = dict["converted_height"].asFloat();
float x = dict["x"].asFloat();
float y = dict["y"].asFloat();
float width = dict["width"].asFloat();
float height = dict["height"].asFloat();
glLineWidth(3);
@ -1535,10 +1535,10 @@ void TMXGIDObjectsTest::onDraw()
{
ValueMap& dict = obj.asValueMap();
float x = dict["converted_x"].asFloat();
float y = dict["converted_y"].asFloat();
float width = dict["converted_width"].asFloat();
float height = dict["converted_height"].asFloat();
float x = dict["x"].asFloat();
float y = dict["y"].asFloat();
float width = dict["width"].asFloat();
float height = dict["height"].asFloat();
glLineWidth(3);