diff options
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r-- | crawl-ref/source/externs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 1cd0c7dc0c..248be30cda 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -271,6 +271,13 @@ struct coord_def y /= div; return (*this); } + + const coord_def &operator *= (int mul) + { + x *= mul; + y *= mul; + return (*this); + } coord_def operator + (const coord_def &other) const { @@ -302,6 +309,12 @@ struct coord_def return (copy /= div); } + coord_def operator * (int mul) const + { + coord_def copy = *this; + return (copy *= mul); + } + int abs() const { return (x * x + y * y); @@ -1032,6 +1045,7 @@ public: god_type deity() const; bool alive() const; coord_def pos() const; + coord_def target_pos() const; bool swimming() const; bool submerged() const; bool can_drown() const; |