Cleans up more legacy code from ACE
Rewrote some code to replace gEnv->pCryPak and ISystem usage. One place was grabbing a Camera view from ISystem, replaced with simple identity matrix. Cleaned up include headers. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <AudioControlsEditorWindow.h>
|
||||
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
@@ -18,22 +17,14 @@
|
||||
#include <ATLControlsPanel.h>
|
||||
#include <AudioControlsEditorPlugin.h>
|
||||
#include <AudioControlsEditorUndo.h>
|
||||
#include <AudioFileUtils.h>
|
||||
#include <AudioSystemPanel.h>
|
||||
|
||||
|
||||
#include <DockTitleBarWidget.h>
|
||||
#include <IAudioSystem.h>
|
||||
#include <ImplementationManager.h>
|
||||
#include <InspectorPanel.h>
|
||||
|
||||
|
||||
#include <CryFile.h>
|
||||
#include <CryPath.h>
|
||||
#include <ISystem.h>
|
||||
#include <Util/PathUtil.h>
|
||||
|
||||
#include <QAudioControlEditorIcons.h>
|
||||
|
||||
#include <DockTitleBarWidget.h>
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QPushButton>
|
||||
@@ -41,6 +32,7 @@
|
||||
#include <QPainter>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
void InitACEResources()
|
||||
{
|
||||
Q_INIT_RESOURCE(AudioControlsEditorUI);
|
||||
@@ -116,25 +108,16 @@ namespace AudioControls
|
||||
{
|
||||
m_fileSystemWatcher.addPath(folder.data());
|
||||
|
||||
AZStd::string search;
|
||||
AZ::StringFunc::Path::Join(folder.data(), "*", search, true, false);
|
||||
auto pCryPak = gEnv->pCryPak;
|
||||
AZ::IO::ArchiveFileIterator handle = pCryPak->FindFirst(search.c_str());
|
||||
if (handle)
|
||||
auto fileIO = AZ::IO::FileIOBase::GetInstance();
|
||||
auto foundFiles = Audio::FindFilesInPath(folder, "*");
|
||||
for (auto& file : foundFiles)
|
||||
{
|
||||
do
|
||||
if (fileIO->IsDirectory(file.c_str()))
|
||||
{
|
||||
AZStd::string sName = static_cast<AZStd::string_view>(handle.m_filename);
|
||||
if (!sName.empty() && sName[0] != '.')
|
||||
{
|
||||
if ((handle.m_fileDesc.nAttrib & AZ::IO::FileDesc::Attribute::Subdirectory) == AZ::IO::FileDesc::Attribute::Subdirectory)
|
||||
{
|
||||
AZ::StringFunc::Path::Join(folder.data(), sName.c_str(), sName);
|
||||
StartWatchingFolder(sName);
|
||||
}
|
||||
}
|
||||
} while (handle = pCryPak->FindNext(handle));
|
||||
pCryPak->FindClose(handle);
|
||||
AZ::IO::FixedMaxPath resolvedPath;
|
||||
fileIO->ReplaceAlias(resolvedPath, file);
|
||||
StartWatchingFolder(file.Native());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user