diff options
Diffstat (limited to 'saga/actor.h')
-rw-r--r-- | saga/actor.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/saga/actor.h b/saga/actor.h index babc847ef8..0d87b6a4cd 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -152,6 +152,9 @@ struct Location { int v() const { return y; } + int uv() const { + return u() + v(); + } void delta(const Location &location, Location &result) const { result.x = x - location.x; result.y = y - location.y; @@ -171,6 +174,10 @@ struct Location { screenPoint.x = x / ACTOR_LMULT; screenPoint.y = y / ACTOR_LMULT; } + void toScreenPointUV(Point &screenPoint) const { + screenPoint.x = u(); + screenPoint.y = v(); + } void toScreenPointXYZ(Point &screenPoint) const { screenPoint.x = x / ACTOR_LMULT; screenPoint.y = y / ACTOR_LMULT - z; |