Gems/Maestro

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-02 11:44:34 -07:00
parent b9cfce8165
commit db7536acda
25 changed files with 68 additions and 85 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ namespace
SEfResTexture* pTex = pRes->GetTextureResource(nSlot);
if (pTex)
{
cry_strcat(outName, Path::GamePathToFullPath(pTex->m_Name.c_str()).toUtf8().data());
azstrcat(outName, Path::GamePathToFullPath(pTex->m_Name.c_str()).toUtf8().data());
}
}
@@ -92,7 +92,7 @@ void CCommentNodeAnimator::AnimateCommentTextTrack(CTrackViewTrack* pTrack, cons
if (commentKey.m_duration > 0 && ac.time < keyHandle.GetTime() + commentKey.m_duration)
{
m_commentContext.m_strComment = commentKey.m_strComment;
cry_strcpy(m_commentContext.m_strFont, commentKey.m_strFont.c_str());
azstrcpy(m_commentContext.m_strFont, commentKey.m_strFont.c_str());
m_commentContext.m_color = commentKey.m_color;
m_commentContext.m_align = commentKey.m_align;
m_commentContext.m_size = commentKey.m_size;
@@ -2808,10 +2808,10 @@ void CTrackViewDopeSheetBase::DrawKeys(CTrackViewTrack* pTrack, QPainter* painte
}
else
{
cry_strcpy(keydesc, "{");
azstrcpy(keydesc, "{");
}
cry_strcat(keydesc, pDescription);
cry_strcat(keydesc, "}");
azstrcat(keydesc, pDescription);
azstrcat(keydesc, "}");
// Draw key description text.
// Find next key.
const QRect textRect(QPoint(x + 10, rect.top()), QPoint(x1, rect.bottom()));
+1 -1
View File
@@ -2516,7 +2516,7 @@ int CTrackViewNodesCtrl::GetMatNameAndSubMtlIndexFromName(QString& matName, cons
if (const char* pCh = strstr(nodeName, ".["))
{
char matPath[MAX_PATH];
cry_strcpy(matPath, nodeName, (size_t)(pCh - nodeName));
azstrcpy(matPath, nodeName, (size_t)(pCh - nodeName));
matName = matPath;
pCh += 2;
if ((*pCh) != 0)
+7 -7
View File
@@ -85,7 +85,7 @@ struct ISurfaceType
};
struct SBreakable2DParams
{
string particle_effect;
AZStd::string particle_effect;
float blast_radius;
float blast_radius_first;
float vert_size_spread;
@@ -97,12 +97,12 @@ struct ISurfaceType
float shard_density;
int use_edge_alpha;
float crack_decal_scale;
string crack_decal_mtl;
AZStd::string crack_decal_mtl;
float max_fracture;
string full_fracture_fx;
string fracture_fx;
AZStd::string full_fracture_fx;
AZStd::string fracture_fx;
int no_procedural_full_fracture;
string broken_mtl;
AZStd::string broken_mtl;
float destroy_timeout;
float destroy_timeout_spread;
@@ -125,8 +125,8 @@ struct ISurfaceType
};
struct SBreakageParticles
{
string type;
string particle_effect;
AZStd::string type;
AZStd::string particle_effect;
int count_per_unit;
float count_scale;
float scale;
+1 -1
View File
@@ -283,7 +283,7 @@ public:
MOCK_METHOD0(EF_GetShaderMissLogPath,
const char*());
MOCK_METHOD1(EF_GetShaderNames,
string * (int& nNumShaders));
AZStd::string * (int& nNumShaders));
MOCK_METHOD1(EF_ReloadFile,
bool(const char* szFileName));
MOCK_METHOD1(EF_ReloadFile_Request,
+1 -1
View File
@@ -122,7 +122,7 @@ public:
const SFileVersion&());
MOCK_METHOD1(AddCVarGroupDirectory,
void(const string&));
void(const AZStd::string&));
MOCK_METHOD0(SaveConfiguration,
void());
MOCK_METHOD3(LoadConfiguration,
+5 -5
View File
@@ -349,23 +349,23 @@ void _makepath(char* path, const char* drive, const char* dir, const char* filen
}
if (dir && dir[0])
{
cry_strcat(tmp, dir);
azstrcat(tmp, dir);
ch = tmp[strlen(tmp) - 1];
if (ch != '/' && ch != '\\')
{
cry_strcat(tmp, "\\");
azstrcat(tmp, "\\");
}
}
if (filename && filename[0])
{
cry_strcat(tmp, filename);
azstrcat(tmp, filename);
if (ext && ext[0])
{
if (ext[0] != '.')
{
cry_strcat(tmp, ".");
azstrcat(tmp, ".");
}
cry_strcat(tmp, ext);
azstrcat(tmp, ext);
}
}
azstrcpy(path, strlen(tmp) + 1, tmp);
+1 -1
View File
@@ -499,7 +499,7 @@ inline void CryDebugStr([[maybe_unused]] const char* format, ...)
va_start(ArgList, format);
azvsnprintf(szBuffer,sizeof(szBuffer)-1, format, ArgList);
va_end(ArgList);
cry_strcat(szBuffer,"\n");
azstrcat(szBuffer,"\n");
OutputDebugString(szBuffer);
#endif
*/
+1 -1
View File
@@ -1545,7 +1545,7 @@ const char* CXConsole::GetFlagsString(const uint32 dwFlags)
static char sFlags[256];
// hiding this makes it a bit more difficult for cheaters
// if(dwFlags&VF_CHEAT) cry_strcat( sFlags,"CHEAT, ");
// if(dwFlags&VF_CHEAT) azstrcat( sFlags,"CHEAT, ");
azstrcpy(sFlags, "");
@@ -11,6 +11,8 @@
#pragma once
#include <AzCore/PlatformDef.h>
#include <AzCore/std/string/conversions.h>
#include <AzCore/Utils/Utils.h>
#include <algorithm>
#include <string>
@@ -23,30 +25,24 @@
namespace CrashHandler
{
std::string GetTimeString();
void GetExecutablePathA(char* pathBuffer, int& bufferSize);
void GetExecutablePathW(wchar_t* pathBuffer, int& bufferSize);
void GetTimeInfo(tm& curTime);
template <typename T>
inline void GetExecutablePath(T& returnPath)
inline void GetExecutablePath(std::string& returnPath)
{
char currentFileName[CRASH_HANDLER_MAX_PATH_LEN] = { 0 };
int bufferLen{ CRASH_HANDLER_MAX_PATH_LEN };
GetExecutablePathA(currentFileName, bufferLen);
AZ::Utils::GetExecutablePath(currentFileName, CRASH_HANDLER_MAX_PATH_LEN);
returnPath = currentFileName;
std::replace(returnPath.begin(), returnPath.end(), '\\', '/');
}
template <>
inline void GetExecutablePath<std::wstring>(std::wstring& returnPath)
inline void GetExecutablePath(std::wstring& returnPathW)
{
wchar_t currentFileName[CRASH_HANDLER_MAX_PATH_LEN] = { 0 };
int bufferLen{ CRASH_HANDLER_MAX_PATH_LEN };
GetExecutablePathW(currentFileName, bufferLen);
returnPath = currentFileName;
std::replace(returnPath.begin(), returnPath.end(), '\\', '/');
std::string returnPath;
GetExecutablePath(returnPath);
wchar_t currentFileNameW[CRASH_HANDLER_MAX_PATH_LEN] = { 0 };
AZStd::to_wstring(currentFileNameW, CRASH_HANDLER_MAX_PATH_LEN, returnPath.c_str(), returnPath.size());
returnPathW = currentFileNameW;
}
template<typename T>