mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-24 17:26:41 +00:00
get rid of beforeScaleOffset
This commit is contained in:
parent
c959b9f6d6
commit
048a787cb1
4 changed files with 7 additions and 17 deletions
|
@ -126,7 +126,6 @@ RenderObject* RenderObject::getTopParent() const
|
|||
static glm::mat4 matrixChain(const RenderObject *ro)
|
||||
{
|
||||
glm::mat4 tranformMatrix = glm::scale(
|
||||
glm::translate(
|
||||
glm::rotate(
|
||||
glm::translate(
|
||||
ro->getParent() ? matrixChain(ro->getParent()) : glm::mat4(1.0f),
|
||||
|
@ -135,8 +134,6 @@ static glm::mat4 matrixChain(const RenderObject *ro)
|
|||
ro->rotation.z + ro->rotationOffset.z,
|
||||
glm::vec3(0.0f, 0.0f, 1.0f)
|
||||
),
|
||||
glm::vec3(ro->beforeScaleOffset.x, ro->beforeScaleOffset.y, 0.0f)
|
||||
),
|
||||
glm::vec3(ro->scale.x, ro->scale.y, 0.0f)
|
||||
);
|
||||
|
||||
|
@ -154,7 +151,6 @@ static void matrixChain(RenderObject *ro)
|
|||
|
||||
glTranslatef(ro->position.x+ro->offset.x, ro->position.y+ro->offset.y, 0);
|
||||
glRotatef(ro->rotation.z+ro->rotationOffset.z, 0, 0, 1);
|
||||
glTranslatef(ro->beforeScaleOffset.x, ro->beforeScaleOffset.y, 0);
|
||||
glScalef(ro->scale.x, ro->scale.y, 0);
|
||||
if (ro->isfh())
|
||||
{
|
||||
|
@ -465,7 +461,6 @@ nofollow:
|
|||
if (isfh())
|
||||
glRotatef(180, 0, 1, 0);
|
||||
|
||||
glTranslatef(beforeScaleOffset.x, beforeScaleOffset.y, beforeScaleOffset.z);
|
||||
const Vector renderScale = scale * rs.scale;
|
||||
glScalef(renderScale.x, renderScale.y, 1);
|
||||
glTranslatef(internalOffset.x, internalOffset.y, internalOffset.z);
|
||||
|
@ -732,7 +727,6 @@ void RenderObject::onUpdate(float dt)
|
|||
alpha.update(dt);
|
||||
offset.update(dt);
|
||||
internalOffset.update(dt);
|
||||
beforeScaleOffset.update(dt);
|
||||
rotationOffset.update(dt);
|
||||
|
||||
bool hasChildrenToDelete = false;
|
||||
|
|
|
@ -252,7 +252,7 @@ public:
|
|||
InterpolatedVector scale;
|
||||
InterpolatedVector color, alpha;
|
||||
InterpolatedVector rotation;
|
||||
InterpolatedVector offset, rotationOffset, internalOffset, beforeScaleOffset;
|
||||
InterpolatedVector offset, rotationOffset, internalOffset;
|
||||
InterpolatedVector velocity, gravity;
|
||||
|
||||
CountedPtr<Texture> texture;
|
||||
|
|
|
@ -172,7 +172,6 @@ private:
|
|||
struct TileData
|
||||
{
|
||||
float x, y, scalex, scaley;
|
||||
//float beforeScaleOffsetX, beforeScaleOffsetY; // almost always 0. // TODO: this is nasty, ideally get rid of this
|
||||
float rotation;
|
||||
unsigned flags; // TileFlags
|
||||
unsigned tag; // FIXME: make this int
|
||||
|
|
|
@ -156,9 +156,6 @@ void TileRender::onRender(const RenderState& rs) const
|
|||
default: ; // both or none set, nothing to do
|
||||
}
|
||||
|
||||
// this is only relevant in editor mode and is always 0 otherwise
|
||||
//glTranslatef(tile.beforeScaleOffsetX, tile.beforeScaleOffsetY, 0);
|
||||
|
||||
glScalef(sw, sh, 1);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue