Formatting and variable name changes for Text constructors.
authorMatt Mullins <mokomull@gmail.com>
Wed, 13 Jun 2012 05:58:49 +0000 (22:58 -0700)
committerMatt Mullins <mokomull@gmail.com>
Sat, 16 Jun 2012 05:02:08 +0000 (22:02 -0700)
Text.cpp
Text.h

index 9ca64b4..7d3f4af 100644 (file)
--- a/Text.cpp
+++ b/Text.cpp
@@ -6,15 +6,29 @@
 #include <GL/gl.h>
 using namespace std;
 
-Text::Text(string filename, FontType t, int s, SDL_Color c, int w, int h ) : WorldObject(filename), mFont(Game::game()->getCurrentLevel()->getFont(s, t)), color(c), width(w), height(h) {
+Text::Text(string id, FontType t, int s, SDL_Color c, int w, int h)
+  : WorldObject(id),
+    mFont(Game::game()->getCurrentLevel()->getFont(s, t)),
+    color(c),
+    width(w),
+    height(h)
+{
        
 }
 
-Text::Text(string name, string t, int s, SDL_Color c, int w, int h) : WorldObject(name), text(t), mFont(Game::game()->getCurrentLevel()->getFont(s, (FontType)0)), color(c), width(w), height(h) {
+Text::Text(string name, string t, int s, SDL_Color c, int w, int h)
+  : WorldObject(name),
+    text(t),
+    mFont(Game::game()->getCurrentLevel()->getFont(s, (FontType)0)),
+    color(c),
+    width(w),
+    height(h)
+{
 
 }
 
-Text::~Text() {
+Text::~Text()
+{
        Game::game()->getCurrentLevel()->closeFont(mFont);
 }
 
@@ -73,5 +87,6 @@ void Text::draw()
        glDeleteTextures(1, &texture);
 }
 
-void Text::update() {
-}
\ No newline at end of file
+void Text::update()
+{
+}
diff --git a/Text.h b/Text.h
index c7de0f8..10e411b 100644 (file)
--- a/Text.h
+++ b/Text.h
@@ -17,7 +17,7 @@ using namespace std;
  */
 class Text : public WorldObject
 {
-       public:
+public:
        Font* mFont;
        string text;
        SDL_Color color;
@@ -26,7 +26,7 @@ class Text : public WorldObject
        int width;
        int height;
        Text(string name, string t, int size = 24, SDL_Color c = WHITE, int w = 600, int h = 150);
-       Text(string filename, FontType t, int size = 24, SDL_Color c = WHITE, int w = 600, int h = 150);
+       Text(string id, FontType t, int size = 24, SDL_Color c = WHITE, int w = 600, int h = 150);
        ~Text();
 };
 #endif