mirror of https://github.com/axmolengine/axmol.git
issue #4039: delete name "converted_x", "converted_y", "converted_width", "converted_height".
This commit is contained in:
parent
2bc91c2ce3
commit
d15009c510
|
@ -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());
|
Point p(x + objectGroup->getPositionOffset().x, _mapSize.height * _tileSize.height - y - objectGroup->getPositionOffset().x - attributeDict["height"].asInt());
|
||||||
p = CC_POINT_PIXELS_TO_POINTS(p);
|
p = CC_POINT_PIXELS_TO_POINTS(p);
|
||||||
dict["converted_x"] = Value(p.x);
|
dict["x"] = Value(p.x);
|
||||||
dict["converted_y"] = Value(p.y);
|
dict["y"] = Value(p.y);
|
||||||
|
|
||||||
int width = attributeDict["width"].asInt();
|
int width = attributeDict["width"].asInt();
|
||||||
int height = attributeDict["height"].asInt();
|
int height = attributeDict["height"].asInt();
|
||||||
Size s(width, height);
|
Size s(width, height);
|
||||||
s = CC_SIZE_PIXELS_TO_POINTS(s);
|
s = CC_SIZE_PIXELS_TO_POINTS(s);
|
||||||
dict["converted_width"] = Value(s.width);
|
dict["width"] = Value(s.width);
|
||||||
dict["converted_height"] = Value(s.height);
|
dict["height"] = Value(s.height);
|
||||||
|
|
||||||
// Add the object to the objectGroup
|
// Add the object to the objectGroup
|
||||||
objectGroup->getObjects().push_back(Value(dict));
|
objectGroup->getObjects().push_back(Value(dict));
|
||||||
|
|
|
@ -778,10 +778,10 @@ void TMXOrthoObjectsTest::onDraw()
|
||||||
{
|
{
|
||||||
ValueMap& dict = obj.asValueMap();
|
ValueMap& dict = obj.asValueMap();
|
||||||
|
|
||||||
float x = dict["converted_x"].asFloat();
|
float x = dict["x"].asFloat();
|
||||||
float y = dict["converted_y"].asFloat();
|
float y = dict["y"].asFloat();
|
||||||
float width = dict["converted_width"].asFloat();
|
float width = dict["width"].asFloat();
|
||||||
float height = dict["converted_height"].asFloat();
|
float height = dict["height"].asFloat();
|
||||||
|
|
||||||
glLineWidth(3);
|
glLineWidth(3);
|
||||||
|
|
||||||
|
@ -850,10 +850,10 @@ void TMXIsoObjectsTest::onDraw()
|
||||||
for (auto& obj : objects)
|
for (auto& obj : objects)
|
||||||
{
|
{
|
||||||
ValueMap& dict = obj.asValueMap();
|
ValueMap& dict = obj.asValueMap();
|
||||||
float x = dict["converted_x"].asFloat();
|
float x = dict["x"].asFloat();
|
||||||
float y = dict["converted_y"].asFloat();
|
float y = dict["y"].asFloat();
|
||||||
float width = dict["converted_width"].asFloat();
|
float width = dict["width"].asFloat();
|
||||||
float height = dict["converted_height"].asFloat();
|
float height = dict["height"].asFloat();
|
||||||
|
|
||||||
glLineWidth(3);
|
glLineWidth(3);
|
||||||
|
|
||||||
|
@ -1535,10 +1535,10 @@ void TMXGIDObjectsTest::onDraw()
|
||||||
{
|
{
|
||||||
ValueMap& dict = obj.asValueMap();
|
ValueMap& dict = obj.asValueMap();
|
||||||
|
|
||||||
float x = dict["converted_x"].asFloat();
|
float x = dict["x"].asFloat();
|
||||||
float y = dict["converted_y"].asFloat();
|
float y = dict["y"].asFloat();
|
||||||
float width = dict["converted_width"].asFloat();
|
float width = dict["width"].asFloat();
|
||||||
float height = dict["converted_height"].asFloat();
|
float height = dict["height"].asFloat();
|
||||||
|
|
||||||
glLineWidth(3);
|
glLineWidth(3);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue