Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Client/cefweb/CWebCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ CWebView* CWebCore::FindWebView(CefRefPtr<CefBrowser> browser)
return nullptr;
}

void CWebCore::AddEventToEventQueue(std::function<void(void)> event, CWebView* pWebView, const SString& name)
void CWebCore::AddEventToEventQueue(std::function<void()> event, CWebView* pWebView, const SString& name)
{
#ifndef MTA_DEBUG
UNREFERENCED_PARAMETER(name);
Expand Down
10 changes: 5 additions & 5 deletions Client/cefweb/CWebCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class CWebCore : public CWebCoreInterface
{
struct EventEntry
{
std::function<void(void)> callback;
CWebView* pWebView;
std::function<void()> callback;
CWebView* pWebView;
#ifdef MTA_DEBUG
SString name;
#endif

EventEntry(const std::function<void(void)>& callback_, CWebView* pWebView_) : callback(callback_), pWebView(pWebView_) {}
EventEntry(const std::function<void()>& callback_, CWebView* pWebView_) : callback(callback_), pWebView(pWebView_) {}
#ifdef MTA_DEBUG
EventEntry(const std::function<void(void)>& callback_, CWebView* pWebView_, const SString& name_)
EventEntry(const std::function<void()>& callback_, CWebView* pWebView_, const SString& name_)
: callback(callback_), pWebView(pWebView_), name(name_)
{
}
Expand All @@ -55,7 +55,7 @@ class CWebCore : public CWebCoreInterface
void DoPulse();
CWebView* FindWebView(CefRefPtr<CefBrowser> browser);

void AddEventToEventQueue(std::function<void(void)> func, CWebView* pWebView, const SString& name);
void AddEventToEventQueue(std::function<void()> func, CWebView* pWebView, const SString& name);
void RemoveWebViewEvents(CWebView* pWebView);
void DoEventQueuePulse();

Expand Down
8 changes: 4 additions & 4 deletions Client/core/CAdditionalVertexStreamManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace
//
//
///////////////////////////////////////////////////////////////
CAdditionalVertexStreamManager::CAdditionalVertexStreamManager(void)
CAdditionalVertexStreamManager::CAdditionalVertexStreamManager()
{
}

Expand All @@ -65,7 +65,7 @@ CAdditionalVertexStreamManager::CAdditionalVertexStreamManager(void)
//
//
///////////////////////////////////////////////////////////////
CAdditionalVertexStreamManager::~CAdditionalVertexStreamManager(void)
CAdditionalVertexStreamManager::~CAdditionalVertexStreamManager()
{
}

Expand All @@ -76,7 +76,7 @@ CAdditionalVertexStreamManager::~CAdditionalVertexStreamManager(void)
// Static function
//
///////////////////////////////////////////////////////////////
CAdditionalVertexStreamManager* CAdditionalVertexStreamManager::GetSingleton(void)
CAdditionalVertexStreamManager* CAdditionalVertexStreamManager::GetSingleton()
{
if (!ms_Singleton)
ms_Singleton = new CAdditionalVertexStreamManager();
Expand Down Expand Up @@ -186,7 +186,7 @@ void CAdditionalVertexStreamManager::SetAdditionalVertexStream(SCurrentStateInfo
//
//
///////////////////////////////////////////////////////////////
void CAdditionalVertexStreamManager::MaybeUnsetAdditionalVertexStream(void)
void CAdditionalVertexStreamManager::MaybeUnsetAdditionalVertexStream()
{
HRESULT hr;
if (m_pOldVertexDeclaration)
Expand Down
12 changes: 6 additions & 6 deletions Client/core/CAdditionalVertexStreamManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ struct SCurrentStateInfo
SCurrentStateInfo& operator=(const SCurrentStateInfo& other);

public:
SCurrentStateInfo(void) { ZERO_POD_STRUCT(this); }
SCurrentStateInfo() { ZERO_POD_STRUCT(this); }

~SCurrentStateInfo(void)
~SCurrentStateInfo()
{
SAFE_RELEASE(stream1.pStreamData);
SAFE_RELEASE(pIndexData);
Expand Down Expand Up @@ -73,17 +73,17 @@ class CAdditionalVertexStreamManager
{
public:
ZERO_ON_NEW
CAdditionalVertexStreamManager(void);
virtual ~CAdditionalVertexStreamManager(void);
CAdditionalVertexStreamManager();
virtual ~CAdditionalVertexStreamManager();

void OnDeviceCreate(IDirect3DDevice9* pDevice);
bool MaybeSetAdditionalVertexStream(D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex,
UINT primCount);
void MaybeUnsetAdditionalVertexStream(void);
void MaybeUnsetAdditionalVertexStream();
void OnVertexBufferDestroy(IDirect3DVertexBuffer9* pStreamData1);
void OnVertexBufferRangeInvalidated(IDirect3DVertexBuffer9* pStreamData, uint Offset, uint Size);

static CAdditionalVertexStreamManager* GetSingleton(void);
static CAdditionalVertexStreamManager* GetSingleton();

protected:
void SetAdditionalVertexStream(SCurrentStateInfo& renderState);
Expand Down
22 changes: 11 additions & 11 deletions Client/core/CChat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ CChat::CChat(CGUI* pManager, const CVector2D& vecPosition)
UpdateGUI();
}

CChat::~CChat(void)
CChat::~CChat()
{
Clear();
ClearInput();
Expand All @@ -102,13 +102,13 @@ CChat::~CChat(void)
g_pChat = NULL;
}

void CChat::OnModLoad(void)
void CChat::OnModLoad()
{
// Set handlers
m_pManager->SetCharacterKeyHandler(INPUT_MOD, GUI_CALLBACK_KEY(&CChat::CharacterKeyHandler, this));
}

void CChat::LoadCVars(void)
void CChat::LoadCVars()
{
unsigned int Font;
float fWidth = 1;
Expand Down Expand Up @@ -497,7 +497,7 @@ void CChat::Output(const char* szText, bool bColorCoded)
} while (szRemainingText);
}

void CChat::Clear(void)
void CChat::Clear()
{
for (int i = 0; i < CHAT_MAX_LINES; i++)
{
Expand All @@ -508,7 +508,7 @@ void CChat::Clear(void)
m_iCacheTextureRevision = -1;
}

void CChat::ClearInput(void)
void CChat::ClearInput()
{
m_strInputText.clear();
m_InputLine.Clear();
Expand Down Expand Up @@ -776,7 +776,7 @@ void CChat::SetDxFont(LPD3DXFONT pDXFont)
}
}

void CChat::UpdateGUI(void)
void CChat::UpdateGUI()
{
m_vecBackgroundSize = CVector2D(m_fNativeWidth * m_vecScale.fX, CChat::GetFontHeight(m_vecScale.fY) * (float(m_uiNumLines) + 0.5f));
m_vecBackgroundSize.fX = Round(m_vecBackgroundSize.fX);
Expand All @@ -799,7 +799,7 @@ void CChat::UpdateGUI(void)
UpdatePosition();
}

void CChat::UpdatePosition(void)
void CChat::UpdatePosition()
{
CVector2D vecResolution = m_pManager->GetResolution();

Expand Down Expand Up @@ -864,7 +864,7 @@ void CChat::SetInputColor(const CColor& Color)
m_pInput->LoadFromTexture(m_pInputTexture);
}

const char* CChat::GetInputPrefix(void)
const char* CChat::GetInputPrefix()
{
return m_InputLine.m_Prefix.GetText();
}
Expand All @@ -874,7 +874,7 @@ void CChat::SetInputPrefix(const char* szPrefix)
m_InputLine.m_Prefix.SetText(szPrefix);
}

CVector2D CChat::CalcInputSize(void)
CVector2D CChat::CalcInputSize()
{
return CVector2D(m_vecBackgroundSize.fX, (GetFontHeight(m_vecScale.fY) * ((float)m_InputLine.m_ExtraLines.size() + 1.25f)));
}
Expand Down Expand Up @@ -998,7 +998,7 @@ void CChat::DrawTextString(const char* szText, CRect2D DrawArea, float fZ, CRect
}
}

CChatLine::CChatLine(void)
CChatLine::CChatLine()
{
m_bActive = false;
UpdateCreationTime();
Expand Down Expand Up @@ -1157,7 +1157,7 @@ void CChatInputLine::Draw(CVector2D& vecPosition, unsigned char ucAlpha, bool bS
}
}

void CChatInputLine::Clear(void)
void CChatInputLine::Clear()
{
m_Sections.clear();
m_ExtraLines.clear();
Expand Down
48 changes: 24 additions & 24 deletions Client/core/CChat.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CChatLineSection;
class CColor
{
public:
CColor(void) { R = G = B = A = 255; }
CColor() { R = G = B = A = 255; }
CColor(unsigned char _R, unsigned char _G, unsigned char _B, unsigned char _A = 255)
{
R = _R;
Expand Down Expand Up @@ -66,8 +66,8 @@ class CChatLineSection
CChatLineSection& operator=(const CChatLineSection& other);

void Draw(const CVector2D& vecPosition, unsigned char ucAlpha, bool bShadow, bool bOutline, const CRect2D& RenderBounds);
float GetWidth(void);
const char* GetText(void) { return m_strText.c_str(); }
float GetWidth();
const char* GetText() { return m_strText.c_str(); }
void SetText(const char* szText) { m_strText = szText; }
void GetColor(CColor& color) { color = m_Color; }
void SetColor(const CColor& color) { m_Color = color; }
Expand All @@ -82,16 +82,16 @@ class CChatLineSection
class CChatLine
{
public:
CChatLine(void);
CChatLine();

virtual const char* Format(const char* szText, float fWidth, CColor& color, bool bColorCoded);
virtual void Draw(const CVector2D& vecPosition, unsigned char ucAlpha, bool bShadow, bool bOutline, const CRect2D& RenderBounds);
virtual float GetWidth(void);
bool IsActive(void) { return m_bActive; }
virtual float GetWidth();
bool IsActive() { return m_bActive; }
void SetActive(bool bActive) { m_bActive = bActive; }

unsigned long GetCreationTime(void) { return m_ulCreationTime; }
void UpdateCreationTime(void);
unsigned long GetCreationTime() { return m_ulCreationTime; }
void UpdateCreationTime();

protected:
bool m_bActive;
Expand All @@ -103,7 +103,7 @@ class CChatInputLine : public CChatLine
{
public:
void Draw(CVector2D& vecPosition, unsigned char ucAlpha, bool bShadow, bool bOutline);
void Clear(void);
void Clear();

CChatLineSection m_Prefix;
std::vector<CChatLine> m_ExtraLines;
Expand Down Expand Up @@ -153,29 +153,29 @@ class CChat
friend class CChatLineSection;

public:
CChat(void){};
CChat(){};
CChat(CGUI* pManager, const CVector2D& vecPosition);
virtual ~CChat();

virtual void Draw(bool bUseCacheTexture, bool bAllowOutline);
virtual void Output(const char* szText, bool bColorCoded = true);
void Clear(void);
void ClearInput(void);
void Clear();
void ClearInput();
bool CharacterKeyHandler(CGUIKeyEventArgs KeyboardArgs);
void SetDxFont(LPD3DXFONT pDXFont);

bool IsVisible(void) { return m_bVisible; }
bool IsVisible() { return m_bVisible; }
void SetVisible(bool bVisible);
bool IsInputVisible(void) { return m_bVisible && m_bInputVisible; }
bool IsInputVisible() { return m_bVisible && m_bInputVisible; }
void SetInputVisible(bool bVisible);

const char* GetInputPrefix(void);
const char* GetInputPrefix();
void SetInputPrefix(const char* szPrefix);
const char* GetInputText(void) { return m_strInputText.c_str(); }
const char* GetInputText() { return m_strInputText.c_str(); }
void SetInputText(const char* szText);
const char* GetCommand(void) { return m_strCommand.c_str(); }
const char* GetCommand() { return m_strCommand.c_str(); }
void SetCommand(const char* szCommand);
CVector2D CalcInputSize(void);
CVector2D CalcInputSize();

static float GetFontHeight(float fScale = 1.0f);
static float GetTextExtent(const char* szText, float fScale = 1.0f);
Expand All @@ -188,19 +188,19 @@ class CChat
void SetNumLines(unsigned int uiNumLines);

void Scroll(int iState) { m_iScrollState = iState; };
void ScrollUp(void);
void ScrollDown(void);
void ScrollUp();
void ScrollDown();

void SetChatFont(eChatFont Font);
void OnModLoad(void);
void OnModLoad();

private:
void LoadCVars(void);
void LoadCVars();

protected:
virtual void UpdatePosition(void);
virtual void UpdatePosition();

void UpdateGUI(void);
void UpdateGUI();
void UpdateSmoothScroll(float* pfPixelScroll, int* piLineScroll);
void DrawDrawList(const SDrawList& drawList, const CVector2D& topLeftOffset = CVector2D(0, 0));
void GetDrawList(SDrawList& outDrawList, bool bUsingOutline);
Expand Down
10 changes: 5 additions & 5 deletions Client/core/CClientVariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
template <>
CClientVariables* CSingleton<CClientVariables>::m_pSingleton = NULL;

CClientVariables::CClientVariables(void)
CClientVariables::CClientVariables()
{
m_pStorage = NULL;
m_bLoaded = false;
m_iRevision = 1;
}

CClientVariables::~CClientVariables(void)
CClientVariables::~CClientVariables()
{
}

bool CClientVariables::Load(void)
bool CClientVariables::Load()
{
// Get the root node
CXMLNode* pRoot = CCore::GetSingleton().GetConfig();
Expand Down Expand Up @@ -227,7 +227,7 @@ void CClientVariables::ClampValue(const std::string& strVariable, CVector2D minV
}

// Ensure CVars are within reasonable limits
void CClientVariables::ValidateValues(void)
void CClientVariables::ValidateValues()
{
uint uiViewportWidth = CCore::GetSingleton().GetGraphics()->GetViewportWidth();
uint uiViewportHeight = CCore::GetSingleton().GetGraphics()->GetViewportHeight();
Expand Down Expand Up @@ -258,7 +258,7 @@ void CClientVariables::ValidateValues(void)
ClampValue("mapalpha", 0, 255);
}

void CClientVariables::LoadDefaults(void)
void CClientVariables::LoadDefaults()
{
#define DEFAULT(__x,__y) if(!Exists(__x)) \
Set(__x,__y)
Expand Down
14 changes: 7 additions & 7 deletions Client/core/CClientVariables.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class CClientVariables : public CCVarsInterface, public CSingleton<CClientVariab
#define SANGET if(!Node(strVariable)) return false

public:
CClientVariables(void);
~CClientVariables(void);
CClientVariables();
~CClientVariables();

// Get queries
bool Get(const std::string& strVariable, bool& val)
Expand Down Expand Up @@ -112,14 +112,14 @@ class CClientVariables : public CCVarsInterface, public CSingleton<CClientVariab

bool Exists(const std::string& strVariable);

bool Load(void);
bool IsLoaded(void) { return m_bLoaded; }
int GetRevision(void) { return m_iRevision; }
void ValidateValues(void);
bool Load();
bool IsLoaded() { return m_bLoaded; }
int GetRevision() { return m_iRevision; }
void ValidateValues();

private:
CXMLNode* Node(const std::string& strVariable);
void LoadDefaults(void);
void LoadDefaults();

bool m_bLoaded;
CXMLNode* m_pStorage;
Expand Down
Loading