linux fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-03 17:59:35 -07:00
parent cbfdf99a9e
commit e28602dbbb
42 changed files with 186 additions and 225 deletions
@@ -52,7 +52,7 @@ void CCaptureTrack::GetKeyInfo(int key, const char*& description, float& duratio
char prefix[64] = "Frame";
if (!m_keys[key].prefix.empty())
{
azstrcpy(prefix, m_keys[key].prefix.c_str());
azstrcpy(prefix, AZ_ARRAY_SIZE(prefix), m_keys[key].prefix.c_str());
}
description = buffer;
if (!m_keys[key].folder.empty())
@@ -25,7 +25,7 @@ void CCommentTrack::GetKeyInfo(int key, const char*& description, float& duratio
description = 0;
duration = m_keys[key].m_duration;
azstrcpy(desc, m_keys[key].m_strComment.c_str());
azstrcpy(desc, AZ_ARRAY_SIZE(desc), m_keys[key].m_strComment.c_str());
description = desc;
}
@@ -457,31 +457,31 @@ void CCompoundSplineTrack::GetKeyInfo(int key, const char*& description, float&
{
float dummy;
m_subTracks[0]->GetKeyInfo(m, subDesc, dummy);
azstrcat(str, subDesc);
azstrcat(str, AZ_ARRAY_SIZE(str), subDesc);
break;
}
}
if (m == m_subTracks[0]->GetNumKeys())
{
azstrcat(str, m_subTrackNames[0].c_str());
azstrcat(str, AZ_ARRAY_SIZE(str), m_subTrackNames[0].c_str());
}
// Tail cases
for (int i = 1; i < GetSubTrackCount(); ++i)
{
azstrcat(str, ",");
azstrcat(str, AZ_ARRAY_SIZE(str), ",");
for (m = 0; m < m_subTracks[i]->GetNumKeys(); ++m)
{
if (m_subTracks[i]->GetKeyTime(m) == time)
{
float dummy;
m_subTracks[i]->GetKeyInfo(m, subDesc, dummy);
azstrcat(str, subDesc);
azstrcat(str, AZ_ARRAY_SIZE(str), subDesc);
break;
}
}
if (m == m_subTracks[i]->GetNumKeys())
{
azstrcat(str, m_subTrackNames[i].c_str());
azstrcat(str, AZ_ARRAY_SIZE(str), m_subTrackNames[i].c_str());
}
}
}
@@ -69,11 +69,11 @@ void CEventTrack::GetKeyInfo(int key, const char*& description, float& duration)
CheckValid();
description = 0;
duration = 0;
azstrcpy(desc, m_keys[key].event.c_str());
azstrcpy(desc, AZ_ARRAY_SIZE(desc), m_keys[key].event.c_str());
if (!m_keys[key].eventValue.empty())
{
azstrcat(desc, ", ");
azstrcat(desc, m_keys[key].eventValue.c_str());
azstrcat(desc, AZ_ARRAY_SIZE(desc), ", ");
azstrcat(desc, AZ_ARRAY_SIZE(desc), m_keys[key].eventValue.c_str());
}
description = desc;
@@ -916,8 +916,8 @@ void CAnimSceneNode::ApplyCameraKey(ISelectKey& key, SAnimContext& ec)
void CAnimSceneNode::ApplyEventKey(IEventKey& key, [[maybe_unused]] SAnimContext& ec)
{
char funcName[1024];
azstrcpy(funcName, "Event_");
azstrcat(funcName, key.event.c_str());
azstrcpy(funcName, AZ_ARRAY_SIZE(funcName), "Event_");
azstrcat(funcName, AZ_ARRAY_SIZE(funcName), key.event.c_str());
gEnv->pMovieSystem->SendGlobalEvent(funcName);
}
@@ -32,7 +32,7 @@ void CScreenFaderTrack::GetKeyInfo(int key, const char*& description, float& dur
CheckValid();
description = 0;
duration = m_keys[key].m_fadeTime;
azstrcpy(desc, m_keys[key].m_fadeType == IScreenFaderKey::eFT_FadeIn ? "In" : "Out");
azstrcpy(desc, AZ_ARRAY_SIZE(desc), m_keys[key].m_fadeType == IScreenFaderKey::eFT_FadeIn ? "In" : "Out");
description = desc;
}
@@ -143,11 +143,11 @@ void CTrackEventTrack::GetKeyInfo(int key, const char*& description, float& dura
CheckValid();
description = 0;
duration = 0;
azstrcpy(desc, m_keys[key].event.c_str());
azstrcpy(desc, AZ_ARRAY_SIZE(desc), m_keys[key].event.c_str());
if (!m_keys[key].eventValue.empty())
{
azstrcat(desc, ", ");
azstrcat(desc, m_keys[key].eventValue.c_str());
azstrcat(desc, AZ_ARRAY_SIZE(desc), ", ");
azstrcat(desc, AZ_ARRAY_SIZE(desc), m_keys[key].eventValue.c_str());
}
description = desc;