diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-09 22:39:51 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-09 22:39:51 -0700 |
commit | d80a7f02c4e1b9f9a728364b61118cc25d872a58 (patch) | |
tree | d4988e6bf0a883f0b64b45a886a2dfd23ff5a43a /src | |
parent | b19fb7a2d562931c08472794fea90a0e4c320760 (diff) | |
download | mana-client-d80a7f02c4e1b9f9a728364b61118cc25d872a58.tar.gz mana-client-d80a7f02c4e1b9f9a728364b61118cc25d872a58.tar.bz2 mana-client-d80a7f02c4e1b9f9a728364b61118cc25d872a58.tar.xz mana-client-d80a7f02c4e1b9f9a728364b61118cc25d872a58.zip |
More code style cleanups
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/viewport.cpp | 6 | ||||
-rw-r--r-- | src/gui/viewport.h | 36 |
2 files changed, 14 insertions, 28 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 75b756f5..5bb29987 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -77,14 +77,12 @@ Viewport::~Viewport() delete mPopupMenu; } -void -Viewport::setMap(Map *map) +void Viewport::setMap(Map *map) { mMap = map; } -void -Viewport::draw(gcn::Graphics *gcnGraphics) +void Viewport::draw(gcn::Graphics *gcnGraphics) { static int lastTick = tick_time; diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 3120de91..ef8e7a38 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -62,75 +62,63 @@ class Viewport : public WindowContainer, public gcn::MouseListener, /** * Sets the map displayed by the viewport. */ - void - setMap(Map *map); + void setMap(Map *map); /** * Draws the viewport. */ - void - draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics); /** * Implements player to keep following mouse. */ - void - logic(); + void logic(); /** * Toggles whether the path debug graphics are shown */ - void - toggleDebugPath() { mShowDebugPath = !mShowDebugPath; } + void toggleDebugPath() { mShowDebugPath = !mShowDebugPath; } /** * Handles mouse press on map. */ - void - mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event); /** * Handles mouse move on map */ - void - mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event); /** * Handles mouse button release on map. */ - void - mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event); /** * Shows a popup for an item. * TODO Find some way to get rid of Item here */ - void - showPopup(int x, int y, Item *item); + void showPopup(int x, int y, Item *item); /** * A relevant config option changed. */ - void - optionChanged(const std::string &name); + void optionChanged(const std::string &name); /** * Returns camera x offset in pixels. */ - int - getCameraX() const { return (int) mPixelViewX; } + int getCameraX() const { return (int) mPixelViewX; } /** * Returns camera y offset in pixels. */ - int - getCameraY() const { return (int) mPixelViewY; } + int getCameraY() const { return (int) mPixelViewY; } /** * Changes viewpoint by relative pixel coordinates. */ - void - scrollBy(float x, float y) { mPixelViewX += x; mPixelViewY += y; } + void scrollBy(float x, float y) { mPixelViewX += x; mPixelViewY += y; } private: Map *mMap; /**< The current map. */ |