Skip to content
Permalink
Browse files

Merge branch 'master' into feature/lua-packages

  • Loading branch information...
qaisjp committed Feb 20, 2019
2 parents aae6ebf + a3701bf commit 3ed21915fa014295b309e2f97e46d07dcfa88faf
Showing 2,481 changed files with 66,216 additions and 329,137 deletions.
@@ -0,0 +1,46 @@
# Attributes
# * text=auto
# *.c text diff=cpp
# *.cc text diff=cpp
# *.cpp text diff=cpp
# *.cxx text diff=cpp
# *.c++ text diff=cpp
# *.h text diff=cpp
# *.hh text diff=cpp
# *.hpp text diff=cpp
# *.h++ text diff=cpp
# *.rc text
*.vcproj text eol=crlf
*.sln text eol=crlf
*.bat text eol=crlf
*.sh text eol=lf
# *.lua text
# *.xml text
# *.yml text
# *.txt text
# *.lua text
# *.nsi text
# *.nsh text
# *.xsd text
# *.po text
# *.ico binary
# *.png binary
# *.bmp binary
# *.dll binary
# *.so binary
# *.dylib binary
# *.a binary
# *.lib binary
# *.exe binary
# *.out binary
# *.app binary
# *.dat binary
# *.ttf binary

# Ignored files by `git archive`
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.ignore export-ignore
/.travis.yml export-ignore
/appveyor.yml export-ignore
@@ -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);
@@ -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_)
{
}
@@ -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();

@@ -593,16 +593,20 @@ bool CWebView::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProces
// http://magpcss.org/ceforum/apidocs3/projects/(default)/CefRenderHandler.html#GetViewRect(CefRefPtr%3CCefBrowser%3E,CefRect&) //
// //
////////////////////////////////////////////////////////////////////
bool CWebView::GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect)
void CWebView::GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect)
{
if (m_bBeingDestroyed)
return false;

rect.x = 0;
rect.y = 0;

if (m_bBeingDestroyed)
{
rect.width = 1;
rect.height = 1;
return;
}

rect.width = static_cast<int>(m_pWebBrowserRenderItem->m_uiSizeX);
rect.height = static_cast<int>(m_pWebBrowserRenderItem->m_uiSizeY);
return true;
}

////////////////////////////////////////////////////////////////////
@@ -114,7 +114,7 @@ class CWebView : public CWebViewInterface,
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, CefProcessId source_process, CefRefPtr<CefProcessMessage> message) override;

// CefRenderHandler methods
virtual bool GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override;
virtual void GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override;
virtual void OnPopupShow(CefRefPtr<CefBrowser> browser, bool show) override;
virtual void OnPopupSize(CefRefPtr<CefBrowser> browser, const CefRect& rect) override;
virtual void OnPaint(CefRefPtr<CefBrowser> browser, CefRenderHandler::PaintElementType paintType, const CefRenderHandler::RectList& dirtyRects,
@@ -54,7 +54,7 @@ namespace
//
//
///////////////////////////////////////////////////////////////
CAdditionalVertexStreamManager::CAdditionalVertexStreamManager(void)
CAdditionalVertexStreamManager::CAdditionalVertexStreamManager()
{
}

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

@@ -76,7 +76,7 @@ CAdditionalVertexStreamManager::~CAdditionalVertexStreamManager(void)
// Static function
//
///////////////////////////////////////////////////////////////
CAdditionalVertexStreamManager* CAdditionalVertexStreamManager::GetSingleton(void)
CAdditionalVertexStreamManager* CAdditionalVertexStreamManager::GetSingleton()
{
if (!ms_Singleton)
ms_Singleton = new CAdditionalVertexStreamManager();
@@ -186,7 +186,7 @@ void CAdditionalVertexStreamManager::SetAdditionalVertexStream(SCurrentStateInfo
//
//
///////////////////////////////////////////////////////////////
void CAdditionalVertexStreamManager::MaybeUnsetAdditionalVertexStream(void)
void CAdditionalVertexStreamManager::MaybeUnsetAdditionalVertexStream()
{
HRESULT hr;
if (m_pOldVertexDeclaration)
@@ -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);
@@ -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);
@@ -87,7 +87,7 @@ CChat::CChat(CGUI* pManager, const CVector2D& vecPosition)
UpdateGUI();
}

CChat::~CChat(void)
CChat::~CChat()
{
Clear();
ClearInput();
@@ -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;
@@ -497,17 +497,18 @@ 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++)
{
m_Lines[i].SetActive(false);
}
m_uiMostRecentLine = 0;
m_fSmoothScroll = 0;
m_iCacheTextureRevision = -1;
}

void CChat::ClearInput(void)
void CChat::ClearInput()
{
m_strInputText.clear();
m_InputLine.Clear();
@@ -775,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);
@@ -798,7 +799,7 @@ void CChat::UpdateGUI(void)
UpdatePosition();
}

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

@@ -863,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();
}
@@ -873,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)));
}
@@ -997,7 +998,7 @@ void CChat::DrawTextString(const char* szText, CRect2D DrawArea, float fZ, CRect
}
}

CChatLine::CChatLine(void)
CChatLine::CChatLine()
{
m_bActive = false;
UpdateCreationTime();
@@ -1156,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();
Oops, something went wrong.

0 comments on commit 3ed2191

Please sign in to comment.
You can’t perform that action at this time.