Ykkrosh
ba0ebd6644
Added <effect>s to sprites/images - currently multiply-color and add-color, though they're far from perfect. This was SVN commit r1525.
52 lines
985 B
C++
52 lines
985 B
C++
#ifndef GUIRenderer_h
|
|
#define GUIRenderer_h
|
|
|
|
#include "lib/res/handle.h"
|
|
#include "ps/Overlay.h"
|
|
#include "ps/CStr.h"
|
|
#include <vector>
|
|
|
|
struct SGUIImageEffects;
|
|
|
|
namespace GUIRenderer
|
|
{
|
|
struct Handle_rfcnt_tex
|
|
{
|
|
Handle h;
|
|
Handle_rfcnt_tex();
|
|
Handle_rfcnt_tex(Handle h_);
|
|
Handle_rfcnt_tex(const Handle_rfcnt_tex& that);
|
|
~Handle_rfcnt_tex();
|
|
Handle_rfcnt_tex& operator=(Handle h_);
|
|
};
|
|
|
|
struct SDrawCall
|
|
{
|
|
Handle_rfcnt_tex m_TexHandle;
|
|
|
|
bool m_EnableBlending;
|
|
|
|
SGUIImageEffects* m_Effects;
|
|
|
|
CRect m_Vertices;
|
|
CRect m_TexCoords;
|
|
float m_DeltaZ;
|
|
|
|
CColor m_BorderColor; // == CColor() for no border
|
|
CColor m_BackColor;
|
|
};
|
|
|
|
typedef std::vector<SDrawCall> DrawCalls;
|
|
}
|
|
|
|
#include "gui/CGUISprite.h"
|
|
|
|
namespace GUIRenderer
|
|
{
|
|
void UpdateDrawCallCache(DrawCalls &Calls, CStr &SpriteName, CRect& Size, int CellID, std::map<CStr, CGUISprite> &Sprites);
|
|
|
|
void Draw(DrawCalls &Calls);
|
|
}
|
|
|
|
#endif // GUIRenderer_h
|