]> git.localhorst.tv Git - l2e.git/commitdiff
consistent naming of graphics drawing functions
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 23 Jan 2013 00:11:25 +0000 (18:11 -0600)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 23 Jan 2013 00:11:25 +0000 (18:11 -0600)
src/graphics/Frame.cpp
src/graphics/Texture.cpp
src/graphics/Texture.h
src/menu/CapsuleChangeMenu.cpp
src/menu/CapsuleMenu.cpp
src/menu/PartyMenu.cpp

index f9d88253a440bd1e0b9f7d8b4756c4554e1332ff..4ba8f4a57a6471ef93ef78968537e92a18a09076 100644 (file)
@@ -35,7 +35,7 @@ void Frame::Draw(SDL_Surface *dest, const Vector<int> &position, int width, int
 
        // top border
        Texture(surface, Vector<int>(RepeatWidth(), BorderHeight()), Vector<int>(offset.X() + BorderWidth(), offset.Y()))
-       .Render(dest, Vector<int>(position.X() + BorderWidth(), position.Y()), Vector<int>(position.X() + width - BorderWidth(), position.Y() + BorderHeight()));
+       .Draw(dest, Vector<int>(position.X() + BorderWidth(), position.Y()), Vector<int>(position.X() + width - BorderWidth(), position.Y() + BorderHeight()));
 
        // top-right corner
        srcRect.x = offset.X() + RepeatWidth() + BorderWidth();
@@ -45,15 +45,15 @@ void Frame::Draw(SDL_Surface *dest, const Vector<int> &position, int width, int
 
        // left border
        Texture(surface, Vector<int>(BorderWidth(), RepeatHeight()), Vector<int>(offset.X(), offset.Y() + BorderHeight()))
-       .Render(dest, Vector<int>(position.X(), position.Y() + BorderHeight()), Vector<int>(position.X() + BorderWidth(), position.Y() + height - BorderHeight()));
+       .Draw(dest, Vector<int>(position.X(), position.Y() + BorderHeight()), Vector<int>(position.X() + BorderWidth(), position.Y() + height - BorderHeight()));
 
        // center fill
        Texture(surface, RepeatSize(), Vector<int>(offset.X() + BorderWidth(), offset.Y() + BorderHeight()))
-       .Render(dest, position + BorderSize(), position + Vector<int>(width, height) - BorderSize());
+       .Draw(dest, position + BorderSize(), position + Vector<int>(width, height) - BorderSize());
 
        // right border
        Texture(surface, Vector<int>(BorderWidth(), RepeatHeight()), Vector<int>(offset.X() + BorderWidth() + RepeatWidth(), offset.Y() + BorderHeight()))
-       .Render(dest, Vector<int>(position.X() + width - BorderWidth(), position.Y() + BorderHeight()), Vector<int>(position.X() + width, position.Y() + height - BorderHeight()));
+       .Draw(dest, Vector<int>(position.X() + width - BorderWidth(), position.Y() + BorderHeight()), Vector<int>(position.X() + width, position.Y() + height - BorderHeight()));
 
        // bottom-left corner
        srcRect.x = offset.X();
@@ -66,7 +66,7 @@ void Frame::Draw(SDL_Surface *dest, const Vector<int> &position, int width, int
 
        // bottom border
        Texture(surface, Vector<int>(RepeatWidth(), BorderHeight()), Vector<int>(offset.X() + BorderWidth(), offset.Y() + BorderHeight() + RepeatHeight()))
-       .Render(dest, Vector<int>(position.X() + BorderWidth(), position.Y() + height - BorderHeight()), Vector<int>(position.X() + width - BorderWidth(), position.Y() + height));
+       .Draw(dest, Vector<int>(position.X() + BorderWidth(), position.Y() + height - BorderHeight()), Vector<int>(position.X() + width - BorderWidth(), position.Y() + height));
 
        // bottom-right corner
        srcRect.x = offset.X() + BorderWidth() + RepeatWidth();
index 97094bc5209c9ba34456ca4aeb7997f5487d8d40..9c49db4060ba32aa4d9728e69a164bf5676d850c 100644 (file)
@@ -26,7 +26,7 @@ Texture::~Texture() {
 }
 
 
-void Texture::Render(SDL_Surface *dest, const Vector<int> &from, const Vector<int> &to) const {
+void Texture::Draw(SDL_Surface *dest, const Vector<int> &from, const Vector<int> &to) const {
        SDL_Rect destRect;
        destRect.x = from.X();
        destRect.y = from.Y();
index b3b920882d152cc5eafde87ddc2dcbef3b723a14..283be3eebd03f9b26011615ac0291630553b67e2 100644 (file)
@@ -19,7 +19,7 @@ public:
        static const int TYPE_ID = 410;
 
 public:
-       void Render(SDL_Surface *dest, const math::Vector<int> &from, const math::Vector<int> &to) const;
+       void Draw(SDL_Surface *dest, const math::Vector<int> &from, const math::Vector<int> &to) const;
 
 public:
        void SetSurface(SDL_Surface *s) { surface = s; }
index 3897cb696679a689abe4c254cef6c3bb193256e3..47c7b2eb5d57bdae5ccbd8a696a907477b75f5de 100644 (file)
@@ -153,7 +153,7 @@ void CapsuleChangeMenu::RenderClasses(SDL_Surface *screen, const Vector<int> &of
        Vector<int> target(
                        cursor.X() + parent->Res().capsuleSelectTopLeft->Width(),
                        cursor.Y() + numClasses * parent->Res().capsuleSelectLadder->Height());
-       parent->Res().capsuleSelectLeftRepeat->Render(screen, cursor, target);
+       parent->Res().capsuleSelectLeftRepeat->Draw(screen, cursor, target);
        cursor.Y() = target.Y();
        parent->Res().capsuleSelectBottomLeft->Draw(screen, cursor);
        cursor.X() += parent->Res().capsuleSelectTopLeft->Width();
@@ -185,7 +185,7 @@ void CapsuleChangeMenu::RenderClasses(SDL_Surface *screen, const Vector<int> &of
        target = Vector<int>(
                        cursor.X() + parent->Res().capsuleSelectTopRight->Width(),
                        cursor.Y() + numClasses * parent->Res().capsuleSelectLadder->Height());
-       parent->Res().capsuleSelectRightRepeat->Render(screen, cursor, target);
+       parent->Res().capsuleSelectRightRepeat->Draw(screen, cursor, target);
        cursor.Y() = target.Y();
        parent->Res().capsuleSelectBottomRight->Draw(screen, cursor);
 }
index b45a204a9366514af10046ac8127ffbd8f83d1d4..e2a983ea81b3b5b2a5d1d2d8b393bd55c079fa76 100644 (file)
@@ -117,7 +117,7 @@ void CapsuleMenu::Render(SDL_Surface *screen) {
 }
 
 void CapsuleMenu::RenderBackground(SDL_Surface *screen) const {
-       Res().capsulebg->Render(screen, Vector<int>(), Vector<int>(screen->w, screen->h));
+       Res().capsulebg->Draw(screen, Vector<int>(), Vector<int>(screen->w, screen->h));
 }
 
 void CapsuleMenu::RenderCapsule(SDL_Surface *screen, const Vector<int> &offset) const {
index 4a347c508914c274e9afbc7d47126fd1c8dc8b4c..8e627ee312ba1902ffe02d5a59427e9b90d948de 100644 (file)
@@ -153,7 +153,7 @@ int PartyMenu::Height() const {
 }
 
 void PartyMenu::RenderBackground(SDL_Surface *screen) const {
-       Res().menubg->Render(screen, Vector<int>(), Vector<int>(screen->w, screen->h));
+       Res().menubg->Draw(screen, Vector<int>(), Vector<int>(screen->w, screen->h));
 }
 
 void PartyMenu::RenderHeros(SDL_Surface *screen, const Vector<int> &offset) const {