summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-24 18:51:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-24 18:51:45 +0300
commit641b843fd85d096afdd9b171975df91676179f3b (patch)
tree760c38447030adbdb12361978fa614ccfc9cf9fd
parent5a5de75f298bea6f2b861dc1fb9aaf1f3d35d07c (diff)
downloadmv-641b843fd85d096afdd9b171975df91676179f3b.tar.gz
mv-641b843fd85d096afdd9b171975df91676179f3b.tar.bz2
mv-641b843fd85d096afdd9b171975df91676179f3b.tar.xz
mv-641b843fd85d096afdd9b171975df91676179f3b.zip
fix code style.
-rw-r--r--src/being/compoundsprite.cpp2
-rw-r--r--src/client.cpp2
-rw-r--r--src/commands.cpp2
-rw-r--r--src/gui/focushandler.cpp4
-rw-r--r--src/gui/gui.cpp14
-rw-r--r--src/gui/rect.h2
-rw-r--r--src/gui/widgets/basiccontainer.cpp26
-rw-r--r--src/gui/widgets/basiccontainer.h7
-rw-r--r--src/gui/widgets/guitable.cpp12
-rw-r--r--src/gui/widgets/guitable.h2
-rw-r--r--src/gui/widgets/tabstrip.cpp4
-rw-r--r--src/gui/widgets/widget.cpp14
-rw-r--r--src/gui/widgets/widget.h25
-rw-r--r--src/gui/widgets/widget2.h2
-rw-r--r--src/render/graphics.cpp10
-rw-r--r--src/render/graphics.h11
-rw-r--r--src/render/graphicsdef.hpp4
-rw-r--r--src/render/mobileopenglgraphics.cpp4
-rw-r--r--src/render/normalopenglgraphics.cpp4
-rw-r--r--src/render/nullopenglgraphics.cpp4
-rw-r--r--src/render/safeopenglgraphics.cpp4
-rw-r--r--src/render/sdl2graphics.cpp4
-rw-r--r--src/render/sdl2softwaregraphics.cpp4
-rw-r--r--src/render/sdlgraphics.cpp4
-rw-r--r--src/render/surfacegraphics.h4
-rw-r--r--src/resources/atlasmanager.cpp2
26 files changed, 88 insertions, 89 deletions
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp
index ea4a2067f..63dd32fec 100644
--- a/src/being/compoundsprite.cpp
+++ b/src/being/compoundsprite.cpp
@@ -337,7 +337,7 @@ void CompoundSprite::redraw() const
SurfaceGraphics *graphics = new SurfaceGraphics();
graphics->setBlitMode(SurfaceGraphics::BLIT_GFX);
graphics->setTarget(surface);
- graphics->_beginDraw();
+ graphics->beginDraw();
int tileX = mapTileSize / 2;
int tileY = mapTileSize;
diff --git a/src/client.cpp b/src/client.cpp
index afb4c236b..4dccaf0cc 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -585,7 +585,7 @@ void Client::initGraphics()
applyGrabMode();
applyGamma();
- mainGraphics->_beginDraw();
+ mainGraphics->beginDraw();
}
void Client::initTitle()
diff --git a/src/commands.cpp b/src/commands.cpp
index cb40d1a99..864dee6c4 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1379,7 +1379,7 @@ impHandler0(testsdlfont)
for (int f = 0; f < 300; f ++)
data.push_back("test " + toString(f) + "string");
- nullGraphics->_beginDraw();
+ nullGraphics->beginDraw();
clock_gettime(CLOCK_MONOTONIC, &time1);
for (int f = 0; f < 500; f ++)
diff --git a/src/gui/focushandler.cpp b/src/gui/focushandler.cpp
index 9424bbf29..ced7c5f6e 100644
--- a/src/gui/focushandler.cpp
+++ b/src/gui/focushandler.cpp
@@ -341,7 +341,7 @@ void FocusHandler::distributeFocusGainedEvent(const Event &focusEvent)
Widget *const sourceWidget = focusEvent.getSource();
std::list<FocusListener*> focusListeners
- = sourceWidget->_getFocusListeners();
+ = sourceWidget->getFocusListeners();
// Send the event to all focus listeners of the widget.
for (std::list<FocusListener*>::const_iterator
@@ -553,7 +553,7 @@ void FocusHandler::distributeFocusLostEvent(const Event& focusEvent)
Widget *const sourceWidget = focusEvent.getSource();
std::list<FocusListener*> focusListeners
- = sourceWidget->_getFocusListeners();
+ = sourceWidget->getFocusListeners();
// Send the event to all focus listeners of the widget.
for (std::list<FocusListener*>::const_iterator
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index aca1ef4b3..761810c1a 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -873,7 +873,7 @@ void Gui::distributeMouseEvent(Widget *const source,
event.setY(y - widgetY);
std::list<MouseListener*> mouseListeners
- = widget->_getMouseListeners();
+ = widget->getMouseListeners();
unsigned int mouseType = event.getType();
// Send the event to all mouse listeners of the widget.
@@ -1130,9 +1130,9 @@ uint32_t Gui::getMouseState(int *const x, int *const y)
void Gui::setTop(Widget *const top)
{
if (mTop)
- mTop->_setFocusHandler(nullptr);
+ mTop->setFocusHandler(nullptr);
if (top)
- top->_setFocusHandler(mFocusHandler);
+ top->setFocusHandler(mFocusHandler);
mTop = top;
}
@@ -1241,10 +1241,10 @@ Widget* Gui::getKeyEventSource() const
{
Widget* widget = mFocusHandler->getFocused();
- while (widget && widget->_getInternalFocusHandler()
- && widget->_getInternalFocusHandler()->getFocused())
+ while (widget && widget->getInternalFocusHandler()
+ && widget->getInternalFocusHandler()->getFocused())
{
- widget = widget->_getInternalFocusHandler()->getFocused();
+ widget = widget->getInternalFocusHandler()->getFocused();
}
return widget;
@@ -1276,7 +1276,7 @@ void Gui::distributeKeyEvent(KeyEvent &event) const
if (widget->isEnabled())
{
std::list<KeyListener*> keyListeners
- = widget->_getKeyListeners();
+ = widget->getKeyListeners();
const unsigned int eventType = event.getType();
// Send the event to all key listeners of the source widget.
diff --git a/src/gui/rect.h b/src/gui/rect.h
index 8b570a9f7..60ba86ed5 100644
--- a/src/gui/rect.h
+++ b/src/gui/rect.h
@@ -64,7 +64,7 @@
#ifndef GUI_RECT_H
#define GUI_RECT_H
-#include <iostream>
+//#include <iostream>
#include "localconsts.h"
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp
index e81bb2a3e..00386a725 100644
--- a/src/gui/widgets/basiccontainer.cpp
+++ b/src/gui/widgets/basiccontainer.cpp
@@ -208,7 +208,7 @@ Widget *BasicContainer::getWidgetAt(int x, int y)
if (widget->isVisible() && widget->getDimension()
.isPointInRect(x, y))
{
- return *it;;
+ return *it;
}
}
@@ -227,15 +227,15 @@ void BasicContainer::logic()
BLOCK_END("BasicContainer::logic")
}
-void BasicContainer::_setFocusHandler(FocusHandler *const focusHandler)
+void BasicContainer::setFocusHandler(FocusHandler *const focusHandler)
{
- Widget::_setFocusHandler(focusHandler);
+ Widget::setFocusHandler(focusHandler);
if (mInternalFocusHandler)
return;
FOR_EACH (WidgetListConstIterator, iter, mWidgets)
- (*iter)->_setFocusHandler(focusHandler);
+ (*iter)->setFocusHandler(focusHandler);
}
void BasicContainer::add(Widget *const widget)
@@ -245,11 +245,11 @@ void BasicContainer::add(Widget *const widget)
mLogicWidgets.push_back(widget);
if (!mInternalFocusHandler)
- widget->_setFocusHandler(_getFocusHandler());
+ widget->setFocusHandler(getFocusHandler());
else
- widget->_setFocusHandler(mInternalFocusHandler);
+ widget->setFocusHandler(mInternalFocusHandler);
- widget->_setParent(this);
+ widget->setParent(this);
widget->addDeathListener(this);
}
@@ -260,8 +260,8 @@ void BasicContainer::remove(Widget* widget)
if (*iter == widget)
{
mWidgets.erase(iter);
- widget->_setFocusHandler(nullptr);
- widget->_setParent(nullptr);
+ widget->setFocusHandler(nullptr);
+ widget->setParent(nullptr);
widget->removeDeathListener(this);
break;
}
@@ -281,8 +281,8 @@ void BasicContainer::clear()
FOR_EACH (WidgetListConstIterator, iter, mWidgets)
{
Widget *const widget = *iter;
- widget->_setFocusHandler(nullptr);
- widget->_setParent(nullptr);
+ widget->setFocusHandler(nullptr);
+ widget->setParent(nullptr);
widget->removeDeathListener(this);
}
@@ -367,8 +367,8 @@ void BasicContainer::setInternalFocusHandler(FocusHandler* focusHandler)
FOR_EACH (WidgetListConstIterator, iter, mWidgets)
{
if (!mInternalFocusHandler)
- (*iter)->_setFocusHandler(_getFocusHandler());
+ (*iter)->setFocusHandler(getFocusHandler());
else
- (*iter)->_setFocusHandler(mInternalFocusHandler);
+ (*iter)->setFocusHandler(mInternalFocusHandler);
}
}
diff --git a/src/gui/widgets/basiccontainer.h b/src/gui/widgets/basiccontainer.h
index 2d8a9beee..8a5d7b9a4 100644
--- a/src/gui/widgets/basiccontainer.h
+++ b/src/gui/widgets/basiccontainer.h
@@ -85,7 +85,8 @@ class BasicContainer : public Widget,
explicit BasicContainer(const Widget2 *const widget) :
Widget(widget),
DeathListener(),
- mWidgets()
+ mWidgets(),
+ mLogicWidgets()
{ }
A_DELETE_COPY(BasicContainer)
@@ -122,8 +123,8 @@ class BasicContainer : public Widget,
virtual void logic() override;
- virtual void _setFocusHandler(FocusHandler *const focusHandler)
- override;
+ virtual void setFocusHandler(FocusHandler *const focusHandler)
+ override;
void setInternalFocusHandler(FocusHandler* focusHandler);
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 35e09ce93..3248f1884 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -73,7 +73,7 @@ GuiTableActionListener::GuiTableActionListener(GuiTable *restrict table,
if (widget)
{
widget->addActionListener(this);
- widget->_setParent(table);
+ widget->setParent(table);
}
}
@@ -82,7 +82,7 @@ GuiTableActionListener::~GuiTableActionListener()
if (mWidget)
{
mWidget->removeActionListener(this);
- mWidget->_setParent(nullptr);
+ mWidget->setParent(nullptr);
}
}
@@ -292,7 +292,7 @@ void GuiTable::installActionListeners()
}
}
- _setFocusHandler(_getFocusHandler());
+ setFocusHandler(getFocusHandler());
}
// -- widget ops
@@ -590,14 +590,14 @@ int GuiTable::getColumnForX(int x) const
return column;
}
-void GuiTable::_setFocusHandler(FocusHandler *const focusHandler)
+void GuiTable::setFocusHandler(FocusHandler *const focusHandler)
{
// add check for focusHandler. may be need remove it?
if (!mModel || !focusHandler)
return;
- Widget::_setFocusHandler(focusHandler);
+ Widget::setFocusHandler(focusHandler);
const int rows = mModel->getRows();
const int cols = mModel->getColumns();
@@ -607,7 +607,7 @@ void GuiTable::_setFocusHandler(FocusHandler *const focusHandler)
{
Widget *const w = mModel->getElementAt(r, c);
if (w)
- w->_setFocusHandler(focusHandler);
+ w->setFocusHandler(focusHandler);
}
}
}
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index ec3bab728..64e0adae4 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -120,7 +120,7 @@ public:
void moveToBottom(Widget *child) override final;
- void _setFocusHandler(FocusHandler *const focusHandler) override final;
+ void setFocusHandler(FocusHandler *const focusHandler) override final;
// Inherited from KeyListener
void keyPressed(KeyEvent& event) override final;
diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp
index 06e2fd3b8..e6459a103 100644
--- a/src/gui/widgets/tabstrip.cpp
+++ b/src/gui/widgets/tabstrip.cpp
@@ -57,8 +57,8 @@ void TabStrip::action(const ActionEvent &event)
WidgetGroup::action(event);
if (event.getSource())
{
- Widget *const widget = event.getSource();
- if (static_cast<Button*>(widget)->isPressed2())
+ const Widget *const widget = event.getSource();
+ if (static_cast<const Button*>(widget)->isPressed2())
{
FOR_EACH (WidgetListConstIterator, iter, mWidgets)
{
diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp
index cd1ac750c..aa3e6254b 100644
--- a/src/gui/widgets/widget.cpp
+++ b/src/gui/widgets/widget.cpp
@@ -77,8 +77,6 @@
#include "listeners/deathlistener.h"
#include "listeners/widgetlistener.h"
-#include "render/graphics.h"
-
#include "debug.h"
Font* Widget::mGlobalFont = nullptr;
@@ -123,7 +121,7 @@ Widget::~Widget()
(*iter)->death(event);
}
- _setFocusHandler(nullptr);
+ setFocusHandler(nullptr);
mWidgets.remove(this);
mWidgetsSet.erase(this);
@@ -234,7 +232,7 @@ void Widget::setVisible(bool visible)
mVisible = visible;
}
-void Widget::_setFocusHandler(FocusHandler *const focusHandler)
+void Widget::setFocusHandler(FocusHandler *const focusHandler)
{
if (mFocusHandler)
{
@@ -426,17 +424,17 @@ bool Widget::isModalMouseInputFocused() const
return mFocusHandler->getModalMouseInputFocused() == this;
}
-const std::list<MouseListener*>& Widget::_getMouseListeners()
+const std::list<MouseListener*>& Widget::getMouseListeners()
{
return mMouseListeners;
}
-const std::list<KeyListener*>& Widget::_getKeyListeners()
+const std::list<KeyListener*>& Widget::getKeyListeners()
{
return mKeyListeners;
}
-const std::list<FocusListener*>& Widget::_getFocusListeners()
+const std::list<FocusListener*>& Widget::getFocusListeners()
{
return mFocusListeners;
}
@@ -446,7 +444,7 @@ Rect Widget::getChildrenArea()
return Rect(0, 0, 0, 0);
}
-FocusHandler* Widget::_getInternalFocusHandler()
+FocusHandler* Widget::getInternalFocusHandler()
{
return mInternalFocusHandler;
}
diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h
index 20361d13b..de5a79502 100644
--- a/src/gui/widgets/widget.h
+++ b/src/gui/widgets/widget.h
@@ -76,7 +76,6 @@
#include "localconsts.h"
class ActionListener;
-class BasicContainer;
class DeathListener;
class FocusHandler;
class FocusListener;
@@ -482,10 +481,10 @@ class Widget : public Widget2
* are doing.
*
* @param focusHandler The focus handler to use.
- * @see _getFocusHandler
+ * @see getFocusHandler
* @since 0.1.0
*/
- virtual void _setFocusHandler(FocusHandler *const focusHandler);
+ virtual void setFocusHandler(FocusHandler *const focusHandler);
/**
* Gets the focus handler used.
@@ -495,10 +494,10 @@ class Widget : public Widget2
* are doing.
*
* @return The focus handler used.
- * @see _setFocusHandler
+ * @see setFocusHandler
* @since 0.1.0
*/
- virtual FocusHandler* _getFocusHandler() A_WARN_UNUSED
+ virtual FocusHandler* getFocusHandler() A_WARN_UNUSED
{ return mFocusHandler; }
/**
@@ -666,7 +665,7 @@ class Widget : public Widget2
* @see getParent
* @since 0.1.0
*/
- virtual void _setParent(Widget* parent)
+ virtual void setParent(Widget* parent)
{ mParent = parent; }
/**
@@ -853,8 +852,8 @@ class Widget : public Widget2
* @return The mouse listeners of the widget.
* @since 0.6.0
*/
- virtual const std::list<MouseListener*>& _getMouseListeners()
- A_WARN_UNUSED;
+ virtual const std::list<MouseListener*>& getMouseListeners()
+ A_WARN_UNUSED;
/**
* Gets the key listeners of the widget.
@@ -862,8 +861,8 @@ class Widget : public Widget2
* @return The key listeners of the widget.
* @since 0.6.0
*/
- virtual const std::list<KeyListener*>& _getKeyListeners()
- A_WARN_UNUSED;
+ virtual const std::list<KeyListener*>& getKeyListeners()
+ A_WARN_UNUSED;
/**
* Gets the focus listeners of the widget.
@@ -871,8 +870,8 @@ class Widget : public Widget2
* @return The focus listeners of the widget.
* @since 0.7.0
*/
- virtual const std::list<FocusListener*>& _getFocusListeners()
- A_WARN_UNUSED;
+ virtual const std::list<FocusListener*>& getFocusListeners()
+ A_WARN_UNUSED;
/**
* Gets the area of the widget occupied by the widget's children.
@@ -904,7 +903,7 @@ class Widget : public Widget2
* @see setInternalFocusHandler
* @since 0.1.0
*/
- virtual FocusHandler* _getInternalFocusHandler() A_WARN_UNUSED;
+ virtual FocusHandler* getInternalFocusHandler() A_WARN_UNUSED;
/**
* Sets the internal focus handler. An internal focus handler is
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index 2d73418ba..7890fd648 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -45,7 +45,7 @@ class Widget2
{
if (!theme)
return Palette::BLACK;
- const int colorId = theme->getIdByChar(c, valid);;
+ const int colorId = theme->getIdByChar(c, valid);
if (valid)
return theme->getColor(mPaletteOffset + colorId, 255);
else
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index 17f444eb8..3a423aac2 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -129,7 +129,7 @@ Graphics::Graphics() :
Graphics::~Graphics()
{
- _endDraw();
+ endDraw();
#ifdef USE_SDL2
if (mRenderer)
{
@@ -470,7 +470,7 @@ bool Graphics::setFullscreen(const bool fs)
bool Graphics::resizeScreen(const int width, const int height)
{
#ifdef USE_SDL2
- _endDraw();
+ endDraw();
mRect.w = width / mScale;
mRect.h = height / mScale;
@@ -488,14 +488,14 @@ bool Graphics::resizeScreen(const int width, const int height)
// +++ need impliment resize in soft mode
#endif // USE_OPENGL
- _beginDraw();
+ beginDraw();
return true;
#else
const int prevWidth = mWidth;
const int prevHeight = mHeight;
- _endDraw();
+ endDraw();
const bool success = setVideoMode(width, height, mScale, mBpp,
mFullscreen, mHWAccel, mEnableResize, mNoFrame);
@@ -511,7 +511,7 @@ bool Graphics::resizeScreen(const int width, const int height)
}
}
- _beginDraw();
+ beginDraw();
return success;
#endif // USE_SDL2
diff --git a/src/render/graphics.h b/src/render/graphics.h
index 75b26a241..49080f4de 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -81,6 +81,7 @@
#endif
#include <stack>
+#include <string>
#include "localconsts.h"
@@ -461,21 +462,21 @@ class Graphics
* NOTE: You will never need to call this function yourself, unless
* you use a Graphics object outside of Guichan.
*
- * @see _endDraw, Gui::draw
+ * @see endDraw, Gui::draw
*/
- virtual void _beginDraw()
+ virtual void beginDraw()
{ }
/**
* Deinitializes drawing. Called by the Gui when a Gui::draw() is done.
- * done. It should reset any state changes made by _beginDraw().
+ * done. It should reset any state changes made by beginDraw().
*
* NOTE: You will never need to call this function yourself, unless
* you use a Graphics object outside of Guichan.
*
- * @see _beginDraw, Gui::draw
+ * @see beginDraw, Gui::draw
*/
- virtual void _endDraw()
+ virtual void endDraw()
{ }
int mWidth;
diff --git a/src/render/graphicsdef.hpp b/src/render/graphicsdef.hpp
index 80d3c7cf8..b11f88249 100644
--- a/src/render/graphicsdef.hpp
+++ b/src/render/graphicsdef.hpp
@@ -33,9 +33,9 @@ public:
const int x2, const int y2,
const int width, const int height) override final;
- void _beginDraw();
+ void beginDraw();
- void _endDraw();
+ void endDraw();
bool pushClipArea(Rect area) override final;
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index c815d096d..0ad5bfeb7 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -839,7 +839,7 @@ void MobileOpenGLGraphics::updateScreen()
BLOCK_END("Graphics::updateScreen")
}
-void MobileOpenGLGraphics::_beginDraw()
+void MobileOpenGLGraphics::beginDraw()
{
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
@@ -891,7 +891,7 @@ void MobileOpenGLGraphics::_beginDraw()
pushClipArea(Rect(0, 0, mRect.w, mRect.h));
}
-void MobileOpenGLGraphics::_endDraw()
+void MobileOpenGLGraphics::endDraw()
{
popClipArea();
}
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index ebac68e1b..72fbd8a99 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -1100,7 +1100,7 @@ void NormalOpenGLGraphics::updateScreen()
BLOCK_END("Graphics::updateScreen")
}
-void NormalOpenGLGraphics::_beginDraw()
+void NormalOpenGLGraphics::beginDraw()
{
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
@@ -1154,7 +1154,7 @@ void NormalOpenGLGraphics::_beginDraw()
pushClipArea(Rect(0, 0, w, h));
}
-void NormalOpenGLGraphics::_endDraw()
+void NormalOpenGLGraphics::endDraw()
{
popClipArea();
}
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index 8782c9573..919b43c10 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -919,12 +919,12 @@ void NullOpenGLGraphics::updateScreen()
BLOCK_END("Graphics::updateScreen")
}
-void NullOpenGLGraphics::_beginDraw()
+void NullOpenGLGraphics::beginDraw()
{
pushClipArea(Rect(0, 0, 640, 480));
}
-void NullOpenGLGraphics::_endDraw()
+void NullOpenGLGraphics::endDraw()
{
popClipArea();
}
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp
index faf2de76e..a191142b5 100644
--- a/src/render/safeopenglgraphics.cpp
+++ b/src/render/safeopenglgraphics.cpp
@@ -431,7 +431,7 @@ void SafeOpenGLGraphics::calcWindow(ImageCollection *const vertCol A_UNUSED,
{
}
-void SafeOpenGLGraphics::_beginDraw()
+void SafeOpenGLGraphics::beginDraw()
{
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
@@ -462,7 +462,7 @@ void SafeOpenGLGraphics::_beginDraw()
pushClipArea(Rect(0, 0, mRect.w, mRect.h));
}
-void SafeOpenGLGraphics::_endDraw()
+void SafeOpenGLGraphics::endDraw()
{
popClipArea();
}
diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp
index 8c78c8cdd..c93622920 100644
--- a/src/render/sdl2graphics.cpp
+++ b/src/render/sdl2graphics.cpp
@@ -653,12 +653,12 @@ void SDLGraphics::fillRectangle(const Rect &rectangle)
SDL_RenderFillRects(mRenderer, &rect, 1);
}
-void SDLGraphics::_beginDraw()
+void SDLGraphics::beginDraw()
{
pushClipArea(Rect(0, 0, mRect.w, mRect.h));
}
-void SDLGraphics::_endDraw()
+void SDLGraphics::endDraw()
{
popClipArea();
}
diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index 0844cd52e..54cd010a8 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -1115,12 +1115,12 @@ void SDL2SoftwareGraphics::fillRectangle(const Rect &rectangle)
}
}
-void SDL2SoftwareGraphics::_beginDraw()
+void SDL2SoftwareGraphics::beginDraw()
{
pushClipArea(Rect(0, 0, mRect.w, mRect.h));
}
-void SDL2SoftwareGraphics::_endDraw()
+void SDL2SoftwareGraphics::endDraw()
{
popClipArea();
}
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 44dcc426d..cbd3f0689 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -1112,12 +1112,12 @@ void SDLGraphics::fillRectangle(const Rect& rectangle)
}
}
-void SDLGraphics::_beginDraw()
+void SDLGraphics::beginDraw()
{
pushClipArea(Rect(0, 0, mRect.w, mRect.h));
}
-void SDLGraphics::_endDraw()
+void SDLGraphics::endDraw()
{
popClipArea();
}
diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h
index 8e85356da..44c2691ae 100644
--- a/src/render/surfacegraphics.h
+++ b/src/render/surfacegraphics.h
@@ -57,10 +57,10 @@ class SurfaceGraphics final : public Graphics
SDL_Surface *getTarget() const
{ return mTarget; }
- void _beginDraw() override final
+ void beginDraw() override final
{ }
- void _endDraw() override final
+ void endDraw() override final
{ }
bool pushClipArea(Rect rect A_UNUSED) override final
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index 870de40a9..90aea108d 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -231,7 +231,7 @@ SDL_Surface *AtlasManager::createSDLAtlas(TextureAtlas *const atlas)
SurfaceGraphics *const graphics = new SurfaceGraphics();
graphics->setTarget(surface);
- graphics->_beginDraw();
+ graphics->beginDraw();
// drawing SDL images to surface
FOR_EACH (std::vector<AtlasItem*>::iterator, it, atlas->items)