Index: ps/trunk/source/gui/CGUI.cpp =================================================================== --- ps/trunk/source/gui/CGUI.cpp +++ ps/trunk/source/gui/CGUI.cpp @@ -989,7 +989,7 @@ if (m_Sprites.find(name) != m_Sprites.end()) LOGWARNING("GUI sprite name '%s' used more than once; first definition will be discarded", name.c_str()); - // shared_ptr to link the effect to every sprite, faster than copy. + // shared_ptr to link the effect to every image, faster than copy. std::shared_ptr effects; for (XMBElement child : Element.GetChildNodes()) Index: ps/trunk/source/gui/CGUISprite.h =================================================================== --- ps/trunk/source/gui/CGUISprite.h +++ ps/trunk/source/gui/CGUISprite.h @@ -16,22 +16,8 @@ */ /* -A GUI Sprite - ---Overview-- - A GUI Sprite, which is actually a collage of several sprites. - ---Usage-- - - Used internally and declared in XML files, read documentations - on how. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_CGUISPRITE @@ -39,6 +25,7 @@ #include "GUIbase.h" +#include "gui/GUIRenderer.h" #include "lib/res/graphics/ogl_tex.h" #include @@ -147,8 +134,6 @@ std::vector m_Images; }; -#include "GUIRenderer.h" - // An instance of a sprite, usually stored in IGUIObjects - basically a string // giving the sprite's name, but with some extra data to cache rendering // calculations between draw calls. @@ -169,7 +154,7 @@ operator bool() const { return !m_SpriteName.empty(); }; /** - * Returns this spirte if it has been set, otherwise the given fallback sprite. + * Returns this sprite if it has been set, otherwise the given fallback sprite. */ const CGUISpriteInstance& operator||(const CGUISpriteInstance& fallback) const { Index: ps/trunk/source/gui/GUIRenderer.h =================================================================== --- ps/trunk/source/gui/GUIRenderer.h +++ ps/trunk/source/gui/GUIRenderer.h @@ -27,6 +27,7 @@ #include +class CGUISprite; struct SGUIImageEffects; struct SGUIImage; @@ -65,12 +66,7 @@ DrawCalls(const DrawCalls&); DrawCalls& operator=(const DrawCalls&); }; -} - -#include "gui/CGUISprite.h" -namespace GUIRenderer -{ void UpdateDrawCallCache(const CGUI* pGUI, DrawCalls& Calls, const CStr& SpriteName, const CRect& Size, int CellID, std::map& Sprites); void Draw(DrawCalls& Calls, float Z); Index: ps/trunk/source/gui/GUIutil.h =================================================================== --- ps/trunk/source/gui/GUIutil.h +++ ps/trunk/source/gui/GUIutil.h @@ -16,17 +16,8 @@ */ /* -GUI util - ---Overview-- - Contains help class GUI<>, which gives us templated parameter to all functions within GUI. - ---More info-- - - Check GUI.h - */ #ifndef INCLUDED_GUIUTIL @@ -189,7 +180,7 @@ * Changes the value of the setting by calling the valueSet functon that performs either a copy or move assignment. * Updates some internal data depending on the setting changed. */ - static PSRETURN SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage, const std::function& valueSet); + static PSRETURN SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const bool& SkipMessage, const std::function& valueSet); // templated typedef of function pointer typedef void (IGUIObject::*void_Object_pFunction_argT)(const T& arg); Index: ps/trunk/source/gui/GUIutil.cpp =================================================================== --- ps/trunk/source/gui/GUIutil.cpp +++ ps/trunk/source/gui/GUIutil.cpp @@ -129,7 +129,7 @@ template PSRETURN GUI::SetSetting(IGUIObject* pObject, const CStr& Setting, T& Value, const bool& SkipMessage) { - return SetSettingWrap(pObject, Setting, Value, SkipMessage, + return SetSettingWrap(pObject, Setting, SkipMessage, [&pObject, &Setting, &Value]() { static_cast* >(pObject->m_Settings[Setting])->m_pSetting = std::move(Value); }); @@ -138,14 +138,14 @@ template PSRETURN GUI::SetSetting(IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage) { - return SetSettingWrap(pObject, Setting, Value, SkipMessage, + return SetSettingWrap(pObject, Setting, SkipMessage, [&pObject, &Setting, &Value]() { static_cast* >(pObject->m_Settings[Setting])->m_pSetting = Value; }); } template -PSRETURN GUI::SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const T& Value, const bool& SkipMessage, const std::function& valueSet) +PSRETURN GUI::SetSettingWrap(IGUIObject* pObject, const CStr& Setting, const bool& SkipMessage, const std::function& valueSet) { ENSURE(pObject != NULL);