[Super-tux-commit] supertux/lib/math vector.h,1.3,1.4
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-08-05 10:08:52
|
Update of /cvsroot/super-tux/supertux/lib/math In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25085/lib/math Modified Files: vector.h Log Message: 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. Index: vector.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/math/vector.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vector.h 21 Jul 2004 16:51:52 -0000 1.3 +++ vector.h 5 Aug 2004 10:08:43 -0000 1.4 @@ -20,6 +20,8 @@ #ifndef SUPERTUX_VECTOR_H #define SUPERTUX_VECTOR_H +#include "special/base.h" + namespace SuperTux { @@ -34,6 +36,9 @@ 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) { } |