Code-style consistency improvement:

Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -16,59 +16,55 @@ struct VERTEXFORMAT2D
float u, v;
};
#define D3DFVF_VERTEXFORMAT2D ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1 )
#define D3DFVF_VERTEXFORMAT2D (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1)
namespace Gwen
namespace Gwen
{
namespace Renderer
{
namespace Renderer
{
class GWEN_EXPORT DirectX9 : public Gwen::Renderer::Base
{
public:
DirectX9(IDirect3DDevice9* pDevice);
~DirectX9();
class GWEN_EXPORT DirectX9 : public Gwen::Renderer::Base
{
public:
virtual void Begin();
virtual void End();
virtual void Release();
DirectX9( IDirect3DDevice9* pDevice );
~DirectX9();
virtual void SetDrawColor(Gwen::Color color);
virtual void Begin();
virtual void End();
virtual void Release();
virtual void DrawLine(int x, int y, int a, int b);
virtual void DrawFilledRect(Gwen::Rect rect);
virtual void SetDrawColor(Gwen::Color color);
virtual void LoadFont(Gwen::Font* pFont);
virtual void FreeFont(Gwen::Font* pFont);
virtual void RenderText(Gwen::Font* pFont, Gwen::Point pos, const Gwen::UnicodeString& text);
virtual Gwen::Point MeasureText(Gwen::Font* pFont, const Gwen::UnicodeString& text);
virtual void DrawLine( int x, int y, int a, int b );
virtual void DrawFilledRect( Gwen::Rect rect );
void StartClip();
void EndClip();
virtual void LoadFont( Gwen::Font* pFont );
virtual void FreeFont( Gwen::Font* pFont );
virtual void RenderText( Gwen::Font* pFont, Gwen::Point pos, const Gwen::UnicodeString& text );
virtual Gwen::Point MeasureText( Gwen::Font* pFont, const Gwen::UnicodeString& text );
void DrawTexturedRect(Gwen::Texture* pTexture, Gwen::Rect pTargetRect, float u1 = 0.0f, float v1 = 0.0f, float u2 = 1.0f, float v2 = 1.0f);
void LoadTexture(Gwen::Texture* pTexture);
void FreeTexture(Gwen::Texture* pTexture);
void StartClip();
void EndClip();
protected:
void* m_pCurrentTexture;
IDirect3DDevice9* m_pDevice;
DWORD m_Color;
void DrawTexturedRect( Gwen::Texture* pTexture, Gwen::Rect pTargetRect, float u1=0.0f, float v1=0.0f, float u2=1.0f, float v2=1.0f );
void LoadTexture( Gwen::Texture* pTexture );
void FreeTexture( Gwen::Texture* pTexture );
void Flush();
void AddVert(int x, int y);
void AddVert(int x, int y, float u, float v);
protected:
static const int MaxVerts = 1024;
VERTEXFORMAT2D m_pVerts[MaxVerts];
int m_iVertNum;
void* m_pCurrentTexture;
IDirect3DDevice9* m_pDevice;
DWORD m_Color;
Gwen::Font::List m_FontList;
};
void Flush();
void AddVert( int x, int y );
void AddVert( int x, int y, float u, float v );
static const int MaxVerts = 1024;
VERTEXFORMAT2D m_pVerts[MaxVerts];
int m_iVertNum;
Gwen::Font::List m_FontList;
};
}
}
} // namespace Renderer
} // namespace Gwen
#endif