diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-03-09 10:00:40 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-03-09 10:00:40 -0300 |
commit | 3fc9017fbb1ae81569aa2ac1401e3272f89a6e65 (patch) | |
tree | 41cf8486ac0dd1fc8fee65d2d5395b30e6161f08 | |
parent | 09489e3a78de39bb4d8690f3c65f8a5e7a56a95e (diff) | |
parent | 7957709cb162a646ad5c81f81cce62f0f61b5e1c (diff) |
Merge pull request #1491 from marynate/PR-fix-tilemap-compile
Fix compie error in TileMap::_fix_cell_transform(...)
-rw-r--r-- | scene/2d/tile_map.cpp | 11 | ||||
-rw-r--r-- | scene/2d/tile_map.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index b9d87c1224..2b88ee5dba 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -215,23 +215,24 @@ bool TileMap::get_center_y() const { return center_y; } -void TileMap::_fix_cell_transform(Matrix32& xform,const Cell& c,Vector2& offset,const Size2 &sc) { +void TileMap::_fix_cell_transform(Matrix32& xform,const Cell& p_cell, const Vector2& p_offset, const Size2 &p_sc) { - Size2 s=sc; + Size2 s=p_sc; + Vector2 offset = p_offset; - if (c.transpose) { + if (p_cell.transpose) { SWAP(xform.elements[0].x, xform.elements[0].y); SWAP(xform.elements[1].x, xform.elements[1].y); SWAP(offset.x, offset.y); SWAP(s.x, s.y); } - if (c.flip_h) { + if (p_cell.flip_h) { xform.elements[0].x=-xform.elements[0].x; xform.elements[1].x=-xform.elements[1].x; if (tile_origin==TILE_ORIGIN_TOP_LEFT) offset.x=s.x-offset.x; } - if (c.flip_v) { + if (p_cell.flip_v) { xform.elements[0].y=-xform.elements[0].y; xform.elements[1].y=-xform.elements[1].y; if (tile_origin==TILE_ORIGIN_TOP_LEFT) diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index 3facc9e8b7..e02c4ee5bb 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -148,7 +148,7 @@ private: uint32_t collision_layer; TileOrigin tile_origin; - void _fix_cell_transform(Matrix32& xform, const Cell& c, Vector2 &offset, const Size2 &s); + void _fix_cell_transform(Matrix32& xform, const Cell& p_cell, const Vector2 &p_offset, const Size2 &p_sc); Map<PosKey,Quadrant>::Element *_create_quadrant(const PosKey& p_qk); void _erase_quadrant(Map<PosKey,Quadrant>::Element *Q); |