From 47676f019a2a12879ec2969d82f3376e68899378 Mon Sep 17 00:00:00 2001 From: Ivan Hernandez Date: Fri, 17 Dec 2010 00:07:03 -0600 Subject: [PATCH] updated todos and began extending Point2D --- Actor.h | 1 - Background.h | 3 +-- Level.h | 2 +- LevelWorld.cpp | 1 - fns.cpp | 22 ++++++++++++++++++++++ fns.h | 19 +++++++++++-------- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/Actor.h b/Actor.h index 26f4708..f928bcb 100644 --- a/Actor.h +++ b/Actor.h @@ -18,7 +18,6 @@ class Actor Actor(Animation *anim); int mFrame;/**< The frame # */ int mCurrentAnimation;/**< Index to the current loaded animation */ - int mAnimation;/**< \todo See if this is used anywhere. Else Del */ std::vector mAnimations;/**< Vector of pointers to all of this sprite's Animations */ private: diff --git a/Background.h b/Background.h index 23bf3d5..2742d6c 100644 --- a/Background.h +++ b/Background.h @@ -18,8 +18,7 @@ class Background{ SizeD _imageSize;/// string to_string(const T& t) { diff --git a/fns.h b/fns.h index 2047c42..d9d6423 100644 --- a/fns.h +++ b/fns.h @@ -9,7 +9,6 @@ using namespace std; SDL_Surface* LoadImage( std::string filename );/**< Loads supported images. */ -//class SizeD; /** 2D position or vector placed here because of general access*/ class Point2D { @@ -17,20 +16,24 @@ class Point2D friend class SizeD; Point2D ():X(0),Y(0){} Point2D (double x, double y):X(x),Y(y){} - Point2D (const Point2D& copy)/**< Copy object */ + Point2D (const Point2D& copy)///< Copy object { X = copy.X; Y = copy.Y; } -// Point2D (const SizeD& copy)/**< Copy object */ /// \todo make SizeD work here -/* { - X = copy.width; - Y = copy.height; - } -*/ + Point2D (/*const SizeD& copy*/int i);///< Copy object \todo make SizeD work here + /** \todo add typical vector functionality like length, nomal vectors etc. */ double X;/**< X position */ double Y;/**< Y Position */ + double length();/**< The length of the Point (from origin) + \return length of the vector/point + */ + Point2D add(Point2D pt);/**< Adds the value of the point to this \return This after modificaiton*/ + Point2D sub(Point2D pt);/**< Subtracts the value of the point from this \return This after modification*/ + Point2D mult(double d);/**< Multiplies the values of this by i \return This after modificaiton*/ + Point2D div(double d);/**< Divides the values of this by i \return This after modificaiton*/ + }; /** Just for more logical names for sizes of objects*/ -- 2.11.0