Added the basic background class and added more aplicable comments to
authorIvan Hernandez <iturtleman128@gmail.com>
Wed, 23 Dec 2009 19:52:44 +0000 (13:52 -0600)
committerIvan Hernandez <iturtleman128@gmail.com>
Wed, 23 Dec 2009 19:52:44 +0000 (13:52 -0600)
previous classes.

Background.cpp [new file with mode: 0644]
Background.h [new file with mode: 0644]

diff --git a/Background.cpp b/Background.cpp
new file mode 100644 (file)
index 0000000..3b72594
--- /dev/null
@@ -0,0 +1,8 @@
+#include "Background.h"
+
+Background::Background(std::string name, std::string filename):_name(name){
+       /** \todo Implememnt the constructor that gets image sizes and puts it together so that background can be used correctly. */
+}
+void Background::draw(){
+       /** \todo implement draw for background scrolling and otherwise. */
+}
diff --git a/Background.h b/Background.h
new file mode 100644 (file)
index 0000000..05f5467
--- /dev/null
@@ -0,0 +1,29 @@
+#include "Game.h"// for size of game window
+#include "fns.h"
+#include <string>
+#include <iostream>
+
+/**
+  The Background
+
+  This class is tasked with the following:
+    - loading the background 
+       - drawing the background
+ */
+
+class Background{
+       private:
+       std::string _name;
+       SizeD _imageSize;
+       /** \todo _sections;//if needed */
+       SDL_Surface *mScreen;
+
+       public:
+       Background(std::string name, std::string filename);
+       void draw();/**< Draw background. */
+       std::string getName(){ return _name; }/** Returns name. */
+       void setName(std::string name){ _name = name; }/** Set Name. */
+       SizeD size(){ return _imageSize;}/** returns image size */
+       
+};
+