Legacy code cleanup - part 3 (#3903)

* Legacy cleanup - part 3

Not much is left that can be easily removed,
so I think this will be last cleanup before the legacy functionality is replaced.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* fix windows build, remove a few more things, re-add one file

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove legacy RenderBus + more cleanups

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove MaterialOwnerBus.h

Clean-up in Cry_Matrix34/33

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
Artur K
2021-09-07 20:14:16 +02:00
committed by GitHub
parent 4d5b047c1b
commit 2a2847b15d
161 changed files with 894 additions and 16076 deletions
+13 -81
View File
@@ -32,6 +32,19 @@
#include <LyShine/Bus/UiCursorBus.h>
//#define DEFENCE_CVAR_HASH_LOGGING
// s should point to a buffer at least 65 chars long
inline void BitsAlpha64(uint64 n, char* s)
{
for (int i = 0; n != 0; n >>= 1, i++)
{
if (n & 1)
{
*s++ = i < 32 ? static_cast<char>(i + 'z' - 31) : static_cast<char>(i + 'Z' - 63);
}
}
*s++ = '\0';
}
static inline void AssertName([[maybe_unused]] const char* szName)
{
#ifdef _DEBUG
@@ -567,35 +580,6 @@ ICVar* CXConsole::Register(const char* sName, int* src, int iValue, int nFlags,
}
//////////////////////////////////////////////////////////////////////////
ICVar* CXConsole::RegisterCVarGroup(const char* szName, const char* szFileName)
{
AssertName(szName);
assert(szFileName);
// suppress cvars not starting with sys_spec_ as
// cheaters might create cvars before we created ours
if (_strnicmp(szName, "sys_spec_", 9) != 0)
{
return 0;
}
ICVar* pCVar = stl::find_in_map(m_mapVariables, szName, NULL);
if (pCVar)
{
AZ_Error("System", false, "CVar groups should only be registered once");
return pCVar;
}
CXConsoleVariableCVarGroup* pCVarGroup = new CXConsoleVariableCVarGroup(this, szName, szFileName, VF_COPYNAME);
pCVar = pCVarGroup;
RegisterVar(pCVar, CXConsoleVariableCVarGroup::OnCVarChangeFunc);
return pCVar;
}
//////////////////////////////////////////////////////////////////////////
ICVar* CXConsole::Register(const char* sName, float* src, float fValue, int nFlags, const char* help, ConsoleVarFunc pChangeFunc, bool allowModify)
{
@@ -620,7 +604,6 @@ ICVar* CXConsole::Register(const char* sName, float* src, float fValue, int nFla
return pCVar;
}
//////////////////////////////////////////////////////////////////////////
ICVar* CXConsole::Register(const char* sName, const char** src, const char* defaultValue, int nFlags, const char* help, ConsoleVarFunc pChangeFunc, bool allowModify)
{
@@ -644,7 +627,6 @@ ICVar* CXConsole::Register(const char* sName, const char** src, const char* defa
return pCVar;
}
//////////////////////////////////////////////////////////////////////////
ICVar* CXConsole::RegisterString(const char* sName, const char* sValue, int nFlags, const char* help, ConsoleVarFunc pChangeFunc)
{
@@ -705,30 +687,6 @@ ICVar* CXConsole::RegisterInt(const char* sName, int iValue, int nFlags, const c
return pCVar;
}
//////////////////////////////////////////////////////////////////////////
ICVar* CXConsole::RegisterInt64(const char* sName, int64 iValue, int nFlags, const char* help, ConsoleVarFunc pChangeFunc)
{
AssertName(sName);
ICVar* pCVar = stl::find_in_map(m_mapVariables, sName, NULL);
if (pCVar)
{
gEnv->pLog->Log("[CVARS]: [DUPLICATE] CXConsole::RegisterInt64(): variable [%s] is already registered", pCVar->GetName());
#if LOG_CVAR_INFRACTIONS_CALLSTACK
gEnv->pSystem->debug_LogCallStack();
#endif // LOG_CVAR_INFRACTIONS_CALLSTACK
return pCVar;
}
pCVar = new CXConsoleVariableInt64(this, sName, iValue, nFlags, help);
RegisterVar(pCVar, pChangeFunc);
return pCVar;
}
//////////////////////////////////////////////////////////////////////////
void CXConsole::UnregisterVariable(const char* sVarName, [[maybe_unused]] bool bDelete)
{
@@ -2891,20 +2849,6 @@ int CXConsole::GetNumVisibleVars()
return numVars;
}
void CXConsole::AddCVarsToHash(ConsoleVariablesVector::const_iterator begin, ConsoleVariablesVector::const_iterator end, CCrc32& runningNameCrc32, CCrc32& runningNameValueCrc32)
{
for (ConsoleVariablesVector::const_iterator it = begin; it <= end; ++it)
{
// add name & variable to string. We add both since adding only the value could cause
// many collisions with variables all having value 0 or all 1.
AZStd::string hashStr = it->first;
runningNameCrc32.Add(hashStr.c_str(), hashStr.length());
hashStr += it->second->GetDataProbeString();
runningNameValueCrc32.Add(hashStr.c_str(), hashStr.length());
}
}
//////////////////////////////////////////////////////////////////////////
size_t CXConsole::GetSortedVars(AZStd::vector<AZStd::string_view>& pszArray, const char* szPrefix)
{
@@ -3089,18 +3033,6 @@ inline size_t sizeOf (const char* sz)
return sz ? strlen(sz) + 1 : 0;
}
//////////////////////////////////////////////////////////////////////////
void CXConsole::GetMemoryUsage (class ICrySizer* pSizer) const
{
pSizer->AddObject(this, sizeof(*this));
pSizer->AddObject(m_sInputBuffer);
pSizer->AddObject(m_sPrevTab);
pSizer->AddObject(m_dqConsoleBuffer);
pSizer->AddObject(m_dqHistory);
pSizer->AddObject(m_mapCommands);
pSizer->AddObject(m_mapBinds);
}
//////////////////////////////////////////////////////////////////////////
void CXConsole::ConsoleLogInputResponse(const char* format, ...)
{