diff --git a/src/Core/CAudioManager.cpp b/src/Core/CAudioManager.cpp new file mode 100644 index 00000000..70b7b049 --- /dev/null +++ b/src/Core/CAudioManager.cpp @@ -0,0 +1,85 @@ +#include "CAudioManager.h" +#include "Core/GameProject/CGameProject.h" +#include "Core/GameProject/CResourceIterator.h" + +CAudioManager::CAudioManager(CGameProject *pProj) + : mpProject(pProj) +{ + ASSERT(mpProject); +} + +void CAudioManager::LoadAssets() +{ + // Clear existing assets + mAudioGroups.clear(); + mpAudioLookupTable = nullptr; + mpSfxNameList = nullptr; + mSfxIdMap.clear(); + + // Load/sort all audio groups + for (TResourceIterator It(mpProject->ResourceStore()); It; ++It) + { + CAudioGroup *pGroup = (CAudioGroup*) It->Load(); + if (pGroup) mAudioGroups.push_back(pGroup); + } + + std::sort(mAudioGroups.begin(), mAudioGroups.end(), [](CAudioGroup *pLeft, CAudioGroup *pRight) -> bool { + return pLeft->GroupID() < pRight->GroupID(); + }); + + // Create SFX Define ID -> AGSC map + for (u32 iGrp = 0; iGrp < mAudioGroups.size(); iGrp++) + { + CAudioGroup *pGroup = mAudioGroups[iGrp]; + + for (u32 iSnd = 0; iSnd < pGroup->NumSoundDefineIDs(); iSnd++) + { + u16 DefineID = pGroup->SoundDefineIDByIndex(iSnd); + ASSERT(mSfxIdMap.find(DefineID) == mSfxIdMap.end()); + mSfxIdMap[DefineID] = pGroup; + } + } + + // Load audio lookup table + sfx name list + TString AudioLookupName = (mpProject->Game() < eEchoesDemo ? "sound_lookup" : "sound_lookup_ATBL"); + CAssetID AudioLookupID = mpProject->FindNamedResource(AudioLookupName); + + if (AudioLookupID.IsValid()) + mpAudioLookupTable = mpProject->ResourceStore()->LoadResource(AudioLookupID, "ATBL"); + + if (mpProject->Game() >= eEchoesDemo) + { + CAssetID SfxNameListID = mpProject->FindNamedResource("audio_name_lookup_STLC"); + + if (SfxNameListID.IsValid()) + mpSfxNameList = mpProject->ResourceStore()->LoadResource(SfxNameListID, "STLC"); + } +} + +void CAudioManager::LogSoundInfo(u32 SoundID) +{ + u16 DefineID = mpAudioLookupTable->FindSoundDefineID(SoundID); + + if (DefineID == -1) + Log::Write("Invalid sound"); + + else + { + auto Iter = mSfxIdMap.find(DefineID); + + if (Iter != mSfxIdMap.end()) + { + if (mpProject->Game() >= eEchoesDemo) + { + TString SoundName = mpSfxNameList->StringByIndex(DefineID); + Log::Write("Sound Name: " + SoundName); + } + + CAudioGroup *pGroup = Iter->second; + Log::Write("Sound ID: " + TString::HexString(SoundID, 4)); + Log::Write("Define ID: " + TString::HexString(DefineID, 4)); + Log::Write("Audio Group: " + pGroup->Entry()->Name().ToUTF8()); + Log::Write(""); + } + } +} diff --git a/src/Core/CAudioManager.h b/src/Core/CAudioManager.h new file mode 100644 index 00000000..d934540d --- /dev/null +++ b/src/Core/CAudioManager.h @@ -0,0 +1,27 @@ +#ifndef CAUDIOMANAGER +#define CAUDIOMANAGER + +#include "Core/Resource/CAudioGroup.h" +#include "Core/Resource/CAudioLookupTable.h" +#include "Core/Resource/CStringList.h" +#include "Core/Resource/TResPtr.h" +#include +#include + +class CAudioManager +{ + CGameProject *mpProject; + + std::vector> mAudioGroups; + TResPtr mpAudioLookupTable; + TResPtr mpSfxNameList; + std::unordered_map mSfxIdMap; + +public: + CAudioManager(CGameProject *pProj); + void LoadAssets(); + void LogSoundInfo(u32 SoundID); +}; + +#endif // CAUDIOMANAGER + diff --git a/src/Core/Core.pro b/src/Core/Core.pro index 315d298f..99acbc51 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -204,7 +204,12 @@ HEADERS += \ Resource/Factory/CUnsupportedParticleLoader.h \ Resource/Resources.h \ Resource/Factory/CResourceFactory.h \ - GameProject/DependencyListBuilders.h + GameProject/DependencyListBuilders.h \ + Resource/CAudioGroup.h \ + Resource/Factory/CAudioGroupLoader.h \ + Resource/CAudioLookupTable.h \ + Resource/CStringList.h \ + CAudioManager.h # Source Files SOURCES += \ @@ -300,4 +305,6 @@ SOURCES += \ GameProject/CDependencyTree.cpp \ Resource/Factory/CUnsupportedFormatLoader.cpp \ Resource/Factory/CUnsupportedParticleLoader.cpp \ - GameProject/DependencyListBuilders.cpp + GameProject/DependencyListBuilders.cpp \ + Resource/Factory/CAudioGroupLoader.cpp \ + CAudioManager.cpp diff --git a/src/Core/GameProject/CGameProject.cpp b/src/Core/GameProject/CGameProject.cpp index 2a922f6b..a47b431e 100644 --- a/src/Core/GameProject/CGameProject.cpp +++ b/src/Core/GameProject/CGameProject.cpp @@ -20,6 +20,7 @@ bool CGameProject::Load(const TWideString& rkPath) Serialize(Reader); mpResourceStore->LoadResourceDatabase(); + mAudioManager.LoadAssets(); return true; } @@ -95,3 +96,26 @@ void CGameProject::GetWorldList(std::list& rOut) const } } } + +CAssetID CGameProject::FindNamedResource(const TString& rkName) const +{ + for (u32 iPkg = 0; iPkg < mPackages.size(); iPkg++) + { + CPackage *pPkg = mPackages[iPkg]; + + for (u32 iCol = 0; iCol < pPkg->NumCollections(); iCol++) + { + CResourceCollection *pCol = pPkg->CollectionByIndex(iCol); + + for (u32 iRes = 0; iRes < pCol->NumResources(); iRes++) + { + const SNamedResource& rkRes = pCol->ResourceByIndex(iRes); + + if (rkRes.Name == rkName) + return rkRes.ID; + } + } + } + + return CAssetID::InvalidID(mGame); +} diff --git a/src/Core/GameProject/CGameProject.h b/src/Core/GameProject/CGameProject.h index 21e35028..90393f9f 100644 --- a/src/Core/GameProject/CGameProject.h +++ b/src/Core/GameProject/CGameProject.h @@ -3,6 +3,7 @@ #include "CPackage.h" #include "CResourceStore.h" +#include "Core/CAudioManager.h" #include #include #include @@ -17,6 +18,7 @@ class CGameProject TWideString mResourceDBPath; std::vector mPackages; CResourceStore *mpResourceStore; + CAudioManager mAudioManager; enum EProjectVersion { @@ -32,6 +34,7 @@ public: CGameProject() : mGame(eUnknownGame) , mProjectName("Unnamed Project") + , mAudioManager(this) { mpResourceStore = new CResourceStore(this); } @@ -41,6 +44,7 @@ public: , mProjectName("Unnamed Project") , mProjectRoot(rkProjRootDir) , mResourceDBPath(L"ResourceDB.rdb") + , mAudioManager(this) { mpResourceStore = new CResourceStore(this); mProjectRoot.Replace(L"/", L"\\"); @@ -53,6 +57,7 @@ public: void Serialize(IArchive& rArc); void SetActive(); void GetWorldList(std::list& rOut) const; + CAssetID FindNamedResource(const TString& rkName) const; // Directory Handling inline TWideString ProjectRoot() const { return mProjectRoot; } @@ -71,6 +76,7 @@ public: inline CPackage* PackageByIndex(u32 Index) const { return mPackages[Index]; } inline void AddPackage(CPackage *pPackage) { mPackages.push_back(pPackage); } inline CResourceStore* ResourceStore() const { return mpResourceStore; } + inline CAudioManager* AudioManager() { return &mAudioManager; } inline EGame Game() const { return mGame; } inline bool IsActive() const { return mspActiveProject == this; } diff --git a/src/Core/GameProject/CResourceIterator.h b/src/Core/GameProject/CResourceIterator.h index ca5a011e..df71ff8d 100644 --- a/src/Core/GameProject/CResourceIterator.h +++ b/src/Core/GameProject/CResourceIterator.h @@ -71,7 +71,11 @@ class TResourceIterator : public CResourceIterator { public: TResourceIterator(CResourceStore *pStore = gpResourceStore) - : CResourceIterator(pStore) {} + : CResourceIterator(pStore) + { + if (mpCurEntry->ResourceType() != ResType::StaticType()) + Next(); + } virtual CResourceEntry* Next() { diff --git a/src/Core/GameProject/DependencyListBuilders.cpp b/src/Core/GameProject/DependencyListBuilders.cpp index 4131c2b4..fa83da1b 100644 --- a/src/Core/GameProject/DependencyListBuilders.cpp +++ b/src/Core/GameProject/DependencyListBuilders.cpp @@ -177,7 +177,7 @@ void CPackageDependencyListBuilder::AddDependency(CResourceEntry *pCurEntry, con // Is this entry valid? bool IsValid = ResType != eMidi && - (ResType != eAudioGroupSet || mGame >= eEchoesDemo) && + (ResType != eAudioGroup || mGame >= eEchoesDemo) && (ResType != eWorld || !pCurEntry) && (ResType != eArea || !pCurEntry || pCurEntry->ResourceType() == eWorld); @@ -359,7 +359,7 @@ void CAreaDependencyListBuilder::AddDependency(const CAssetID& rkID, std::list= eEchoesDemo); + (ResType != eAudioGroup || mGame >= eEchoesDemo); if (!IsValid) return; diff --git a/src/Core/GameProject/DependencyListBuilders.h b/src/Core/GameProject/DependencyListBuilders.h index 529eb08b..49c71653 100644 --- a/src/Core/GameProject/DependencyListBuilders.h +++ b/src/Core/GameProject/DependencyListBuilders.h @@ -2,6 +2,7 @@ #define DEPENDENCYLISTBUILDERS #include "CDependencyTree.h" +#include "CGameProject.h" #include "CPackage.h" #include "CResourceEntry.h" #include "Core/Resource/CDependencyGroup.h" diff --git a/src/Core/Resource/CAudioGroup.h b/src/Core/Resource/CAudioGroup.h new file mode 100644 index 00000000..cb9bffd8 --- /dev/null +++ b/src/Core/Resource/CAudioGroup.h @@ -0,0 +1,30 @@ +#ifndef CAUDIOGROUP +#define CAUDIOGROUP + +#include "CResource.h" + +// Very limited functionality - mostly just intended to find the AGSC that a sound ID belongs to +class CAudioGroup : public CResource +{ + DECLARE_RESOURCE_TYPE(eAudioGroup) + friend class CAudioGroupLoader; + + TString mGroupName; + u32 mGroupID; + std::vector mDefineIDs; + +public: + CAudioGroup(CResourceEntry *pEntry = 0) + : CResource(pEntry) + , mGroupID(-1) + {} + + // Accessors + inline TString GroupName() const { return mGroupName; } + inline u32 GroupID() const { return mGroupID; } + inline u32 NumSoundDefineIDs() const { return mDefineIDs.size(); } + inline u16 SoundDefineIDByIndex(u32 Index) const { return mDefineIDs[Index]; } +}; + +#endif // CAUDIOGROUP + diff --git a/src/Core/Resource/CAudioLookupTable.h b/src/Core/Resource/CAudioLookupTable.h new file mode 100644 index 00000000..ba8f39d9 --- /dev/null +++ b/src/Core/Resource/CAudioLookupTable.h @@ -0,0 +1,25 @@ +#ifndef CAUDIOLOOKUPTABLE +#define CAUDIOLOOKUPTABLE + +#include "CResource.h" + +class CAudioLookupTable : public CResource +{ + DECLARE_RESOURCE_TYPE(eAudioLookupTable) + friend class CAudioGroupLoader; + std::vector mDefineIDs; + +public: + CAudioLookupTable(CResourceEntry *pEntry = 0) + : CResource(pEntry) + {} + + inline u16 FindSoundDefineID(u32 SoundID) + { + ASSERT(SoundID >= 0 && SoundID < mDefineIDs.size()); + return mDefineIDs[SoundID]; + } +}; + +#endif // CAUDIOLOOKUPTABLE + diff --git a/src/Core/Resource/CResource.cpp b/src/Core/Resource/CResource.cpp index bfbbd33e..a9cbda27 100644 --- a/src/Core/Resource/CResource.cpp +++ b/src/Core/Resource/CResource.cpp @@ -53,7 +53,7 @@ TString GetResourceTypeName(EResType Type) case eAreaSurfaceBounds: return "Area Surface Bounds"; case eAreaOctree: return "Area Octree"; case eAreaVisibilityTree: return "Area Visibility Tree"; - case eAudioGroupSet: return "Audio Group Set"; + case eAudioGroup: return "Audio Group Set"; case eAudioMacro: return "Audio Macro"; case eAudioSample: return "Audio Sample"; case eAudioLookupTable: return "Audio Lookup Table"; @@ -177,7 +177,7 @@ TString GetResourceCookedExtension(EResType Type, EGame Game) CResourceTypeRegistrant__##CookedExtension gResourceTypeRegistrant__##CookedExtension; REGISTER_RESOURCE_TYPE(AFSM, eStateMachine, ePrimeDemo, eEchoes) -REGISTER_RESOURCE_TYPE(AGSC, eAudioGroupSet, ePrimeDemo, eCorruptionProto) +REGISTER_RESOURCE_TYPE(AGSC, eAudioGroup, ePrimeDemo, eCorruptionProto) REGISTER_RESOURCE_TYPE(ANCS, eAnimSet, ePrimeDemo, eEchoes) REGISTER_RESOURCE_TYPE(ANIM, eAnimation, ePrimeDemo, eReturns) REGISTER_RESOURCE_TYPE(ATBL, eAudioLookupTable, ePrimeDemo, eCorruption) diff --git a/src/Core/Resource/CStringList.h b/src/Core/Resource/CStringList.h new file mode 100644 index 00000000..f4a4232b --- /dev/null +++ b/src/Core/Resource/CStringList.h @@ -0,0 +1,30 @@ +#ifndef CSTRINGLIST +#define CSTRINGLIST + +#include "CResource.h" + +class CStringList : public CResource +{ + DECLARE_RESOURCE_TYPE(eStringList) + friend class CAudioGroupLoader; + std::vector mStringList; + +public: + CStringList(CResourceEntry *pEntry = 0) + : CResource(pEntry) + {} + + inline u32 NumStrings() const + { + return mStringList.size(); + } + + inline TString StringByIndex(u32 Index) const + { + ASSERT(Index >= 0 && Index < mStringList.size()); + return mStringList[Index]; + } +}; + +#endif // CSTRINGLIST + diff --git a/src/Core/Resource/EResType.h b/src/Core/Resource/EResType.h index 325cfb75..5e61bb74 100644 --- a/src/Core/Resource/EResType.h +++ b/src/Core/Resource/EResType.h @@ -18,7 +18,7 @@ enum EResType eAreaSurfaceBounds, eAreaOctree, eAreaVisibilityTree, - eAudioGroupSet, + eAudioGroup, eAudioMacro, eAudioSample, eAudioLookupTable, diff --git a/src/Core/Resource/Factory/CAudioGroupLoader.cpp b/src/Core/Resource/Factory/CAudioGroupLoader.cpp new file mode 100644 index 00000000..b8464b06 --- /dev/null +++ b/src/Core/Resource/Factory/CAudioGroupLoader.cpp @@ -0,0 +1,78 @@ +#include "CAudioGroupLoader.h" + +CAudioGroup* CAudioGroupLoader::LoadAGSC(IInputStream& rAGSC, CResourceEntry *pEntry) +{ + // For now we only load sound define IDs and the group ID! + // Version check + u32 Check = rAGSC.PeekLong(); + EGame Game = (Check == 0x1 ? eEchoes : ePrime); + CAudioGroup *pOut = new CAudioGroup(pEntry); + + // Read header, navigate to Proj chunk + if (Game == ePrime) + { + rAGSC.ReadString(); + pOut->mGroupName = rAGSC.ReadString(); + u32 PoolSize = rAGSC.ReadLong(); + rAGSC.Seek(PoolSize + 0x4, SEEK_CUR); + } + + else + { + rAGSC.Seek(0x4, SEEK_CUR); + pOut->mGroupName = rAGSC.ReadString(); + pOut->mGroupID = rAGSC.ReadShort(); + u32 PoolSize = rAGSC.ReadLong(); + rAGSC.Seek(0xC + PoolSize, SEEK_CUR); + } + + // Read needed data from the Proj chunk + u32 ProjStart = rAGSC.Tell(); + rAGSC.Seek(0x4, SEEK_CUR); + u16 GroupID = rAGSC.ReadShort(); + u16 GroupType = rAGSC.ReadShort(); + rAGSC.Seek(0x14, SEEK_CUR); + u32 SfxTableStart = rAGSC.ReadLong(); + + if (Game == ePrime) + pOut->mGroupID = GroupID; + else + ASSERT(pOut->mGroupID == GroupID); + + if (GroupType == 1) + { + rAGSC.Seek(ProjStart + SfxTableStart, SEEK_SET); + u16 NumSounds = rAGSC.ReadShort(); + rAGSC.Seek(0x2, SEEK_CUR); + + for (u32 iSfx = 0; iSfx < NumSounds; iSfx++) + { + pOut->mDefineIDs.push_back( rAGSC.ReadShort() ); + rAGSC.Seek(0x8, SEEK_CUR); + } + } + + return pOut; +} + +CAudioLookupTable* CAudioGroupLoader::LoadATBL(IInputStream& rATBL, CResourceEntry *pEntry) +{ + CAudioLookupTable *pOut = new CAudioLookupTable(pEntry); + u32 NumMacroIDs = rATBL.ReadLong(); + + for (u32 iMacro = 0; iMacro < NumMacroIDs; iMacro++) + pOut->mDefineIDs.push_back( rATBL.ReadShort() ); + + return pOut; +} + +CStringList* CAudioGroupLoader::LoadSTLC(IInputStream& rSTLC, CResourceEntry *pEntry) +{ + CStringList *pOut = new CStringList(pEntry); + u32 NumStrings = rSTLC.ReadLong(); + + for (u32 iStr = 0; iStr < NumStrings; iStr++) + pOut->mStringList[iStr] = rSTLC.ReadString(); + + return pOut; +} diff --git a/src/Core/Resource/Factory/CAudioGroupLoader.h b/src/Core/Resource/Factory/CAudioGroupLoader.h new file mode 100644 index 00000000..41d3729a --- /dev/null +++ b/src/Core/Resource/Factory/CAudioGroupLoader.h @@ -0,0 +1,18 @@ +#ifndef CAUDIOGROUPLOADER_H +#define CAUDIOGROUPLOADER_H + +#include "Core/Resource/CAudioGroup.h" +#include "Core/Resource/CAudioLookupTable.h" +#include "Core/Resource/CStringList.h" + +class CAudioGroupLoader +{ + CAudioGroupLoader() {} + +public: + static CAudioGroup* LoadAGSC(IInputStream& rAGSC, CResourceEntry *pEntry); + static CAudioLookupTable* LoadATBL(IInputStream& rATBL, CResourceEntry *pEntry); + static CStringList* LoadSTLC(IInputStream& rSTLC, CResourceEntry *pEntry); +}; + +#endif // CAUDIOGROUPLOADER_H diff --git a/src/Core/Resource/Factory/CResourceFactory.h b/src/Core/Resource/Factory/CResourceFactory.h index 22628559..74d95133 100644 --- a/src/Core/Resource/Factory/CResourceFactory.h +++ b/src/Core/Resource/Factory/CResourceFactory.h @@ -4,6 +4,7 @@ #include "CAnimationLoader.h" #include "CAnimSetLoader.h" #include "CAreaLoader.h" +#include "CAudioGroupLoader.h" #include "CCollisionLoader.h" #include "CDependencyGroupLoader.h" #include "CFontLoader.h" @@ -35,6 +36,8 @@ public: case eAnimation: return new CAnimation(pEntry); case eAnimSet: return new CAnimSet(pEntry); case eArea: return new CGameArea(pEntry); + case eAudioGroup: return new CAudioGroup(pEntry); + case eAudioLookupTable: return new CAudioLookupTable(pEntry); case eDynamicCollision: return new CCollisionMeshGroup(pEntry); case eDependencyGroup: return new CDependencyGroup(pEntry); case eFont: return new CFont(pEntry); @@ -43,6 +46,7 @@ public: case eSkeleton: return new CSkeleton(pEntry); case eSkin: return new CSkin(pEntry); case eStaticGeometryMap: return new CPoiToWorld(pEntry); + case eStringList: return new CStringList(pEntry); case eStringTable: return new CStringTable(pEntry); case eTexture: return new CTexture(pEntry); case eWorld: return new CWorld(pEntry); @@ -54,7 +58,6 @@ public: { // Warning: It is the caller's responsibility to check if the required resource is already in memory before calling this function. if (!rInput.IsValid()) return nullptr; - CResource *pRes = nullptr; switch (pEntry->ResourceType()) @@ -63,6 +66,8 @@ public: case eAnimEventData: pRes = CUnsupportedFormatLoader::LoadEVNT(rInput, pEntry); break; case eAnimSet: pRes = CAnimSetLoader::LoadANCSOrCHAR(rInput, pEntry); break; case eArea: pRes = CAreaLoader::LoadMREA(rInput, pEntry); break; + case eAudioGroup: pRes = CAudioGroupLoader::LoadAGSC(rInput, pEntry); break; + case eAudioLookupTable: pRes = CAudioGroupLoader::LoadATBL(rInput, pEntry); break; case eDependencyGroup: pRes = CDependencyGroupLoader::LoadDGRP(rInput, pEntry); break; case eDynamicCollision: pRes = CCollisionLoader::LoadDCLN(rInput, pEntry); break; case eFont: pRes = CFontLoader::LoadFONT(rInput, pEntry); break; @@ -78,6 +83,7 @@ public: case eSkin: pRes = CSkinLoader::LoadCSKR(rInput, pEntry); break; case eStateMachine2: pRes = CUnsupportedFormatLoader::LoadFSM2(rInput, pEntry); break; case eStaticGeometryMap: pRes = CPoiToWorldLoader::LoadEGMC(rInput, pEntry); break; + case eStringList: pRes = CAudioGroupLoader::LoadSTLC(rInput, pEntry); break; case eStringTable: pRes = CStringLoader::LoadSTRG(rInput, pEntry); break; case eTexture: pRes = CTextureDecoder::LoadTXTR(rInput, pEntry); break; case eWorld: pRes = CWorldLoader::LoadMLVL(rInput, pEntry); break; diff --git a/src/Core/Resource/TResPtr.h b/src/Core/Resource/TResPtr.h index edc8eecd..fc26c87f 100644 --- a/src/Core/Resource/TResPtr.h +++ b/src/Core/Resource/TResPtr.h @@ -2,7 +2,6 @@ #define TRESPTR_H #include "CResource.h" -#include "Core/GameProject/CGameProject.h" template class TResPtr diff --git a/src/Editor/TestDialog.cpp b/src/Editor/TestDialog.cpp index 50c65ac5..83e42aed 100644 --- a/src/Editor/TestDialog.cpp +++ b/src/Editor/TestDialog.cpp @@ -1,14 +1,36 @@ #include "TestDialog.h" #include "ui_TestDialog.h" +#include TestDialog::TestDialog(QWidget *pParent) : QDialog(pParent) , ui(new Ui::TestDialog) { ui->setupUi(this); + connect(ui->spinBox, SIGNAL(valueChanged(int)), this, SLOT(OnSpinBoxChanged(int))); + connect(ui->spinBox_2, SIGNAL(valueChanged(int)), this, SLOT(OnSpinBoxChanged(int))); + connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(OnFind())); } TestDialog::~TestDialog() { delete ui; } + +void TestDialog::OnSpinBoxChanged(int NewValue) +{ + if (sender() != ui->spinBox) ui->spinBox->setValue(NewValue); + if (sender() != ui->spinBox_2) ui->spinBox_2->setValue(NewValue); +} + +void TestDialog::OnFind() +{ + u32 SoundID = ui->spinBox->value(); + CGameProject *pProj = CGameProject::ActiveProject(); + + if (pProj) + { + CAudioManager *pAudioMgr = pProj->AudioManager(); + pAudioMgr->LogSoundInfo(SoundID); + } +} diff --git a/src/Editor/TestDialog.h b/src/Editor/TestDialog.h index 6aadf993..82256027 100644 --- a/src/Editor/TestDialog.h +++ b/src/Editor/TestDialog.h @@ -2,7 +2,6 @@ #define TESTDIALOG_H #include -#include "Editor/PropertyEdit/CPropertyModel.h" namespace Ui { class TestDialog; @@ -11,12 +10,15 @@ class TestDialog; class TestDialog : public QDialog { Q_OBJECT - CPropertyModel *mpModel; public: explicit TestDialog(QWidget *pParent = 0); ~TestDialog(); +public slots: + void OnSpinBoxChanged(int NewValue); + void OnFind(); + private: Ui::TestDialog *ui; }; diff --git a/src/Editor/TestDialog.ui b/src/Editor/TestDialog.ui index 57185d2d..da1c123e 100644 --- a/src/Editor/TestDialog.ui +++ b/src/Editor/TestDialog.ui @@ -6,8 +6,8 @@ 0 0 - 300 - 535 + 238 + 43 @@ -15,38 +15,47 @@ - - - - 10 - - - - QAbstractItemView::AllEditTriggers - - - true - - - QAbstractItemView::NoSelection - - - QAbstractItemView::ScrollPerPixel - - - false - - + + + + + + 1 + 0 + + + + 65536 + + + + + + + + 1 + 0 + + + + 65536 + + + 16 + + + + + + + Find + + + + - - - CPropertyView - QTreeView -
Editor/PropertyEdit/CPropertyView.h
-
-