From: Ricardo Cruz Date: Thu, 5 Aug 2004 10:08:43 +0000 (+0000) Subject: Added base_type to vector constructor. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ec21d00383f308fc6cca7d88b0bd39bd7b910788;p=supertux.git Added base_type to vector constructor. This way it is possible to just pass the object's base to draw() and other functions that want Vectors. SVN-Revision: 1704 --- diff --git a/lib/math/vector.h b/lib/math/vector.h index 8e8555db8..90588c827 100644 --- a/lib/math/vector.h +++ b/lib/math/vector.h @@ -20,6 +20,8 @@ #ifndef SUPERTUX_VECTOR_H #define SUPERTUX_VECTOR_H +#include "special/base.h" + namespace SuperTux { @@ -34,6 +36,9 @@ namespace SuperTux Vector(const Vector& other) : x(other.x), y(other.y) { } + Vector(const base_type& base) + : x(base.x), y(base.y) + { } Vector() : x(0), y(0) { }