Fix clang 13 compilation problems (#5791)
* Fix clang 13 compilation problems Re-instated ShowPlayedSequencesDebug logic by introducing no-op lambda which replaces missing `Draw2dLabel` functionality ( added TODO marker there ) Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * apply review suggestions Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Fix type in assert message Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
@@ -606,11 +606,9 @@ void CBaseLibraryManager::RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid)
|
||||
|
||||
if (m_bUniqGuidMap)
|
||||
{
|
||||
bool bNewItem = true;
|
||||
REFGUID oldGuid = pItem->GetGUID();
|
||||
if (!GuidUtil::IsEmpty(oldGuid))
|
||||
{
|
||||
bNewItem = false;
|
||||
m_itemsGuidMap.erase(oldGuid);
|
||||
}
|
||||
if (GuidUtil::IsEmpty(newGuid))
|
||||
|
||||
@@ -487,7 +487,6 @@ bool CLayoutWnd::LoadConfig()
|
||||
|
||||
CreateLayout((EViewLayout)layout, false);
|
||||
|
||||
bool bRebindViewports = false;
|
||||
if (m_splitWnd)
|
||||
{
|
||||
const QString str = settings.value("Viewports").toString();
|
||||
@@ -498,14 +497,12 @@ bool CLayoutWnd::LoadConfig()
|
||||
{
|
||||
break;
|
||||
}
|
||||
bRebindViewports = true;
|
||||
if (!resToken.isEmpty())
|
||||
{
|
||||
m_viewType[nIndex] = resToken;
|
||||
}
|
||||
nIndex++;
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
BindViewports();
|
||||
|
||||
@@ -329,7 +329,6 @@ bool CAxisGizmo::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point
|
||||
hc.b2DViewport = view->GetType() != ET_ViewportCamera;
|
||||
hc.point2d = point;
|
||||
view->ViewToWorldRay(point, hc.raySrc, hc.rayDir);
|
||||
bool bHit = false;
|
||||
if (HitTest(hc))
|
||||
{
|
||||
switch (hc.manipulatorMode)
|
||||
@@ -344,7 +343,6 @@ bool CAxisGizmo::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point
|
||||
view->SetCurrentCursor(STD_CURSOR_SCALE);
|
||||
break;
|
||||
}
|
||||
bHit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,17 +186,6 @@ CBaseObject* CObjectManager::NewObject(CObjectClassDesc* cls, CBaseObject* prev,
|
||||
if (obj->GetType() != OBJTYPE_AZENTITY)
|
||||
{
|
||||
GetIEditor()->RecordUndo(new CUndoBaseObjectNew(obj));
|
||||
|
||||
// check for script entities
|
||||
const char* scriptClassName = "";
|
||||
CEntityObject* entityObj = qobject_cast<CEntityObject*>(obj);
|
||||
QByteArray entityClass; // Leave it outside of the if. Otherwise buffer is deleted.
|
||||
if (entityObj)
|
||||
{
|
||||
entityClass = entityObj->GetEntityClass().toUtf8();
|
||||
scriptClassName = entityClass.data();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -498,13 +498,11 @@ void SandboxIntegrationManager::EntityParentChanged(
|
||||
// before finally being saved, it will result in all of those layers saving, too.
|
||||
AZ::EntityId oldAncestor = oldParentId;
|
||||
|
||||
bool wasNotInLayer = false;
|
||||
AZ::EntityId oldLayer;
|
||||
do
|
||||
{
|
||||
if (!oldAncestor.IsValid())
|
||||
{
|
||||
wasNotInLayer = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -530,13 +528,11 @@ void SandboxIntegrationManager::EntityParentChanged(
|
||||
|
||||
AZ::EntityId newAncestor = newParentId;
|
||||
|
||||
bool isGoingToRootScene = false;
|
||||
AZ::EntityId newLayer;
|
||||
do
|
||||
{
|
||||
if (!newAncestor.IsValid())
|
||||
{
|
||||
isGoingToRootScene = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,18 +108,15 @@ void CSoundKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selec
|
||||
{
|
||||
ISoundKey soundKey;
|
||||
keyHandle.GetKey(&soundKey);
|
||||
bool bChangedSoundFile = false;
|
||||
|
||||
if (pVar == mv_startTrigger.GetVar())
|
||||
{
|
||||
QString sFilename = mv_startTrigger;
|
||||
bChangedSoundFile = sFilename != soundKey.sStartTrigger.c_str();
|
||||
soundKey.sStartTrigger = sFilename.toUtf8().data();
|
||||
}
|
||||
else if (pVar == mv_stopTrigger.GetVar())
|
||||
{
|
||||
QString sFilename = mv_stopTrigger;
|
||||
bChangedSoundFile = sFilename != soundKey.sStopTrigger.c_str();
|
||||
soundKey.sStopTrigger = sFilename.toUtf8().data();
|
||||
}
|
||||
|
||||
|
||||
@@ -2233,7 +2233,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
|
||||
if (pTrack && inRange)
|
||||
{
|
||||
bool keyCreated = false;
|
||||
if (bTryAddKeysInGroup && pNode->GetParentNode()) // Add keys in group
|
||||
{
|
||||
CTrackViewTrackBundle tracksInGroup = pNode->GetTracksByParam(pTrack->GetParameterType());
|
||||
@@ -2248,8 +2247,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
AzToolsFramework::ScopedUndoBatch undoBatch("Create Key");
|
||||
pCurrTrack->CreateKey(keyTime);
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
else // A compound track
|
||||
@@ -2262,8 +2259,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
AzToolsFramework::ScopedUndoBatch undoBatch("Create Key");
|
||||
pSubTrack->CreateKey(keyTime);
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2276,15 +2271,13 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
AzToolsFramework::ScopedUndoBatch undoBatch("Create Key");
|
||||
pTrack->CreateKey(keyTime);
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
else // A compound track
|
||||
{
|
||||
if (pTrack->GetValueType() == AnimValueType::RGB)
|
||||
{
|
||||
keyCreated = CreateColorKey(pTrack, keyTime);
|
||||
CreateColorKey(pTrack, keyTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2295,7 +2288,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey
|
||||
if (IsOkToAddKeyHere(pSubTrack, keyTime))
|
||||
{
|
||||
pSubTrack->CreateKey(keyTime);
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
@@ -2617,7 +2609,6 @@ void CTrackViewDopeSheetBase::DrawSelectTrack(const Range& timeRange, QPainter*
|
||||
void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* painter, CTrackViewTrack* pTrack, const QRect& rc)
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_visibilityBrush);
|
||||
@@ -2648,7 +2639,6 @@ void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* pa
|
||||
painter->fillRect(QRect(QPoint(x0, rc.top() + 4), QPoint(x, rc.bottom() - 4)), gradient);
|
||||
}
|
||||
|
||||
t0 = time;
|
||||
x0 = x;
|
||||
}
|
||||
int x = TimeToClient(timeRange.end);
|
||||
|
||||
@@ -198,7 +198,6 @@ void CTrackViewKeyPropertiesDlg::OnKeySelectionChanged(CTrackViewSequence* seque
|
||||
|
||||
m_wndProps->setEnabled(false);
|
||||
m_wndTrackProps->setEnabled(false);
|
||||
bool bAssigned = false;
|
||||
if (selectedKeys.GetKeyCount() > 0 && selectedKeys.AreAllKeysOfSameType())
|
||||
{
|
||||
CTrackViewTrack* pTrack = selectedKeys.GetKey(0).GetTrack();
|
||||
@@ -215,12 +214,6 @@ void CTrackViewKeyPropertiesDlg::OnKeySelectionChanged(CTrackViewSequence* seque
|
||||
{
|
||||
AddVars(m_keyControls[i]);
|
||||
}
|
||||
|
||||
if (m_keyControls[i]->OnKeySelectionChange(selectedKeys))
|
||||
{
|
||||
bAssigned = true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,11 +197,9 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
return false;
|
||||
}
|
||||
|
||||
int numcols;
|
||||
unsigned char ch, ch1;
|
||||
uint8* ptr1;
|
||||
int i;
|
||||
short transparency = -1;
|
||||
|
||||
TImage<uint8> outImageIndex;
|
||||
|
||||
@@ -246,7 +244,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
HasColormap = ((ch & COLORMAPMASK) ? true : false);
|
||||
|
||||
BitsPerPixel = (ch & 7) + 1;
|
||||
numcols = ColorMapSize = 1 << BitsPerPixel;
|
||||
BitMask = ColorMapSize - 1;
|
||||
|
||||
Background = NEXTBYTE; /* background color... not used. */
|
||||
@@ -290,10 +287,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
{
|
||||
case GRAPHIC_EXT:
|
||||
ch = NEXTBYTE;
|
||||
if (ptr[0] & 0x1)
|
||||
{
|
||||
transparency = ptr[3]; /* transparent color index */
|
||||
}
|
||||
ptr += ch;
|
||||
break;
|
||||
case PLAINTEXT_EXT:
|
||||
@@ -317,9 +310,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
}
|
||||
}
|
||||
|
||||
//if (transparency >= 0)
|
||||
//mfSet_transparency(transparency);
|
||||
|
||||
/* Now read in values from the image descriptor */
|
||||
|
||||
ch = NEXTBYTE;
|
||||
|
||||
@@ -213,12 +213,10 @@ namespace AzQtComponents
|
||||
// rectangle drawing.
|
||||
if (qTableView || qListView)
|
||||
{
|
||||
int hHdr = 0;
|
||||
int vHdr = 0;
|
||||
|
||||
if (qTableView)
|
||||
{
|
||||
hHdr = qTableView->horizontalHeader()->isVisible() ? qTableView->horizontalHeader()->height() : 0;
|
||||
vHdr = qTableView->verticalHeader()->isVisible() ? qTableView->verticalHeader()->width() : 0;
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -23,7 +23,6 @@ namespace AzToolsFramework
|
||||
// save 2k at a time :( need a better way to do this.
|
||||
AZStd::size_t pos = 0;
|
||||
AZStd::size_t remaining = m_windowState.size();
|
||||
AZ::u8* charData = (AZ::u8*)windowState.begin();
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
@@ -31,7 +30,6 @@ namespace AzToolsFramework
|
||||
m_serializableWindowState.push_back();
|
||||
m_serializableWindowState.back().assign((AZ::u8*)windowState.begin() + pos, (AZ::u8*)windowState.begin() + pos + bytes_this_gulp);
|
||||
pos += bytes_this_gulp;
|
||||
charData += bytes_this_gulp;
|
||||
remaining -= bytes_this_gulp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1201,8 +1201,6 @@ namespace AzToolsFramework
|
||||
.arg((item->parent() == nullptr) ? item->m_entity->GetName().c_str() : GetNodeDisplayName(*item->m_node).c_str()));
|
||||
}
|
||||
|
||||
SliceTargetTreeItem* parent = nullptr;
|
||||
|
||||
AZStd::vector<SliceAssetPtr> validSliceAssets = GetValidTargetAssetsForField(*item);
|
||||
|
||||
// For the selected item populate the tree of all valid slice targets.
|
||||
@@ -1274,7 +1272,6 @@ namespace AzToolsFramework
|
||||
selectButton->setChecked(true);
|
||||
}
|
||||
|
||||
parent = sliceItem;
|
||||
++level;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ extern intptr_t _findfirst64(const char* pFileName, __finddata64_t* pFindData);
|
||||
|
||||
extern DWORD GetFileAttributesW(LPCWSTR lpFileName);
|
||||
|
||||
extern const bool GetFilenameNoCase(const char* file, char*, const bool cCreateNew = false);
|
||||
extern const bool GetFilenameNoCase(const char* file, char*);
|
||||
|
||||
extern BOOL GetUserName(LPSTR lpBuffer, LPDWORD nSize);
|
||||
|
||||
|
||||
@@ -1263,8 +1263,7 @@ ILINE void FS_CLOSEDIR_NOERR(FS_DIR_TYPE pDir)
|
||||
const bool GetFilenameNoCase
|
||||
(
|
||||
const char* file,
|
||||
char* pAdjustedFilename,
|
||||
const bool cCreateNew
|
||||
char* pAdjustedFilename
|
||||
)
|
||||
{
|
||||
assert(file);
|
||||
@@ -1281,29 +1280,19 @@ const bool GetFilenameNoCase
|
||||
}
|
||||
}
|
||||
|
||||
char* slash;
|
||||
const char* dirname;
|
||||
char* name;
|
||||
|
||||
if ((pAdjustedFilename) == (char*)-1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
slash = strrchr(pAdjustedFilename, '/');
|
||||
#if !defined(LINUX) && !defined(APPLE) && !defined(DEFINE_SKIP_WILDCARD_CHECK) // fix the parent path anyhow.
|
||||
char* slash = strrchr(pAdjustedFilename, '/');
|
||||
char* name = pAdjustedFilename;
|
||||
if (slash)
|
||||
{
|
||||
dirname = pAdjustedFilename;
|
||||
name = slash + 1;
|
||||
*slash = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dirname = ".";
|
||||
name = pAdjustedFilename;
|
||||
}
|
||||
|
||||
#if !defined(LINUX) && !defined(APPLE) && !defined(DEFINE_SKIP_WILDCARD_CHECK) // fix the parent path anyhow.
|
||||
// Check for wildcards. We'll always return true if the specified filename is
|
||||
// a wildcard pattern.
|
||||
if (strchr(name, '*') || strchr(name, '?'))
|
||||
@@ -1314,13 +1303,13 @@ const bool GetFilenameNoCase
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Scan for the file.
|
||||
if (slash)
|
||||
{
|
||||
*slash = '/';
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if FIX_FILENAME_CASE
|
||||
char* path = pAdjustedFilename;
|
||||
|
||||
@@ -1027,8 +1027,6 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName,
|
||||
// key CRC
|
||||
uint32 keyCRC;
|
||||
|
||||
size_t nMemSize = 0;
|
||||
|
||||
for (;; )
|
||||
{
|
||||
int nRowIndex = -1;
|
||||
@@ -1509,30 +1507,6 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName,
|
||||
pEntry->flags |= SLocalizedStringEntry::IS_INTERCEPTED;
|
||||
}
|
||||
|
||||
nMemSize += sizeof(*pEntry) + pEntry->sCharacterName.length() * sizeof(char);
|
||||
if (m_cvarLocalizationEncode == 0)
|
||||
{
|
||||
//Note that this isn't accurate if we're using encoding/compression to shrink the string as the encoding step hasn't happened yet
|
||||
if (pEntry->TranslatedText.psUtf8Uncompressed)
|
||||
{
|
||||
nMemSize += pEntry->TranslatedText.psUtf8Uncompressed->length() * sizeof(char);
|
||||
}
|
||||
}
|
||||
if (pEntry->pEditorExtension != NULL)
|
||||
{
|
||||
nMemSize += pEntry->pEditorExtension->sKey.length()
|
||||
+ pEntry->pEditorExtension->sOriginalActorLine.length()
|
||||
+ pEntry->pEditorExtension->sUtf8TranslatedActorLine.length() * sizeof(char)
|
||||
+ pEntry->pEditorExtension->sOriginalText.length()
|
||||
+ pEntry->pEditorExtension->sOriginalCharacterName.length();
|
||||
}
|
||||
|
||||
|
||||
// Compression Preparation
|
||||
//unsigned int nSourceSize = pEntry->swTranslatedText.length()*sizeof(wchar_t);
|
||||
//if (nSourceSize)
|
||||
// int zResult = Compress(pDest, nDestLen, pEntry->swTranslatedText.c_str(), nSourceSize);
|
||||
|
||||
AddLocalizedString(m_pLanguage, pEntry, keyCRC);
|
||||
}
|
||||
|
||||
@@ -1540,10 +1514,7 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName,
|
||||
{
|
||||
pEncoder->Finalize();
|
||||
|
||||
{
|
||||
uint8 compressionBuffer[COMPRESSION_FIXED_BUFFER_LENGTH];
|
||||
//uint8 decompressionBuffer[COMPRESSION_FIXED_BUFFER_LENGTH];
|
||||
size_t uncompressedTotal = 0, compressedTotal = 0;
|
||||
for (size_t stringToCompress = startOfStringsToCompress; stringToCompress < m_pLanguage->m_vLocalizedStrings.size(); stringToCompress++)
|
||||
{
|
||||
SLocalizedStringEntry* pStringToCompress = m_pLanguage->m_vLocalizedStrings[stringToCompress];
|
||||
@@ -1551,30 +1522,19 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName,
|
||||
{
|
||||
size_t compBufSize = COMPRESSION_FIXED_BUFFER_LENGTH;
|
||||
memset(compressionBuffer, 0, COMPRESSION_FIXED_BUFFER_LENGTH);
|
||||
//CryLogAlways("%u Compressing %s (%p)", stringToCompress, pStringToCompress->szCompressedTranslatedText, pStringToCompress->szCompressedTranslatedText);
|
||||
size_t inputStringLength = strlen((const char*)(pStringToCompress->TranslatedText.szCompressed));
|
||||
pEncoder->CompressInput(pStringToCompress->TranslatedText.szCompressed, inputStringLength, compressionBuffer, &compBufSize);
|
||||
compressionBuffer[compBufSize] = 0;
|
||||
pStringToCompress->huffmanTreeIndex = iEncoder;
|
||||
pEncoder->AddRef();
|
||||
//CryLogAlways("Compressed %s (%u) to %s (%u)", pStringToCompress->szCompressedTranslatedText, strlen((const char*)pStringToCompress->szCompressedTranslatedText), compressionBuffer, compBufSize);
|
||||
uncompressedTotal += inputStringLength;
|
||||
compressedTotal += compBufSize;
|
||||
|
||||
uint8* szCompressedString = new uint8[compBufSize];
|
||||
SAFE_DELETE_ARRAY(pStringToCompress->TranslatedText.szCompressed);
|
||||
|
||||
memcpy(szCompressedString, compressionBuffer, compBufSize);
|
||||
pStringToCompress->TranslatedText.szCompressed = szCompressedString;
|
||||
|
||||
//Testing code
|
||||
//memset( decompressionBuffer, 0, COMPRESSION_FIXED_BUFFER_LENGTH );
|
||||
//size_t decompBufSize = pEncoder->UncompressInput(compressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH, decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH);
|
||||
//CryLogAlways("Decompressed %s (%u) to %s (%u)", compressionBuffer, compBufSize, decompressionBuffer, decompBufSize);
|
||||
}
|
||||
}
|
||||
//CryLogAlways("[LOC PROFILING] %s, %u, Uncompressed %u, Compressed %u", sFileName, m_pLanguage->m_vLocalizedStrings.size() - startOfStringsToCompress, uncompressedTotal, compressedTotal);
|
||||
}
|
||||
}
|
||||
|
||||
pXmlTableReader->Release();
|
||||
@@ -1584,11 +1544,7 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName,
|
||||
|
||||
bool CLocalizedStringsManager::DoLoadAGSXmlDocument(const char* sFileName, uint8 nTagID, bool bReload)
|
||||
{
|
||||
if (!sFileName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!m_pLanguage)
|
||||
if (!sFileName|| !m_pLanguage)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1731,7 +1687,6 @@ bool CLocalizedStringsManager::DoLoadAGSXmlDocument(const char* sFileName, uint8
|
||||
}
|
||||
{
|
||||
uint8 compressionBuffer[COMPRESSION_FIXED_BUFFER_LENGTH] = {};
|
||||
size_t uncompressedTotal = 0, compressedTotal = 0;
|
||||
for (size_t stringToCompress = startOfStringsToCompress; stringToCompress < m_pLanguage->m_vLocalizedStrings.size(); stringToCompress++)
|
||||
{
|
||||
SLocalizedStringEntry* pStringToCompress = m_pLanguage->m_vLocalizedStrings[stringToCompress];
|
||||
@@ -1744,8 +1699,6 @@ bool CLocalizedStringsManager::DoLoadAGSXmlDocument(const char* sFileName, uint8
|
||||
compressionBuffer[compBufSize] = 0;
|
||||
pStringToCompress->huffmanTreeIndex = iEncoder;
|
||||
pEncoder->AddRef();
|
||||
uncompressedTotal += inputStringLength;
|
||||
compressedTotal += compBufSize;
|
||||
uint8* szCompressedString = new uint8[compBufSize];
|
||||
SAFE_DELETE_ARRAY(pStringToCompress->TranslatedText.szCompressed);
|
||||
memcpy(szCompressedString, compressionBuffer, compBufSize);
|
||||
@@ -1810,7 +1763,7 @@ bool CLocalizedStringsManager::LocalizeString_s(const AZStd::string& sString, AZ
|
||||
bool CLocalizedStringsManager::LocalizeStringInternal(const char* pStr, size_t len, AZStd::string& outLocalizedString, bool bEnglish)
|
||||
{
|
||||
assert (m_pLanguage);
|
||||
if (m_pLanguage == 0)
|
||||
if (m_pLanguage == nullptr)
|
||||
{
|
||||
CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "LocalizeString: No language set.");
|
||||
outLocalizedString.assign(pStr, pStr + len);
|
||||
|
||||
@@ -2610,15 +2610,8 @@ namespace AssetProcessor
|
||||
{
|
||||
ScopedTransaction transaction(m_databaseConnection);
|
||||
|
||||
const char* statementName = INSERT_NEW_LEGACYSUBID;
|
||||
|
||||
bool creatingNew = entry.m_subIDsEntryID == InvalidEntryId;
|
||||
|
||||
if (!creatingNew)
|
||||
{
|
||||
statementName = OVERWRITE_EXISTING_LEGACYSUBID;
|
||||
}
|
||||
|
||||
if (creatingNew)
|
||||
{
|
||||
if (!s_InsertNewLegacysubidQuery.BindAndStep(*m_databaseConnection, entry.m_productPK, entry.m_subID))
|
||||
|
||||
@@ -274,11 +274,9 @@ namespace AssetProcessor
|
||||
}
|
||||
|
||||
//look for the job in flight first
|
||||
bool found = false;
|
||||
auto foundElement = m_jobRunKeyToJobInfoMap.find(request.m_jobRunKey);
|
||||
if (foundElement != m_jobRunKeyToJobInfoMap.end())
|
||||
{
|
||||
found = true;
|
||||
jobInfo = foundElement->second;
|
||||
}
|
||||
else
|
||||
@@ -296,7 +294,6 @@ namespace AssetProcessor
|
||||
|
||||
AZ_Assert(jobInfos.size() == 1, "Should only have found one jobInfo!!!");
|
||||
jobInfo = AZStd::move(jobInfos[0]);
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (jobInfo.m_status == JobStatus::Failed_InvalidSourceNameExceedsMaxLimit)
|
||||
|
||||
@@ -177,11 +177,9 @@ namespace AssetProcessor
|
||||
AZ_TracePrintf(AssetProcessor::DebugChannel, "JobTrace AddNewJob(%i %s,%s,%s)\n", rcJob, rcJob->GetInputFileAbsolutePath().toUtf8().constData(), rcJob->GetPlatformInfo().m_identifier.c_str(), rcJob->GetJobKey().toUtf8().constData());
|
||||
#endif
|
||||
|
||||
bool isPending = false;
|
||||
if (rcJob->GetState() == RCJob::pending)
|
||||
{
|
||||
m_jobsInQueueLookup.insert(rcJob->GetElementID(), rcJob);
|
||||
isPending = true;
|
||||
}
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
@@ -152,7 +152,6 @@ void RCcontrollerUnitTests::RunRCControllerTests()
|
||||
}
|
||||
|
||||
QModelIndex rcJobIndex;
|
||||
int rcJobJobIndex;
|
||||
QString rcJobCommand;
|
||||
QString rcJobState;
|
||||
|
||||
@@ -172,7 +171,6 @@ void RCcontrollerUnitTests::RunRCControllerTests()
|
||||
return;
|
||||
}
|
||||
|
||||
rcJobJobIndex = rcJobListModel->data(rcJobIndex, RCJobListModel::jobIndexRole).toInt();
|
||||
rcJobCommand = rcJobListModel->data(rcJobIndex, RCJobListModel::displayNameRole).toString();
|
||||
rcJobState = rcJobListModel->data(rcJobIndex, RCJobListModel::stateRole).toString();
|
||||
}
|
||||
|
||||
@@ -32,10 +32,9 @@ namespace ImageProcessingAtom
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 dwWidth, dwHeight, dwMips;
|
||||
uint32 dwWidth, dwHeight;
|
||||
dwWidth = Get()->GetWidth(0);
|
||||
dwHeight = Get()->GetHeight(0);
|
||||
dwMips = Get()->GetMipCount();
|
||||
|
||||
//if the output image size doesn't work the desired pixel format. set to fallback format
|
||||
const PixelFormatInfo* dstFmtInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(fmtDst);
|
||||
|
||||
@@ -99,11 +99,9 @@ namespace ImageProcessingAtom
|
||||
return pRet;
|
||||
}
|
||||
|
||||
const char* pFormatText;
|
||||
if (dwBitsPerChannel == 8)
|
||||
{
|
||||
// R8, GR8, BGR8, BGRA8
|
||||
pFormatText = "8-bit";
|
||||
pRet = Load8BitImageFromTIFF(tif);
|
||||
}
|
||||
else if (dwBitsPerChannel == 16)
|
||||
@@ -111,19 +109,16 @@ namespace ImageProcessingAtom
|
||||
// A/L/R16, R16F, GR16, GR16f, ARGB16, ARGB16f
|
||||
if (dwFormat == SAMPLEFORMAT_IEEEFP)
|
||||
{
|
||||
pFormatText = "16-bit float";
|
||||
pRet = Load16BitHDRImageFromTIFF(tif);
|
||||
}
|
||||
else
|
||||
{
|
||||
pFormatText = "16-bit int";
|
||||
pRet = Load16BitImageFromTIFF(tif);
|
||||
}
|
||||
}
|
||||
else if (dwBitsPerChannel == 32 && dwFormat == SAMPLEFORMAT_IEEEFP)
|
||||
{
|
||||
// A/L/R32f, GR32f, ARGB32f
|
||||
pFormatText = "32-bit float";
|
||||
pRet = Load32BitHDRImageFromTIFF(tif);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1438,15 +1438,12 @@ namespace ImageProcessingAtom
|
||||
int32 a_Channel2Src, int32 a_Channel3Src )
|
||||
{
|
||||
int32 iFace, iMipLevel, u, v, k;
|
||||
int32 size;
|
||||
CP_ITYPE texelData[4];
|
||||
int32 channelSrcArray[4];
|
||||
|
||||
//since output is being modified, terminate any active filtering threads
|
||||
TerminateActiveThreads();
|
||||
|
||||
size = m_OutputSize;
|
||||
|
||||
channelSrcArray[0] = a_Channel0Src;
|
||||
channelSrcArray[1] = a_Channel1Src;
|
||||
channelSrcArray[2] = a_Channel2Src;
|
||||
|
||||
@@ -561,12 +561,10 @@ uint32_t AZ::FFont::GetNumQuadsForText(const char* str, const bool asciiMultiLin
|
||||
++numQuads;
|
||||
}
|
||||
|
||||
uint32_t nextCh = 0;
|
||||
const wchar_t* pChar = strW.c_str();
|
||||
while (uint32_t ch = *pChar)
|
||||
{
|
||||
++pChar;
|
||||
nextCh = *pChar;
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
|
||||
+16
-8
@@ -290,14 +290,22 @@ namespace AZ
|
||||
menuButton->setAutoRaise(true);
|
||||
menuButton->setIcon(QIcon(":/Cards/img/UI20/Cards/menu_ico.svg"));
|
||||
menuButton->setVisible(true);
|
||||
QObject::connect(menuButton, &QToolButton::clicked, &dialog, [&]() {
|
||||
QAction* action = nullptr;
|
||||
|
||||
QMenu menu(&dialog);
|
||||
action = menu.addAction("Clear", [&] { inspector->SetUvNameMap(RPI::MaterialModelUvOverrideMap()); });
|
||||
action = menu.addAction("Revert", [&] { inspector->SetUvNameMap(matModUvOverrides);; });
|
||||
menu.exec(QCursor::pos());
|
||||
});
|
||||
QObject::connect(
|
||||
menuButton, &QToolButton::clicked, &dialog, [&]()
|
||||
{
|
||||
QMenu menu(&dialog);
|
||||
menu.addAction(
|
||||
"Clear", [&]
|
||||
{
|
||||
inspector->SetUvNameMap(RPI::MaterialModelUvOverrideMap());
|
||||
});
|
||||
menu.addAction(
|
||||
"Revert", [&]
|
||||
{
|
||||
inspector->SetUvNameMap(matModUvOverrides);
|
||||
});
|
||||
menu.exec(QCursor::pos());
|
||||
});
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox(&dialog);
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
|
||||
|
||||
@@ -194,7 +194,6 @@ namespace AZ
|
||||
const uint32_t originalVertex = sourceOriginalVertex[vertexIndex + vertexStart];
|
||||
const uint32_t influenceCount = AZStd::GetMin<uint32_t>(MaxSupportedSkinInfluences, static_cast<uint32_t>(sourceSkinningInfo->GetNumInfluences(originalVertex)));
|
||||
uint32_t influenceIndex = 0;
|
||||
float weightError = 1.0f;
|
||||
|
||||
AZStd::vector<uint32_t> localIndices;
|
||||
for (; influenceIndex < influenceCount; ++influenceIndex)
|
||||
@@ -202,7 +201,6 @@ namespace AZ
|
||||
EMotionFX::SkinInfluence* influence = sourceSkinningInfo->GetInfluence(originalVertex, influenceIndex);
|
||||
localIndices.push_back(static_cast<uint32_t>(influence->GetNodeNr()));
|
||||
blendWeightBufferData[atomVertexBufferOffset + vertexIndex][influenceIndex] = influence->GetWeight();
|
||||
weightError -= blendWeightBufferData[atomVertexBufferOffset + vertexIndex][influenceIndex];
|
||||
}
|
||||
|
||||
// Zero out any unused ids/weights
|
||||
|
||||
@@ -169,11 +169,9 @@ namespace AudioControls
|
||||
if (parent.isValid())
|
||||
{
|
||||
bool bChildValid = false;
|
||||
bool bHasChildren = false;
|
||||
QModelIndex child = parent.model()->index(0, 0, parent);
|
||||
for (int i = 1; child.isValid(); ++i)
|
||||
{
|
||||
bHasChildren = true;
|
||||
if (ApplyFilter(child))
|
||||
{
|
||||
bChildValid = true;
|
||||
|
||||
@@ -27,9 +27,9 @@ namespace AudioControls
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
QConnectionsWidget::QConnectionsWidget(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_control(nullptr)
|
||||
, m_notFoundColor(QColor(0xf3, 0x81, 0x1d))
|
||||
, m_localizedColor(QColor(0x42, 0x85, 0xf4))
|
||||
, m_control(nullptr)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace AudioControls
|
||||
m_connectionList->installEventFilter(this);
|
||||
|
||||
connect(m_connectionList, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(ShowConnectionContextMenu(const QPoint&)));
|
||||
connect(m_connectionList, SIGNAL(itemSelectionChanged()), this, SLOT(SelectedConnectionChanged()));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
@@ -101,27 +100,6 @@ namespace AudioControls
|
||||
contextMenu.exec(m_connectionList->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
void QConnectionsWidget::SelectedConnectionChanged()
|
||||
{
|
||||
TConnectionPtr connection;
|
||||
EACEControlType controlType = AudioControls::eACET_NUM_TYPES;
|
||||
if (m_control)
|
||||
{
|
||||
QList<QListWidgetItem*> selected = m_connectionList->selectedItems();
|
||||
if (selected.length() == 1)
|
||||
{
|
||||
QListWidgetItem* currentItem = selected[0];
|
||||
if (currentItem)
|
||||
{
|
||||
const CID externalId = currentItem->data(eMDR_ID).toInt();
|
||||
connection = m_control->GetConnection(externalId);
|
||||
controlType = m_control->GetType();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
void QConnectionsWidget::MakeConnectionTo(IAudioSystemControl* middlewareControl)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace AudioControls
|
||||
|
||||
private slots:
|
||||
void ShowConnectionContextMenu(const QPoint& pos);
|
||||
void SelectedConnectionChanged();
|
||||
void CurrentConnectionModified();
|
||||
void RemoveSelectedConnection();
|
||||
|
||||
|
||||
@@ -343,17 +343,6 @@ namespace Audio
|
||||
{
|
||||
if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::FileCacheInfo))
|
||||
{
|
||||
EATLDataScope dataScope = eADS_ALL;
|
||||
|
||||
if (CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::Global))
|
||||
{
|
||||
dataScope = eADS_GLOBAL;
|
||||
}
|
||||
else if (CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::LevelSpecific))
|
||||
{
|
||||
dataScope = eADS_LEVEL_SPECIFIC;
|
||||
}
|
||||
|
||||
const auto frameTime = AZStd::chrono::system_clock::now();
|
||||
|
||||
const float entryDrawSize = 1.5f;
|
||||
|
||||
@@ -552,14 +552,6 @@ namespace EMotionFX
|
||||
motionNode->CreateMotionInstance(animGraphInstance->GetActorInstance(), this);
|
||||
}
|
||||
|
||||
// get the id of the currently used the motion set
|
||||
MotionSet* motionSet = animGraphInstance->GetMotionSet();
|
||||
uint32 motionSetID = MCORE_INVALIDINDEX32;
|
||||
if (motionSet)
|
||||
{
|
||||
motionSetID = motionSet->GetID();
|
||||
}
|
||||
|
||||
// update the internally stored playback info
|
||||
motionNode->UpdatePlayBackInfo(animGraphInstance);
|
||||
|
||||
|
||||
-2
@@ -412,11 +412,9 @@ namespace EMStudio
|
||||
if (!nodesByAnimGraph.empty())
|
||||
{
|
||||
MCore::CommandGroup commandGroup("Delete anim graph nodes");
|
||||
AZ::u32 numNodes = 0;
|
||||
|
||||
for (const AZStd::pair<EMotionFX::AnimGraph*, AZStd::vector<EMotionFX::AnimGraphNode*>>& animGraphAndNodes : nodesByAnimGraph)
|
||||
{
|
||||
numNodes += static_cast<AZ::u32>(animGraphAndNodes.second.size());
|
||||
CommandSystem::DeleteNodes(&commandGroup, animGraphAndNodes.first, animGraphAndNodes.second, true);
|
||||
}
|
||||
|
||||
|
||||
-10
@@ -482,16 +482,6 @@ namespace EMStudio
|
||||
QMenu menu(this);
|
||||
menu.setToolTipsVisible(true);
|
||||
|
||||
bool actorSelected = false;
|
||||
for (const QTreeWidgetItem* item : items)
|
||||
{
|
||||
if (item->parent() == nullptr)
|
||||
{
|
||||
actorSelected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool instanceSelected = false;
|
||||
const int selectedItemCount = items.count();
|
||||
for (int i = 0; i < selectedItemCount; ++i)
|
||||
|
||||
-7
@@ -2152,13 +2152,6 @@ namespace EMStudio
|
||||
float startTime = copyElement.m_startTime + offset;
|
||||
float endTime = copyElement.m_endTime + offset;
|
||||
|
||||
// calculate the duration of the motion event
|
||||
float duration = 0.0f;
|
||||
if (MCore::Compare<float>::CheckIfIsClose(startTime, endTime, MCore::Math::epsilon) == false)
|
||||
{
|
||||
duration = endTime - startTime;
|
||||
}
|
||||
|
||||
CommandSystem::CommandHelperAddMotionEvent(trackName.c_str(), startTime, endTime, copyElement.m_eventDatas, &commandGroup);
|
||||
}
|
||||
|
||||
|
||||
@@ -276,6 +276,11 @@ namespace GraphCanvas
|
||||
m_subTitleWidget->SetLabel(subtitle);
|
||||
updateLayout = true;
|
||||
}
|
||||
|
||||
if (updateLayout)
|
||||
{
|
||||
UpdateLayout();
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralNodeTitleGraphicsWidget::SetTitle(const AZStd::string& title)
|
||||
@@ -463,13 +468,6 @@ namespace GraphCanvas
|
||||
{
|
||||
GRAPH_CANVAS_DETAILED_PROFILE_FUNCTION();
|
||||
|
||||
Styling::PaletteStyle style = m_styleHelper.GetAttribute(Styling::Attribute::PaletteStyle, Styling::PaletteStyle::Solid);
|
||||
|
||||
if (m_paletteOverride)
|
||||
{
|
||||
style = m_paletteOverride->GetAttribute(Styling::Attribute::PaletteStyle, Styling::PaletteStyle::Solid);
|
||||
}
|
||||
|
||||
// Background
|
||||
QRectF bounds = boundingRect();
|
||||
|
||||
|
||||
+3
-5
@@ -188,9 +188,7 @@ namespace GraphCanvas
|
||||
void GeneralSlotLayoutGraphicsWidget::LinearSlotGroupWidget::DisplaySlot(const AZ::EntityId& slotId)
|
||||
{
|
||||
ConnectionType connectionType = ConnectionType::CT_Invalid;
|
||||
SlotRequestBus::EventResult(connectionType, slotId, &SlotRequests::GetConnectionType);
|
||||
|
||||
int layoutOrder = 0;
|
||||
SlotRequestBus::EventResult(connectionType, slotId, &SlotRequests::GetConnectionType);
|
||||
|
||||
SlotLayoutInfo slotInfo(slotId);
|
||||
|
||||
@@ -199,14 +197,14 @@ namespace GraphCanvas
|
||||
SlotUINotificationBus::MultiHandler::BusConnect(slotId);
|
||||
|
||||
m_inputSlotSet.insert(slotId);
|
||||
layoutOrder = LayoutSlot(m_inputs, m_inputSlots, slotInfo);
|
||||
LayoutSlot(m_inputs, m_inputSlots, slotInfo);
|
||||
}
|
||||
else if (connectionType == CT_Output)
|
||||
{
|
||||
SlotUINotificationBus::MultiHandler::BusConnect(slotId);
|
||||
|
||||
m_outputSlotSet.insert(slotId);
|
||||
LayoutSlot(m_outputs, m_outputSlots, slotInfo);
|
||||
LayoutSlot(m_outputs, m_outputSlots, slotInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2182,18 +2182,6 @@ void AbstractSplineWidget::MoveSelectedKeys(Vec2 offset, bool copyKeys)
|
||||
}
|
||||
}
|
||||
|
||||
int rangeMin = aznumeric_cast<int>(TimeToXOfs(affectedRangeMin));
|
||||
int rangeMax = aznumeric_cast<int>(TimeToXOfs(affectedRangeMax));
|
||||
|
||||
if (m_timeRange.start == affectedRangeMin)
|
||||
{
|
||||
rangeMin = m_rcSpline.left();
|
||||
}
|
||||
if (m_timeRange.end == affectedRangeMax)
|
||||
{
|
||||
rangeMax = m_rcSpline.right();
|
||||
}
|
||||
|
||||
if (m_pTimelineCtrl)
|
||||
{
|
||||
m_pTimelineCtrl->update();
|
||||
|
||||
@@ -1866,24 +1866,22 @@ void CUiAnimViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKe
|
||||
|
||||
if (pTrack && inRange)
|
||||
{
|
||||
bool keyCreated = false;
|
||||
if (bTryAddKeysInGroup && pNode->GetParentNode()) // Add keys in group
|
||||
if (bTryAddKeysInGroup && pNode->GetParentNode()) // Add keys in group
|
||||
{
|
||||
CUiAnimViewTrackBundle tracksInGroup = pNode->GetTracksByParam(pTrack->GetParameterType());
|
||||
for (int i = 0; i < (int)tracksInGroup.GetCount(); ++i)
|
||||
{
|
||||
CUiAnimViewTrack* pCurrTrack = tracksInGroup.GetTrack(i);
|
||||
|
||||
if (pCurrTrack->GetChildCount() == 0) // A simple track
|
||||
if (pCurrTrack->GetChildCount() == 0) // A simple track
|
||||
{
|
||||
if (IsOkToAddKeyHere(pCurrTrack, keyTime))
|
||||
{
|
||||
RecordTrackUndo(pCurrTrack);
|
||||
pCurrTrack->CreateKey(keyTime);
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
else // A compound track
|
||||
else // A compound track
|
||||
{
|
||||
for (unsigned int k = 0; k < pCurrTrack->GetChildCount(); ++k)
|
||||
{
|
||||
@@ -1892,26 +1890,24 @@ void CUiAnimViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKe
|
||||
{
|
||||
RecordTrackUndo(pSubTrack);
|
||||
pSubTrack->CreateKey(keyTime);
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pTrack->GetChildCount() == 0) // A simple track
|
||||
else if (pTrack->GetChildCount() == 0) // A simple track
|
||||
{
|
||||
if (IsOkToAddKeyHere(pTrack, keyTime))
|
||||
{
|
||||
RecordTrackUndo(pTrack);
|
||||
pTrack->CreateKey(keyTime);
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
else // A compound track
|
||||
else // A compound track
|
||||
{
|
||||
if (pTrack->GetValueType() == eUiAnimValue_RGB)
|
||||
{
|
||||
keyCreated = CreateColorKey(pTrack, keyTime);
|
||||
CreateColorKey(pTrack, keyTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1922,7 +1918,6 @@ void CUiAnimViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKe
|
||||
if (IsOkToAddKeyHere(pSubTrack, keyTime))
|
||||
{
|
||||
pSubTrack->CreateKey(keyTime);
|
||||
keyCreated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2236,7 +2231,6 @@ void CUiAnimViewDopeSheetBase::DrawSelectTrack(const Range& timeRange, QPainter*
|
||||
void CUiAnimViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* painter, CUiAnimViewTrack* pTrack, const QRect& rc)
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_visibilityBrush);
|
||||
@@ -2267,7 +2261,6 @@ void CUiAnimViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* p
|
||||
painter->fillRect(QRect(QPoint(x0, rc.top() + 4), QPoint(x, rc.bottom() - 4)), gradient);
|
||||
}
|
||||
|
||||
t0 = time;
|
||||
x0 = x;
|
||||
}
|
||||
int x = TimeToClient(timeRange.end);
|
||||
|
||||
@@ -726,24 +726,27 @@ void UiAnimationSystem::StillUpdate()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void UiAnimationSystem::ShowPlayedSequencesDebug()
|
||||
{
|
||||
//f32 green[4] = {0, 1, 0, 1};
|
||||
//f32 purple[4] = {1, 0, 1, 1};
|
||||
//f32 white[4] = {1, 1, 1, 1};
|
||||
constexpr f32 green[4] = {0, 1, 0, 1};
|
||||
constexpr f32 purple[4] = {1, 0, 1, 1};
|
||||
constexpr f32 white[4] = {1, 1, 1, 1};
|
||||
float y = 10.0f;
|
||||
AZStd::vector<AZStd::string> names;
|
||||
|
||||
//TODO: needs an implementation
|
||||
auto Draw2dLabel = [](float /*x*/,float /*y*/,float /*depth*/,const f32* /*color*/,bool /*center*/, const char* /*fmt*/, ...) {};
|
||||
|
||||
for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it)
|
||||
{
|
||||
PlayingUIAnimSequence& playingSequence = *it;
|
||||
|
||||
if (playingSequence.sequence == NULL)
|
||||
if (playingSequence.sequence == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AZ_Assert(false,"gEnv->pRenderer is always null so it can't be used here");
|
||||
//const char* fullname = playingSequence.sequence->GetName();
|
||||
//gEnv->pRenderer->Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed);
|
||||
const char* fullname = playingSequence.sequence->GetName();
|
||||
Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed);
|
||||
|
||||
y += 16.0f;
|
||||
|
||||
@@ -762,7 +765,7 @@ void UiAnimationSystem::ShowPlayedSequencesDebug()
|
||||
names.push_back(name);
|
||||
}
|
||||
|
||||
//gEnv->pRenderer->Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name.c_str());
|
||||
Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name.c_str());
|
||||
}
|
||||
|
||||
y += 32.0f;
|
||||
|
||||
@@ -3510,17 +3510,9 @@ void UiTextComponent::UnitTestLocalization(CLyShine* lyshine, IConsoleCmdArgs* /
|
||||
|
||||
AZStd::string localizationXml("libs/localization/localization.xml");
|
||||
|
||||
bool initLocSuccess = false;
|
||||
|
||||
if (pLocMan)
|
||||
if (!pLocMan || !pLocMan->InitLocalizationData(localizationXml.c_str()) || !pLocMan->LoadLocalizationDataByTag("init"))
|
||||
{
|
||||
if (pLocMan->InitLocalizationData(localizationXml.c_str()))
|
||||
{
|
||||
if (pLocMan->LoadLocalizationDataByTag("init"))
|
||||
{
|
||||
initLocSuccess = true;
|
||||
}
|
||||
}
|
||||
AZ_Assert(false, "Failed to load localization");
|
||||
}
|
||||
|
||||
ComponentGetSetTextTestsLoc(lyshine);
|
||||
|
||||
@@ -206,19 +206,16 @@ UiCanvasFileObject* UiCanvasFileObject::LoadCanvasEntitiesFromOldFormatFile(cons
|
||||
|
||||
// Do a sanity check that the buffer does start with the prefix that we will remove
|
||||
// Also, determine how newlines are represented in the file.
|
||||
bool useCarriageReturnNewline = false;
|
||||
const char* suffixToRemove = nullptr;
|
||||
|
||||
size_t prefixToRemoveLen = 0;
|
||||
if (strncmp(buffer, prefixToRemove1, strlen(prefixToRemove1)) == 0)
|
||||
{
|
||||
useCarriageReturnNewline = false;
|
||||
prefixToRemoveLen = strlen(prefixToRemove1);
|
||||
suffixToRemove = suffixToRemove1;
|
||||
}
|
||||
else if (strncmp(buffer, prefixToRemove2, strlen(prefixToRemove2)) == 0)
|
||||
{
|
||||
useCarriageReturnNewline = true;
|
||||
prefixToRemoveLen = strlen(prefixToRemove2);
|
||||
suffixToRemove = suffixToRemove2;
|
||||
}
|
||||
@@ -257,7 +254,6 @@ UiCanvasFileObject* UiCanvasFileObject::LoadCanvasEntitiesFromOldFormatFile(cons
|
||||
{
|
||||
++p;
|
||||
suffixToRemove = suffixToRemove2;
|
||||
useCarriageReturnNewline = true;
|
||||
}
|
||||
if (*p == '\n')
|
||||
{
|
||||
|
||||
@@ -598,7 +598,6 @@ namespace
|
||||
int curChar = 0;
|
||||
float curLineWidth = 0.0f;
|
||||
float biggestLineWidth = 0.0f;
|
||||
float widthSum = 0.0f;
|
||||
|
||||
// When iterating over batches, we need to know the previous
|
||||
// character, which we can only obtain if we keep track of the last
|
||||
@@ -690,7 +689,6 @@ namespace
|
||||
{
|
||||
// Reset the current line width to account for newline
|
||||
curLineWidth = curCharWidth;
|
||||
widthSum += curLineWidth;
|
||||
}
|
||||
else if ((lastSpace > 0) && ((curChar - lastSpace) < 16) && (curChar - lastSpace >= 0)) // 16 is the default threshold
|
||||
{
|
||||
@@ -703,7 +701,6 @@ namespace
|
||||
}
|
||||
|
||||
curLineWidth = curLineWidth - lastSpaceWidth + curCharWidth;
|
||||
widthSum += curLineWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -723,7 +720,6 @@ namespace
|
||||
biggestLineWidth = curLineWidth;
|
||||
}
|
||||
|
||||
widthSum += curLineWidth;
|
||||
curLineWidth = curCharWidth;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,12 +40,12 @@ CAnimSequence::CAnimSequence(IMovieSystem* pMovieSystem, uint32 id, SequenceType
|
||||
m_nextGenId = 1;
|
||||
m_pMovieSystem = pMovieSystem;
|
||||
m_flags = 0;
|
||||
m_pParentSequence = NULL;
|
||||
m_pParentSequence = nullptr;
|
||||
m_timeRange.Set(0, 10);
|
||||
m_bPaused = false;
|
||||
m_bActive = false;
|
||||
m_legacySequenceObject = nullptr;
|
||||
m_activeDirector = NULL;
|
||||
m_activeDirector = nullptr;
|
||||
m_activeDirectorNodeId = -1;
|
||||
m_precached = false;
|
||||
m_bResetting = false;
|
||||
@@ -271,7 +271,7 @@ IAnimNode* CAnimSequence::CreateNodeInternal(AnimNodeType nodeType, uint32 nNode
|
||||
return nullptr; // should never happen, null pointer guard
|
||||
}
|
||||
|
||||
CAnimNode* animNode = NULL;
|
||||
CAnimNode* animNode = nullptr;
|
||||
|
||||
if (nNodeId == -1)
|
||||
{
|
||||
@@ -331,7 +331,7 @@ IAnimNode* CAnimSequence::CreateNodeInternal(AnimNodeType nodeType, uint32 nNode
|
||||
if (AddNode(animNode))
|
||||
{
|
||||
// If there isn't an active director, set it now.
|
||||
if (m_activeDirector == NULL && animNode->GetType() == AnimNodeType::Director)
|
||||
if (m_activeDirector == nullptr && animNode->GetType() == AnimNodeType::Director)
|
||||
{
|
||||
SetActiveDirector(animNode);
|
||||
}
|
||||
@@ -352,7 +352,7 @@ IAnimNode* CAnimSequence::CreateNode(XmlNodeRef node)
|
||||
{
|
||||
if (!GetMovieSystem())
|
||||
{
|
||||
return 0; // should never happen, null pointer guard
|
||||
return nullptr; // should never happen, null pointer guard
|
||||
}
|
||||
|
||||
AnimNodeType type;
|
||||
@@ -361,13 +361,13 @@ IAnimNode* CAnimSequence::CreateNode(XmlNodeRef node)
|
||||
XmlString name;
|
||||
if (!node->getAttr("Name", name))
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
IAnimNode* pNewNode = CreateNode(type);
|
||||
if (!pNewNode)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
pNewNode->SetName(name);
|
||||
@@ -377,7 +377,7 @@ IAnimNode* CAnimSequence::CreateNode(XmlNodeRef node)
|
||||
|
||||
// Make sure de-serializing this node didn't just create an id conflict. This can happen sometimes
|
||||
// when copy/pasting nodes from a different sequence to this one.
|
||||
for (auto curNode : m_nodes)
|
||||
for (const auto& curNode : m_nodes)
|
||||
{
|
||||
CAnimNode* animNode = static_cast<CAnimNode*>(curNode.get());
|
||||
if (animNode->GetId() == newAnimNode->GetId() && animNode != newAnimNode)
|
||||
@@ -413,7 +413,7 @@ void CAnimSequence::RemoveNode(IAnimNode* node, bool removeChildRelationships)
|
||||
}
|
||||
if (removeChildRelationships && m_nodes[i]->GetParent() == node)
|
||||
{
|
||||
m_nodes[i]->SetParent(0);
|
||||
m_nodes[i]->SetParent(nullptr);
|
||||
}
|
||||
|
||||
i++;
|
||||
@@ -423,7 +423,7 @@ void CAnimSequence::RemoveNode(IAnimNode* node, bool removeChildRelationships)
|
||||
if (m_activeDirector == node)
|
||||
{
|
||||
// Clear the active one.
|
||||
m_activeDirector = NULL;
|
||||
m_activeDirector = nullptr;
|
||||
m_activeDirectorNodeId = -1;
|
||||
|
||||
// If there is another director node, set it as active.
|
||||
@@ -445,7 +445,7 @@ void CAnimSequence::RemoveAll()
|
||||
stl::free_container(m_nodes);
|
||||
stl::free_container(m_events);
|
||||
stl::free_container(m_nodesNeedToRender);
|
||||
m_activeDirector = NULL;
|
||||
m_activeDirector = nullptr;
|
||||
m_activeDirectorNodeId = -1;
|
||||
}
|
||||
|
||||
@@ -462,9 +462,9 @@ void CAnimSequence::Reset(bool bSeekToStart)
|
||||
|
||||
if (!bSeekToStart)
|
||||
{
|
||||
for (AnimNodes::iterator it = m_nodes.begin(); it != m_nodes.end(); ++it)
|
||||
for (const auto& it :m_nodes)
|
||||
{
|
||||
IAnimNode* animNode = it->get();
|
||||
IAnimNode* animNode = it.get();
|
||||
static_cast<CAnimNode*>(animNode)->OnReset();
|
||||
}
|
||||
m_bResetting = false;
|
||||
@@ -1091,7 +1091,7 @@ int CAnimSequence::GetTrackEventsCount() const
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
char const* CAnimSequence::GetTrackEvent(int iIndex) const
|
||||
{
|
||||
char const* szResult = NULL;
|
||||
char const* szResult = nullptr;
|
||||
const bool bValid = (iIndex >= 0 && iIndex < GetTrackEventsCount());
|
||||
CRY_ASSERT(bValid);
|
||||
|
||||
@@ -1153,7 +1153,7 @@ IAnimNode* CAnimSequence::FindNodeById(int nNodeId)
|
||||
return animNode;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -1172,7 +1172,7 @@ IAnimNode* CAnimSequence::FindNodeByName(const char* sNodeName, const IAnimNode*
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -1352,9 +1352,9 @@ bool CAnimSequence::IsAncestorOf(const IAnimSequence* sequence) const
|
||||
return false; // should never happen, null pointer guard
|
||||
}
|
||||
|
||||
for (AnimNodes::const_iterator it = m_nodes.begin(); it != m_nodes.end(); ++it)
|
||||
for (const auto& it :m_nodes)
|
||||
{
|
||||
IAnimNode* pNode = it->get();
|
||||
IAnimNode* pNode = it.get();
|
||||
if (pNode->GetType() == AnimNodeType::Director)
|
||||
{
|
||||
IAnimTrack* pSequenceTrack = pNode->GetTrackForParameter(AnimParamType::Sequence);
|
||||
|
||||
@@ -57,8 +57,6 @@ void CLayerNode::Initialize()
|
||||
//-----------------------------------------------------------------------------
|
||||
void CLayerNode::Animate(SAnimContext& ec)
|
||||
{
|
||||
bool bVisibilityModified = false;
|
||||
|
||||
int trackCount = NumTracks();
|
||||
for (int paramIndex = 0; paramIndex < trackCount; paramIndex++)
|
||||
{
|
||||
@@ -93,14 +91,12 @@ void CLayerNode::Animate(SAnimContext& ec)
|
||||
if (visible != m_bPreVisibility)
|
||||
{
|
||||
m_bPreVisibility = visible;
|
||||
bVisibilityModified = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bInit = true;
|
||||
m_bPreVisibility = visible;
|
||||
bVisibilityModified = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -785,60 +785,60 @@ bool CMovieSystem::InternalStopSequence(IAnimSequence* sequence, bool bAbort, bo
|
||||
{
|
||||
assert(sequence != 0);
|
||||
|
||||
bool bRet = false;
|
||||
PlayingSequences::iterator it;
|
||||
|
||||
if (FindSequence(sequence, it))
|
||||
if (!FindSequence(sequence, it))
|
||||
{
|
||||
if (bAnimate && sequence->IsActivated())
|
||||
{
|
||||
if (m_sequenceStopBehavior == eSSB_GotoEndTime)
|
||||
{
|
||||
SAnimContext ac;
|
||||
ac.singleFrame = true;
|
||||
ac.time = sequence->GetTimeRange().end;
|
||||
sequence->Animate(ac);
|
||||
}
|
||||
else if (m_sequenceStopBehavior == eSSB_GotoStartTime)
|
||||
{
|
||||
SAnimContext ac;
|
||||
ac.singleFrame = true;
|
||||
ac.time = sequence->GetTimeRange().start;
|
||||
sequence->Animate(ac);
|
||||
}
|
||||
|
||||
sequence->Deactivate();
|
||||
}
|
||||
|
||||
// If this sequence is cut scene end it.
|
||||
if (sequence->GetFlags() & IAnimSequence::eSeqFlags_CutScene)
|
||||
{
|
||||
if (!gEnv->IsEditing() || !m_bCutscenesPausedInEditor)
|
||||
{
|
||||
if (m_pUser)
|
||||
{
|
||||
m_pUser->EndCutScene(sequence, sequence->GetCutSceneFlags(true));
|
||||
}
|
||||
}
|
||||
|
||||
sequence->SetParentSequence(NULL);
|
||||
}
|
||||
|
||||
// tell all interested listeners
|
||||
NotifyListeners(sequence, bAbort ? IMovieListener::eMovieEvent_Aborted : IMovieListener::eMovieEvent_Stopped);
|
||||
|
||||
// erase the sequence after notifying listeners so if they choose to they can get the ending time of this sequence
|
||||
if (FindSequence(sequence, it))
|
||||
{
|
||||
m_playingSequences.erase(it);
|
||||
}
|
||||
|
||||
sequence->Resume();
|
||||
static_cast<CAnimSequence*>(sequence)->OnStop();
|
||||
bRet = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return bRet;
|
||||
if (bAnimate && sequence->IsActivated())
|
||||
{
|
||||
if (m_sequenceStopBehavior == eSSB_GotoEndTime)
|
||||
{
|
||||
SAnimContext ac;
|
||||
ac.singleFrame = true;
|
||||
ac.time = sequence->GetTimeRange().end;
|
||||
sequence->Animate(ac);
|
||||
}
|
||||
else if (m_sequenceStopBehavior == eSSB_GotoStartTime)
|
||||
{
|
||||
SAnimContext ac;
|
||||
ac.singleFrame = true;
|
||||
ac.time = sequence->GetTimeRange().start;
|
||||
sequence->Animate(ac);
|
||||
}
|
||||
|
||||
sequence->Deactivate();
|
||||
}
|
||||
|
||||
// If this sequence is cut scene end it.
|
||||
if (sequence->GetFlags() & IAnimSequence::eSeqFlags_CutScene)
|
||||
{
|
||||
if (!gEnv->IsEditing() || !m_bCutscenesPausedInEditor)
|
||||
{
|
||||
if (m_pUser)
|
||||
{
|
||||
m_pUser->EndCutScene(sequence, sequence->GetCutSceneFlags(true));
|
||||
}
|
||||
}
|
||||
|
||||
sequence->SetParentSequence(NULL);
|
||||
}
|
||||
|
||||
// tell all interested listeners
|
||||
NotifyListeners(sequence, bAbort ? IMovieListener::eMovieEvent_Aborted : IMovieListener::eMovieEvent_Stopped);
|
||||
|
||||
// erase the sequence after notifying listeners so if they choose to they can get the ending time of this sequence
|
||||
if (FindSequence(sequence, it))
|
||||
{
|
||||
m_playingSequences.erase(it);
|
||||
}
|
||||
|
||||
sequence->Resume();
|
||||
static_cast<CAnimSequence*>(sequence)->OnStop();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -906,7 +906,7 @@ void CMovieSystem::Reset(bool bPlayOnReset, bool bSeekToStart)
|
||||
InternalStopAllSequences(true, false);
|
||||
|
||||
// Reset all sequences.
|
||||
for (Sequences::iterator iter = m_sequences.begin(); iter != m_sequences.end(); ++iter)
|
||||
for (Sequences::const_iterator iter = m_sequences.cbegin(); iter != m_sequences.cend(); ++iter)
|
||||
{
|
||||
IAnimSequence* pCurrentSequence = iter->get();
|
||||
NotifyListeners(pCurrentSequence, IMovieListener::eMovieEvent_Started);
|
||||
@@ -940,7 +940,7 @@ void CMovieSystem::Reset(bool bPlayOnReset, bool bSeekToStart)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CMovieSystem::PlayOnLoadSequences()
|
||||
{
|
||||
for (Sequences::iterator sit = m_sequences.begin(); sit != m_sequences.end(); ++sit)
|
||||
for (Sequences::const_iterator sit = m_sequences.cbegin(); sit != m_sequences.cend(); ++sit)
|
||||
{
|
||||
IAnimSequence* sequence = sit->get();
|
||||
if (sequence->GetFlags() & IAnimSequence::eSeqFlags_PlayOnReset)
|
||||
@@ -984,16 +984,27 @@ void CMovieSystem::ShowPlayedSequencesDebug()
|
||||
{
|
||||
float y = 10.0f;
|
||||
std::vector<const char*> names;
|
||||
std::vector<float> rows;
|
||||
constexpr f32 green[4] = {0, 1, 0, 1};
|
||||
constexpr f32 purple[4] = {1, 0, 1, 1};
|
||||
constexpr f32 white[4] = {1, 1, 1, 1};
|
||||
|
||||
//TODO: needs an implementation
|
||||
auto Draw2dLabel = [](float /*x*/,float /*y*/,float /*depth*/,const f32* /*color*/,bool /*center*/, const char* /*fmt*/, ...) {};
|
||||
|
||||
for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it)
|
||||
{
|
||||
PlayingSequence& playingSequence = *it;
|
||||
|
||||
if (playingSequence.sequence == NULL)
|
||||
if (playingSequence.sequence == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const char* fullname = playingSequence.sequence->GetName();
|
||||
|
||||
Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed);
|
||||
|
||||
y += 16.0f;
|
||||
|
||||
for (int i = 0; i < playingSequence.sequence->GetNodeCount(); ++i)
|
||||
@@ -1014,9 +1025,10 @@ void CMovieSystem::ShowPlayedSequencesDebug()
|
||||
if (alreadyThere == false)
|
||||
{
|
||||
names.push_back(name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name);
|
||||
}
|
||||
y += 32.0f;
|
||||
}
|
||||
}
|
||||
@@ -1088,7 +1100,8 @@ void CMovieSystem::UpdateInternal(const float deltaTime, const bool bPreUpdate)
|
||||
|
||||
// Skip sequence if current update does not apply
|
||||
const bool bSequenceEarlyUpdate = (playingSequence.sequence->GetFlags() & IAnimSequence::eSeqFlags_EarlyMovieUpdate) != 0;
|
||||
if (bPreUpdate && !bSequenceEarlyUpdate || !bPreUpdate && bSequenceEarlyUpdate)
|
||||
if ((bPreUpdate && !bSequenceEarlyUpdate ) || (!bPreUpdate && bSequenceEarlyUpdate)
|
||||
)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1263,7 +1276,7 @@ void CMovieSystem::PauseCutScenes()
|
||||
{
|
||||
m_bCutscenesPausedInEditor = true;
|
||||
|
||||
if (m_pUser != NULL)
|
||||
if (m_pUser != nullptr)
|
||||
{
|
||||
for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it)
|
||||
{
|
||||
@@ -1285,7 +1298,7 @@ void CMovieSystem::ResumeCutScenes()
|
||||
|
||||
m_bCutscenesPausedInEditor = false;
|
||||
|
||||
if (m_pUser != NULL)
|
||||
if (m_pUser != nullptr)
|
||||
{
|
||||
for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it)
|
||||
{
|
||||
@@ -1475,7 +1488,7 @@ void CMovieSystem::ListSequencesCmd([[maybe_unused]] IConsoleCmdArgs* pArgs)
|
||||
void CMovieSystem::PlaySequencesCmd(IConsoleCmdArgs* pArgs)
|
||||
{
|
||||
const char* sequenceName = pArgs->GetArg(1);
|
||||
gEnv->pMovieSystem->PlaySequence(sequenceName, NULL, false, false);
|
||||
gEnv->pMovieSystem->PlaySequence(sequenceName, nullptr, false, false);
|
||||
}
|
||||
#endif //#if !defined(_RELEASE)
|
||||
|
||||
|
||||
@@ -197,8 +197,8 @@ CAnimSceneNode::CAnimSceneNode(const int id)
|
||||
m_lastCaptureKey = -1;
|
||||
m_bLastCapturingEnded = true;
|
||||
m_captureFrameCount = 0;
|
||||
m_pCamNodeOnHoldForInterp = 0;
|
||||
m_CurrentSelectTrack = 0;
|
||||
m_pCamNodeOnHoldForInterp = nullptr;
|
||||
m_CurrentSelectTrack = nullptr;
|
||||
m_CurrentSelectTrackKeyNumber = 0;
|
||||
m_lastPrecachePoint = -1.f;
|
||||
SetName("Scene");
|
||||
@@ -335,12 +335,12 @@ void CAnimSceneNode::Animate(SAnimContext& ec)
|
||||
return;
|
||||
}
|
||||
|
||||
CSelectTrack* cameraTrack = NULL;
|
||||
CEventTrack* pEventTrack = NULL;
|
||||
CSequenceTrack* pSequenceTrack = NULL;
|
||||
CConsoleTrack* pConsoleTrack = NULL;
|
||||
CGotoTrack* pGotoTrack = NULL;
|
||||
CCaptureTrack* pCaptureTrack = NULL;
|
||||
CSelectTrack* cameraTrack = nullptr;
|
||||
CEventTrack* pEventTrack = nullptr;
|
||||
CSequenceTrack* pSequenceTrack = nullptr;
|
||||
CConsoleTrack* pConsoleTrack = nullptr;
|
||||
CGotoTrack* pGotoTrack = nullptr;
|
||||
CCaptureTrack* pCaptureTrack = nullptr;
|
||||
/*
|
||||
bool bTimeJump = false;
|
||||
if (ec.time < m_time)
|
||||
@@ -449,7 +449,7 @@ void CAnimSceneNode::Animate(SAnimContext& ec)
|
||||
// Check if a camera override is set by CVar
|
||||
const char* overrideCamName = gEnv->pMovieSystem->GetOverrideCamName();
|
||||
AZ::EntityId overrideCamId;
|
||||
if (overrideCamName != 0 && strlen(overrideCamName) > 0)
|
||||
if (overrideCamName != nullptr && strlen(overrideCamName) > 0)
|
||||
{
|
||||
// overriding with a Camera Component entity is done by entityId (as names are not unique among AZ::Entities) - try to convert string to u64 to see if it's an id
|
||||
AZ::u64 u64Id = strtoull(overrideCamName, nullptr, /*base (radix)*/ 10);
|
||||
@@ -784,7 +784,7 @@ void CAnimSceneNode::ApplyCameraKey(ISelectKey& key, SAnimContext& ec)
|
||||
if (!bInterpolateCamera && m_pCamNodeOnHoldForInterp)
|
||||
{
|
||||
m_pCamNodeOnHoldForInterp->SetSkipInterpolatedCameraNode(false);
|
||||
m_pCamNodeOnHoldForInterp = 0;
|
||||
m_pCamNodeOnHoldForInterp = nullptr;
|
||||
}
|
||||
|
||||
SCameraParams cameraParams;
|
||||
@@ -861,9 +861,9 @@ void CAnimSceneNode::ApplyCameraKey(ISelectKey& key, SAnimContext& ec)
|
||||
}
|
||||
|
||||
IAnimNode* prevCameraAnimNode = m_pSequence->FindNodeByName(prevKey.szSelection.c_str(), this);
|
||||
if (prevCameraAnimNode == NULL)
|
||||
if (prevCameraAnimNode == nullptr)
|
||||
{
|
||||
prevCameraAnimNode = m_pSequence->FindNodeByName(prevKey.szSelection.c_str(), NULL);
|
||||
prevCameraAnimNode = m_pSequence->FindNodeByName(prevKey.szSelection.c_str(), nullptr);
|
||||
}
|
||||
|
||||
if (prevCameraAnimNode && prevCameraAnimNode->GetType() == AnimNodeType::Camera && prevCameraAnimNode->GetTrackForParameter(AnimParamType::FOV))
|
||||
@@ -930,35 +930,33 @@ void CAnimSceneNode::ApplyAudioKey(char const* const sTriggerName, bool const bP
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CAnimSceneNode::ApplySequenceKey(IAnimTrack* pTrack, [[maybe_unused]] int nPrevKey, int nCurrKey, ISequenceKey& key, SAnimContext& ec)
|
||||
{
|
||||
if (nCurrKey >= 0)
|
||||
if (nCurrKey < 0)
|
||||
{
|
||||
IAnimSequence* pSequence = GetSequenceFromSequenceKey(key);
|
||||
if (pSequence)
|
||||
{
|
||||
float startTime = -FLT_MAX;
|
||||
float endTime = -FLT_MAX;
|
||||
return;
|
||||
}
|
||||
IAnimSequence* pSequence = GetSequenceFromSequenceKey(key);
|
||||
if (!pSequence)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.bOverrideTimes)
|
||||
{
|
||||
key.fDuration = (key.fEndTime - key.fStartTime) > 0.0f ? (key.fEndTime - key.fStartTime) : 0.0f;
|
||||
startTime = key.fStartTime;
|
||||
endTime = key.fEndTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
key.fDuration = pSequence->GetTimeRange().Length();
|
||||
}
|
||||
if (key.bOverrideTimes)
|
||||
{
|
||||
key.fDuration = (key.fEndTime - key.fStartTime) > 0.0f ? (key.fEndTime - key.fStartTime) : 0.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
key.fDuration = pSequence->GetTimeRange().Length();
|
||||
}
|
||||
|
||||
pTrack->SetKey(nCurrKey, &key);
|
||||
pTrack->SetKey(nCurrKey, &key);
|
||||
|
||||
SAnimContext newAnimContext = ec;
|
||||
newAnimContext.time = std::min(ec.time - key.time + key.fStartTime, key.fDuration + key.fStartTime);
|
||||
SAnimContext newAnimContext = ec;
|
||||
newAnimContext.time = std::min(ec.time - key.time + key.fStartTime, key.fDuration + key.fStartTime);
|
||||
|
||||
if (static_cast<CAnimSequence*>(pSequence)->GetTime() != newAnimContext.time)
|
||||
{
|
||||
pSequence->Animate(newAnimContext);
|
||||
}
|
||||
}
|
||||
if (static_cast<CAnimSequence*>(pSequence)->GetTime() != newAnimContext.time)
|
||||
{
|
||||
pSequence->Animate(newAnimContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,10 +144,7 @@ namespace UnitTest
|
||||
{
|
||||
m_cloth->GetClothConfigurator()->SetTransform(m_clothTransform);
|
||||
|
||||
static float time = 0.0f;
|
||||
static float velocity = 1.0f;
|
||||
|
||||
time += deltaTime;
|
||||
constexpr float velocity = 1.0f;
|
||||
|
||||
for (auto& sphere : m_sphereColliders)
|
||||
{
|
||||
|
||||
@@ -1225,10 +1225,10 @@ namespace PhysX
|
||||
AZ_PROFILE_DATAPOINT(Physics, stats.getNbBroadPhaseRemoves(), RootCategory, BroadphaseSubCategory, "BroadPhaseRemoves");
|
||||
|
||||
// Compute pair stats for all geometry types
|
||||
#if AZ_PROFILE_DATAPOINT
|
||||
AZ::u32 ccdPairs = 0;
|
||||
AZ::u32 modifiedPairs = 0;
|
||||
AZ::u32 triggerPairs = 0;
|
||||
|
||||
for (AZ::u32 i = 0; i < PxGeometryType::eGEOMETRY_COUNT; i++)
|
||||
{
|
||||
// stat[i][j] = stat[j][i], hence, discarding the symmetric entries
|
||||
@@ -1241,6 +1241,7 @@ namespace PhysX
|
||||
triggerPairs += stats.getRbPairStats(physx::PxSimulationStatistics::eTRIGGER_PAIRS, firstGeom, secondGeom);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[[maybe_unused]] const char* CollisionsSubCategory = "Collisions";
|
||||
AZ_PROFILE_DATAPOINT(Physics, ccdPairs, RootCategory, CollisionsSubCategory, "CCDPairs");
|
||||
|
||||
@@ -51,8 +51,6 @@ namespace Twitch
|
||||
|
||||
void TwitchSystemComponent::SetApplicationID(const AZStd::string& twitchApplicationID)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
/*
|
||||
** THIS CAN ONLY BE SET ONCE!!!!!!
|
||||
*/
|
||||
@@ -62,7 +60,6 @@ namespace Twitch
|
||||
if (IsValidTwitchAppID(twitchApplicationID))
|
||||
{
|
||||
m_applicationID = twitchApplicationID;
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user