From: Matt Mullins Date: Wed, 13 Jun 2012 05:58:49 +0000 (-0700) Subject: Formatting and variable name changes for Text constructors. X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=a26fe6fbf33254af82163e2d0c09ca887d4d40df;p=IvanGame.git Formatting and variable name changes for Text constructors. --- diff --git a/Text.cpp b/Text.cpp index 9ca64b4..7d3f4af 100644 --- a/Text.cpp +++ b/Text.cpp @@ -6,15 +6,29 @@ #include 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 --- 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